decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ and its ilk.
authorMark Mitchell <mark@codesourcery.com>
Thu, 15 Mar 2001 03:37:14 +0000 (03:37 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 15 Mar 2001 03:37:14 +0000 (03:37 +0000)
* decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
and its ilk.

From-SVN: r40485

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.old-deja/g++.other/fnname1.C [new file with mode: 0644]

index c02b2412698591f10f7140bf821bc1e32ceb546d..4258b7e86812f932bb8449a2db7f4c19bb38bca0 100644 (file)
@@ -1,3 +1,8 @@
+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.
index f917fc86a1989ae554346e39b860cc0c17cf1b23..8a5857a506b508966aa22e82da448049b0b0f812 100644 (file)
@@ -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 (file)
index 0000000..8fcf07f
--- /dev/null
@@ -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__;
+}