mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 22:21:44 +08:00
85th Cygnus<->FSF quick merge
From-SVN: r11597
This commit is contained in:
parent
c7b1ed2b88
commit
909e536aa5
@ -1,3 +1,24 @@
|
||||
Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
|
||||
|
||||
* typeck.c (require_complete_type): Be sure to instantiate the
|
||||
MAIN_VARIANT of the type.
|
||||
|
||||
* decl2.c (finish_file): Instantiate pending templates before
|
||||
processing static constructors and destructors.
|
||||
|
||||
* pt.c (instantiate_decl): Don't instantiate functions at toplevel
|
||||
unless at_eof.
|
||||
|
||||
Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
|
||||
|
||||
* decl2.c (delete_sanity): If error_mark_node is passed
|
||||
in as an expression, quit while we're ahead.
|
||||
|
||||
* decl.c (grokdeclarator): Give an error message if `friend'
|
||||
is combined with any storage class specifiers.
|
||||
|
||||
Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* parse.y (named_complex_class_head_sans_basetype): Don't crash on
|
||||
|
@ -8268,6 +8268,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises, attrli
|
||||
error ("top-level declaration of `%s' specifies `auto'", name);
|
||||
}
|
||||
|
||||
if (nclasses > 0 && friendp)
|
||||
error ("storage class specifiers invalid in friend function declarations");
|
||||
|
||||
/* Now figure out the structure of the declarator proper.
|
||||
Descend through it, creating more complex types, until we reach
|
||||
the declared identifier (or NULL_TREE, in an absolute declarator). */
|
||||
|
@ -1124,6 +1124,9 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
|
||||
this down as a NULL_TREE into build_vec_delete. */
|
||||
tree maxindex = NULL_TREE;
|
||||
|
||||
if (exp == error_mark_node)
|
||||
return exp;
|
||||
|
||||
if (current_template_parms)
|
||||
{
|
||||
t = build_min (DELETE_EXPR, void_type_node, exp, size);
|
||||
@ -2822,10 +2825,6 @@ finish_file ()
|
||||
|
||||
start_time = get_run_time ();
|
||||
|
||||
/* Push into C language context, because that's all
|
||||
we'll need here. */
|
||||
push_lang_context (lang_name_c);
|
||||
|
||||
/* Otherwise, GDB can get confused, because in only knows
|
||||
about source for LINENO-1 lines. */
|
||||
lineno -= 1;
|
||||
@ -2833,6 +2832,16 @@ finish_file ()
|
||||
interface_unknown = 1;
|
||||
interface_only = 0;
|
||||
|
||||
for (fnname = pending_templates; fnname; fnname = TREE_CHAIN (fnname))
|
||||
{
|
||||
tree decl = TREE_VALUE (fnname);
|
||||
instantiate_decl (decl);
|
||||
}
|
||||
|
||||
/* Push into C language context, because that's all
|
||||
we'll need here. */
|
||||
push_lang_context (lang_name_c);
|
||||
|
||||
#if 1
|
||||
/* The reason for pushing garbage onto the global_binding_level is to
|
||||
ensure that we can slice out _DECLs which pertain to virtual function
|
||||
@ -3082,11 +3091,6 @@ finish_file ()
|
||||
if (flag_handle_signatures)
|
||||
walk_sigtables ((void (*)())0, finish_sigtable_vardecl);
|
||||
|
||||
for (fnname = pending_templates; fnname; fnname = TREE_CHAIN (fnname))
|
||||
{
|
||||
tree decl = TREE_VALUE (fnname);
|
||||
instantiate_decl (decl);
|
||||
}
|
||||
for (fnname = saved_inlines; fnname; fnname = TREE_CHAIN (fnname))
|
||||
{
|
||||
tree decl = TREE_VALUE (fnname);
|
||||
|
@ -1226,7 +1226,7 @@ stands.
|
||||
|
||||
Only exact type matching or reference matching of throw types works when
|
||||
-fno-rtti is used. Only works on a SPARC (like Suns), i386, arm,
|
||||
rs6000, PowerPC, Alpha, mips, VAX, and m68k machines. Partial support
|
||||
rs6000, PowerPC, Alpha, mips, VAX, m68k and z8k machines. Partial support
|
||||
is in for all other machines, but a stack unwinder called
|
||||
__unwind_function has to be written, and added to libgcc2 for them. The
|
||||
new EH code doesn't rely upon the __unwind_function for C++ code,
|
||||
|
@ -1566,6 +1566,7 @@ tsubst (t, args, nargs, in_decl)
|
||||
{
|
||||
tree r = copy_node (t);
|
||||
TREE_TYPE (r) = type;
|
||||
DECL_CONTEXT (r) = current_class_type;
|
||||
set_nested_typename (r, current_class_name, DECL_NAME (r), type);
|
||||
TREE_CHAIN (r) = NULL_TREE;
|
||||
return r;
|
||||
@ -2935,7 +2936,12 @@ instantiate_decl (d)
|
||||
if (! pattern_defined
|
||||
|| (TREE_CODE (d) == FUNCTION_DECL && ! DECL_INLINE (d)
|
||||
&& (! DECL_INTERFACE_KNOWN (d)
|
||||
|| ! DECL_NOT_REALLY_EXTERN (d))))
|
||||
|| ! DECL_NOT_REALLY_EXTERN (d)))
|
||||
/* Kludge: if we compile a constructor in the middle of processing a
|
||||
toplevel declaration, we blow away the declspecs in
|
||||
temp_decl_obstack when we call permanent_allocation in
|
||||
finish_function. So don't compile it yet. */
|
||||
|| (TREE_CODE (d) == FUNCTION_DECL && ! nested && ! at_eof))
|
||||
{
|
||||
add_pending_template (d);
|
||||
return d;
|
||||
|
@ -112,7 +112,7 @@ require_complete_type (value)
|
||||
|
||||
if (IS_AGGR_TYPE (type) && CLASSTYPE_TEMPLATE_INSTANTIATION (type))
|
||||
{
|
||||
instantiate_class_template (type);
|
||||
instantiate_class_template (TYPE_MAIN_VARIANT (type));
|
||||
if (TYPE_SIZE (type) != 0)
|
||||
return value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user