Commit 07515729 by Jakub Jelinek Committed by Jakub Jelinek

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
parent b2a06efa
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);
}
......
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>
// PR c++/28878
// { dg-do compile }
template<int>
void foo()
[
throw; // { dg-error "expected" }
} // { dg-error "expected" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment