* cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
* decl.c (duplicate_decls): Remove special-case code to deal with
template friends, and just do the obvious thing.
* pt.c (register_specialization): Tweak for clarity, and also to
clear DECL_INITIAL for an instantiation before it is merged with a
specialization.
(check_explicit_specialization): Fix indentation.
(tsubst_friend_function): Handle both definitions in friend
declaration and outside friend declarations.
(tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
(regenerate_decl_from_template): Tweak accordingly.
(instantiate_decl): Likewise.
From-SVN: r23674
* decl.c (cplus_expand_expr_stmt): Promote warning about naked
member function reference to error.
* cvt.c (ocp_convert): Complain about converting an overloaded
function to void.
* init.c (build_offset_ref): Just return a lone static member
function.
* decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
not internal ones.
* typeck.c (build_binary_op_nodefault): Improve error handling.
* decl.c (grokfndecl): Complain about making 'main' a template.
* typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
* call.c (build_method_call): Handle a BIT_NOT_EXPR around a
TYPE_DECL in a template.
* typeck2.c (my_friendly_abort): Add URL in the other case, too.
From-SVN: r23673
* decl.c (struct cp_function): Add named_label_uses.
(push_cp_function_context): Save it.
(pop_cp_function_context): Restore it.
(define_label): Also complain about jumping into the scope of
non-POD objects that don't have constructors.
* tree.c (pod_type_p): New fn.
Fixes g++.other/init9.C
* pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
* rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
(get_tinfo_fn): Not here.
* repo.c (repo_get_id): Abort if we get called for an incomplete
type.
Fixes g++.pt/instantiate4.C
From-SVN: r23667
�
* decl.c (error_mark_node), java-tree.h: New global.
* parse.y: Use empty_stmt_node instead of size_zero_node.
(build_if_else_statement): If missing else, use empty_stmt_node.
* parse.y (not_initialized_as_it_should_p): Removed, with its callers.
(java_complete_expand_method): Complain if return is missing.
(java_check_regular_methods): Comment out incorrect error check.
(not_accessible_p): Fix incorrect handling of protected methods.
(patch_method_invocation): Pass correct context to not_accessible_p.
(find_applicable_accessible_methods_list): Likewise.
(qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
(java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
(patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
* jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
(push_int_const): Remove reundant NOTE_PUSH.
(generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
(- case SWITCH_EXPR): Fix code generation bug.
(- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
(generate_classfile): More robust for abstract methods.
From-SVN: r23661
Allow uses of interface types to verify. This is not really
type-safe, but it matches what Sun does, and is OK as long as
there are appropriate run-time checks.
* verify.c (merge_types): If merging two interface types,
just set the result to java.lang.Object.
* expr.c (pop_type): Any interface is matches by java.lang.Object.
From-SVN: r23657
�
Allow uses of interface types to verify. This is not really
type-safe, but it matches what Sun does, and is OK as long as
there are appropriate run-time checks.
* verify.c (merge_types): If merging two interface types,
just set the result to java.lang.Object.
* expr.c (pop_type): Any interface is matches by java.lang.Object.
From-SVN: r23656
* alpha.c (reg_not_elim_operand): New.
* alpha.h (PREDICATE_CODES): Add it.
* alpha.md (s48addq, s48subq patterns): Use it as the predicate
for the multiplicand.
From-SVN: r23650
* gjavah.c (main): Handle --output-class-directory argument.
* jvspec.c (lang_specific_driver): Translate `-d' into
-foutput-class-dir.
* jcf.h (jcf_write_base_directory): Declare.
* lang.c (lang_decode_option): Recognize -foutput-class-dir.
* lang-options.h: Mention -foutput-class-dir.
* jcf-write.c (jcf_write_base_directory): New global.
(make_class_file_name): Put generated .class file into `-d'
directory, or into source directory if -d not given. Function now
static.
(write_classfile): Free class file name. Handle case where class
file name is NULL.
(DIR_SEPARATOR): New macro.
Include <sys/stat.h>
From-SVN: r23640
* cplus-dem.c (demangle_prefix): Use the last __
in the mangled name when looking for the signature. This allows
template names to begin with __.
From-SVN: r23627
* jcf-io.c (find_class): Added explanatory comment.
* jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
trailing slash to `.zip' entries.
From-SVN: r23615
* jvspec.c (GC_NAME): New define.
(lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
if required.
* Make-lang.in (jvspec.o): Define WITH_GC_<name>.
From-SVN: r23612
* reload1.c (reload): Handle equivalences set up in multiple places.
* local-alloc.c (reg_equiv_init_insns): New variable.
(no_equiv): New function.
(update_equiv_regs): Handle equivalences set up in multiple places.
Don't ignore an insn just because its destination is likely to be
spilled.
From-SVN: r23610