From: Geoffrey Keating Date: Tue, 29 Jul 2003 04:14:48 +0000 (+0000) Subject: c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect main function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f0eabcc4df9bfda5ea33cc8e12826b41b95d50b;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3059e557af..dc9725702e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-07-28 Geoffrey Keating + + * c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect + main function. + 2003-07-28 Mark Mitchell PR c++/11667 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 7923a1623b2..6a87c427295 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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. */