Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/diagnostic/virtual-constexpr.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 // { dg-options "-fdiagnostics-show-caret -pedantic-errors" } |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-skip-if "virtual constexpr" { *-*-* } { "-std=gnu++2a" } { "" } } | |
4 | |
5 struct S | |
6 { | |
7 virtual constexpr void foo(); // { dg-error "3:member .foo. can be declared both .virtual. and .constexpr." } | |
8 /* { dg-begin-multiline-output "" } | |
9 virtual constexpr void foo(); | |
10 ^~~~~~~ ~~~~~~~~~ | |
11 { dg-end-multiline-output "" } */ | |
12 constexpr virtual void bar(); // { dg-error "13:member .bar. can be declared both .virtual. and .constexpr." } | |
13 /* { dg-begin-multiline-output "" } | |
14 constexpr virtual void bar(); | |
15 ~~~~~~~~~ ^~~~~~~ | |
16 { dg-end-multiline-output "" } */ | |
17 }; |