Commit Graph

15741 Commits

Author SHA1 Message Date
Jim Wilson
948edfa702 decl.c (start_function): Don't call temporary_allocation for a nested function.
* decl.c (start_function): Don't call temporary_allocation for a
	nested function.

From-SVN: r18356
1998-03-02 06:06:14 -05:00
Jeffrey A Law
54f00917bc Bump for snapshot
From-SVN: r18354
1998-03-01 18:05:53 -07:00
Jeffrey A Law
38630f7e2e Bump for snapshot
From-SVN: r18353
1998-03-01 17:52:20 -07:00
Jason Merrill
574817a219 pt.c (instantiate_class_template): Don't mess with friends if our type uses template parms.
* pt.c (instantiate_class_template): Don't mess with friends if
	our type uses template parms.

From-SVN: r18350
1998-03-01 16:07:22 -05:00
Jeff Law
ab63953e19 reorg.c (fill_slots_from_thread): Don't steal delay list from target if condition code of jump conflicts with...
* reorg.c (fill_slots_from_thread): Don't steal delay list from target
        if condition code of jump conflicts with opposite_needed.
        * reorg.c (fill_slots_from_thread): Mark resources referenced in
        opposite_needed thread.  Return delay_list even when cannot get
        any more delay insns from end of subroutine.
        * reorg.c (fill_slots_from_thread): New parameter, delay_list.
        All callers changed.

From-SVN: r18348
1998-03-01 10:24:18 -07:00
Jeffrey A Law
925b1f338e * ginclude/va-ppc.h (va_arg): Fix typo in long long support.
From-SVN: r18346
1998-03-01 10:11:31 -07:00
Bruno Haible
72dd050ade frame.c (start_fde_sort, [...]): New functions for fast sorting of an FDE array.
* frame.c (start_fde_sort, fde_split, heapsort, fde_merge,
        end_fde_sort): New functions for fast sorting of an FDE array.
        (fde_insert): Simplified.
        (add_fdes): Change argument list.
        (frame_init): Use the new functions.

From-SVN: r18345
1998-03-01 10:09:39 -07:00
Jeffrey A Law
c7271385a3 * i386.c (reg_mentioned_in_mem): Fix dangling else statement.
From-SVN: r18344
1998-03-01 10:07:50 -07:00
Jeffrey A Law
de153e8290 * fold-const.c (fold_range_test): Always return a value.
From-SVN: r18343
1998-03-01 10:04:14 -07:00
Mumit Khan
81023100d3 winnt.c (i386_pe_unique_section): Put read-only data in the text section unless READONLY_DATA_SECTION is defined.
* config/i386/winnt.c (i386_pe_unique_section): Put read-only
        data in the text section unless READONLY_DATA_SECTION is defined.

From-SVN: r18342
1998-03-01 09:55:15 -07:00
Jeffrey A Law
818e50a59d c-parse.in (undeclared variable error): Tweak error message to be clearer.
* c-parse.in (undeclared variable error): Tweak error message to
        be clearer.

