This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/71115] Missing warning: excess elements in struct initializer
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 May 2016 20:16:33 +0000
- Subject: [Bug c/71115] Missing warning: excess elements in struct initializer
- Auto-submitted: auto-generated
- References: <bug-71115-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71115
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #6 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #5)
> Confirmed. Similarly to other bug reports involving warnings and macros
> defined in system headers this too is caused by -Wno-system-headers and the
> macro NULL being defined in system headers.
Perhaps this is relevant (from https://gcc.gnu.org/wiki/DiagnosticsGuidelines)
In cases where we want to emit diagnostics about a token that is located in a
macro that is itself defined in system header, for example, for the NULL macro,
using the original location of the token will suppress the diagnostic (unless
-Wsystem-header). Instead, one should use:
source_location loc =
expansion_point_location_if_in_system_header (original_location);