Commit Graph

18819 Commits

Author SHA1 Message Date
Mark Mitchell
61a127b3d1 cp-tree.def (PTRMEM_CST): New tree node.
* cp-tree.def (PTRMEM_CST): New tree node.
	* cp-tree.h (ptrmem_cst): New type.
	(lang_type): Remove local_typedecls.
	(dummy): Increase to 12 bits from 11.
	(CLASSTYPE_LOCAL_TYPEDECLS): Remove.
	(PTRMEM_CST_CLASS): New macro.
	(PTRMEM_CST_MEMBER): Likewise.
	(current_access_specifier): New variable.
	(current_class_type): Remove duplicate declaration.
	(finish_struct): Change prototype.
	(unreverse_member_declarations): New function.
	(pushdecl_class_level): Change prototype.
	(grok_enum_decls): Remove.
	(fixup_anonymous_union): New function.
	(grok_x_components): Change prototype.
	(tsubst_chain): Remove.
	(finish_member_template_decl): Likewise.
	(check_explicit_specialization): Fix indentation.
	(finish_class_definition): Change prototype.
	(finish_member_class_template): Likewise.
	(finish_member_declaration): New function.
	(check_multiple_declarators): Likewise.
	* class.c (class_stack_node_t): New type.
	(current_class_base): Remove.
	(current_class_stack): Change type.
	(current_access_specifier): New variable.
	(grow_method): Remove.
	(check_member_decl_is_same_in_complete_scope): Break out from
	finish_struct.
	(make_method_vec): New function.
	(free_method_vec): Likewise.
	(add_implicitly_declared_members): Break out from finish_struct_1.
	(free_method_vecs): New variable.
	(add_method): Rework for direct use from parser.
	(handle_using_decl): Watch for NULL_TREE while iterating through
	CLASSTYPE_METHOD_VEC.
	(finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
	just do some error-checking.
	(warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
	(finish_struct_1): Simplify.  Use add_implicitly_declared_members.
	(finish_struct): Change prototype.  Simplify; fields and methods
	are already set up at this point.
	(init_class_processing): Set up current_class_stack.
	(pushclass): Save current_access_specifier.
	(popclass): Restore it.
	(currently_open_class): Simplify.
	(build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
	* decl.c (saved_scope): Add access_specifier.
	(maybe_push_to_top_level): Save it.
	(pop_from_top_level): Restore it.
	(maybe_process_template_type_declaration): Use
	finish_member_declaration.
	(pushtag): Likewise.
	(pushdecl_class_level): Don't return a value.
	(fixup_anonymous_union): Break out from grok_x_components.
	(shadow_tag): Use it.
	(xref_tag): Complain about using an elaborated type specifier to
	reference a template type parameter or typedef name.
	(xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(current_local_enum): Remove.
	(build_enumerator): Call finish_member_declaration.
	(grok_enum_decls): Remove.
	* decl2.c (grok_x_components): Simplify.
	(check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
	(grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(merge_functions): Add to comment.
	(arg_assoc_type): Prototype.
	(arg_assoc): Pass as many arguments as there are parameters.
	* error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
	OFFSET_REF.
	* expr.c (cpls_expand_expr): Remove dead code.  Handle
	PTRMEM_CST.
	* friend.c (do_friend): Lookup friends when in nested classes.
	Change comments.
	* init.c (build_offset_ref): Do lookup even for classes that are
	only partially defined.
	(decl_constant_value): Remove dead code.
	* method.c (build_overload_value): Remove hack where by TYPE was
	not a TYPE.  Handle PTRMEM_CST.
	(build_template_parm_names): Don't pass a PARM_DECL where a TYPE
	should go.
	* parse.y (components, notype_components, component_decl,
	component_decl_1, component_declarator, component_declarator0):
	Now all are itype rather than ttype.  Rework to add members to
	classes on the fly.
	(typesqpecqual_reserved): Use check_multiple_declarators.
	(structsp): Update class to finish_class_definition.
	(do_xref_defn): Unsplit into named_class_head.
	(access_specifier): Set current_access_specifier.
	* pt.c (set_current_access_from_decl): New function.
	(finish_member_template_decl): Don't take the parameters.
	(comp_template_args): Make more robust.
	(lookup_template_class): Don't use current_local_enum.
	(for_each_template_parm): Handle PTRMEM_CST.
	(instantiate_class_template): Use set_current_access_from_decl,
	finish_member_declaration and unreverse_member_declarations.  Set
	lineno/input_filename before generating implicit member functions.
	(type_unification_real): Don't assume back-unification happens
	only for the last argument.
	(regenerate_decl_from_template): Call pushclass a bit earlier.
	(tsubst_chain): Remove.
	(tsubst_enum): Use set_current_access_from_decl.
	(set_mangled_name_for_template_decl): Fix indentation.
	* search.c (lookup_fnfields_1): Change iteration through
	CLASSTYPE_METHOD_VEC.
	(dfs_pushdecls): Likewise.
	(dfs_compress_decls): Likewise.
	(add_conversions): Likewise.
	* semantics.c (finish_class_definition): Don't take components.
	Change call to finish_struct.
	(finish_member_declaration): New function.
	(finish_member_class_template): Don't take template parameters.
	Change call to grok_x_components.  Call finish_member_template_decl.
	(check_multiple_declarators): New function.
	* sig.c (append_signature_fields): Work from the TYPE_METHODS, not
	a passed in fieldlist.
	* tree.c (search_tree): Handle PTRMEM_CST.
	(mapcar): Likewise.
	* typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
	INTEGER_CSTs, for pointer-to-data members.

From-SVN: r22869
1998-10-06 14:20:30 +00:00
Catherine Moore
1c9a32c2d5 sysv4.h (ASM_OUTPUT_SECTION_NAME): Don't check for flag_function_sections.
* config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME):  Don't
        check for flag_function_sections.

From-SVN: r22868
1998-10-06 09:47:21 -04:00
Mark Mitchell
683b80daf3 call.c (resolve_args): Resolve template specializations, if possible.
* call.c (resolve_args): Resolve template specializations, if
	possible.

From-SVN: r22867
1998-10-06 12:38:05 +00:00
J"orn Rennecke
37053d1fe5 * cse.c (insert_regs): Fix bug in Sep 24 change.
From-SVN: r22866
1998-10-06 13:04:55 +01:00
J"orn Rennecke
b707b4509b Cleanup for -fdump-unnumbered:
* flags.h (flag_dump_unnumbered): Declare.
	* toplev.c (flag_dump_unnumbered): Don't declare.
	* print-rtl.c (flags.h): Include.
	(print_rtl_single): Add return value.
	* rtl.h (print_rtl_single): Update declaration.
	* flow.c (flag_dump_unnumbered): Don't declare.
	(print_rtl_with_bb): Use return value of print_rtl_single.

From-SVN: r22865
1998-10-06 10:03:38 +01:00
Kaveh R. Ghazi
87603ed0ee Warning fixes:
* Makefile.in (spew.o): Depend on toplev.h.
        * call.c (compare_ics): Initialize variables `deref_from_type2',
        `deref_to_type1' and `deref_to_type2'.
        * except.c (get_eh_type): Hide prototype and definition.
        (process_start_catch_block_old): Remove unused static prototype.
        * pt.c (tsubst_decl): Initialize variable `argvec'.
        * spew.c: Include toplev.h.

From-SVN: r22864
1998-10-06 05:04:32 +00:00
Jeff Law
bcd26ca722 Daily bump.
From-SVN: r22863
1998-10-05 18:45:02 -06:00
Bernd Schmidt
cad6f7d050 Makefile.in (stupid.o): Update dependencies.
* Makefile.in (stupid.o): Update dependencies.
	(global.o): Likewise.
	* global.c: Include reload.h
	(reg_becomes_live): New function.
	(reg_dies): New function.
	(build_insn_chain): New function.
	(global_alloc): Call build_insn_chain before calling reload.
	* reload.h (struct needs): New structure definition.
	(struct insn_chain): Likewise.
	(reload_insn_chain): Declare variable.
	(new_insn_chain): Declare function.
	* reload1.c (reload_startobj): New variable.
	(reload_insn_chain): New variable.
	(unused_insn_chains): New variable.
	(new_insn_chain): New function.
	(init_reload): Initialize reload_startobj, not reload_firstobj.
	(reload): Initialize reload_firstobj.
	Before returning, free everything on the reload_obstack.
	* stupid.c: Include insn-config.h, reload.h and basic-block.h.
	(reg_where_dead_chain, reg_where_born_exact, reg_where_born_clobber,
	current_chain): New variables.
	(reg_where_born): Delete variable.
	(REG_WHERE_BORN): New macro.
	(find_clobbered_regs): New function.
	(stupid_life_analysis): Don't allocate/free reg_where_born.
	Allocate and free reg_where_born_exact, reg_where_born_clobber,
	reg_where_dead_chain.
	Use REG_WHERE_BORN instead of reg_where_born.
	While processing the insns, build the reload_insn_chain with
	information about register lifetimes.
	(stupid_reg_compare): Use REG_WHERE_BORN instead of reg_where_born.
	(stupid_mark_refs): Replace arg INSN with arg CHAIN.  All callers
	changed.
	Compute and information about birth and death of pseudo registers in
	reg_where_dead_chain, reg_where_born_exact and reg_where_born_clobber.
	Delete code to set elements of reg_where_born.

From-SVN: r22862
1998-10-05 18:39:23 -06:00
Alexandre Oliva
0eaae86cab friend35.C: New test.
* g++.old-deja/g++.pt/friend35.C: New test.  A template function
 	must be declared before its specializations can be named in friend
 	declarations.

From-SVN: r22861
1998-10-06 00:24:05 +00:00
Alexandre Petit-Bianco
40208b1c3a tree.def (GOTO_EXPR): Modified documentation.
0
	* tree.def (GOTO_EXPR): Modified documentation.
	* expr.c (expand_expr): Expand GOTO_EXPR into a goto or a computed
 	goto.

From-SVN: r22860
1998-10-05 15:36:18 -07:00
Alexandre Petit-Bianco
70e6ca43a3 tree.def (GOTO_EXPR): Modified documentation.
8
	* tree.def (GOTO_EXPR): Modified documentation.
	* expr.c (expand_expr): Expand GOTO_EXPR into a goto or a computed
 	goto.

From-SVN: r22859
1998-10-05 15:36:16 -07:00
Jason Merrill
c27be9b9fc pt.c (instantiate_decl): Do save and restore file position.
* pt.c (instantiate_decl): Do save and restore file position.
	* method.c (build_decl_overload_real): Clear
	numeric_output_need_bar after __.
	* call.c (build_new_method_call): Issue 'incomplete type' error,
	if class is not defined.

From-SVN: r22856
1998-10-05 18:10:23 -04:00
David Edelsohn
cac8ce95a1 unroll.c (loop_iteration_var, [...]): No longer static.
* unroll.c (loop_iteration_var, loop_initial_value, loop_increment
        loop_final_value, loop_comparison_code): No longer static.
        (unroll_loop): Delete loop_start_value update.
        * loop.h (loop_iteration_var, loop_initial_value, loop_increment,
        loop_final_value, loop_comparison_code): Extern.
        (loop_start_value): Delete extern.
        * loop.c (loop_can_insert_bct, loop_increment, loop_start_value,
        loop_comparison_value, loop_comparison_code): Delete.
        (loop_optimize): Remove initialization for deleted variables.
        (strength_reduce): Delete analyze_loop_iterations call.  Only call
        insert_bct if flag_branch_count_on_reg set.
        (analyze_loop_iterations): Delete.
        (insert_bct): Remove iteration count calculation.  Move checks for
        viable BCT optimization to here.  Obtain iteration count from
        loop_iterations and correct for unrolling.  Check for enough
        iteration to be beneficial.  Comment out runtime iteration count
        case.
        (insert_bct): Print iteration count in dump file.  Remove
        loop_var_mode and use word_mode directly.
        * rs6000.h (processor_type): Add PROCESSOR_PPC604e.
        * rs6000.c (rs6000_override_options): Use it.
        (optimization_options): Enable use of flag_branch_on_count_reg.
        * rs6000.md (define_function_unit): Describe 604e.

From-SVN: r22852
1998-10-05 18:03:25 -04:00
Kaveh Ghazi
d64db93fbc call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used.
* call.c (build_object_call): Move declaration of variable
        `fn' into the scope where it is used.  Don't access variable
        `fn' when it is uninitialized, instead use `fns'.

From-SVN: r22850
1998-10-05 21:31:14 +00:00
Kaveh Ghazi
08d292de20 call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used.
* call.c (build_object_call): Move declaration of variable
        `fn' into the scope where it is used.  Don't access variable
        `fn' when it is uninitialized, instead use `fns'.

From-SVN: r22849
1998-10-05 21:13:46 +00:00
Herman A.J. ten Brugge
877ca132ec loop.c (move_movables): Corrected threshold calculation for moved_once registers.
* loop.c (move_movables): Corrected threshold calculation for
        moved_once registers.

From-SVN: r22847
1998-10-05 14:48:22 -06:00
Bernd Schmidt
da5a44b36e * loop.c (combine_givs_p): Fix test for identical givs.
From-SVN: r22845
1998-10-05 14:20:39 -06:00
Dave Love
5d7d0cae2f u77-test.f: Add regression test for RAND.
1998-10-05  Dave Love  <d.love@dl.ac.uk>
	* g77.f-torture/execute/u77-test.f: Add regression test for RAND.
	* g77.f-torture/execute/io1.f: New test.

From-SVN: r22844
1998-10-05 11:45:31 +00:00
Dave Love
d88c06be2c Add regression test for RAND.
From-SVN: r22843
1998-10-05 11:44:43 +00:00
Dave Love
bd7aa7c3f7 New test.
From-SVN: r22842
1998-10-05 11:44:03 +00:00
Kaveh R. Ghazi
a3225b7a3d warn_summary (subdirectoryFilter): New shell function to optionally filter in/out gcc subdirectories when...
* warn_summary (subdirectoryFilter): New shell function to
       optionally filter in/out gcc subdirectories when summarizing
       warnings.  Add new flags to support subdirectory filtering.
       Also, ensure the bootstrap stage is a number.  Add some more C
       keywords that are preserved in the "warning type" summary and
       tighten up the "arg ???" regexp.

From-SVN: r22839
1998-10-05 11:27:05 +00:00
Nick Clifton
b75ab88ba3 If errorcount nonzero, don't call abort if the function is already defined.
From-SVN: r22836
1998-10-05 10:12:39 +00:00
Jeff Law
6a99221410 combine.c (simplify_rtx): Do not replace TRUNCATE with a SUBREG if truncation is not a no-op.
8
        * combine.c (simplify_rtx): Do not replace TRUNCATE with a SUBREG if
        truncation is not a no-op.

From-SVN: r22835
1998-10-05 03:05:58 -06:00
Jeff Law
f385990fce combine.c (simplify_rtx): Do not replace TRUNCATE with a SUBREG if truncation is not a no-op.
�
        * combine.c (simplify_rtx): Do not replace TRUNCATE with a SUBREG if
        truncation is not a no-op.

From-SVN: r22834
1998-10-05 03:05:56 -06:00
Jeffrey A Law
01e6961906 Bump for snapshot
From-SVN: r22832
1998-10-05 03:02:11 -06:00
Jeffrey A Law
d03e855440 Bump for snapshot
From-SVN: r22831
1998-10-05 02:19:58 -06:00
Jeff Law
691a430d48 Daily bump.
From-SVN: r22830
1998-10-04 18:45:02 -06:00
H.J. Lu
3f219cad5d Makefile.in (s-libi77): Depend on i77.
* Makefile.in (s-libi77): Depend on i77.
        (s-libf77): Depend on i77.
        (s-libu77): Depend on u77.

From-SVN: r22829
1998-10-04 18:17:29 -06:00
Torbjorn Granlund
32fdf36bb6 expmed.c (expand_divmod): Don't widen for computing remainder if we seem to have a divmod pattern for...
* expmed.c (expand_divmod): Don't widen for computing remainder
        if we seem to have a divmod pattern for needed mode.

From-SVN: r22828
1998-10-04 18:08:56 -06:00
Zack Weinberg
4284b774e6 cpplib.c (macroexpand): Correct off-by-one error in handling of escapes.
* cpplib.c (macroexpand): Correct off-by-one error in handling
        of escapes.

From-SVN: r22827
1998-10-04 18:03:35 -06:00
Richard Henderson
861556b4d9 combine.c (expand_field_assignment): Don't do bitwise operations on MODE_FLOAT; pun to MODE_INT if possible.
* combine.c (expand_field_assignment): Don't do bitwise operations
        on MODE_FLOAT; pun to MODE_INT if possible.

From-SVN: r22826
1998-10-04 16:59:58 -07:00
Theodore Papadopoulo
12a27dfc4e errfn.c (cp_thing): Print buf as a string not as a printf format to avoid problems with the operator%.
* errfn.c (cp_thing): Print buf as a string not as a printf format
	to avoid problems with the operator%. Consequently, `%%' sequences
	in format are copied as `%' in buf.

From-SVN: r22825
1998-10-04 17:12:11 -04:00
Jason Merrill
5f2c99c43b pt.c (pop_tinst_level): Call extract_interface_info.
* pt.c (pop_tinst_level): Call extract_interface_info.
	(instantiate_decl): Don't save and restore file position.
	* decl.c (cp_finish_decl): Make statics in extern inlines and
	templates common, if possible and the target doesn't support weak
	symbols.

From-SVN: r22824
1998-10-04 16:10:49 -04:00
Jason Merrill
b4558b577c tlink.c (scan_linker_output): Recognize errors from irix 6.2 linker.
* tlink.c (scan_linker_output): Recognize errors from irix 6.2
	linker.  Recognize mangled names in quotes.

Co-Authored-By: Scott Snyder <snyder@fnal.gov>

From-SVN: r22823
1998-10-04 15:37:42 -04:00
Robert Lipe
82872b5cde Correct typo in robertl's most recent entry.
From-SVN: r22822
1998-10-04 18:01:59 +00:00
Jason Merrill
70189f1266 update
From-SVN: r22821
1998-10-04 12:21:01 -04:00
Jason Merrill
14ae7e7d28 decl.c (grokdeclarator): Remove redundant calls to build_type_variant and some duplicated code.
* decl.c (grokdeclarator): Remove redundant calls to
	build_type_variant and some duplicated code.
	* sig.c (build_signature_reference_type): Only take the type parm.
	(build_signature_pointer_type): Likewise.
	* tree.c (build_cplus_method_type): Adjust.
	* cp-tree.h: Update.

From-SVN: r22820
1998-10-04 12:20:59 -04:00
Alexandre Oliva
710afba434 mark XFAIL where appropriate
From-SVN: r22819
1998-10-04 15:44:37 +00:00
Alexandre Oliva
00f1494939 overload5.C: New test...
* g++.old-deja/g++.pt/overload5.C: New test; initialize variable
 	with pointer to template function, for which no argument deduction
 	is possible
	* g++.old-deja/g++.pt/overload4.C: New test; passing pointer to
	specialization of template function as argument to template
	function
	* g++.old-deja/g++.other/access2.C: New test; Inner class
	shouldn't have privileged access to Outer's names

From-SVN: r22818
1998-10-04 15:31:58 +00:00
Mark Mitchell
a1b8d8ffae call.c (build_over_call): Make pedwarns about dropped qualifiers into full-fledged errors.
* call.c (build_over_call): Make pedwarns about dropped qualifiers
	into full-fledged errors.
	* cvt.c (convert_to_reference): Likewise.
	* typeck.c (convert_for_assignment): Likewise.

From-SVN: r22809
1998-10-04 11:36:26 +00:00
Mark Mitchell
6396c3a579 search.c (expand_upcast_vtables): In addition to unsetting TREE_READONLY, remove top-level const type qualifier.
* search.c (expand_upcast_vtables): In addition to unsetting
	TREE_READONLY, remove top-level const type qualifier.

From-SVN: r22808
1998-10-04 11:17:08 +00:00
Jakub Jelinek
295c5559cc sparc.md (ashldi3+1): Name it ashldi3_sp64.
* config/sparc/sparc.md (ashldi3+1): Name it ashldi3_sp64.
	(ashlsi3_const1, ashldi3_const1): New combiner patterns.
	(ashrsi3_extend, ashrsi3_extend2): New combiner patterns.
	(lshrsi3_extend, lshrsi3_extend2): Ditto.

From-SVN: r22805
1998-10-03 21:05:38 -07:00
David S. Miller
ca2636edcd function.c (purge_addressof_1): If trying to take a sub-word integral piece of a floating point mode...
* function.c (purge_addressof_1): If trying to take a sub-word
	integral piece of a floating point mode, put it on the stack.

From-SVN: r22804
1998-10-03 18:29:21 -07:00
Jeff Law
223bd5493d Daily bump.
From-SVN: r22803
1998-10-03 18:45:02 -06:00
Mark Mitchell
01240200ee class.c (current_class_ptr, [...]): Clarify documentation.
* class.c (current_class_ptr, current_class_ref): Clarify
	documentation.
	* cvt.c (ocp_convert): Don't expect fold to remove all trivial
	NOP type conversions.
	* decl.c (decls_match): Use comptypes directly; ignore
	qualifiers on the DECL.
	(duplicate_decls): Remove qualifier checks on DECL.
	(grokdeclarator): Make the type built up include top-level
	qualifiers.
	* decl2.c (do_dtors): Fix spelling error.
	* error.c (dump_simple_decl): Don't look at qualifiers on the decl
	when printing type information.
	* init.c (build_new_1): Add documentation.  Deal with the fact
	that type of allocated memory now contains qualifiers.
	* lex.c (is_global): Improve error-recovery.
	* sig.c (build_member_function_pointer): Don't cast away const
	on fields of sigtable_entry_type.
	* tree.c (lvalue_type): Don't look at top-level qualifiers on
	expressions.
	* typeck.c (decay_conversion): Likewise.
	(build_component_ref): Make sure the type of the COMPONENT_REF
	contains top-level qualifiers, as appropriate.  Improve
	error-handling.
	(build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
	(build_array_ref): Likewise.
	(build_unary_op): Improve error-recovery.
	(unary_complex_lvalue): Make taking the address a bound member
	function an error, not a sorry.
	(build_conditional_expr): Look at the type qualifiers, not the
	qualifiers on the expression itself.

From-SVN: r22802
1998-10-03 23:11:19 +00:00
Jason Merrill
d5698b0753 new
From-SVN: r22801
1998-10-03 18:59:10 -04:00
Jason Merrill
5eea678fdb decl2.c (merge_functions): Remove duplicates.
* decl2.c (merge_functions): Remove duplicates.
	* decl2.c: Add -f{no-,}implicit-inline-templates.
	(lang_decode_option): Unset it if -frepo.
	(import_export_decl): Check it.
	* decl.c (lookup_name_real): Template parms also take precedence
	over implicit typename.  Only warn if yylex.

From-SVN: r22800
1998-10-03 18:53:37 -04:00
Richard Henderson
4d77340e3d * alpha/linux.h (CPP_PREDEFINES): Define __alpha__ for imake.
From-SVN: r22796
1998-10-03 12:02:05 -07:00
Jason Merrill
04682bc777 update
From-SVN: r22795
1998-10-03 12:49:31 -04:00
Jason Merrill
3bbb73169a typeck.c (build_conditional_expr): Only fold if ifexp is an INTEGER_CST.
* typeck.c (build_conditional_expr): Only fold if ifexp is an
	INTEGER_CST.

From-SVN: r22794
1998-10-03 11:56:25 -04:00