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]

[incremental] Patch: FYI: fix hole in c_token


I'm checking this in on the incremental-compiler branch.

When I added the user_owned field to c_token, I increased its size by
a whole word.  This patch fixes the problem by reducing the width of
the pragma_kind field.

Tom

ChangeLog:
2007-11-12  Tom Tromey  <tromey@redhat.com>

	* c-pragma.c (c_register_pragma_1): Update.
	* c-parser.c (c_token) <pragma_kind>: Use 6 bits, not 7.

Index: c-pragma.c
===================================================================
--- c-pragma.c	(revision 130053)
+++ c-pragma.c	(working copy)
@@ -885,7 +885,7 @@
   id += PRAGMA_FIRST_EXTERNAL - 1;
 
   /* The C++ front end allocates 6 bits in cp_token; the C front end
-     allocates 7 bits in c_token.  At present this is sufficient.  */
+     allocates 6 bits in c_token.  At present this is sufficient.  */
   gcc_assert (id < 64);
 
   cpp_register_deferred_pragma (parse_in, space, name, id,
Index: c-parser.c
===================================================================
--- c-parser.c	(revision 130057)
+++ c-parser.c	(working copy)
@@ -257,7 +257,7 @@
   ENUM_BITFIELD (rid) keyword : 8;
   /* If this token is a CPP_PRAGMA, this indicates the pragma that
      was seen.  Otherwise it is PRAGMA_NONE.  */
-  ENUM_BITFIELD (pragma_kind) pragma_kind : 7;
+  ENUM_BITFIELD (pragma_kind) pragma_kind : 6;
   /* True if this token is from a system header.  */
   BOOL_BITFIELD in_system_header : 1;
   /* True if this token comes from a header owned by the user.  */


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