From-SVN: r18341
1998-03-01 09:46:44 -07:00
Jeffrey A Law
c93dc3ace6 Bump for snapshot
From-SVN: r18325
1998-03-01 03:22:38 -07:00
Jason Merrill
ca40b399b1 missed
From-SVN: r18324
1998-02-28 20:57:25 -05:00
Mark Mitchell
90ca38bbee * final.c (final_scan_insn): Undo overzealous removal of `set'.
From-SVN: r18323
1998-03-01 00:08:36 +00:00
Jason Merrill
b9af0782c4 new
From-SVN: r18304
1998-02-28 10:32:36 -05:00
Jason Merrill
11686454d6 parse.y (nested_name_specifier): Use explicit_template_type.
* parse.y (nested_name_specifier): Use explicit_template_type.
	(typename_sub): Allow a template_type, an explicit_template_type,
	or an implicit template type at the end.
	* lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
	* decl.c (make_typename_type): Handle template-id where the name
	is a TEMPLATE_DECL.
	* call.c (build_scoped_method_call): Handle member template
	destructor call.
	* pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
	destructor is represented by the type.

From-SVN: r18303
1998-02-28 10:32:02 -05:00
Jason Merrill
b2b7d40a91 cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
* cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
	* parse.y (nested_name_specifier): Add 'template' case.
	(explicit_template_type): New rule.
	(typename_sub): Use it.
	* decl.c (make_typename_type): Handle getting a template-id for NAME.
	* pt.c (tsubst): Likewise.

From-SVN: r18296
1998-02-28 07:19:29 -05:00
Kaveh R. Ghazi
5feca98414 pa.h (CONST_COSTS): When checking the CONST_DOUBLE enumerated case...
* pa.h (CONST_COSTS): When checking the CONST_DOUBLE enumerated
       case, add parentheses to specify the proper order of precedence in
       the if-statement.

From-SVN: r18291
1998-02-28 07:34:12 +00:00
Kaveh R. Ghazi
5172371191 Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h.
	* pa.c: Include stdlib.h.
	(pa_combine_instructions): Prototype the function.
	(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
	(reloc_needed): Add default case for enumeration switch.
	(remove_useless_addtr_insns): Remove unused variable `all'.
	(hppa_expand_prologue): Add explicit braces to avoid
	ambiguous `else'.
	(output_function_epilogue): Remove unused variable `i'.
	(output_millicode_call): Remove unused variable `link'.
	(shadd_constant_p, forward_branch_p): Make the function static.
	(following_call): Explicitly declare to return int.
	(pa_reorg): Declare as void.
	(pa_combine_instructions): Declare as static void.  Add
	parentheses around && within ||.
	* pa.h: Add prototypes for pa_reorg, symbolic_operand,
	following_call, function_label_operand, lhs_lshift_cint_operand
	and zdepi_cint_p.
	* pa.md: Add parentheses around && within ||.
	* cppalloc.c: Include stdlib.h.
	* cpperror.c (cpp_print_containing_files): Remove unused variable
	`i'.  Fix format specifier in fprintf.
	* cse.c (cse_around_loop): Add explicit braces to avoid
	ambiguous `else'.
	(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
	* expr.c (expand_expr): Add parentheses around && within ||.
	* final.c (app_enable): Replace fprintf with fputs where there are
	no format specifiers and no trailing argument after the string.
	Eg, when printing ASM_APP_ON/ASM_APP_OFF.
	(app_disable): Likewise.
	(final_end_function): Likewise.
	(final_scan_insn): Likewise.  Remove unused variable `set'.
	(profile_function): Wrap empty if-statement body in {} brackets.
	* function.c: Include stdlib.h.
	(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
	(reposition_prologue_and_epilogue_notes): Add parentheses
	around assignment used as truth value.
	* integrate.c (expand_inline_function): Wrap variable
	`cc0_insn' in macro HAVE_cc0.
	* jump.c (jump_optimize): Wrap variable `q' in macro
	HAVE_cc0.  Remove unused variable `prev1'.
	* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
	within ||.  Fix format specifier in fprintf.
	(__bb_init_prg): Add parentheses around assignment used as
	truth value.
	* local-alloc.c: Include stdlib.h.
	(requires_inout): Add parentheses around assignment used
	as truth value.
	* loop.c (analyze_loop_iterations): Wrap prototype and definition
	in macro HAVE_decrement_and_branch_on_count.
	(insert_bct, instrument_loop_bct): Likewise.
	(move_movables): Add parentheses around assignment used as
	truth value.
	(consec_sets_invariant_p): Likewise.
	(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
	* objc/objc-act.c: Include stdlib.h.
	(lookup_method_in_protocol_list): Wrap empty else-statement body
	in braces.
	(lookup_protocol_in_reflist): Likewise.
	(objc_add_static_instance): Remove unused variables `decl_expr'
	and `decl_spec'.
	(get_objc_string_decl): Remove unused variable `decl'.
	(generate_static_references): Remove unused variables `idecl' and
	`instance'.
	(check_protocols): Wrap empty else-statement body in braces.
	* protoize.c: Include stdlib.h.
	(substr): Add parentheses around assignment used as truth value.
	(abspath): Likewise.
	(shortpath): Likewise.
	* regmove.c (fixup_match_1): Add parentheses around assignment
	used as truth value.
	* reload.c (push_secondary_reload): Remove unused variable `i'.
	(find_reloads): Add parentheses around assignment used as truth
	value.
	* reload1.c: Include stdlib.h.
	* rtl.h: Correct typo in prototype of offsettable_memref_p.
	* stmt.c (add_case_node): Add parentheses around assignment used
	as truth value.
	(case_tree2list): Likewise.
	* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
	in macro VALID_MACHINE_DECL_ATTRIBUTE.  Wrap variable
	`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
	(merge_attributes): Add explicit braces to avoid ambiguous
	`else'.
	* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in
	macro HAVE_cc0.
	* varasm.c: Include stdlib.h.

From-SVN: r18290
1998-02-28 07:06:53 +00:00
Kaveh R. Ghazi
c580105315 I've backed out of including stat.h via system.h because stat.h can define...
I've backed out of including stat.h via system.h because stat.h can
define static functions (eg on x86 svr4 according to jfc@mit.edu)
causing code bloat.
        * system.h: Remove sys/stat.h.
        * gcc.c: Add sys/stat.h.

From-SVN: r18289
1998-02-28 06:11:54 +00:00
Kaveh Ghazi
3d85c12ecc ChangeLog entry, omitted for change described below, is now installed:
* genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE.
        * genattrtab.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * tlink.c: Likewise.  Also wrap `getenv' in NEED_DECLARATION_GETENV.

From-SVN: r18288
1998-02-28 05:01:14 +00:00
Jason Merrill
bd8c73e92a new
From-SVN: r18287
1998-02-27 12:46:18 -05:00
Jason Merrill
db897306f2 pt.c (add_to_template_args): Fix thinko.
* pt.c (add_to_template_args): Fix thinko.
	(instantiate_class_template): Call it later.

From-SVN: r18286
1998-02-27 12:46:01 -05:00
Jason Merrill
8d019cef1a Support partial specialization of member class templates.
* pt.c (get_class_bindings): Add outer_args parm.
	(most_specialized_class): Likewise.
	(instantiate_class_template): Pass it.
	(more_specialized_class): Likewise.
	(lookup_template_class): Get context from template if none
	was specified.
	(finish_member_template_decl): Don't do anything with a
	partial specialization.
	* decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
	AGGREGATE_TYPE_P.
	* class.c (finish_struct): Member class templates have already been
	checked for name clashes.
	* decl.c (pushdecl_with_scope): Handle pushing at class level.

From-SVN: r18285
1998-02-27 07:15:17 -05:00
Kaveh Ghazi
5987a4f34a genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE.
* genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE.
        * genattrtab.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * tlink.c: Likewise.  Also wrap `getenv' in NEED_DECLARATION_GETENV.

From-SVN: r18284
1998-02-27 08:23:47 +00:00
Jason Merrill
81ce6e9a35 new
From-SVN: r18283
1998-02-26 21:53:00 -05:00
Jason Merrill
5f311aeccd comment
From-SVN: r18282
1998-02-26 21:42:03 -05:00
Andreas Schwab
bd762873cd * invoke.texi: Use @itemx for a secondary item in a @table.
From-SVN: r18281
1998-02-27 02:30:29 +00:00
Jason Merrill
93cdc044ea pt.c (tsubst, [...]): Support member class templates.
* pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
	(tsubst, *_PARM): Support multiple levels of template classes.
	(instantiate_class_template): Look up the pattern from the
	original template.
	(lookup_template_class): Handle getting a template for d1.
	(push_template_decl): Correct setting of 'primary'.
	(reduce_template_parm_level): Add 'levels' parm.
	(finish_member_template_decl): Support member class templates.
	(template_class_depth): Handle multiple levels.
	* parse.y (component_decl_1, fn.def2): Remove member template case.
	(component_decl): Add member template cases.
	* decl2.c (check_member_template): We now handle member template
	classes.
	* decl.c (pushtag): Handle member templates.
	* method.c (do_inline_function_hair): Don't touch
	IDENTIFIER_GLOBAL_VALUE.
	* init.c (build_offset_ref): If name isn't an identifier, just
	return it.
	* spew.c (yylex): Handle PTYPENAME like TYPENAME.
	* typeck.c (get_delta_difference): Do adjust for conversions to
	and from virtual base.

From-SVN: r18280
1998-02-26 21:27:38 -05:00
Andreas Schwab
a7b4c0acc8 Update copyright
From-SVN: r18279
1998-02-27 02:26:47 +00:00
Andreas Schwab
0fd12b0449 m68k.md (movsf+1): Optimize moving a CONST_DOUBLE zero.
* config/m68k/m68k.md (movsf+1): Optimize moving a CONST_DOUBLE
	zero.

From-SVN: r18278
1998-02-27 02:10:47 +00:00
Ken Raeburn
acbce66755 regclass.c (init_reg_sets): Move init of move cost tables...
* regclass.c (init_reg_sets): Move init of move cost tables...
(init_reg_sets_1): ...to here.

From-SVN: r18273
1998-02-26 13:45:45 +00:00
Jeff Law
5cd4989aa1 Initial revision
From-SVN: r18245
1998-02-25 17:49:33 -07:00
Jeff Law
a0dfe933e2 choose-temp.c: Fix handling of sys/file.h to work in libiberty.
8
        * choose-temp.c: Fix handling of sys/file.h to work in libiberty.

From-SVN: r18242
1998-02-25 16:10:36 -07:00
Ian Lance Taylor
c3cf395b61 choose-temp.c: Fix handling of sys/file.h to work in libiberty.
* choose-temp.c: Fix handling of sys/file.h to work in libiberty.

From-SVN: r18241
1998-02-25 16:10:35 -07:00
Ian Lance Taylor
b9fb3c420b choose-temp.c: Fix handling of sys/file.h to work in libiberty.
Mon Feb 23 14:33:15 1998  Ian Lance Taylor  <ian@cygnus.com>
        * choose-temp.c: Fix handling of sys/file.h to work in libiberty.

From-SVN: r18240
1998-02-25 16:09:55 -07:00
Jeff Law
c1b2e68daa New testcase for x86 specific crash.
From-SVN: r18239
1998-02-25 16:07:14 -07:00
Jeffrey A Law
b94b5c16dd i386.c (struct machine_function): Add new fields for PIC stuff.
* i386.c (struct machine_function): Add new fields for PIC stuff.
        (save_386_machine_status): Fix argument to xmalloc.  Save pic_label_rtx
        and pic_label_name.
        (restore_386_machine_status): Corresponding changes.
        (clear_386_stack_locals): Also clear pic_label_rtx and pic_label_name.

From-SVN: r18237
1998-02-25 15:39:34 -07:00
Mark Mitchell
9b899da087 Add .cvsignore file.
From-SVN: r18231
1998-02-25 12:07:17 +00:00
Jason Merrill
32e02ee0c0 typeck.c (get_delta_difference): Give hard error for conversion from virtual base.
* typeck.c (get_delta_difference): Give hard error for conversion
	from virtual base.
	* cp-tree.h: Tweak formatting.

From-SVN: r18229
1998-02-25 05:07:07 -05:00
Jason Merrill
75cf27d4c9 update
From-SVN: r18228
1998-02-24 19:55:32 -05:00
Jason Merrill
30394414d9 Partial implementation of namespaces.
* decl.c (push_namespace): Handle redeclaration error.
	* cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
	(IDENTIFIER_NAMESPACE_BINDINGS): New macro.
	(NAMESPACE_BINDING): New macro.
	(IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
	* *.c: Use them.
	* pt.c (push_template_decl): Use innermost_args.
	* decl.c (get_unique_name): Tweak from earlier in the name.
	* cp-tree.def: Add CPLUS_BINDING node.
	* cp-tree.h (tree_binding): new struct
	(BINDING_SCOPE, BINDING_VALUE): new macros
	(current_namespace, global_namespace): declare extern
	(struct lang_decl_flags): new field in_namespace
	(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
	(DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
	(TREE_INDIRECT_USING): new macro
	* decl2.c (current_namespace, global_namespace): Declare.  The
	value is a NAMESPACE_DECL now, not a TREE_LIST.
	(is_namespace_ancestor, namespace_ancestor):new static functions.
	(add_using_namespace, ambiguous_decl): likewise.
	(lookup_using_namespace): new support function for lookup_name.
	(qualified_lookup_using_namespace): new support function for
	do_scoped_id and lookup_namespace_name
	(get_namespace_id): mark as obsolete.
	(current_namespace_id): Likewise.
	(do_namespace_alias): Implement.
	(do_using_directive): Implement as call to add_using_namespace.
	* decl.c (binding_for_name): new function.
	(push_namespace, pop_namespace): implement.
	(push_decl): don't install a FUNCTION_DECL in the global branch.
	(lookup_namespace_name): implement using qualified lookup.
	(lookup_name_real): For global scoping, lookup in
	global_namespace. For namespace scoping, lookup in given
	namespace. For unscoped lookup, iterate over namespace,
	considering using directives.
	(init_decl_processing): initialize global_namespace.
	(grokvardecl): Build assembler name as static name for globals.
	(grokdeclarator): Remove old namespace mangling.
	(xref_tag): When installing a global binding for the
	tag, make sure we have an identifier.
	* method.c (build_overload_nested_name): mangle namespaces.
	(build_qualified_name): Likewise.
	(build_decl_overload_real): Likewise.
	* lex.c (build_lang_decl): set namespace for new declaration to
	current_namespace.
	(do_scoped_id): find global names in global or current
	namespace, or using qualified namespace lookup, depending on
	context.
	* init.c (build_member_call): When scope is namespace, use
	build_x_function_call instead.
	(build_offset_ref): When scope is namespace, collapse processing
	to lookup_namespace_name instead.
	* error.c (dump_decl): Support NAMESPACE_DECL.
	* decl.c (pushdecl): Bind globals to current namespace.
	(push_overloaded_decl): Likewise.
	(lookup_tag): Likewise.
	(lookup_name_current_level): Likewise.
	(xref_tag): Likewise.
	(start_function): Likewise.
	* lex.c (do_identifier): Likewise.
	(identifier_typedecl_value): Likewise.
	(real_yylex): Likewise.
	* method.c (do_inline_function_hair): Likewise.
	* parse.y (unscoped): Likewise.
	* pt.c (check_explicit_specialization): Likewise.
	(lookup_template_class): Likewise.
	* rtti.c (call_void_fn): Likewise.
	* sig.c (build_sigtable): Likewise.
	* ptree.c (lang_print_xnode): New function.

From-SVN: r18227
1998-02-24 19:49:51 -05:00
Jeffrey A Law
8dfafd99fd c-parse.y (undeclared variable error): Tweak error message to be clearer.
* c-parse.y (undeclared variable error): Tweak error message
        to be clearer.

From-SVN: r18226
1998-02-24 17:30:00 -07:00
Richard Henderson
bb8ebb7ff8 flags.h (g_switch_value, [...]): Declare.
* flags.h (g_switch_value, g_switch_set): Declare.
        * alpha.c (override_options): Set g_switch_value=8 if not set.
        * alpha/elf.h (CC1_SPEC): New.
        (ASM_SPEC): New.
        (LINK_SPEC): Pass along the -G value we were given.
        (LOCAL_ASM_OP): Remove.
        (ASM_OUTPUT_ALIGNED_LOCAL): Output to .bss or .sbss by size.
        (MAX_OFILE_ALIGNMENT): New.
        (BSS_SECTION_ASM_OP, SBSS_SECTION_ASM_OP, SDATA_SECTION_ASM_OP): New.
        (EXTRA_SECTIONS): Add sbss and sdata.
        (SECTION_FUNCTION_TEMPLATE): New.
        (EXTRA_SECTION_FUNCTIONS): Use it.
        (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Remove.
        (SELECT_SECTION): Use sdata when small enough.
        * alpha/linux.h (ASM_SPEC): Remove.

From-SVN: r18225
1998-02-24 16:00:29 -08:00
Andreas Schwab
3eaa4d3b4d Changes for _G_IO_IO_FILE_VERSION == 0x20001:
* libioP.h (_IO_showmanyc_t, _IO_SHOWMANYC, _IO_imbue_t,
	_IO_IMBUE): New definitions.
	(struct _IO_jump_t): Add __showmanyc and __imbue fields.
	(_IO_file_fopen): Add new fourth argument.
	* filebuf.cc (filebuf::open): Pass new fourth argument to
	_IO_file_fopen.
	* iolibio.h (_IO_freopen): Likewise.
	* streambuf.cc (streambuf::showmanyc, streambuf::imbue): New
	functions.
	* streambuf.h (_IO_wchar_t): Define to _G_wchar_t.
	(ios::fill): Remove casts.
	(struct streambuf): Add showmanyc and imbue members.
	* iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >=
	1]: Initialize new fields is_char of struct printf_info.
	(ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 1]:
	Likewise.

From-SVN: r18222
1998-02-24 13:09:55 -07:00
Brendan Kehoe
14e403d46d decl.c (finish_function): Give a pedwarn for reaching end of non-void function, not just a warning.
* decl.c (finish_function): Give a pedwarn for reaching end of
	non-void function, not just a warning.
Remove the above.

From-SVN: r18218
1998-02-24 09:22:12 -05:00
Brendan Kehoe
373dae0516 decl.c (finish_function): Give a pedwarn for reaching end of non-void function, not just a warning.
* decl.c (finish_function): Give a pedwarn for reaching end of
        non-void function, not just a warning.

From-SVN: r18217
1998-02-24 03:37:13 -05:00
Jason Merrill
8adf5b5e7b pt.c (instantiate_class_template): Don't instantiate if pedantic and the args use template parms.
* pt.c (instantiate_class_template): Don't instantiate if pedantic
	and the args use template parms.
	* pt.c (push_tinst_level): If the instantiaton uses template parms,
	fail silently.
	* decl.c (xref_basetypes): Do call complete_type for basetypes
	that involve template parameters.

From-SVN: r18215
1998-02-23 20:41:45 -05:00
Jason Merrill
6c3e25ebe2 * typeck2.c (process_init_constructor): Fix labeled init check.
From-SVN: r18214
1998-02-23 19:37:57 -05:00
Jeff Law
d7ab20570c Update address.
From-SVN: r18211
1998-02-23 14:57:23 -07:00