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]

catch wandering GTY markers


This patch catches GTY markers which aren't understood by gengtype,
and fixes a case that it found.

Bootstrapped & tested on powerpc-darwin.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-straygty.patch========================
2004-05-31  Geoffrey Keating  <geoffk@apple.com>

	* gengtype-lex.l: Catch stray GTY markers in the files gengtype
	looks at.
	* alias.c (alias_invariant_size): Make alias_invariant_size
	static, fix GTY marker.

Index: gengtype-lex.l
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gengtype-lex.l,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 gengtype-lex.l
--- gengtype-lex.l	30 May 2004 00:49:06 -0000	1.20
+++ gengtype-lex.l	31 May 2004 19:46:11 -0000
@@ -333,6 +333,11 @@ ITYPE	{IWORD}({WS}{IWORD})*
 		 "unterminated comment or string; unexpected EOF");
 }
 
+^"#define"{WS}"GTY(" /* do nothing */
+{WS}"GTY"{WS}?"("	{
+  error_at_line (&lexer_line, "stray GTY marker");
+}
+
 %%
 
 void
Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.225
diff -u -p -u -p -r1.225 alias.c
--- alias.c	25 May 2004 18:10:41 -0000	1.225
+++ alias.c	31 May 2004 19:46:11 -0000
@@ -182,7 +182,7 @@ static GTY (()) rtx static_reg_base_valu
    Because this array contains only pseudo registers it has no effect
    after reload.  */
 static GTY((length("alias_invariant_size"))) rtx *alias_invariant;
-unsigned GTY(()) int alias_invariant_size;
+static GTY(()) unsigned int alias_invariant_size;
 
 /* Vector indexed by N giving the initial (unchanging) value known for
    pseudo-register N.  This array is initialized in init_alias_analysis,
============================================================


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