* [parisc-linux] __FUNCTION__ broken
@ 2000-10-28 2:55 Alan Modra
2000-10-29 6:00 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2000-10-28 2:55 UTC (permalink / raw)
To: Mark Mitchell; +Cc: Grant Grundler, gcc-patches, parisc-linux
Hi Mark,
Your 2000-09-16 change doesn't clear c_function_name_declared_p
anywhere, resulting in empty strings for __FUNCTION__ and the like.
eg. testcase
cat > funcname.c <<EOF
extern int printf (__const char *__restrict __format, ...);
int foo (int x)
{
return x+1;
}
int main (void)
{
printf ("%s\n", __FUNCTION__);
return 0;
}
EOF
The following little patch seems to fix the problem, but please check
whether other cleaning up is required.
--- gcc/c-decl.c~ Thu Oct 26 16:20:36 2000
+++ gcc/c-decl.c Sat Oct 28 12:10:56 2000
@@ -6733,6 +6733,7 @@ finish_function (nested)
function. For a nested function, this value is used in
pop_c_function_context and then reset via pop_function_context. */
current_function_decl = NULL;
+ c_function_name_declared_p = 0;
}
}
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: __FUNCTION__ broken
2000-10-28 2:55 [parisc-linux] __FUNCTION__ broken Alan Modra
@ 2000-10-29 6:00 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2000-10-29 6:00 UTC (permalink / raw)
To: Alan Modra; +Cc: Mark Mitchell, Grant Grundler, gcc-patches, parisc-linux
On Sat, Oct 28, 2000 at 01:55:13PM +1100, Alan Modra wrote:
> current_function_decl = NULL;
> + c_function_name_declared_p = 0;
Applied, thanks.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-10-29 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-28 2:55 [parisc-linux] __FUNCTION__ broken Alan Modra
2000-10-29 6:00 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox