c-decl.c (finish_decl): Don't add DECL_STMTs for nested function prototypes.
* c-decl.c (finish_decl): Don't add DECL_STMTs for nested function prototypes. * gcc.c-torture/compile/20011023-1.c: New test. From-SVN: r46463
This commit is contained in:
parent
b8c815e548
commit
c0a4369a23
|
@ -1,3 +1,8 @@
|
||||||
|
2001-10-24 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* c-decl.c (finish_decl): Don't add DECL_STMTs for nested function
|
||||||
|
prototypes.
|
||||||
|
|
||||||
2001-10-23 Stan Shebs <shebs@apple.com>
|
2001-10-23 Stan Shebs <shebs@apple.com>
|
||||||
|
|
||||||
* config/rs6000/x-darwin: Use -no-cpp-precomp instead of
|
* config/rs6000/x-darwin: Use -no-cpp-precomp instead of
|
||||||
|
|
|
@ -3735,7 +3735,8 @@ finish_decl (decl, init, asmspec_tree)
|
||||||
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec));
|
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec));
|
||||||
}
|
}
|
||||||
|
|
||||||
add_decl_stmt (decl);
|
if (TREE_CODE (decl) != FUNCTION_DECL)
|
||||||
|
add_decl_stmt (decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DECL_CONTEXT (decl) != 0)
|
if (DECL_CONTEXT (decl) != 0)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2001-10-24 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gcc.c-torture/compile/20011023-1.c: New test.
|
||||||
|
|
||||||
2001-10-23 Geoffrey Keating <geoffk@redhat.com>
|
2001-10-23 Geoffrey Keating <geoffk@redhat.com>
|
||||||
|
|
||||||
* lib/g77.exp: Rewrite based on lib/g++.exp.
|
* lib/g77.exp: Rewrite based on lib/g++.exp.
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* Test whether tree inlining works with prototyped nested functions. */
|
||||||
|
|
||||||
|
extern void foo (char *x);
|
||||||
|
void bar (void);
|
||||||
|
void bar (void)
|
||||||
|
{
|
||||||
|
auto void baz (void);
|
||||||
|
void baz (void)
|
||||||
|
{
|
||||||
|
char tmp[2];
|
||||||
|
foo (tmp);
|
||||||
|
}
|
||||||
|
baz ();
|
||||||
|
}
|
Loading…
Reference in New Issue