aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c3059e5..dc97257 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 7923a16..6a87c42 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. */