diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/parens2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/parens2.C | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/parens2.C b/gcc/testsuite/g++.dg/parse/parens2.C new file mode 100644 index 00000000000..416af0ee048 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/parens2.C @@ -0,0 +1,11 @@ +/* PR c++/8842. */ +/* { dg-do compile } */ +int main( int argc, char* argv ) +{ + int i = 5; + // This always worked: + // double l1 = double(int(i)) / double(int(i)); + // But this used to give a parse error before the `/' token: + double l2 = (double(int(i)) / double(int(i))); +} + |