Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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" }
}