* c-decl.c (last_function_parms, last_function_parm_tags)
authorZack Weinberg <zack@gcc.gnu.org>
Tue, 9 Mar 2004 23:39:16 +0000 (23:39 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 9 Mar 2004 23:39:16 +0000 (23:39 +0000)
commit77dbdb5745d52b1ff3ddede885706d77a3817dd7
tree0c69b5e19f8954ba545d24fb4b1c73984cd752bf
parent305eeaeb7a5acd2256d075f463fe32fe80781e85
* c-decl.c (last_function_parms, last_function_parm_tags)
(last_function_parm_others, current_function_parms)
(current_function_parm_tags, current_function_parm_others):
Delete.
(ARG_INFO_PARMS, ARG_INFO_TAGS, ARG_INFO_TYPES, ARG_INFO_OTHERS):
New macros.
(grokdeclarator): For function definitions, save the arg-info
block from the declarator in DECL_ARGUMENTS.
(grokparms): Do not write to last_function_parm*.  Use ARG_INFO_*
macros to operate on arg-info block.  Can assume ARG_INFO_PARMS
contains only PARM_DECLs.  Improve diagnostics.
(get_parm_info): Use ARG_INFO_* macros.  Improve comments and
diagnostics.  Disable some expensive checks if not ENABLE_CHECKING.
(store_parm_decls_newstyle): Take the function to operate on,
and an arg-info block, as arguments; don't get anything from
current_function_* globals.
(store_parm_decls_oldstyle): Likewise.
(store_parm_decls): Pass fndecl and its arg-info block down to
store_parm_decls_newstyle/oldstyle.  Send functions with empty
argument lists through store_parm_decls_newstyle to reduce
overhead.
(pushdecl): Comment on the problems with the call to copy_node.
Clear DECL_ARGUMENTS of the old node after copying it, if it
is an arg-info block instead of a chain of decls.
(start_function): Do not manipulate current_function_parm* or
last_function_parm*.

* testsuite/gcc.dg/noncompile/incomplete-2.c: Move dg-error to
proper line.

From-SVN: r79206
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/noncompile/incomplete-2.c