summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-04 00:46:02 +0000
committermueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-04 00:46:02 +0000
commitb24655ef32d2caa4129f97dff97e12d308230f2c (patch)
treea091dc320d6614250cc2109b18a78f2c0ae5b007
parent06f9fe3e3f40c0c2eaae10f693374b35e2362fc0 (diff)
downloadppe42-gcc-b24655ef32d2caa4129f97dff97e12d308230f2c.tar.gz
ppe42-gcc-b24655ef32d2caa4129f97dff97e12d308230f2c.zip
2007-05-04 Dirk Mueller <dmueller@suse.de>
* c.opt(Wmain,ffreestanding): Enable for C++,ObjC++. * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is not in effect. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124404 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c.opt4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h3
4 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1add00feeb6..afb5846120e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-04 Dirk Mueller <dmueller@suse.de>
+
+ * c.opt(Wmain,ffreestanding): Enable for C++,ObjC++.
+
2007-05-03 Jan Hubicka <jh@suse.cz>
* fold-const.c (fold_unary): Convert (T1)(X op Y) into ((T1)X op (T1)Y),
diff --git a/gcc/c.opt b/gcc/c.opt
index 61aaf82fef4..0635fdca13c 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -271,7 +271,7 @@ C ObjC C++ ObjC++ Var(warn_long_long) Init(1) Warning
Do not warn about using \"long long\" when -pedantic
Wmain
-C ObjC Warning
+C ObjC C++ ObjC++ Warning
Warn about suspicious declarations of \"main\"
Wmissing-braces
@@ -551,7 +551,7 @@ C++ ObjC++
Scope of for-init-statement variables is local to the loop
ffreestanding
-C ObjC
+C ObjC C++ ObjC++
Do not assume that standard C libraries and \"main\" exist
fgnu-keywords
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d0b0dd9fadc..52bf5e8654c 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 fb682c7ee04..df067c9d46c 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) \
OpenPOWER on IntegriCloud