* except.c (expand_start_catch_block): Call push_template_decl for
catch-block parameters.
* method.c (synthesize_method): Build an empty compound statement
for the body of a constructor.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28888
138bc75d-0d04-0410-961f-
82ee72b054a4
+1999-08-25 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (grokdeclarator): Amend comment.
+ * except.c (expand_start_catch_block): Call push_template_decl for
+ catch-block parameters.
+ * method.c (synthesize_method): Build an empty compound statement
+ for the body of a constructor.
+
1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (cp_build_qualified_type_real): If we're asking for the
if (staticp)
{
- /* C++ allows static class members.
- All other work for this is done by grokfield.
- This VAR_DECL is built by build_lang_decl.
- All other VAR_DECLs are built by build_decl. */
+ /* C++ allows static class members. All other work
+ for this is done by grokfield. */
decl = build_lang_decl (VAR_DECL, declarator, type);
TREE_STATIC (decl) = 1;
/* In class context, 'static' means public access. */
{
decl = grokdeclarator (declarator, declspecs, CATCHPARM,
1, NULL_TREE);
+ if (processing_template_decl)
+ decl = push_template_decl (decl);
pushdecl (decl);
add_decl_stmt (decl);
}
if (arg_chain != void_list_node)
do_build_copy_constructor (fndecl);
else if (TYPE_NEEDS_CONSTRUCTING (current_class_type))
- setup_vtbl_ptr ();
+ {
+ tree compound_stmt;
+
+ setup_vtbl_ptr ();
+ compound_stmt = begin_compound_stmt (/*has_no_scope=*/0);
+ finish_compound_stmt (/*has_no_scope=*/0, compound_stmt);
+ }
}
finish_function (lineno, 0, nested);
--- /dev/null
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+template <class T> void test(){
+ try {
+ }
+ catch(int x){
+ }
+}
+
+template void test<int>();