This is the mail archive of the gcc-patches@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]

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


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