diff options
author | Marek Polacek <polacek@redhat.com> | 2019-06-20 22:06:36 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-06-20 22:06:36 +0000 |
commit | c35f57c5bd2b7d3fcf04f7bb8134db43c5b31059 (patch) | |
tree | 84252defab0849187a337fa25e2f6382ee14191c /gcc | |
parent | 966e7f731ef7ea019e681b7b53421c6857315c4a (diff) | |
download | gcc-c35f57c5bd2b7d3fcf04f7bb8134db43c5b31059.zip gcc-c35f57c5bd2b7d3fcf04f7bb8134db43c5b31059.tar.gz gcc-c35f57c5bd2b7d3fcf04f7bb8134db43c5b31059.tar.bz2 |
re PR c++/68265 (Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace)
PR c++/68265
* g++.dg/parse/error62.C: New test.
From-SVN: r272525
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/error62.C | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c6130e5..48ca72f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-20 Marek Polacek <polacek@redhat.com> + + PR c++/68265 + * g++.dg/parse/error62.C: New test. + 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/86587 diff --git a/gcc/testsuite/g++.dg/parse/error62.C b/gcc/testsuite/g++.dg/parse/error62.C new file mode 100644 index 0000000..8dac0ff --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error62.C @@ -0,0 +1,10 @@ +// PR c++/68265 + +int main() +{ + int (*) {} // { dg-error "expected primary-expression" } + any amount of syntactic nonsense // { dg-error "not declared in this scope" } + on multiple lines, with *punctuation* and ++operators++ even... + will be silently discarded + until the next close brace +} |