gcc/testsuite/g++.old-deja/g++.rfg/00324_02-.C
raw| 1 | // { dg-do assemble } |
| 2 | // Another simple one. GCC corerctly gives errors for this code when the |
| 3 | // - -pedantic-errors options is used. g++ doesn't. |
| 4 | |
| 5 | |
| 6 | void f (int i) { } |
| 7 | |
| 8 | void (*fp)(void); |
| 9 | |
| 10 | int i; |
| 11 | |
| 12 | void |
| 13 | test () |
| 14 | { |
| 15 | i ? f : fp; // { dg-error "6:conditional expression|invalid conversion" } |
| 16 | } |