OSDN Git Service

[gcc/ChangeLog]
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2004 23:39:11 +0000 (23:39 +0000)
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2004 23:39:11 +0000 (23:39 +0000)
2004-08-25  Ziemowit Laski  <zlaski@apple.com>

        * c-decl.c (grokparm): New function.
        * c-tree.h (grokparm): New prototype.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86587 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c
gcc/c-tree.h

index 7229f5a..7770a07 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-25  Ziemowit Laski  <zlaski@apple.com>
+
+       * c-decl.c (grokparm): New function.
+       * c-tree.h (grokparm): New prototype.
+
 2004-08-25  Andrew MacLeod  <amacleod@redhat.com>
 
        * tree-ssa-operands.h (struct ssa_operand_iterator_d): New.  SSA operand
index e9a9036..6630d9a 100644 (file)
@@ -3153,6 +3153,20 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
     }
 }
 
+/* Given a parsed parameter declaration, decode it into a PARM_DECL.  */
+
+tree
+grokparm (tree parm)
+{
+  tree decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)),
+                             TREE_PURPOSE (TREE_PURPOSE (parm)),
+                             PARM, false, NULL);
+
+  decl_attributes (&decl, TREE_VALUE (parm), 0);
+
+  return decl;
+}
+
 /* Given a parsed parameter declaration, decode it into a PARM_DECL
    and push that on the current scope.  */
 
index 41abd26..5c99f47 100644 (file)
@@ -180,6 +180,7 @@ extern tree get_parm_info (bool);
 extern tree grokfield (tree, tree, tree);
 extern tree groktypename (tree);
 extern tree groktypename_in_parm_context (tree);
+extern tree grokparm (tree);
 extern tree implicitly_declare (tree);
 extern void keep_next_level (void);
 extern tree lookup_name (tree);