Commit c0a4369a by Jakub Jelinek Committed by Jakub Jelinek

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
parent b8c815e5
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>
* 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));
}
add_decl_stmt (decl);
if (TREE_CODE (decl) != FUNCTION_DECL)
add_decl_stmt (decl);
}
if (DECL_CONTEXT (decl) != 0)
......
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>
* lib/g77.exp: Rewrite based on lib/g++.exp.
......
/* 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 ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment