summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-25 01:27:08 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-25 01:27:08 +0000
commit6146c0d97eb492bcd65b7099a2c3a4f80c68fd0e (patch)
treea6c376b2d642ea347ecf2a383f4502c18e03f30a /gcc/cp
parent02ac89cde2b15bebf73cdbbaf6c47bd40037e914 (diff)
downloadgcc-6146c0d97eb492bcd65b7099a2c3a4f80c68fd0e.tar.gz
* invoke.texi (-fno-builtin): Document that this is always on
in C++. * decl.c (duplicate_decls): Tidy. (init_decl_processing): Always set flag_no_builtin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 577cf532fa9..df72dfe3d0a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-24 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (duplicate_decls): Tidy.
+ (init_decl_processing): Always set flag_no_builtin.
+
2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2184
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 8376282bcfc..c91ba6082ee 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3717,11 +3717,8 @@ duplicate_decls (newdecl, olddecl)
DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
}
}
-
- if (TREE_CODE (newdecl) == NAMESPACE_DECL)
- {
- NAMESPACE_LEVEL (newdecl) = NAMESPACE_LEVEL (olddecl);
- }
+ else if (TREE_CODE (newdecl) == NAMESPACE_DECL)
+ NAMESPACE_LEVEL (newdecl) = NAMESPACE_LEVEL (olddecl);
/* Now preserve various other info from the definition. */
TREE_ADDRESSABLE (newdecl) = TREE_ADDRESSABLE (olddecl);
@@ -6372,6 +6369,12 @@ init_decl_processing ()
flag_inline_functions = 0;
}
+ /* In C++, we never create builtin functions whose name does not
+ begin with `__'. Users should be using headers to get prototypes
+ in C++. It would be nice if we could warn when `-fbuiltin' is
+ used explicitly, but we do not have that information. */
+ flag_no_builtin = 1;
+
/* Initially, C. */
current_lang_name = lang_name_c;