This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/50871] libstdc++ should be built with -Wpedantic and/or -Wsystem-headers
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Nov 2017 18:36:09 +0000
- Subject: [Bug libstdc++/50871] libstdc++ should be built with -Wpedantic and/or -Wsystem-headers
- Auto-submitted: auto-generated
- References: <bug-50871-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50871
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #14)
> It's better than what we have today, but I'm not sure it's where we want to
> get to in the long term.
>
> I've been trying a patch that allows the system_header pragma to be
> disabled when building and testing.
How about using
#pragma GCC diagnostic warning "-Wsystem-headers"
instead?
> This causes testsuite failures due to
> warnings that can't be controlled by options or diagnostic pragmas:
>
> /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/cmath:
> 47: error: #include_next is a GCC extension
Maybe leave off -Wpedantic for now.
> /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/
> complex:1951: warning: floating point suffix 'if' shadowed by implementation
This seems like a real issue. Perhaps for C++14 and up we should disable the
built-in complex suffixes.