aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d0b0dd9..52bf5e8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-04 Dirk Mueller <dmueller@suse.de>
+
+ * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
+ not in effect.
+
2007-05-02 Seongbae Park <seongbae.park@gmail.com>
PR c++/31663
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index fb682c7..df067c9 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -303,7 +303,8 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
#define DECL_MAIN_P(NODE) \
(DECL_EXTERN_C_FUNCTION_P (NODE) \
&& DECL_NAME (NODE) != NULL_TREE \
- && MAIN_NAME_P (DECL_NAME (NODE)))
+ && MAIN_NAME_P (DECL_NAME (NODE))) \
+ && flag_hosted
/* The overloaded FUNCTION_DECL. */
#define OVL_FUNCTION(NODE) \