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: PATCH: Yet another ObjC-ish "hook" in c-decl.c



On 2 Sep 2004, at 16.01, Zack Weinberg wrote:


Ziemowit Laski <zlaski@apple.com> writes:

A recent modification to store_parm_decls() broke the ongoing ObjC
integration again :-(.  In its new form, store_parm_decls() is no
longer usable from ObjC, because it dereferences the newfangled
'current_function_arg_info' static variable, which only
grokdeclarator() sets.  The new objc-act.c no longer calls any of the
grok...() functions, since it no longer deals in raw declspec goo.

So, I introduce process_parm_decls(), which future ObjC will call
instead of store_parm_decls().  I'm inclined to commit this as obvious
since this solves ObjC's problems and cannot possibly cause any
problems for C, but I'll wait a short while for people's thoughts, if
any.

Better you should export store_parm_decls_newstyle and use that from objc-act.c.

OK:


[gcc/ChangeLog]
2004-09-02  Ziemowit Laski  <zlaski@apple.com>

        * c-decl.c (store_parm_decls_newstyle): Make externally visible.
        * c-tree.h (store_parm_decls_newstyle): New prototype.

Index: gcc/c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.569
diff -u -3 -p -r1.569 c-decl.c
--- gcc/c-decl.c        1 Sep 2004 20:09:16 -0000       1.569
+++ gcc/c-decl.c        2 Sep 2004 23:06:19 -0000
@@ -6158,7 +6158,7 @@ start_function (tree declspecs, tree dec
    definitions (prototype format). The parms already have decls, so we
    need only record them as in effect and complain if any redundant
    old-style parm decls were written.  */
-static void
+void
 store_parm_decls_newstyle (tree fndecl, tree arg_info)
 {
   tree decl;
Index: gcc/c-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
retrieving revision 1.173
diff -u -3 -p -r1.173 c-tree.h
--- gcc/c-tree.h        31 Aug 2004 08:29:24 -0000      1.173
+++ gcc/c-tree.h        2 Sep 2004 23:06:19 -0000
@@ -200,6 +200,7 @@ extern tree start_enum (tree);
 extern int  start_function (tree, tree, tree);
 extern tree start_decl (tree, tree, bool, tree);
 extern tree start_struct (enum tree_code, tree);
+extern void store_parm_decls_newstyle (tree, tree);
 extern void store_parm_decls (void);
 extern tree xref_tag (enum tree_code, tree);
 extern int c_expand_decl (tree);

--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477


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