This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/71115] Missing warning: excess elements in struct initializer


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]