gcc/testsuite/gcc.dg/c90-func-1.c
raw| 1 | /* Test that we diagnose the __func__ predefined identifier in |
| 2 | C90 pedantic mode. */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ |
| 5 | |
| 6 | void |
| 7 | foo (void) |
| 8 | { |
| 9 | const char *s = __func__; /* { dg-error " ISO C90 does not support .__func__. predefined identifier" } */ |
| 10 | } |