]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/40370 (ICE with invalid array bound in template class)
authorJakub Jelinek <jakub@gcc.gnu.org>
Mon, 8 Jun 2009 16:26:01 +0000 (18:26 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 8 Jun 2009 16:26:01 +0000 (18:26 +0200)
commit85a988d14eba08447282db312f99637a527bfba0
tree0996b2383b9560e0508fc26e2c0b221bced86d75
parentdb34470d17bd803cf74f747e7714f6029abd9b38
re PR c++/40370 (ICE with invalid array bound in template class)

PR c++/40370
PR c++/40372
* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
on error_mark_node.  Check for VLAs outside of function context
before check whether to wrap bounds into a NOP_EXPR with
TREE_SIDE_EFFECTS.

* g++.dg/template/error41.C: New test.
* g++.dg/template/error42.C: New test.

From-SVN: r148278
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/error41.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/error42.C [new file with mode: 0644]