Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/parse/ambig10.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
rev | line source |
---|---|
152 | 1 // PR c++/88754 |
2 // { dg-do compile } | |
3 | |
4 struct A | |
5 { | |
6 A(int); | |
7 void foo(); | |
8 }; | |
9 | |
10 template<int N> int value() { return N; } | |
11 | |
12 void bar() | |
13 { | |
14 A(value<0>()).foo(); | |
15 A(value<0>()); | |
16 (A(value<0>())).foo(); | |
17 | |
18 A value<0>; // { dg-error "invalid declaration" } | |
19 A value<0>(); // { dg-error "invalid declaration" } | |
20 } |