diff options
author | Joseph Myers <joseph@codesourcery.com> | 2004-11-01 19:49:55 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-11-01 19:49:55 +0000 |
commit | ee0602299c6e6e70f24adb7983137786f227c70c (patch) | |
tree | 807c495bb9e4d5a1fe92f0997159322a7f1f95a3 /gcc/c-decl.c | |
parent | 40d05429503044c2cd3d10317ae1cff1b06d21ce (diff) | |
download | gcc-ee0602299c6e6e70f24adb7983137786f227c70c.zip gcc-ee0602299c6e6e70f24adb7983137786f227c70c.tar.gz gcc-ee0602299c6e6e70f24adb7983137786f227c70c.tar.bz2 |
re PR c/18239 (ICE in get_parm_info with werid attribute)
PR c/18239
* c-decl.c (get_parm_info): Allow FUNCTION_DECLs to appear amongst
parameter declarations.
testsuite:
* gcc.dg/parm-impl-decl-1.c, gcc.dg/parm-impl-decl-2.c: New tests.
From-SVN: r89956
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 839b5f3..ba4249a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4855,10 +4855,13 @@ get_parm_info (bool ellipsis) case CONST_DECL: case TYPE_DECL: + case FUNCTION_DECL: /* CONST_DECLs appear here when we have an embedded enum, and TYPE_DECLs appear here when we have an embedded struct or union. No warnings for this - we already warned about the - type itself. */ + type itself. FUNCTION_DECLs appear when there is an implicit + function declaration in the parameter list. */ + TREE_CHAIN (decl) = others; others = decl; /* fall through */ @@ -4875,7 +4878,6 @@ get_parm_info (bool ellipsis) /* Other things that might be encountered. */ case LABEL_DECL: - case FUNCTION_DECL: case VAR_DECL: default: gcc_unreachable (); |