Nathan Sidwell [Tue, 24 Dec 2002 22:20:14 +0000 (22:20 +0000)]
re PR c++/7964 (ICE in build_base_path)
cp:
PR C++/7964
* cp-tree.h (resolve_scoped_fn_name): Prototype.
* call.c (resolve_scoped_fn_name): New function. Deal with
more template expansion. Broken out of ...
* parse.y (parse_finish_call_expr): ... here. Call it.
* decl2.c (build_expr_from_tree, CALL_EXPR): Use
resolve_scoped_fn_name and build_call_from_tree.
testsuite:
* g++.dg/lookup/scoped3.C: New test.
Nathan Sidwell [Tue, 24 Dec 2002 22:12:17 +0000 (22:12 +0000)]
re PR c++/9053 (g++ confused about ambiguity of overloaded function templates)
cp:
PR c++/9053
* decl.c (duplicate_decls): Templates may be disambiguated by
return type.
PR c++/8702
* decl2.c (check_classfn): Use lookup_fnfield_1. List all
conversion operators on failure.
testsuite
* g++.dg/lookup/decl1.C: New test.
* g++.dg/lookup/decl2.C: New test.
Jeff Sturm [Mon, 23 Dec 2002 19:59:31 +0000 (19:59 +0000)]
exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit of catch_type.
* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit
of catch_type.
* java/lang/natClass.cc (initializeClass): Link vtable, otable,
idt tables after initializing superclass.
* java/lang/natClassLoader.cc (uaddr): New typedef.
(_Jv_PrepareCompiledClass): Resolve superclass, interfaces
if they are constant pool indicies. Don't link vtable, otable yet.
ada:
* gnat_rm.texi: Include gcc-common.texi. Use GCC version number
only.
* Make-lang.in ($(srcdir)/ada/gnat_ug_unx.info,
$(srcdir)/ada/gnat_ug_vms.info, $(srcdir)/ada/gnat_ug_vxw.info,
$(srcdir)/ada/gnat_ug_wnt.info, $(srcdir)/ada/gnat_rm.info,
ada/gnat_ug_unx.dvi, ada/gnat_ug_vms.dvi, ada/gnat_ug_vxw.dvi,
ada/gnat_ug_wnt.dvi, ada/gnat_rm.dvi): Depend on
$(srcdir)/doc/include/gcc-common.texi.
f:
* root.texi: Include gcc-common.texi.
* bugs.texi, news.texi: Don't include root.texi as part of full
manual.
* g77.texi: Update for use of gcc-common.texi.
* Make-lang.in ($(srcdir)/f/g77.info, f/g77.dvi): Depend on
$(srcdir)/doc/include/gcc-common.texi.
java:
* gcj.texi: Include gcc-common.texi.
* Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
$(srcdir)/doc/include/gcc-common.texi.
treelang:
* treelang.texi: Include gcc-common.texi.
* Make-lang.in ($(srcdir)/treelang/treelang.info, treelang.dvi):
Depend on gcc-common.texi. Add other missing dependencies.
(treelang.dvi): Use texi2dvi.
Nathanael Nerode [Mon, 23 Dec 2002 16:54:15 +0000 (16:54 +0000)]
Makefile.tpl: Use shared multilib.out.
* Makefile.tpl: Use shared multilib.out. Use move-if-change for it.
Convert (cd foo; make) to (cd foo && make). Clean up multilib.out.
* Makefile.in: Regenerate.
* configure.in: Remove unnecessary leftovers.
Mark Mitchell [Mon, 23 Dec 2002 16:39:36 +0000 (16:39 +0000)]
stor-layout.c (update_alignment_for_field): Correct handling of unnamed bitfields on PCC_BITFIELD_TYPE_MATTERS machines.
* stor-layout.c (update_alignment_for_field): Correct handling of
unnamed bitfields on PCC_BITFIELD_TYPE_MATTERS machines.
* doc/tm.texi (PCC_BITFIELD_TYPE_MATTERS): Note that an unnamed
bitfield does not affect alignment.
Kazu Hirata [Mon, 23 Dec 2002 14:58:53 +0000 (14:58 +0000)]
h8300-protos.h: Update the prototype of expand_a_shift.
* config/h8300/h8300-protos.h: Update the prototype of
expand_a_shift.
* config/h8300/h8300.c (expand_a_shift): Change the return
type to void.
* config/h8300/h8300.md: Update all the uses of
expand_a_shift.
Mark Mitchell [Mon, 23 Dec 2002 02:10:18 +0000 (02:10 +0000)]
stor-layout.c (update_alignment_for_field): Use ADJUST_FIELD_ALIGN when computing the alignment for a zero-width bitfield...
* stor-layout.c (update_alignment_for_field): Use
ADJUST_FIELD_ALIGN when computing the alignment for a zero-width
bitfield when PCC_BITFIELD_TYPE_MATTERS.
Kazu Hirata [Sat, 21 Dec 2002 17:43:15 +0000 (17:43 +0000)]
h8300-protos.h: Update the prototype for split_adds_subs.
* config/h8300/h8300-protos.h: Update the prototype for
split_adds_subs.
Add prototypes for const_le_2_operand and const_le_6_operand.
* config/h8300/h8300.c (split_adds_subs): Add an argument to
specify whether inc/dec should be used when possible.
(const_le_2_operand): New.
(const_le_6_operand): Likewise.
* config/h8300/h8300.md (two peepholes): New.
* config/alpha/alpha.c (decl_has_samegp): New.
(samegp_function_operand): Use it. Rename from
current_file_function_operand.
(direct_call_operand): Handle -msmall-text via symbol->jump.
(tls_symbolic_operand_1): Use T for tprel64, t for smaller tprel.
(tls_symbolic_operand_type): Likewise.
(alpha_encode_section_info): Likewise. Handle -msmall-text.
(alpha_function_ok_for_sibcall): Use decl_has_samegp.
(alpha_end_function): Set symbol->jump for functions defined in
the text section.
* config/alpha/alpha-protos.h: Update.
* config/alpha/alpha.h (MASK_SMALL_TEXT, TARGET_SMALL_TEXT): New.
(TARGET_SWITCHES): Add -msmall-text and -mlarge-text.
(PREDICATE_CODES): Update.
* config/alpha/alpha.md (call patterns): Update for
samegp_function_operand rename; use !samegp reloc if
TARGET_EXPLICIT_RELOCS.
* doc/invoke.text: Document -msmall-text and -mlarge-text.
Ian Dall [Fri, 20 Dec 2002 18:14:18 +0000 (18:14 +0000)]
ns32k.md (movdi): Use "l" instead of "f" to match all registers capable of holding a double float.
* config/ns32k/ns32k.md (movdi): Use "l" instead of "f" to match
all registers capable of holding a double float.
(*rcond): change name of "reverse branch" insns to
something more meaningful.
(*rbgt, *rblt, *rbge, *rble): Reverse branches to handle IEEE
comparisons properly.
(*ffs): Change operand 0 from write to read-modify-write.
(*ffsssi2): Drop constraints from define_expand.
* config/ns32k/ns32k.h (STORE_RATIO, STORE_BY_PIECES): Avoid using
MOVE_RATIO as default for store operations.
Hartmut Penner [Fri, 20 Dec 2002 13:02:42 +0000 (13:02 +0000)]
invoke.texi: Document -mzarch, -mesa, -mcpu= and -march= option for S/390 and zSeries.
* doc/invoke.texi: Document -mzarch, -mesa, -mcpu= and -march=
option for S/390 and zSeries.
* config/s390/s390.c (s390_cpu, s390_cpu_string, s390_arch,
s390_arch_string): New variables.
(override_options): Checking for options and setting of
appropriate target_flags, cpu and arch flags.
* config/s390/s390.h: (processor_type): New enum.
(TARGET_SWITCHES): New switches -mesa/zarch.
* config/s390/s390.md: New attribute 'cpu'.
Andrew Haley [Fri, 20 Dec 2002 02:06:21 +0000 (02:06 +0000)]
natResourceBundle.cc: Include ArrayIndexOutOfBoundsException.h.
2002-12-19 Andrew Haley <aph@redhat.com>
* java/util/natResourceBundle.cc: Include
ArrayIndexOutOfBoundsException.h.
(getCallingClassLoader): Don't put upper bound on stack search.
Catch ArrayIndexOutOfBoundsException.
i386.c (ix86_handle_cdecl_attribute): Check for attributes incompatible with fastcall attribute.
* config/i386/i386.c (ix86_handle_cdecl_attribute): Check for
attributes incompatible with fastcall attribute.
(ix86_handle_regparm_attribute): Likewise.
* config/i386/i386.c (ix86_comp_type_attributes): Check for mismatched
fastcall types.
* config/i386/cygwin.h (TARGET_OS_CPP_BUILTINS): Add fastcall
attributes.
(ASM_OUTPUT_LABELREF): Define as i386_pe_output_labelref.
* config/i386/i386-protos.h (i386_pe_output_labelref): Declare.
* config/i386/winnt.c (i386_pe_mark_dllimport). Add __imp_ prefix in
i386_pe_output_labelref rather than here.
(gen_fastcall_suffix): New function. Decorates a label name with the
fastcall prefix (@) and the stdcall suffix.
(i386_pe_encode_section_info): Call gen_fastcall_suffix() if a symbol
has a fastcall attribute.
(i386_pe_output_labelref): New function. Outputs a label reference.
* config/i386/i386.c (ix86_attribute_table): Accept 'fastcall' as a
valid attribute.
(ix86_return_pops_args): Fastcall functions pop the stack.
(init_cumulative_args): Reserve registers ECX and EDX if function has
fastcall attribute.
(function_arg): Use registers ECX and EDX if function has fastcall
attribute.
* config/i386/i386.h (CUMULATIVE_ARGS): Add fastcall attribute flag.
(DLL_IMPORT_EXPORT_PREFIX): Redefine as '#'.
(FASTCALL_PREFIX): Define as '@'.
* config/i386/mingw32.h (TARGET_OS_CPP_BUILTINS): Add fastcall
attributes.
* doc/extend.texi: Add documentation of fastcall attribute.
* testsuite/gcc.dg/i386-fastcall-1.c: New.
Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net> Co-Authored-By: Eric Kohl <ekohl@rz-online.de>
From-SVN: r60337
Nathanael Nerode [Thu, 19 Dec 2002 21:44:30 +0000 (21:44 +0000)]
configure.in: FORBUILD when build!=host changed from ../$build-alias to ../build-$build_alias...
* configure.in: FORBUILD when build!=host changed from
../$build-alias to ../build-$build_alias to match change made
in top directory.
* configure: Regenerated.
Devang Patel [Thu, 19 Dec 2002 20:34:43 +0000 (12:34 -0800)]
This was approved for 3.4 BIB branch.
This was approved for 3.4 BIB branch. But since it is dead now, I am putting
this in mainline sources.
2002-12-19 Devang Patel <dpatel@apple.com>
* gcc.c (struct default_compiler): Recognizes input file name with
.CPP extension as C++ source files
* cp/lang-spec.h: Same
* doc/invoke.texi: Add documentation for .CPP support.
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous
comment.
* java/lang/ClassLoader.java (defineClass): Use chained
exception when rethrowing.
* defineclass.cc (handleClassBegin): Mark class as interpreted.
* java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New
constants.
* resolve.cc (_Jv_PrepareMissingMethods): New function.
(_Jv_PrepareClass): Use it.
* include/java-interp.h (_Jv_IsInterpretedClass): Rewrote.
(_Jv_InterpClass): _Jv_PrepareMissingMethods now friend.
* java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS.
(Class): _Jv_PrepareMissingMethods now friend.
* java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize.
Record `NULL' for system class loader.
(_Jv_RegisterInitiatingLoader): Use JvSynchronize. Special case
system class loader.
(_Jv_FindClassInCache): Likewise.
(_Jv_UnregisterClass): Use JvSynchronize. Free old loader info.
(_Jv_FindClass): Special case system class loader.
* java/lang/natClass.cc (_Jv_abstractMethodError): New function.
(_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty
vtable slots.
(_Jv_LayoutVTableMethods): Don't generate vtable slot for a method
in a final class.
(_getDeclaredMethod): Don't return synthetic methods.
(getDeclaredMethods): Likewise.
(_getMethod): Likewise.
(_getMethods): Likewise.
Jason Merrill [Thu, 19 Dec 2002 17:43:54 +0000 (12:43 -0500)]
Handle anonymous unions at the tree level.
C++ ABI change: Mangle anonymous unions using the name of their
first named field (by depth-first search). Should not cause
binary compatibility problems, though, as the compiler previously
didn't emit anything for affected unions.
* cp-tree.def (ALIAS_DECL): New tree code.
* decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
first field, not the largest.
(finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
push the decl, and write it out at namespace scope.
* decl.c (lookup_name_real): See through an ALIAS_DECL.
(pushdecl): Add namespace bindings for ALIAS_DECLs.
* rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
of a decl which doesn't have one.
* typeck.c (build_class_member_access_expr): Don't recurse if
we already have the type we want.
Jason Merrill [Thu, 19 Dec 2002 17:16:26 +0000 (12:16 -0500)]
Handle anonymous unions at the tree level.
C++ ABI change: Mangle anonymous unions using the name of their
first named field (by depth-first search). Should not cause
binary compatibility problems, though, as the compiler previously
didn't emit anything for affected unions.
* cp-tree.def (ALIAS_DECL): New tree code.
* decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
first field, not the largest.
(finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
push the decl, and write it out at namespace scope.
* decl.c (lookup_name_real): See through an ALIAS_DECL.
(pushdecl): Add namespace bindings for ALIAS_DECLs.
* rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
of a decl which doesn't have one.
* typeck.c (build_class_member_access_expr): Don't recurse if
we already have the type we want.