repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
expr
/
bitfield5.C
blob
9565828f69870ad277e69dbf256af3bff510afb2
1
// PR c++/30274
2
// { dg-do run }
3
4
struct S {
5
bool x : 4;
6
};
7
8
S s;
9
10
int main() {
11
s.x++; // { dg-warning "deprecated" "" { target { ! c++17 } } }
12
// { dg-error "forbidden" "" { target c++17 } .-1 }
13
if (s.x != 1)
14
return 1;
15
++s.x; // { dg-warning "deprecated" "" { target { ! c++17 } } }
16
// { dg-error "forbidden" "" { target c++17 } .-1 }
17
if (s.x != 1)
18
return 2;
19
}