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]

Re: ggc_free


On Sun, Jan 25, 2004 at 11:58:03AM +0100, Jan Hubicka wrote:
> The testcase is:
> 
> __extension__ extern __inline long long int
> strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
> 		  int __base)
> {
> 	  return __strtoll_internal (__nptr, __endptr, __base, 0);
> }

Ok, this makes sense.

A better fix, I think, is to put an integer onto the parse stack rather 
than any sort of allocated widget at all.  No telling why I approved 
this change in the first place -- I must have been drunk or something...

Anyway, the problem originally reported, 

  http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00586.html

still passes with this backed out.



r~


	* c-parse.in (extension): Use itype.
	(SAVE_EXT_FLAGS): Don't allocate a tree.
	(RESTORE_EXT_FLAGS): Don't read a tree.

Inde: c-parse.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v
retrieving revision 1.195
diff -u -p -u -r1.195 c-parse.in
--- c-parse.in	22 Jan 2004 10:52:18 -0000	1.195
+++ c-parse.in	25 Jan 2004 18:46:44 -0000
@@ -204,7 +204,7 @@ do {									\
 %type <ttype> init maybeasm
 %type <ttype> asm_operands nonnull_asm_operands asm_operand asm_clobbers
 %type <ttype> maybe_attribute attributes attribute attribute_list attrib
-%type <ttype> any_word extension
+%type <ttype> any_word
 
 %type <ttype> compstmt compstmt_start compstmt_nostart compstmt_primary_start
 %type <ttype> do_stmt_start poplevel stmt label
@@ -230,7 +230,7 @@ do {									\
 %type <ttype> parmlist_or_identifiers parmlist_or_identifiers_1
 %type <ttype> identifiers_or_typenames
 
-%type <itype> setspecs setspecs_fp
+%type <itype> setspecs setspecs_fp extension
 
 %type <location> save_location
 
@@ -295,15 +295,14 @@ static GTY(()) tree declspec_stack;
 
 /* For __extension__, save/restore the warning flags which are
    controlled by __extension__.  */
-#define SAVE_EXT_FLAGS()			\
-	size_int (pedantic			\
-		  | (warn_pointer_arith << 1)	\
-		  | (warn_traditional << 2)	\
-		  | (flag_iso << 3))
+#define SAVE_EXT_FLAGS()		\
+	(pedantic			\
+	 | (warn_pointer_arith << 1)	\
+	 | (warn_traditional << 2)	\
+	 | (flag_iso << 3))
 
-#define RESTORE_EXT_FLAGS(tval)			\
+#define RESTORE_EXT_FLAGS(val)			\
   do {						\
-    int val = tree_low_cst (tval, 0);		\
     pedantic = val & 1;				\
     warn_pointer_arith = (val >> 1) & 1;	\
     warn_traditional = (val >> 2) & 1;		\


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