From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Sutou Kouhei <kou(at)clear-code(dot)com> |
Cc: | peter(at)eisentraut(dot)org, tristan(at)neon(dot)tech, michael(at)paquier(dot)xyz, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: meson: Specify -Wformat as a common warning flag for extensions |
Date: | 2024-04-07 23:26:35 |
Message-ID: | 20240407232635.fq4kc5556lahaoej@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2024-03-15 18:36:55 +0900, Sutou Kouhei wrote:
> +warning_level = get_option('warning_level')
> +# See https://mesonbuild.com/Builtin-options.html#details-for-warning_level for
> +# warning_level values.
> +if warning_level == '1'
> + common_builtin_flags += ['-Wall', '/W2']
> +elif warning_level == '2'
> + common_builtin_flags += ['-Wall', '-Wextra', '/W3']
> +elif warning_level == '3'
> + common_builtin_flags += ['-Wall', '-Wextra', '-Wpedantic', '/W4']
> +elif warning_level == 'everything'
> + common_builtin_flags += ['-Weverything', '/Wall']
> +endif
> +cflags_builtin = cc.get_supported_arguments(common_builtin_flags)
> +if llvm.found()
> + cxxflags_builtin = cpp.get_supported_arguments(common_builtin_flags)
> +endif
This seems like a fair amount of extra configure tests. Particularly because
/W* isn't ever interesting for Makefile.global - they're msvc flags - because
you can't use that with msvc.
I'm also doubtful that it's worth supporting warning_level=3/everything, you
end up with a completely flood of warnings that way.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2024-04-07 23:31:36 | Re: Table AM Interface Enhancements |
Previous Message | Alexander Korotkov | 2024-04-07 23:25:17 | Re: Table AM Interface Enhancements |