repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tc1
/
dr179.C
blob
39e4164d2a93589c8aa545a48564c57ce48f1cc4
1
// { dg-do compile }
2
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3
// DR179: Function pointers and subtraction
4
5
void foo(void);
6
typedef void (*fp)(void);
7
8
int main()
9
{
10
fp f1 = foo;
11
fp f2 = foo;
12
(void)f2-f1; // { dg-error "" "cannot subtract pointers to function" }
13
}