* 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
+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
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.
--- /dev/null
+/* 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 ();
+}