summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.rfg/00324_02-.C
blob: 1e742cb0d04b8f304cc6e74b5fc67e55dc322230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// Another simple one.  GCC corerctly gives errors for this code when the
// - -pedantic-errors options is used.  g++ doesn't.


void f (int i) { }
 
void (*fp)(void);
 
int i;
 
void
test ()
{
   i ? f : fp; // { dg-error "conditional expression|invalid conversion" } 
}