comparison gcc/testsuite/g++.dg/cpp0x/constexpr-volatile.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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" }