aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-03-15 03:37:14 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-03-15 03:37:14 +0000
commita3eab6194fe9c17e2609882621404955cb03c662 (patch)
treeaa7a4a8a4d9bbb67d0b4dee61782357ae31df425
parent19e7881c81752c856edb9f71db93805ce0416be6 (diff)
downloadgcc-a3eab6194fe9c17e2609882621404955cb03c662.zip
gcc-a3eab6194fe9c17e2609882621404955cb03c662.tar.gz
gcc-a3eab6194fe9c17e2609882621404955cb03c662.tar.bz2
decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ and its ilk.
* decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ and its ilk. From-SVN: r40485
-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__;
+}