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

[cs] invalidate fragment boundaries inside struct definition

I checked in the following compile server patch, which is needed to let the enter.exit-fragment handling (in c-common.c) know that we are inside a struct definition, and prevent a fragment that stradles the struct.
--Per Bothner

2003-11-07  Per Bothner  <>

	* c-decl.c (start_struct):  Increment currently_nested.
	(finish_struct):  Decrement currently_nested.

Index: c-decl.c
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.417.2.5
diff -u -p -r1.417.2.5 c-decl.c
--- c-decl.c	12 Sep 2003 22:19:54 -0000	1.417.2.5
+++ c-decl.c	7 Nov 2003 20:33:36 -0000
@@ -4884,6 +4884,9 @@ start_struct (enum tree_code code, tree 
   note_tag (ref);
   C_TYPE_BEING_DEFINED (ref) = 1;
   TYPE_PACKED (ref) = flag_pack_struct;
+  currently_nested++;
   return ref;
@@ -5023,6 +5026,8 @@ finish_struct (tree t, tree fieldlist, t
   tree x;
   int toplevel = global_scope == current_scope;
   int saw_named_field;
+  currently_nested--;
   /* If this type was previously laid out as a forward reference,
      make sure we lay it out again.  */

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