* except.c (build_throw): Only set current_function_returns_abnormally
if cfun is not NULL.
* g++.dg/parse/crash33.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116655
138bc75d-0d04-0410-961f-
82ee72b054a4
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
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>
--- /dev/null
+// PR c++/28878
+// { dg-do compile }
+
+template<int>
+void foo()
+[
+ throw; // { dg-error "expected" }
+} // { dg-error "expected" }