Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
diagnostic
/
main2.C
blob: 02495cf1970185395332bc8eaf7ee9a98bf3a7e1 [
file
] [
log
] [
blame
]
int
main
();
typedef
int
(*
fptr
)
();
void
foo
(
fptr
);
fptr bar
()
{
foo
(
main
);
// { dg-error "8:ISO C\\+\\+ forbids taking address of function" }
return
main
;
// { dg-error "10:ISO C\\+\\+ forbids taking address of function" }
}