OSDN Git Service

(attrib): Handle attribute ((section ("string"))).
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Feb 1994 22:48:19 +0000 (22:48 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Feb 1994 22:48:19 +0000 (22:48 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6581 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-parse.in

index 29708d6..82e9d7a 100644 (file)
@@ -1110,6 +1110,16 @@ attrib
                                       tree_cons ($5, $7, NULL_TREE),
                                       NULL_TREE),
                            NULL_TREE); }
+    | IDENTIFIER '(' STRING ')'
+       { /* If not "section (name)", then issue warning.  */
+         if (strcmp (IDENTIFIER_POINTER ($1), "section") != 0)
+           {
+             warning ("`%s' attribute directive ignored",
+                      IDENTIFIER_POINTER ($1));
+             $$ = $1;
+           }
+         else
+           $$ = tree_cons ($1, $3, NULL_TREE); }
     ;
 \f
 /* Initializers.  `init' is the entry point.  */