gcc/testsuite/gcc.dg/c99-func-3.c
raw| 1 | /* Test for C99 __func__: not merging with string literals. */ |
| 2 | /* Origin: Joseph Myers <[email protected]> */ |
| 3 | /* { dg-do run } */ |
| 4 | /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ |
| 5 | |
| 6 | extern void abort (void); |
| 7 | extern void exit (int); |
| 8 | |
| 9 | int |
| 10 | main (void) |
| 11 | { |
| 12 | if ("main" == __func__) |
| 13 | abort (); |
| 14 | else |
| 15 | exit (0); |
| 16 | } |