c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect main function.

* c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect
	main function.

From-SVN: r69913
This commit is contained in:
Geoffrey Keating 2003-07-29 04:14:48 +00:00 committed by Geoffrey Keating
parent 5fd5bdbd62
commit 5f0eabcc4d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-07-28 Geoffrey Keating <geoffk@apple.com>
* c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect
main function.
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11667

View File

@ -6338,7 +6338,7 @@ c_expand_body_1 (tree fndecl, int nested_p)
to run global initializers, etc. */
if (DECL_NAME (fndecl)
&& MAIN_NAME_P (DECL_NAME (fndecl))
&& DECL_CONTEXT (fndecl) == NULL_TREE)
&& C_DECL_FILE_SCOPE (fndecl))
expand_main_function ();
/* Generate the RTL for this function. */