SOURCES: cilk-update.patch (NEW) - md5: 74acadad4fa904407b6d1a3b2f...

sparky sparky at pld-linux.org
Sat Jan 21 15:11:51 CET 2006


Author: sparky                       Date: Sat Jan 21 14:11:51 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- md5: 74acadad4fa904407b6d1a3b2f1894b2
- warning: it big, 250Kb
- update, now it works with glibc headers

---- Files affected:
SOURCES:
   cilk-update.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/cilk-update.patch
diff -u /dev/null SOURCES/cilk-update.patch:1.1
--- /dev/null	Sat Jan 21 15:11:51 2006
+++ SOURCES/cilk-update.patch	Sat Jan 21 15:11:46 2006
@@ -0,0 +1,6637 @@
+diff -Nur 5.4.2.2/Makefile.am current.Bug188/Makefile.am
+--- 5.4.2.2/Makefile.am	2004-10-23 03:26:49.000000000 +0000
++++ current.Bug188/Makefile.am	2005-09-27 03:59:00.000000000 +0000
+@@ -1,3 +1,4 @@
++ACLOCAL_AMFLAGS = -I m4dir
+ SUBDIRS = cilk2c runtime support examples doc FAQ
+ EXTRA_DIST = THANKS bootstrap.sh
+ 
+diff -Nur 5.4.2.2/Makefile.in current.Bug188/Makefile.in
+--- 5.4.2.2/Makefile.in	2004-10-23 03:26:12.000000000 +0000
++++ current.Bug188/Makefile.in	2005-10-05 16:47:46.000000000 +0000
+@@ -104,6 +104,7 @@
+ am__include = @am__include@
+ am__quote = @am__quote@
+ install_sh = @install_sh@
++ACLOCAL_AMFLAGS = -I m4dir
+ SUBDIRS = cilk2c runtime support examples doc FAQ
+ EXTRA_DIST = THANKS bootstrap.sh
+ 
+@@ -144,7 +145,7 @@
+ $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ 	cd $(srcdir) && $(AUTOCONF)
+ 
+-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4
++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4 m4dir/acx_pthread.m4
+ 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ 
+ config.h: stamp-h1
+diff -Nur 5.4.2.2/SVN_VERSION current.Bug188/SVN_VERSION
+--- 5.4.2.2/SVN_VERSION	2004-10-23 03:27:43.000000000 +0000
++++ current.Bug188/SVN_VERSION	2005-10-25 01:30:04.000000000 +0000
+@@ -1 +1 @@
+-1708
++2560
+diff -Nur 5.4.2.2/cilk2c/ANSI-C.y current.Bug188/cilk2c/ANSI-C.y
+--- 5.4.2.2/cilk2c/ANSI-C.y	2004-10-23 03:26:43.000000000 +0000
++++ current.Bug188/cilk2c/ANSI-C.y	2005-10-25 01:28:54.000000000 +0000
+@@ -104,11 +104,9 @@
+ #include "stringParse.h"
+  
+ FILE_IDENTITY(ident_ansi_c_y,
+-	      "$HeadURL: https://bradley.lcs.mit.edu/svn/repos/cilk/5.4.2.2/cilk2c/ANSI-C.y $ $LastChangedBy: bradley $ $Rev: 1708 $ $Date$");
++	      "$HeadURL: https://bradley.csail.mit.edu/svn/repos/cilk/current.Bug188/cilk2c/ANSI-C.y $ $LastChangedBy: bradley $ $Rev: 2561 $ $Date$");
+ 
+-#ifndef YYDEBUG
+ int yydebug=0;
+-#endif
+ 
+ extern int yylex(void);
+ PRIVATE void WarnAboutPrecedence(OpType op, Node *node);
+@@ -191,7 +189,7 @@
+ ...
+ 
+ */
+-
++/* %debug */
+ 
+ %union {
+     Node      *n;
+@@ -318,10 +316,10 @@
+ %type <n> logical.AND.expression logical.OR.expression conditional.expression
+ %type <n> assignment.expression constant.expression expression.opt
+ %type <L> attributes.opt attributes attribute attribute.list 
+-%type <n> attrib any.word asm.opt
++%type <n> attrib any.word asm.opt asm
+ 
+ %type <n> initializer.opt initializer basic.initializer initializer.list bracketed.initializer.list
+-%type <n> bit.field.size.opt bit.field.size enumerator.value.opt
++%type <n> bit.field.size enumerator.value.opt
+ 
+ %type <n> statement labeled.statement expression.statement
+ %type <n> selection.statement iteration.statement jump.statement
+@@ -334,7 +332,7 @@
+ %type <n> postfixing.abstract.declarator array.abstract.declarator
+ %type <n> postfix.abstract.declarator old.function.declarator
+ %type <n> struct.or.union.specifier struct.or.union elaborated.type.name
+-%type <n> sue.type.specifier sue.declaration.specifier enum.specifier
++%type <n> sue.type.specifier sue.type.specifier.noatt sue.declaration.specifier enum.specifier
+ 
+ %type <n> parameter.declaration
+ %type <n> identifier.declarator parameter.typedef.declarator
+@@ -357,10 +355,10 @@
+ %type <n> identifier.or.typedef.name
+ 
+ %type <tq> type.qualifier type.qualifier.list declaration.qualifier.list
+-%type <tq> declaration.qualifier storage.class
++%type <tq> declaration.qualifier storage.class storage.class.noatt
+ %type <tq> pointer.type.qualifier pointer.type.qualifier.list
+ 
+-%type <n>  basic.type.name
++%type <n>  basic.type.name basic.type.name.noatt
+ 
+ /* GCC extensions */
+ %token <tok> ASM
+@@ -728,12 +726,16 @@
+  * These rules were just moved from the function.definition: rule.  -KHR
+  */
+         | declaration.specifier identifier.declarator
+-            { $2 = DefineProc(FALSE, SetDeclType($2, $1, Redecl)); }
++            {
++	      Node *decl = SetDeclType($2, $1, Redecl);
++	      $2 = DefineProc(FALSE, decl);
++	    }
+           compound.statement.no.new.scope
+             { $$ = MakeNewList(SetProcBody($2, $4)); }
+         | type.specifier identifier.declarator
+ 	    {
+-	      $2 = DefineProc(FALSE, SetDeclType($2, $1, Redecl));
++	      Node *decl = SetDeclType($2, $1, Redecl);
++	      $2 = DefineProc(FALSE, decl);
+ 	      $2->pragmas_before = GrabPragmas(0);
+ 	    }
+           compound.statement.no.new.scope
+@@ -751,19 +753,49 @@
+             { 
+ 	      SetDeclType($2, $1, Redecl);
+ 	    }
+-          asm.opt { SetDeclAsm($2, $4); }
+-          attributes.opt { AppendDeclAttribs($2, $6); }
++          asm { SetDeclAsm($2, $4); }
++          attributes.opt { SetDeclAttribs($2, $6); }
+           initializer.opt
+             { 
+               $$ = MakeNewList(SetDeclInit($2, $8)); 
+             }
++        | declaration.specifier
++          declarator
++            { 
++	      SetDeclType($2, $1, Redecl);
++	    }
++          attributes.opt
++            {
++		SetDeclAttribs($2, $4);
++            }
++          initializer.opt
++            { 
++	      //SetDeclAttribs($2, $4);
++              $$ = MakeNewList(SetDeclInit($2, $6)); 
++            }
++        | type.specifier 
++          declarator 
++            { 
++	      //printf("%s:%d ", __FILE__, __LINE__); DPN($2); 
++              SetDeclType($2, $1, Redecl);
++	      //printf("%s:%d ", __FILE__, __LINE__); DPN($2); 
++            }
++          attributes.opt
++          initializer.opt
++            { 
++	      //printf("%s:%d ", __FILE__, __LINE__); DPN($2); 
++	      SetDeclAttribs($2, $4);
++	      //printf("%s:%d ", __FILE__, __LINE__); DPN($2); 
++              $$ = MakeNewList(SetDeclInit($2, $5)); 
++	      //printf("%s:%d ", __FILE__, __LINE__); DPL($$); 
++	    }
+         | type.specifier 
+           declarator 
+             { 
+               SetDeclType($2, $1, Redecl);
+             }
+-          asm.opt { SetDeclAsm($2, $4); }
+-          attributes.opt { AppendDeclAttribs($2, $6); }
++          asm { SetDeclAsm($2, $4); }
++          attributes.opt { SetDeclAttribs($2, $6); }
+           initializer.opt
+             { 
+               $$ = MakeNewList(SetDeclInit($2, $8)); 
+@@ -773,10 +805,14 @@
+ 	      $$ = AppendDecl($1, $3, Redecl);
+ 	    }
+           asm.opt { SetDeclAsm($3, $5); }
+-          attributes.opt { AppendDeclAttribs($3, $7); }
++          attributes.opt { SetDeclAttribs($3, $7); }
+           initializer.opt
+             { 
+               SetDeclInit($3, $9); 
++	      if (yydebug) {
++		  printf("%s:%d ", __FILE__, __LINE__); DPL($7); 
++		  printf("%s:%d ", __FILE__, __LINE__); DPN($3);
++	      }
+             }
+ 
+         /******** ERROR PRODUCTIONS ********/
+@@ -813,7 +849,9 @@
+             { 
+               SetDeclType($2, MakeDefaultPrimType($1.tq, $1.coord), NoRedecl);
+             }
+-          attributes.opt { SetDeclAttribs($2, $4); }
++          attributes.opt {
++              SetDeclAttribs($2, $4);
++          }
+ 	  initializer.opt
+             { 
+               $$ = MakeNewList(SetDeclInit($2, $6)); 
+@@ -822,7 +860,9 @@
+             { 
+               SetDeclType($2, MakeDefaultPrimType($1.tq, $1.coord), NoRedecl);
+             }
+-          attributes.opt { SetDeclAttribs($2, $4); }
++          attributes.opt {
++	    SetDeclAttribs($2, $4);
++	  }
+ 	  initializer.opt
+             { 
+               $$ = MakeNewList(SetDeclInit($2, $6)); 
+@@ -889,8 +929,8 @@
+ sue.declaration.specifier: /*P*/   
+           sue.type.specifier storage.class
+             { $$ = TypeQualifyNode($1, $2.tq, & $2.coord); }
+-        | declaration.qualifier.list elaborated.type.name
+-            { $$ = TypeQualifyNode($2, $1.tq, & $1.coord); }
++        | declaration.qualifier.list elaborated.type.name attributes.opt
++            { $$ = TypeQualifyNode($2, tq_union($1.tq, tq_attribute($3)), & $1.coord); }
+         | sue.declaration.specifier declaration.qualifier
+             { $$ = TypeQualifyNode($1, $2.tq, & $2.coord); }
+         ;
+@@ -900,8 +940,11 @@
+ typedef.declaration.specifier:  /*P*/      
+           typedef.type.specifier storage.class
+             { $$ = TypeQualifyNode($1, $2.tq, & $2.coord); }
+-        | declaration.qualifier.list TYPEDEFname
+-            { $$ = ConvertIdToTdef($2, $1.tq, GetTypedefType($2)); $$->coord = $1.coord; }
++        | declaration.qualifier.list TYPEDEFname attributes.opt
++            { $$ = ConvertIdToTdef($2, $1.tq, GetTypedefType($2));
++              $$->coord = $1.coord;
++	      NodeUpdateTq2($$, tq_union, tq_attribute($3));
++            }
+         | typedef.declaration.specifier declaration.qualifier
+             { $$ = TypeQualifyNode($1, $2.tq, & $2.coord); }
+         ;
+@@ -914,14 +957,21 @@
+             { $$.tq = MergeTypeQuals($1.tq, $2.tq, $2.coord);
+               $$.coord = $1.coord; }
+         | declaration.qualifier.list declaration.qualifier
+-            { $$.tq = MergeTypeQuals($1.tq, $2.tq, $2.coord);
+-              $$.coord = $1.coord; }
++            {
++              $$.tq = MergeTypeQuals($1.tq, $2.tq, $2.coord);
++              $$.coord = $1.coord; 
++	    }
++/*
++        | declaration.qualifier.list  attribute
++           {  $$.tq = tq_union($1.tq, tq_attribute($2));
++	      $$.coord = $1.coord; }
++*/
+         ;
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ declaration.qualifier: /*P*/
+           type.qualifier
+-        | storage.class
++          | storage.class
+         ;
+ 
+ typeof.expression: 
+@@ -931,11 +981,19 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ type.specifier: /*P*/
+-          basic.type.specifier               /* Arithmetic or void */
+-            { $$ = FinishPrimType($1); }
++          basic.type.specifier attributes.opt       /* Arithmetic or void */
++            { $$ = FinishPrimType($1);
++              $$ = TypeQualifyNode($$, tq_attribute($2), NULL);
++             }
+         | sue.type.specifier                 /* Struct/Union/Enum  */
+-        | typedef.type.specifier             /* Typedef            */
+-        | typeof.type.specifier              /* This is really a gcc extension */
++        | typedef.type.specifier attributes.opt            /* Typedef            */
++            {
++              $$ = TypeQualifyNode($1, tq_attribute($2), NULL);
++            }
++        | typeof.type.specifier attributes.opt             /* This is really a gcc extension */
++            {
++              $$ = TypeQualifyNode($1, tq_attribute($2), NULL);
++            }
+         ;
+ 
+ typeof.type.specifier:
+@@ -948,7 +1006,7 @@
+             {
+ 		$$ = NodeCopy(NodeDataType(SemCheckNode($3)), Subtree); /* copy the node so we can remove type qualifiers without hurting the code */	      
+ 		SetCoords($$, $1, Subtree);
+-	        NodeRemoveTq($$, -1); /* Take off all the type qualifiers */
++		NodeUpdateTq($$, tq_remove_everything); /* Take off all the type qualifiers */
+ 	    }
+ 	| type.qualifier.list TYPEOF '(' typeof.expression ')'   /* gcc extension      */
+   	    /*
+@@ -959,7 +1017,7 @@
+             {
+ 		/* we have to copy the node because we don't want the type qualifiers to modify the original node. */
+ 		Node *thetype=SetCoords(NodeCopy(NodeDataType(SemCheckNode($4)), Subtree), $2, Subtree);
+-		NodeRemoveTq(thetype, -1); /* Take off all the type qualifiers */		    
++		NodeUpdateTq(thetype, tq_remove_everything); /* Take off all the type qualifiers */
+ 		$$ = TypeQualifyNode(thetype, $1.tq, & $1.coord); /* Add on the new type qualifiers */
+ 	    }
+         ;
+@@ -976,7 +1034,11 @@
+         ;
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+-sue.type.specifier: /*P*/
++sue.type.specifier:
++          sue.type.specifier.noatt attributes.opt
++             { $$ = TypeQualifyNode($1, tq_attribute($2), 0); }
++;
++sue.type.specifier.noatt: /*P*/
+           elaborated.type.name              /* struct/union/enum */
+         | type.qualifier.list elaborated.type.name
+             { $$ = TypeQualifyNode($2, $1.tq, & $1.coord); }
+@@ -997,7 +1059,9 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ type.qualifier.list: /*P*/
+-          type.qualifier
++          type.qualifier attributes.opt 
++            { $$.tq = tq_union($1.tq, tq_attribute($2));
++	      $$.coord = $1.coord; }
+         | type.qualifier.list type.qualifier
+             { $$.tq = MergeTypeQuals($1.tq, $2.tq, $2.coord);
+               $$.coord = $1.coord; }
+@@ -1033,17 +1097,17 @@
+ /* Redundant '(' placed immediately to the left of the TYPEDEFname  */
+ paren.typedef.declarator: /*P*/
+           paren.postfix.typedef.declarator
+-        | '*' paren.typedef.declarator
+-            { $$ = SetDeclType($2, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl);
++        | '*' attributes.opt paren.typedef.declarator  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($3, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl);
+                }
+-        | '*' '(' simple.paren.typedef.declarator ')' 
+-            { $$ = SetDeclType($3, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl); 
++        | '*' attributes.opt '(' simple.paren.typedef.declarator ')'  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($4, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl); 
+                }
+-        | '*' pointer.type.qualifier.list '(' simple.paren.typedef.declarator ')' 
+-            { $$ = SetDeclType($4, MakePtrCoord(   $2.tq,    NULL, $1), Redecl);
++        | '*' attributes.opt pointer.type.qualifier.list '(' simple.paren.typedef.declarator ')'  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($5, MakePtrCoord(   $3.tq,    NULL, $1), Redecl);
+                }
+-        | '*' pointer.type.qualifier.list paren.typedef.declarator
+-            { $$ = SetDeclType($3, MakePtrCoord(   $2.tq,    NULL, $1), Redecl); 
++        | '*' attributes.opt pointer.type.qualifier.list paren.typedef.declarator  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($4, MakePtrCoord(   $3.tq,    NULL, $1), Redecl); 
+                }
+         ;
+         
+@@ -1086,11 +1150,11 @@
+ /*                        */    /* ? */ /* ?.?.? */
+ clean.typedef.declarator: /*P*/
+           clean.postfix.typedef.declarator
+-        | '*' parameter.typedef.declarator
+-            { $$ = SetDeclType($2, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl); 
++        | '*' attributes.opt parameter.typedef.declarator  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($3, MakePtrCoord(EMPTY_TQ, NULL, $1), Redecl); 
+                }
+-        | '*' pointer.type.qualifier.list parameter.typedef.declarator  
+-            { $$ = SetDeclType($3, MakePtrCoord($2.tq, NULL, $1), Redecl); 
++        | '*' attributes.opt pointer.type.qualifier.list parameter.typedef.declarator   /* UNUSED attributes.opt */ 
++            { $$ = SetDeclType($4, MakePtrCoord($3.tq, NULL, $1), Redecl); 
+                }
+         ;
+ 
+@@ -1113,15 +1177,15 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ unary.abstract.declarator: /*P*/
+-          '*' 
++          '*' attributes.opt  /* UNUSED attributes.opt */
+             { $$ = MakePtrCoord(EMPTY_TQ, NULL, $1); }
+-        | '*' pointer.type.qualifier.list 
+-            { $$ = MakePtrCoord($2.tq, NULL, $1); }
+-        | '*' abstract.declarator
+-            { $$ = SetBaseType($2, MakePtrCoord(EMPTY_TQ, NULL, $1)); 
++        | '*' attributes.opt pointer.type.qualifier.list   /* UNUSED attributes.opt */
++            { $$ = MakePtrCoord($3.tq, NULL, $1); }
++        | '*' attributes.opt abstract.declarator  /* UNUSED attributes.opt */
++            { $$ = SetBaseType($3, MakePtrCoord(EMPTY_TQ, NULL, $1)); 
+                }
+-        | '*' pointer.type.qualifier.list abstract.declarator
+-            { $$ = SetBaseType($3, MakePtrCoord($2.tq, NULL, $1)); 
++        | '*' attributes.opt pointer.type.qualifier.list abstract.declarator  /* UNUSED attributes.opt */
++            { $$ = SetBaseType($4, MakePtrCoord($3.tq, NULL, $1)); 
+                }
+         ;
+ 
+@@ -1158,11 +1222,13 @@
+ /*                        */    /* ? */ /* ?.?.? */
+ unary.identifier.declarator: /*P293*/
+           postfix.identifier.declarator
+-        | '*' identifier.declarator
+-            { $$ = ModifyDeclType($2, MakePtrCoord(EMPTY_TQ, NULL, $1)); 
+-               }
+-        | '*' pointer.type.qualifier.list identifier.declarator
+-            { $$ = ModifyDeclType($3, MakePtrCoord(   $2.tq,    NULL, $1)); 
++        | '*' attributes.opt identifier.declarator
++            { //printf("%s:%d ", __FILE__, __LINE__); DPL($2);
++              SetDeclAttribs($3, $2);
++              $$ = ModifyDeclType($3, MakePtrCoord(EMPTY_TQ, NULL, $1)); 
++              }
++        | '*' attributes.opt pointer.type.qualifier.list identifier.declarator
++            { $$ = ModifyDeclType($4, MakePtrCoord(tq_union(tq_attribute($2), $3.tq),    NULL, $1)); 
+                }
+         ;
+         
+@@ -1200,11 +1266,11 @@
+             { 
+               $$ = $1; 
+             }
+-        | '*' old.function.declarator
+-            { $$ = SetDeclType($2, MakePtrCoord(EMPTY_TQ, NULL, $1), SU); 
++        | '*' attributes.opt old.function.declarator /* UNUSED attributes.opt */
++            { $$ = SetDeclType($3, MakePtrCoord(EMPTY_TQ, NULL, $1), SU); 
+                }
+-        | '*' pointer.type.qualifier.list old.function.declarator
+-            { $$ = SetDeclType($3, MakePtrCoord($2.tq, NULL, $1), SU); 
++        | '*' attributes.opt pointer.type.qualifier.list old.function.declarator  /* UNUSED attributes.opt */
++            { $$ = SetDeclType($4, MakePtrCoord($3.tq, NULL, $1), SU); 
+                }
+         ;
+ 
+@@ -1306,7 +1372,9 @@
+          *     aligned(8)         (that is this last rule)
+          *     packed             (that is the first rule)
+          *     section("shared")  (that is this last rule)
+-         *                        I think the other rules are needed for the format attributes.  -Bradley
++	 * The problem is that the IDENTIFIER, if parsed as an expression, will
++	 *     be parsed as an undeclared variable.  (It could even be a type name
++	 *     which will be parsed badly too.
+          */
+ 	| any.word '(' nonnull.expression.list ')'
+                 { $$ = ConvertIdToAttrib($1, $3); }
+@@ -1321,9 +1389,12 @@
+ asm.opt:
+ 	  /* empty */
+              { $$ = NULL; }    
+-        | ASM '(' string.literal.list ')' 
+-             { $$ = MakeAsmCoord(EMPTY_TQ, $3, NULL, NULL, NULL, $1); }
++        | asm
+ 	;
++asm:
++          ASM '(' string.literal.list ')' 
++             { $$ = MakeAsmCoord(EMPTY_TQ, $3, NULL, NULL, NULL, $1); }
++;
+ 
+ any.word:
+ 	  IDENTIFIER
+@@ -1407,42 +1478,41 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ parameter.declaration: /*P*/
+-          declaration.specifier
+-            { $$ = $1; }
+-        | declaration.specifier abstract.declarator
+-            { $$ = SetBaseType($2, $1); 
++          attributes.opt declaration.specifier
++            { $$ = $2; }
++        | attributes.opt declaration.specifier abstract.declarator
++            { $$ = SetBaseType($3, $2); 
+             }
+-        | declaration.specifier identifier.declarator
+-            { $$ = SetDeclType($2, $1, Formal); 
++        | attributes.opt declaration.specifier identifier.declarator
++            { $$ = SetDeclType($3, $2, Formal); 
+             }
+-        | declaration.specifier parameter.typedef.declarator
+-            { $$ = SetDeclType($2, $1, Formal); 
++        | attributes.opt declaration.specifier parameter.typedef.declarator
++            { $$ = SetDeclType($3, $2, Formal); 
+             }
+-        | declaration.qualifier.list /* DEFAULT_INT */ 
+-            { $$ = MakeDefaultPrimType($1.tq, $1.coord); }
+-        | declaration.qualifier.list /* DEFAULT_INT */ abstract.declarator
+-            { $$ = SetBaseType($2, MakeDefaultPrimType($1.tq, $1.coord)); }
+-        | declaration.qualifier.list /* DEFAULT_INT */ identifier.declarator
+-            { $$ = SetDeclType($2, MakeDefaultPrimType($1.tq, $1.coord), Formal); }
+-        | type.specifier
+-            { $$ = $1; }
+-        | type.specifier abstract.declarator
+-            { $$ = SetBaseType($2, $1); 
++        | attributes.opt declaration.qualifier.list /* DEFAULT_INT */ 
++            { $$ = MakeDefaultPrimType($2.tq, $2.coord); }
++        | attributes.opt declaration.qualifier.list /* DEFAULT_INT */ abstract.declarator
++            { $$ = SetBaseType($3, MakeDefaultPrimType($2.tq, $2.coord)); }
++        | attributes.opt declaration.qualifier.list /* DEFAULT_INT */ identifier.declarator
++            { $$ = SetDeclType($3, MakeDefaultPrimType($2.tq, $2.coord), Formal); }
++        | attributes.opt type.specifier
++            { $$ = $2; }
++        | attributes.opt type.specifier abstract.declarator
++            { $$ = SetBaseType($3, $2); 
+             }
+-        | type.specifier identifier.declarator attributes.opt
++        | attributes.opt type.specifier identifier.declarator attributes.opt
+             {
+-	      SetDeclAttribs($2, $3);
+-	      $$ = SetDeclType($2, $1, Formal);
+-            }
+-        | type.specifier parameter.typedef.declarator
+-            { $$ = SetDeclType($2, $1, Formal); 
++	      $$ = SetDeclType($3, TypeQualifyNode($2, tq_attribute(JoinLists($1,$4)), NULL), Formal)
++	    }
++        | attributes.opt type.specifier parameter.typedef.declarator
++            { $$ = SetDeclType($3, $2, Formal); 
+             }
+-        | type.qualifier.list /* DEFAULT_INT */ 
+-            { $$ = MakeDefaultPrimType($1.tq, $1.coord); }
+-        | type.qualifier.list /* DEFAULT_INT */ abstract.declarator
+-            { $$ = SetBaseType($2, MakeDefaultPrimType($1.tq, $1.coord)); }
+-        | type.qualifier.list /* DEFAULT_INT */ identifier.declarator
+-            { $$ = SetDeclType($2, MakeDefaultPrimType($1.tq, $1.coord), Formal); }
++        | attributes.opt type.qualifier.list /* DEFAULT_INT */ 
++            { $$ = MakeDefaultPrimType($2.tq, $2.coord); }
++        | attributes.opt type.qualifier.list /* DEFAULT_INT */ abstract.declarator
++            { $$ = SetBaseType($3, MakeDefaultPrimType($2.tq, $2.coord)); }
++        | attributes.opt type.qualifier.list /* DEFAULT_INT */ identifier.declarator
++            { $$ = SetDeclType($3, MakeDefaultPrimType(tq_union(tq_attribute($1),$2.tq), $2.coord), Formal); }
+         ;
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+@@ -1475,31 +1545,31 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ struct.or.union.specifier: /*P*/
+-          struct.or.union '{' struct.declaration.list '}' attributes.opt
++          struct.or.union '{' struct.declaration.list '}'
+             { 
+-              $$ = SetSUdclNameFields($1, NULL, $3, $2, $4, $5);
++              $$ = SetSUdclNameFields($1, NULL, $3, $2, $4, NULL);
+             }
+         | struct.or.union identifier.or.typedef.name
+-          '{' struct.declaration.list '}' attributes.opt
++          '{' struct.declaration.list '}'
+             { 
+-              $$ = SetSUdclNameFields($1, $2, $4, $3, $5, $6);
++              $$ = SetSUdclNameFields($1, $2, $4, $3, $5, NULL);
+ 	    }
+         | struct.or.union identifier.or.typedef.name
+             { 
+               $$ = SetSUdclName($1, $2, $1->coord);
+ 	    }
+         /* EAB: create rules for empty structure declarations */
+-        | struct.or.union '{' '}' attributes.opt
++        | struct.or.union '{' '}'
+             { 
+               if (ANSIOnly)
+                  Warning(1, "empty structure declaration");
+-              $$ = SetSUdclNameFields($1, NULL, NULL, $2, $3, $4);
++              $$ = SetSUdclNameFields($1, NULL, NULL, $2, $3, NULL);
+ 	    }
+-        | struct.or.union identifier.or.typedef.name '{' '}' attributes.opt
++        | struct.or.union identifier.or.typedef.name '{' '}'
+             { 
+               if (ANSIOnly)
+                  Warning(1, "empty structure declaration");
+-              $$ = SetSUdclNameFields($1, $2, NULL, $3, $4, $5); 
++              $$ = SetSUdclNameFields($1, $2, NULL, $3, $4, NULL); 
+ 	    }
+         ;
+ 
+@@ -1520,7 +1590,7 @@
+ struct.declaration: /*P*/
+           struct.declaring.list ';'
+         | struct.default.declaring.list ';'
+-        | gcc.extension struct.declaration { $$ = $2; NodeAddTq((Node*)(FirstItem($$)), T_EXTENSION); ((Node*)(FirstItem($$)))->coord = $1; }
++        | gcc.extension struct.declaration { $$ = $2; NodeUpdateTq((Node*)(FirstItem($$)), tq_add_extension); ((Node*)(FirstItem($$)))->coord = $1; }
+         ;
+ 
+ /* doesn't redeclare typedef */
+@@ -1547,7 +1617,10 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ struct.declarator: /*P*/
+-          declarator bit.field.size.opt attributes.opt
++          declarator attributes.opt
++            { SetDeclAttribs($1,$2);
++	      $$ = $1; }
++        | declarator bit.field.size attributes.opt
+             { SetDeclAttribs($1, $3);
+               $$ = SetDeclBitSize($1, $2); }
+         | bit.field.size attributes.opt
+@@ -1557,7 +1630,8 @@
+ 
+ /*                        */    /* ? */ /* ?.?.? */
+ struct.identifier.declarator: /*P*/
+-          identifier.declarator bit.field.size.opt attributes.opt
++          identifier.declarator
++        | identifier.declarator bit.field.size attributes.opt
+             { $$ = SetDeclBitSize($1, $2);
+               SetDeclAttribs($1, $3); }
+         | bit.field.size attributes.opt
+@@ -1565,11 +1639,6 @@
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list