[pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

Eli Schwartz eschwartz at archlinux.org
Thu Mar 26 20:42:36 UTC 2020

On 3/26/20 3:32 PM, Anatol Pomozov wrote:
> Hello
> In this case I would like to propose to move forward with my original
> patch and enable 'pedantic' warning level by default. It will match
> the flag with the Makefile based build.
The original patch did not clarify this was about parity with autotools.
I've looked around a bit and my conclusions are as follows:

- We always defaulted to -pedantic -D_GNU_SOURCE -Wall in autotools,
  plus additional flags if --enable-warningflags

- meson will, with warning_level 3, add -Wall -Wextra -Wpedantic, which
  means this patch would add the heretofore-unseen -Wextra
  (warning_level 1 only adds -Wall, 2 adds -Wall -Wextra, no option is
  available for those who like -Wpedantic but don't want -Wextra)

Since autotools unconditionally added these flags, parity suggests
always adding them in meson too. Do we care about -Wextra? We currently
build with -Wextra without warnings being emitted, anyway.

If -Wextra is fine then we can just take this current patch, but amend
it to add -Wextra to configure.ac near

if test "x$debug" = "xyes" ; then

Anatol, can you also update the commit message to mention that this is
implementing parity with the default autotools warning level?

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20200326/1f3e276b/attachment.sig>

More information about the pacman-dev mailing list