From: Mark Mitchell Date: Thu, 15 Mar 2001 03:37:14 +0000 (+0000) Subject: decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ and its ilk. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3eab6194fe9c17e2609882621404955cb03c662;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c02b2412698..4258b7e8681 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-03-14 Mark Mitchell + + * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ + and its ilk. + 2001-03-14 Mark Mitchell * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f917fc86a19..8a5857a506b 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 00000000000..8fcf07f08ef --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/fnname1.C @@ -0,0 +1,8 @@ +// Build don't run: +// Origin: Loren James Rittle +// Special g++ Options: -g + +int main () +{ + const char *s = __FUNCTION__; +}