DR 2345 - Jumping across initializers in init-statements and conditions.
* g++.dg/cpp1z/init-statement10.C: New test. From-SVN: r276019
This commit is contained in:
parent
9f635bd13f
commit
296580b640
@ -1,3 +1,8 @@
|
||||
2019-09-21 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
DR 2345 - Jumping across initializers in init-statements and conditions.
|
||||
* g++.dg/cpp1z/init-statement10.C: New test.
|
||||
|
||||
2019-09-21 Richard Sandiford <richard.sandiford@arm.com>
|
||||
|
||||
* gcc.target/aarch64/sve/cond_convert_1.c: Remove XFAILs.
|
||||
|
14
gcc/testsuite/g++.dg/cpp1z/init-statement10.C
Normal file
14
gcc/testsuite/g++.dg/cpp1z/init-statement10.C
Normal file
@ -0,0 +1,14 @@
|
||||
// DR 2345 - Jumping across initializers in init-statements and conditions.
|
||||
// { dg-do compile { target c++17 } }
|
||||
|
||||
int
|
||||
fn ()
|
||||
{
|
||||
goto X;
|
||||
if (int i = 42; i == 42)
|
||||
{
|
||||
X: // { dg-error "jump to label" }
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user