Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/constexpr-volatile.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // DR 1453 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 struct S { | |
5 constexpr S() : n{} { } | |
6 volatile int n; | |
7 }; | |
8 | |
9 constexpr S s; // { dg-error "literal" } | |
10 | |
11 struct Z { | |
12 volatile int m; | |
13 }; | |
14 | |
15 struct T { | |
16 constexpr T() : n{} { } | |
17 Z n; | |
18 }; | |
19 | |
20 constexpr T t; // { dg-error "literal" } | |
21 | |
22 struct U : Z { | |
23 constexpr U() : Z{} { } | |
24 }; | |
25 | |
26 constexpr U u; // { dg-error "literal" } |