mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 00:21:03 +08:00
re PR c++/28878 (ICE using "[" instead of "{")
PR c++/28878 * except.c (build_throw): Only set current_function_returns_abnormally if cfun is not NULL. * g++.dg/parse/crash33.C: New test. From-SVN: r116655
This commit is contained in:
parent
b2a06efa61
commit
07515729e9
@ -1,5 +1,9 @@
|
||||
2006-09-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/28878
|
||||
* except.c (build_throw): Only set current_function_returns_abnormally
|
||||
if cfun is not NULL.
|
||||
|
||||
PR c++/26917
|
||||
* repo.c (repo_file): Remove.
|
||||
(open_repo_file, reopen_repo_file_for_write): Return fopened
|
||||
|
@ -605,7 +605,8 @@ build_throw (tree exp)
|
||||
|
||||
if (processing_template_decl)
|
||||
{
|
||||
current_function_returns_abnormally = 1;
|
||||
if (cfun)
|
||||
current_function_returns_abnormally = 1;
|
||||
return build_min (THROW_EXPR, void_type_node, exp);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-09-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/28878
|
||||
* g++.dg/parse/crash33.C: New test.
|
||||
|
||||
2006-09-01 J"orn Rennecke <joern.rennecke@st.com>
|
||||
Richard Guenther <rguenther@suse.de>
|
||||
Adam Nemet <anemet@caviumnetworks.com>
|
||||
|
8
gcc/testsuite/g++.dg/parse/crash33.C
Normal file
8
gcc/testsuite/g++.dg/parse/crash33.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/28878
|
||||
// { dg-do compile }
|
||||
|
||||
template<int>
|
||||
void foo()
|
||||
[
|
||||
throw; // { dg-error "expected" }
|
||||
} // { dg-error "expected" }
|
Loading…
x
Reference in New Issue
Block a user