This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/16358] New: -Wno-system-headers hides warning caused by user header vs system header conflict
- From: "avi at exanet dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2004 08:05:15 -0000
- Subject: [Bug preprocessor/16358] New: -Wno-system-headers hides warning caused by user header vs system header conflict
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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