Robert Lipe [Mon, 23 Feb 1998 08:58:16 +0000 (08:58 +0000)]
collect2.c (ldd_file_name): Bracket declaration with same manifests as use.
* collect2.c (ldd_file_name): Bracket declaration with same
manifests as use.
(full_real_ld_suffix): Deleted. Variable was calloced and
written into, but never read.
Jason Merrill [Mon, 23 Feb 1998 03:17:44 +0000 (22:17 -0500)]
Support for friend templates.
* typeck.c (build_x_function_call): Handle static member function
templates like non-templates. Handle friend templates like normal
function templates.
* pt.c (tsubst, *_PARM): Don't use orig_level.
(get_bindings): Don't call add_to_template_args.
(instantiate_template): Likewise.
(tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
* ptree.c (print_lang_type): Print index/level for template parms.
* Make-lang.in (cc1plus): Note that cc1plus depends on
cp/cp-tree.h and cp/cp-tree.def.
* cp-tree.def (TEMPLATE_CONST_PARM): Remove.
(TEMPLATE_PARM_INDEX): New tree code, used to indicate a
position in a template parameter list.
* cp-tree.h (template_parm_index): New structure, used as the tree
structure for a TEMPLATE_PARM_INDEX.
(TEMPLATE_PARM_IDX): New macro.
(TEMPLATE_PARM_LEVEL): Likewise.
(TEMPLATE_PARM_DESCENDANTS): Likewise.
(TEMPLATE_PARM_ORIG_LEVEL): Likewise.
(TEMPLATE_PARM_DECL): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
(TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
(TEMPLATE_TYPE_DECL): Likewise.
(TEMPLATE_CONST_IDX): Remove.
(TEMPLATE_CONST_LEVEL): Likewise.
(TEMPLATE_CONST_SET_INFO): Likewise.
(TEMPLATE_TYPE_SET_INFO): Likewise.
(TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
node.
(TEMPLATE_TYPE_LEVEL): Likewise.
* decl.c (decls_match): Call comp_template_parms, rather than
expanding it inline.
(duplicate_decls): If two template declarations are being merged,
then their TEMPLATE_INFOs should be merged as well.
(grokfndecl): Save template-id information when declaring a friend
with explicit template arguments. Pass arguments to
check_explicit_specialization via correct convention; at some
point check_explicit_specialization changed, but these call-sites
did not.
(grokdeclarator): Tidy up slightly.
* decl2.c (check_classfn): Tidy up slightly. Don't assume that
two template functions with the same DECL_ASSEMBLER_NAME the same,
since the names are not yet mangled.
* error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
TEMPLATE_CONST_PARM.
(dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
decl for a non-type parameter, rather than printing `<tparm ...>'.
* friend.c (is_friend): Handle TEMPLATE_DECL friends.
(do_friend): Deal with template friends.
* lex.c (do_pending_inlines): Call
maybe_begin_member_template_processing, rather than
conditionally calling begin_member_template_processing.
(process_next_inline): Likewise. Call
maybe_end_member_template_processing, rather than
conditionally calling end_member_template_processing.
(do_pending_defargs): Likewise.
(do_identifier): Use TEMPLATE_PARM_INDEX instead of
TEMPLATE_CONST_PARM.
* method.c (build_mangled_template_parm_index): New function.
(build_overload_value): Use it.
(build_overload_name): Likewise.
* pt.c (finish_member_template_decl): Allow friend declarations.
(template_class_depth): New function.
(is_member_template): Rename, and modify, to become...
(is_member_or_friend_template): New function.
(end_member_template_processing): Rename, and modify, to become...
(maybe_end_member_template_processing).
(build_template_parm_index): New function.
(reduce_template_parm_level): New function.
(process_template_parm): Modify to use build_template_parm_index.
(current_template_args): Change name to current_template_parms.
(push_template_decl): Deal with friend templates.
(uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
TEMPLATE_CONST_PARM.
(tsubst_friend_function): New function.
(instantiate_class_template): Generate the DECL_FRIENDLIST
for a new instantiation by using tsubst_friend_function rather
than just tsubst.
(tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
appropriate new macros. Use reduce_template_parm_level to
generate lower-level template parameters. Handle tsubst'ing into
TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
templates. Similarly for the template parameters for a new
template.
(tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
(unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
(get_bindings): Call add_to_template_args if necessary.
(instantiate_decl): Handle instantiations of friend templates.
* search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
TEMPLATE_TYPE_PARM as a list of fields; it's not!
* spew.c (yylex): Do a little manual constant propogation to
clarify the code.
Craig Burley [Sun, 22 Feb 1998 19:31:54 +0000 (14:31 -0500)]
Improve run-time diagnostic for "PRINT '(I1', 42":
* com.c (ffecom_char_args_x_): Renamed from ffecom_char_args_,
which is now a macro (to avoid lots of changes to other code)
with new arg, ffecom_char_args_with_null_ being another new
macro to call same function with different value for new arg.
This function now appends a null byte to opCONTER expression
if the new arg is TRUE.
(ffecom_arg_ptr_to_expr): Support NULL length pointer.
* ste.c (ffeste_io_cilist_):
(ffeste_io_icilist_): Pass NULL length ptr for
FORMAT expression, so null byte gets appended where
feasible.
* target.c (ffetarget_character1):
(ffetarget_concatenate_character1):
(ffetarget_substr_character1):
(ffetarget_convert_character1_character1):
(ffetarget_convert_character1_hollerith):
(ffetarget_convert_character1_integer4):
(ffetarget_convert_character1_logical4):
(ffetarget_convert_character1_typeless):
(ffetarget_hollerith): Append extra phantom null byte as
part of FFETARGET-NULL-BYTE kludge.
Yes, even more patches from Craig :-)
Craig Burley [Sun, 22 Feb 1998 19:28:41 +0000 (14:28 -0500)]
Make-lang.in (f77.install-common): Don't install, and don't uninstall existing, Info files if f/g77.info doesn't exit.
* Make-lang.in (f77.install-common): Don't install, and
don't uninstall existing, Info files if f/g77.info
doesn't exit. (This is a somewhat modified version
of an egcs patch on 1998-01-07 12:05:51 by Bruno Haible
<bruno@linuix.mathematik.uni-karlsruhe.de>.
Jeff Law [Sun, 22 Feb 1998 19:26:46 +0000 (12:26 -0700)]
com.c (ffecom_arglist_expr_): Crash if non-supplied optional arg isn't passed as an address.
* com.c (ffecom_arglist_expr_): Crash if non-supplied
optional arg isn't passed as an address.
Pass null pointer explicitly, instead of via ffecom routine.
If incoming argstring is NULL, substitute pointer to "0".
Recognize '0' as ending the usual arg stuff, just like '\0'.
* com.c (ffecom_arglist_expr_): Pass null pointers for optional
args which aren't supplied.
More patches from Craig.
Craig Burley [Sun, 22 Feb 1998 19:21:21 +0000 (14:21 -0500)]
Support FORMAT(I<1+2>) (constant variable-FORMAT expressions):
Support FORMAT(I<1+2>) (constant variable-FORMAT
expressions):
* bad.def (FFEBAD_FORMAT_VARIABLE): New diagnostic.
* std.c (ffestd_R1001rtexpr_): New function.
(ffestd_R1001dump_, ffestd_R1001dump_1005_1_,
ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_,
ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_,
ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_,
ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_):
Use new function instead of ffestd_R1001error_.
* stb.c (ffestb_R10014_, ffestb_R10016_, ffestb_R10018_,
ffestb_R100110_): Restructure `for' loop for style.
Change from Craig.
Jeff Law [Sun, 22 Feb 1998 19:09:19 +0000 (12:09 -0700)]
sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2): Define this new symbol.
/
* config/sparc/sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2):
Define this new symbol.
(DWARF2_DEBUGGING_INFO, DWARF_DEBUGGING_INFO): Do not #undef.
* toplev.c (main): Do not default to DWARF2_DEBUG with -ggdb if
LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.
Paul Eggert [Sun, 22 Feb 1998 19:09:18 +0000 (19:09 +0000)]
sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2): Define this new symbol.
d
* config/sparc/sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2):
Define this new symbol.
(DWARF2_DEBUGGING_INFO, DWARF_DEBUGGING_INFO): Do not #undef.
* toplev.c (main): Do not default to DWARF2_DEBUG with -ggdb if
LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.
Jeff Law [Sun, 22 Feb 1998 16:55:25 +0000 (09:55 -0700)]
vmsbuild.com [...]: Synchronized with Makefile.in: Add fnmatch.o and objalloc.o; remove vasprintf.o.
�
* vmsbuild.com [REQUIRE_OFILES]: Synchronized with Makefile.in:
Add fnmatch.o and objalloc.o; remove vasprintf.o.
[config.h]: Define NEED_strsignal.
* functions.def: Correct argument types for strerror and
strsignal. Reported by Alex Gutman <agutman@emc.com>.
Jeff Law [Sun, 22 Feb 1998 16:55:24 +0000 (09:55 -0700)]
vmsbuild.com [...]: Synchronized with Makefile.in: Add fnmatch.o and objalloc.o; remove vasprintf.o.
$
* vmsbuild.com [REQUIRE_OFILES]: Synchronized with Makefile.in:
Add fnmatch.o and objalloc.o; remove vasprintf.o.
[config.h]: Define NEED_strsignal.
* functions.def: Correct argument types for strerror and
strsignal. Reported by Alex Gutman <agutman@emc.com>.
Jeff Law [Sun, 22 Feb 1998 16:55:23 +0000 (09:55 -0700)]
vmsbuild.com [...]: Synchronized with Makefile.in: Add fnmatch.o and objalloc.o; remove vasprintf.o.
P
* vmsbuild.com [REQUIRE_OFILES]: Synchronized with Makefile.in:
Add fnmatch.o and objalloc.o; remove vasprintf.o.
[config.h]: Define NEED_strsignal.
* functions.def: Correct argument types for strerror and
strsignal. Reported by Alex Gutman <agutman@emc.com>.
Jeff Law [Sun, 22 Feb 1998 16:53:40 +0000 (09:53 -0700)]
cplus-dem.c (gnu_special): Don't get confused by .<digits> strings that are not actually lengths.
* cplus-dem.c (gnu_special): Don't get confused by .<digits>
strings that are not actually lengths.
* config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
since it gets built automatically
* vasprintf.c (int_vasprintf): Increase buffer size for float/double
values.
Jeff Law [Sun, 22 Feb 1998 16:46:27 +0000 (09:46 -0700)]
alloca-norm.h (alloca, GCC case): Don't redefine alloca if it was alr eady defined previously.
* alloca-norm.h (alloca, GCC case): Don't redefine alloca if it
was alr eady defined previously.
* Makefile.in (INSTALL): Use ../install-sh, not install.
Jeff Law [Sun, 22 Feb 1998 16:31:03 +0000 (09:31 -0700)]
configure.in: For *-*-cygwin32*, add a -I for winsup to both XCINCLUDES and XCXXINCLUDES.
* configure.in: For *-*-cygwin32*, add a -I for winsup to both
XCINCLUDES and XCXXINCLUDES.
* config.shared: Use ${host_includes} when setting CXXINCLUDES in
the DOING_LIBGXX case.
* Makefile.in (_G_config.h): Pass $(CINCLUDES) in CC and
$(CXXINCLUDES) in CXX when running gen-params.
* config.shared (THIS_FILE): Really found via TOLIBIO instead
of TOLIBCXX, which is empty when configuring gperf.
(LIBS): When linking gperf, find libstdc++ relative to TO_TOPDIR
instead of hardcoded "../".
Jason Merrill [Fri, 20 Feb 1998 11:13:44 +0000 (06:13 -0500)]
ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS.
* ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS.
* stl_alloc.h: Ditto.
* stl_config.h: Ditto.
* stl_rope.h: Ditto.
* stl_config.h: include <_G_config.h> if __GNUG__ is defined.
(__STL_PTHREADS): Defined if _PTHREADS is defined or
__GLIBC__ >= 2.
David Edelsohn [Thu, 19 Feb 1998 19:41:03 +0000 (14:41 -0500)]
[multiple changes]
Thu Feb 19 22:36:53 1998 Andrey Slepuhin <pooh@msu.net>
David Edelsohn <edelsohn@mhpcc.edu>
* collect2.c (XCOFF_SCAN_LIBS): Remove.
(export_flag): New variable.
(export_file): #ifdef COLLECT_EXPORT_LIST.
(import_file, exports, imports, undefined): New variables.
(libs, cmdline_lib_dirs, libpath_lib_dirs, libpath, libexts): Same.
(dump_list, dump_prefix_list, is_in_list): New functions.
(write_export_file): $ifdef COLLECT_EXPORT_LIST.
(write_import_file, resolve_lib_name): New functions.
(use_import_list, ignore_library): Same.
(collect_exit): maybe_unlink import_file and #ifdef.
(handler): Same.
(main): New variable importf, #ifdef exportf. Move parsing of
-shared before general argument parsing. Resolve AIX library
paths and import libgcc.a symbols. Treat .so shared libraries the
same as objects and .a libraries. Create alias for object_lst and
increment it instead of original pointer. Scan AIX libraries as
objects earlier instead of using scan_libraries. Perform AIX
tlink later to resolve templates instead of forking ld.
(GCC_OK_SYMBOL): Ensure symbol not in undef section.
(GCC_UNDEF_SYMBOL): New macro.
(scan_prog_file): Loop for members of AIX libraries. Handle
export/import of ctors/dtors.
(aix_std_libs): New variable.
(scan_libraries, XCOFF): Delete.
Fri Feb 19 22:36:52 1998 Robert Lipe <robertl@dgii.com>
* collect2.c (full_real_ld_suffix): #ifdef CROSS_COMPILE.
* pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
all callers changed. Rely on the new parameter instead of arg
being a TREE_LIST when determine whether we are working inside
template template parameter. Clean up is_type test.
Jeffrey A Law [Thu, 19 Feb 1998 00:35:51 +0000 (00:35 +0000)]
emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
* emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
* emit-rtl.c (hard-reg-set.h): Include.
(get_lowpart_common): Don't make new REG for hard reg in a
class that cannot change size.
* Makefile.in (emit-rtl.o): Depend on hard-reg-set.h.
* combine.c: Revert previous patch.
Co-Authored-By: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
From-SVN: r18109
Dave Love [Tue, 17 Feb 1998 23:52:39 +0000 (23:52 +0000)]
u77-test.f: Tweak some o/p.
* libU77/u77-test.f: Tweak some o/p.
* libU77/Makefile.in (check): Use -L for new directory structure.
* Makefile.in (check): Run the u77 check.
(config.status, Makefile): New targets.
Kaveh R. Ghazi [Tue, 17 Feb 1998 22:43:25 +0000 (22:43 +0000)]
fold-const.c: Include "system.h" to get stdlib.h and stdio.h.
* fold-const.c: Include "system.h" to get stdlib.h and stdio.h.
(lshift_double): Add parentheses around + or - inside shift.
(rshift_double): Likewise.
(size_int_wide): Explicitly set type of `bit_p' to `int'.
* Makefile.in (fold-const.o): Depend on system.h.
combine.c (simplify_rtx): Obey CLASS_CANNOT_CHANGE_SIZE when simplifying a subreg of a hard reg.
* combine.c (simplify_rtx): Obey CLASS_CANNOT_CHANGE_SIZE when
simplifying a subreg of a hard reg.
(expand_compound_operation): Likewise.
(force_to_mode): Likewise.
Kaveh R. Ghazi [Tue, 17 Feb 1998 21:35:43 +0000 (21:35 +0000)]
haifa-sched.c: Include "system.h" to get <stdlib.h> and <stdio.h>.
* haifa-sched.c: Include "system.h" to get <stdlib.h> and <stdio.h>.
(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
(sched_note_set): Remove unused parameter `b', all callers changed.
(schedule_block): Likewise for `rgn'.
(split_hard_reg_notes): Likewise for `orig_insn'.
(check_live): Likewise for `trg'.
(update_live): Likewise.
(check_live_1): Explcitly declare variable `i' as int.
(update_live_1): Likewise.
(insn_issue_delay): Remove unused variable `link'.
(sched_analyze_2): Add default case in enumeration switch.
(schedule_insns): Remove unused variable `i'.
* Makefile.in ($(SCHED_PREFIX)sched.o): Depend on system.h.
H.J. Lu [Tue, 17 Feb 1998 20:54:12 +0000 (20:54 +0000)]
linux.mt (IO_OBJECTS): Add iogetline.o.
* config/linux.mt (IO_OBJECTS): Add iogetline.o.
* config/linuxlibc1.mt: Ditto.
* iogetline.c (_IO_getline_info): Renamed from _IO_getline.
(_IO_getline): Just call _IO_getline_info.
* isgetline.cc (istream::getline, istream::get, _sb_readline):
Call _IO_getline_info instead of _IO_getline and get the EOF
information.
* sbgetline.cc (streambuf::sgetline): Ditto.
* libioP.h (_IO_getline_info): New declaration.
* iogetline.c (_IO_getline): Handle the case when there is no
buffer.
Mark Mitchell [Tue, 17 Feb 1998 14:13:09 +0000 (14:13 +0000)]
parse.y (initdcl0_innards): New grammar symbol.
* parse.y (initdcl0_innards): New grammar symbol.
(nomods_initdecls, nomods_initdcl0): Change type from itype to
none, since the resulting value is never used.
(parse_decl): New function.
(datadef): Remove redundant actions.
(initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
* parse.c: Regenerated.
Joern Rennecke [Tue, 17 Feb 1998 10:26:44 +0000 (10:26 +0000)]
rtl.h (force_line_numbers, [...]): Declare.
* rtl.h (force_line_numbers, restore_line_number_status): Declare.
* emit-rtl.c (force_line_numbers, restore_line_number_status):
New functions.
* stmt.c (struct nesting): Replace seenlabel with line_number_status.
(expand_start_case): Adjust to this change.
(check_seenlabel): New function.
(pushcase, pushcase_range, expand_endcase): Use it.