Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/init/reference2.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
6 // We should we able to diagnostic this without instantiating the template | 6 // We should we able to diagnostic this without instantiating the template |
7 template <int a1> | 7 template <int a1> |
8 void f() | 8 void f() |
9 { | 9 { |
10 typedef int& T; | 10 typedef int& T; |
11 T a = T(); // { dg-error "value-initialization of reference" } | 11 T a = T(); // { dg-error "9:invalid value-initialization of reference" } |
12 } | 12 } |
13 | 13 |