|
|
Re: GCC4.2.4 no longer defines the __func__ macro?
|
|
10/22/2008 12:24 PM
post15416
|
Re: GCC4.2.4 no longer defines the __func__ macro?
Peter Weber wrote:
> Hi list,
> does the gcc 4.2.4 no longer defines the __func__ macro?
> I used that for debug/trace outputs within each function but it seems it diappeared in gcc4.2.4.
It is no longer treated as a macro but as a variable.
$ cat func.c
#include <stdio.h>
int foo() {
printf("%s\n",__func__);
}
int main() {
printf("%s\n",__func__);
foo();
}
$ qcc -V4.2.4,gcc_ntox86 func.c
$ ./a.out
main
foo
Regards,
Ryan Mansfield
|
|
|
|
|