aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/fnname1.C8
3 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c02b241..4258b7e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2001-03-14 Mark Mitchell <mark@codesourcery.com>
+ * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
+ and its ilk.
+
+2001-03-14 Mark Mitchell <mark@codesourcery.com>
+
* class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
* cp-tree.h (DECL_IN_MEMORY_P): Likewise.
* decl.c (duplicate_decls): Likewise.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f917fc8..8a5857a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6609,6 +6609,7 @@ cp_make_fname_decl (id, name, type_dep)
DECL_SOURCE_LINE (decl) = 0;
DECL_ARTIFICIAL (decl) = 1;
DECL_IN_SYSTEM_HEADER (decl) = 1;
+ DECL_IGNORED_P (decl) = 1;
pushdecl (decl);
if (processing_template_decl)
decl = push_template_decl (decl);
diff --git a/gcc/testsuite/g++.old-deja/g++.other/fnname1.C b/gcc/testsuite/g++.old-deja/g++.other/fnname1.C
new file mode 100644
index 0000000..8fcf07f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/fnname1.C
@@ -0,0 +1,8 @@
+// Build don't run:
+// Origin: Loren James Rittle <rittle@latour.rsch.comm.mot.com>
+// Special g++ Options: -g
+
+int main ()
+{
+ const char *s = __FUNCTION__;
+}