This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix pedwarn generated while in system headers
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 11 Dec 2005 10:59:16 -0500 (EST)
- Subject: [patch] Fix pedwarn generated while in system headers
The enclosed patch fixes PR 25171. Tested on hppa2.0w-hp-hpux11.11
and hppa64-hp-hpux11.11.
Ok for 4.1 and 4.2?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-12-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/25171
* c-decl.c (check_bitfield_type_and_width): Don't issue pedwarn "type
of bit-field" when in system header.
Index: c-decl.c
===================================================================
--- c-decl.c (revision 108374)
+++ c-decl.c (working copy)
@@ -3748,6 +3748,7 @@
type_mv = TYPE_MAIN_VARIANT (*type);
if (pedantic
+ && !in_system_header
&& type_mv != integer_type_node
&& type_mv != unsigned_type_node
&& type_mv != boolean_type_node)