File 0004-c-parse.in-structsp_attr-Fix-for-bison-2.4.1-pedantr.patch of Package gcc3

From 3c0a8a54619167ccabad2803ba741e98cc428410 Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 2 Nov 2009 22:14:49 +0000
Subject: [PATCH 3/3] 	* c-parse.in (structsp_attr): Fix for bison 2.4.1
 pedantry.

git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch@153828 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog  | 4 ++++
 gcc/c-parse.in | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d17872f..a899efb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-02  Jason Merrill  <jason@redhat.com>
+
+	* c-parse.in (structsp_attr): Fix for bison 2.4.1 pedantry.
+
 2006-04-25  Nick Clifton  <nickc@redhat.com>
 
 	* config/m32r/m32r.c (gen_compare): Fix reg/smallconst equal code,
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 66d27ac..35bc3f8 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -1730,7 +1730,7 @@ enum_head:
 
 structsp_attr:
 	  struct_head identifier '{'
-		{ $$ = start_struct (RECORD_TYPE, $2);
+		{ $<ttype>$ = start_struct (RECORD_TYPE, $2);
 		  /* Start scope of tag before parsing components.  */
 		}
 	  component_decl_list '}' maybe_attribute
@@ -1741,7 +1741,7 @@ structsp_attr:
 				      nreverse ($3), chainon ($1, $5));
 		}
 	| union_head identifier '{'
-		{ $$ = start_struct (UNION_TYPE, $2); }
+		{ $<ttype>$ = start_struct (UNION_TYPE, $2); }
 	  component_decl_list '}' maybe_attribute
 		{ $$ = finish_struct ($<ttype>4, nreverse ($5),
 				      chainon ($1, $7)); }
@@ -1750,12 +1750,12 @@ structsp_attr:
 				      nreverse ($3), chainon ($1, $5));
 		}
 	| enum_head identifier '{'
-		{ $$ = start_enum ($2); }
+		{ $<ttype>$ = start_enum ($2); }
 	  enumlist maybecomma_warn '}' maybe_attribute
 		{ $$ = finish_enum ($<ttype>4, nreverse ($5),
 				    chainon ($1, $8)); }
 	| enum_head '{'
-		{ $$ = start_enum (NULL_TREE); }
+		{ $<ttype>$ = start_enum (NULL_TREE); }
 	  enumlist maybecomma_warn '}' maybe_attribute
 		{ $$ = finish_enum ($<ttype>3, nreverse ($4),
 				    chainon ($1, $7)); }
-- 
1.8.4.5
openSUSE Build Service is sponsored by