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 preprocessor/16358] New: -Wno-system-headers hides warning caused by user header vs system header conflict


Consider the code

  #define BLOCK_SIZE 4096
  #include <linux/fs.h>

The header re#defines BLOCK_SIZE. Now, -Wno-system-headers suppresses the
warning as it comes in a system header, and the result is that BLOCK_SIZE is
silently redefined to 1024.

This can probably be fixed by considering all sources of a multi-source warning
(like symbol redefinition) when checking whether to suppress the warning or not.

-- 
           Summary: -Wno-system-headers hides warning caused by user header
                    vs system header conflict
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: avi at exanet dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16358


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