https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79084

            Bug ID: 79084
           Summary: No warning for implicit double with complex specifier
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <complex.h>
complex c;

This doesn't issue the expected pedwarn when compiled with -Wpedantic, because
the "complex" macro is defined in a system header.

With -Wsystem-headers you do get a warning:

In file included from c.c:1:0:
c.c:2:1: warning: ISO C does not support plain ‘complex’ meaning ‘double
complex’ [-Wpedantic]
 complex c;
 ^

As the location (c.c:2:1) is not in a system header the warning should not be
suppressed. When user code misuses a macro defined in a system header that is
not system code, and should not be suppressed.

Reply via email to