58831 Commits

Author SHA1 Message Date
Kriang Lerdsuwanakij
43daf8ffa8 re PR c++/13092 (Accepts invalid pointer-to-member conversion)
PR c++/13092
        * init.c (build_offset_ref): Build SCOPE_REF with non-null
        TREE_TYPE for non-dependent names.
        * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
        unknown_type_node as its TREE_TYPE.
        * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
        * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
        (dump_expr) <SCOPE_REF case>: Likewise.

From-SVN: r82551
2004-06-01 11:51:56 -04:00
Richard Henderson
7a3ea2011b c-parse.in (OFFSETOF, [...]): New.
* c-parse.in (OFFSETOF, offsetof_member_designator): New.
        (primary): Handle offsetof.  Add error productions for faux functions.
        Move component_ref objc checking to build_component_ref.
        (reswords): Add offsetof.
        (rid_to_yy): Add offsetof.
        * c-tree.h (build_offsetof): Declare.
        * c-common.h (objc_is_public): Declare.
        * c-typeck.c (build_component_ref): Check objc_is_public.
        (build_offsetof): New.
        * stub-objc.c (objc_is_public): New.
        * objc/objc-act.c, objc/objc-act.h (objc_is_public): Rename
        from is_public.
        * ginclude/stddef.h (offsetof): Use __builtin_offsetof.
        * doc/extend.texi (Offsetof): Move from C++ section to C section
        and rewrite for __builtin_offsetof.
cp/
        * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
        * parser.c (struct cp_parser): Remove in_offsetof.
        (cp_parser_new): Don't set it.
        (cp_parser_unary_expression): Don't check it.
        (cp_parser_postfix_open_square_expression): Split out from ...
        (cp_parser_postfix_expression): ... here.
        (cp_parser_postfix_dot_deref_expression): Likewise.
        (cp_parser_builtin_offsetof): New.
        (cp_parser_primary_expression): Use it.
testsuite/
        * g++.dg/template/dependent-expr4.C: Use __builtin_offsetof.

From-SVN: r82549
2004-06-01 08:12:23 -07:00
Bernardo Innocenti
c4ec6988bc Also credit Peter Jakubek for last patch.
From-SVN: r82548
2004-06-01 16:37:14 +02:00
Peter Barada
5050d266ea m68k.c (m68k_output_mi_thunk): For ColdFire, use %d0 as a scratch to perform an add to memory.
* config/m68k/m68k.c(m68k_output_mi_thunk):  For ColdFire, use %d0 as
	a scratch to perform an add to memory.

From-SVN: r82547
2004-06-01 15:22:04 +02:00
Bernardo Innocenti
225d221a9d re PR target/14018 (m68k backend: -malign-loops/-malign-jumps broken)
PR target/14018
	* config/m68k/m68k.c (m68k_align_loops_string, m68k_align_jumps_string,
	m68k_align_funcs_string, m68k_align_loops, m68k_align_jumps,
	m68k_align_funcs): Remove.
	(override_options): Remove code to handle -malign-* options.
	* config/m68k/m68k.h (TARGET_OPTIONS): Remove -malign-* options.
	(FUNCTION_BOUNDARY, LOOP_ALIGN, LOOP_ALIGN_AFTER_BARRIER): Remove.
	(m68k_align_loops_string, m68k_align_jumps_string,
	m68k_align_funcs_string, m68k_align_loops, m68k_align_jumps,
	m68k_align_funcs): Remove definitions.

From-SVN: r82546
2004-06-01 14:56:49 +02:00
Michael Koch
c05e85e236 [multiple changes]
2004-06-01  Tom Tromey  <tromey@redhat.com>

	* java/io/ObjectStreamField.java: Cleaned up imports.

2004-06-01  Michael Koch  <konqueror@gmx.de>

	* java/io/ObjectStreamField.java: Style and javadoc cleanup.

2004-06-01  Mark Wielaard  <mark@klomp.org>

	* java/io/Writer.java (Writer(Object)): Fixed API doc.

From-SVN: r82545
2004-06-01 12:47:02 +00:00
Tobias Schlüter
ea0ece0949 re PR fortran/15477 (gfortran should not have own version number)
PR fortran/15477
* gfortran.h (GFC_VERSION): Remove.
* gfortran.texi (version-gfortran): Remove, replace by version-GCC
where used.

From-SVN: r82544
2004-06-01 14:12:58 +02:00
Michael Koch
6ef44cfd0b 2004-06-01 Michael Koch <konqueror@gmx.de>
* java/security/Security.java
	(insertProviderAt): Use equals() instead of ==.
	(removeProvicer): Likewise.
	(getProvider): Likewise.
	* java/security/Signature.java
	(sign): Don't set state to UNINITIALIZED.
	(verify): Likewise.

From-SVN: r82543
2004-06-01 11:57:10 +00:00
Paul Eggert
1460af9501 re PR target/15626 (GCC 3.4 emits "ld: warning: relocation error: R_SPARC_UA32")
PR target/15626
	* doc/install.texi (sparc-sun-solaris2*): Document messages issued
	by the Sun linker in conjunction with the Sun assembler.
	(sparc-sun-solaris2.7): Update revision info for Sun patch 106950.

From-SVN: r82541
2004-06-01 11:28:50 +00:00
Giovanni Bajo
07166901ad re PR c++/14932 (cannot use offsetof to get offsets of array elements in g++ 3.4.0 prerelease)
PR c++/14932
	* parser.c (cp_parser_postfix_expression): Allow subscript
	operator in offsetof.

	PR c++/14932
	* g++.dg/parse/offsetof4.C: New test.

From-SVN: r82538
2004-06-01 10:22:11 +00:00
Paolo Bonzini
1ec4e9c30b Makefile.tpl: Fix typo.
2004-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.tpl: Fix typo.
	* Makefile.in: Regenerate.

From-SVN: r82536
2004-06-01 08:11:33 +00:00
Paolo Bonzini
c2f7605f1d configure.in: Remove new- prefix from toplevel bootstrap targets.
2004-06-01  Paolo Bonzini <bonzini@gnu.org>

	* configure.in: Remove new- prefix from toplevel
	bootstrap targets.
	* configure: Regenerate.

From-SVN: r82535
2004-06-01 07:54:44 +00:00
Paolo Bonzini
f516a7dacf Makefile.tpl (all.normal): Rename to all.
2004-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.tpl (all.normal): Rename to all.
	(all): Replace with a rule to pick the default
	target from configure.
	(all-gcc, configure-gcc): Use conditionals to
	do nothing when toplevel bootstrap is going on.
	(GCC directory bootstrap) [gcc-bootstrap]: Disable.
	(Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
	* configure.in: Support --enable-bootstrap.

	* Makefile.def: Remove new- prefix from toplevel
	bootstrap targets.
	* Makefile.tpl: Likewise.

	* Makefile.def: Add bootstrap_stage 4.  Add bootstrap2
	target.

	* Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS)
	$(RECURSE_FLAGS) to recursive invocation of make.

	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r82534
2004-06-01 07:43:25 +00:00
Jeff Law
0b068ee90d stmt.c (expand_decl): Be more selective about calling mark_reg_pointer.
* stmt.c (expand_decl): Be more selective about calling
        mark_reg_pointer.

From-SVN: r82533
2004-06-01 01:42:35 -06:00
Nicola Pero
61c627ed2c re PR objc/7993 (private variables cannot be shadowed in subclasses)
2004-06-01  Nicola Pero  <nicola@brainstorm.co.uk>

 	Fix PR objc/7993:
	* objc-act.c (is_private): Do not emit the 'instance variable %s
	is declared private' error.
	(is_public): Emit the error after calling is_private.
	(lookup_objc_ivar): If the instance variable is private, return 0
	- the instance variable is invisible here.
testsuite:
	* objc.dg/private-1.m, objc-dg/private-2.m: New testcases.

From-SVN: r82532
2004-06-01 07:40:02 +00:00
Eric Botcazou
d314442396 invoke.texi (-static-libgcc): Explicitly mention non-GNU linkers.
* doc/invoke.texi (-static-libgcc): Explicitly mention
	non-GNU linkers.

From-SVN: r82529
2004-06-01 07:13:51 +00:00
Andreas Jaeger
76f824a4a0 config.h.in: Regenerated.
* config.h.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r82528
2004-06-01 07:43:27 +02:00
Andreas Jaeger
42fcd7bb7a configure.in: Handle multilibs, support --enable-version-specific-runtime-libs.
* configure.in: Handle multilibs, support
	--enable-version-specific-runtime-libs.
	* Makefile.am (lib_LTLIBRARIES): Rename to ...
        (toolexeclib_LTLIBRARIES): this for multilib support.
	* Makefile.in: Regenerated.
	* configure: Regenerated.
	* aclocal.m4: Regenerated.

	* testsuite/lib/libmudflap.exp (libmudflap-init): Handle
	multilibs, using multilib directory instead of hardcoded path.
	Set LD_RUN_PATH.

From-SVN: r82527
2004-06-01 07:21:07 +02:00
GCC Administrator
017f7506b5 Daily bump.
From-SVN: r82525
2004-06-01 00:16:14 +00:00
Mark Wielaard
1900c4c6bf GtkComponentPeer.java (requestFocus): Implement by calling gtkRequestFocus.
2004-06-01  Mark Wielaard  <mark@klomp.org>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (requestFocus):
	Implement by calling gtkRequestFocus.
	(gtkRequestFocus): New native method.
	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_requestFocus__):
	Renamed to ...
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus):
	New function name.
	(filter_expose_event_handler):
	Mark static.
	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
	(menu_pos): Mark static.

From-SVN: r82517
2004-05-31 23:03:01 +00:00
Mark Mitchell
e17b3578a3 re PR c++/15701 (ICE with friends and template template parameter)
PR c++/15701
	* friend.c (add_friend): Do not try to perform access checks for
	functions from dependent classes.

	PR c++/15701
	* g++.dg/template/friend29.C: New test.

From-SVN: r82516
2004-05-31 22:48:30 +00:00
Bernardo Innocenti
5847e53ee7 re PR target/12968 (doc m68k -mshort)
PR target/12968
	* doc/invoke.texi: Document stack alignment side-effect of -mshort.

From-SVN: r82511
2004-06-01 00:27:39 +02:00
Michael Koch
57807c3178 CollationElementIterator.java, [...]: New versions from GNU classpath.
2004-06-01  Michael Koch  <konqueror@gmx.de>

	* java/text/CollationElementIterator.java,
	java/text/CollationKey.java,
	java/text/RuleBasedCollator.java: New versions from GNU classpath.
	* testsuite/libjava.mauve/xfails: Removed all
	java.text.CollationElementIterator tests.

From-SVN: r82510
2004-05-31 22:16:31 +00:00
Michael Koch
f7dbd56c9a InflaterInputStream.java: Merged more with Classpath version.
2004-06-01  Michael Koch  <konqueror@gmx.de>

	* java/util/zip/InflaterInputStream.java: Merged more with Classpath
	version.
	* java/util/zip/ZipOutputStream.java (): Renamed enum to e to removed
	Java 1.5 keyword usage.

From-SVN: r82509
2004-05-31 22:14:37 +00:00
Joseph Myers
ec3e68358f re PR c/15749 (--pedantic-errors behaves differently from --pedantic with C-compiler on Linux)
PR c/15749
	* c-decl.c (grokdeclarator, finish_struct): Don't pedwarn for
	misuses of structures with flexible array members if
	in_system_header.

testsuite:
	* gcc.dg/pr15749-1.c, gcc.dg/pr15749-1.h: New test.

From-SVN: r82506
2004-05-31 23:06:33 +01:00
Eric Botcazou
a4a90b847a re PR target/15693 (ICE - unrecognizable insn)
PR target/15693
	* config/sparc/sparc.c (compare_operand): New predicate.
	* config/sparc/sparc.h (PREDICATE_CODES): Add it.
	* config/sparc/sparc.md (cmpsi expander): Use it.  If the first
	operand is a ZERO_EXTRACT and the second operand is not zero,
	force the former to a register.
	(cmpdi expander): Likewise.

From-SVN: r82500
2004-05-31 21:34:26 +00:00
Mark Mitchell
c8b2e872a8 re PR c++/15742 ('noreturn' attribute ignored in method of template functions.)
PR c++/15742
	* call.c (build_over_call): Set
	current_function_returns_abnormally even in template functions.

	PR c++/15696
	* cp-tree.h (invalid_nonstatic_memfn_p): New function.
	* cvt.c (convert_to_void): Use it.
	* typeck.c (invalid_nonstatic_memfn_p): New function.
	(decay_conversion): Use it.

	PR c++/15625
	* pt.c (tsubst_decl): Set DECL_FRIEND_CONTEXT for instantiated
	templates.

	PR c++/15629
	* name-lookup.c (arg_assoc_class): Do not find template
	specializations.

	PR c++/15209
	* tree.c (lvalue_p_1): Only consider the right-hand side of "."
	expressions when determining whether or not an express is packed.

	PR c++/15742
	* g++.dg/warn/Wreturn-1.C: New test.

	PR c++/15696
	* g++.dg/expr/ptrmem5.C: New test.

	PR c++/15625
	* g++.dg/template/friend27.C: New test.

	PR c++/15629
	* g++.dg/template/friend28.C: New test.
	* g++.dg/template/friend.C: Do not depend on <iostream>.  Add
	error message.

	PR c++/15209
	* g++.dg/ext/packed3.C: Remove bogus error.
	* g++.dg/ext/packed4.C: Remove bogus check.
	* g++.dg/ext/packed6.C: New test.

From-SVN: r82499
2004-05-31 21:24:31 +00:00
Benjamin Kosnik
7c9fee34e5 linker-map.gnu (GLIBCXX_3.4.1): Add.
2004-05-31  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu (GLIBCXX_3.4.1): Add.
	* testsuite/testsuite_abi.cc: Same.
	* configure.ac (libtool_VERSION): Bump to 6:1:0.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r82498
2004-05-31 21:19:52 +00:00
Olga Rodimina
44a4b8db07 * javax/swing/plaf/basic/BasicMenuUI.java:
(MouseEntered): Do not call getPath() from MenuSelectionManager.
	Call getPath() from super class instead.

From-SVN: r82496
2004-05-31 21:09:30 +00:00
Geoffrey Keating
133f7a77c2 gengtype-lex.l: Catch stray GTY markers in the files gengtype looks at.
* gengtype-lex.l: Catch stray GTY markers in the files gengtype
	looks at.
	* alias.c (alias_invariant_size): Make alias_invariant_size
	static, fix GTY marker.

From-SVN: r82493
2004-05-31 19:49:50 +00:00
Tobias Schlüter
c3e8c6b838 * trans-types.c: Fix spelling & layout in comments.
From-SVN: r82492
2004-05-31 21:31:12 +02:00
Kazu Hirata
09d98c720e re PR tree-optimization/15743 (Fold index() at tree level.)
PR tree-optimization/15743.
	* builtins.c (fold_builtin_1): Fold index() and rindex().

From-SVN: r82491
2004-05-31 17:39:14 +00:00
Roger Sayle
1f7a8dccd4 re PR c++/15069 (a bit test on a variable of enum type is miscompiled)
PR middle-end/15069
	* fold-const.c (fold_single_bit_test): Only perform "(X & C) != 0"
	into "X < 0" (where C is the signbit) if X's type is a full mode.

	* g++.dg/opt/fold3.C: New test case.

From-SVN: r82490
2004-05-31 17:01:17 +00:00
John David Anglin
1027314a21 pa.md: Disable the peephole2 patterns that generate indexed floating-point stores when...
* pa.md: Disable the peephole2 patterns that generate indexed
	floating-point stores when indexing is disabled.

From-SVN: r82489
2004-05-31 16:10:54 +00:00
Gabriel Dos Reis
41fd3bac90 c-pretty-print.c (pp_c_left_bracket): Make a function.
* c-pretty-print.c (pp_c_left_bracket): Make a function.
        (pp_c_right_bracket): Likewise.
        (pp_c_star): Likewise.
        (pp_c_ampersand): Define.
        * c-pretty-print.h (pp_c_left_bracket): Declare.
        (pp_c_right_bracket): Likewise.
        (pp_c_star): Likewise.
        (pp_c_ampersand): Likewise.

cp/
        * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
        (pp_cxx_begin_template_argument_list): Turn into a function.
        (pp_cxx_end_template_argument_list): Likewise.
        (pp_cxx_separate_with): Define.
        (pp_cxx_unqualified_id): Tidy.
        (pp_cxx_primary_expression): Likewise.
        (pp_cxx_postfix_expression): Likewise.
        (pp_cxx_expression): Likewise.
        (pp_cxx_simple_type_specifier): Likewise.
        (pp_cxx_type_specifier_seq): Likewise.
        (pp_cxx_parameter_declaration_clause): Likewise.
        (pp_cxx_exception_specification): Likewise.
        (pp_cxx_direct_declarator): Likewise.
        (pp_cxx_type_id): Likewise.
        * cxx-pretty-print.h (pp_cxx_whitespace): Export from
        cxx-pretty-print.c.
        (pp_cxx_left_paren): Likewise.
        (pp_cxx_right_paren): Likewise.
        (pp_cxx_left_brace): Likewise.
        (pp_cxx_right_brace): Likewise.
        (pp_cxx_left_bracket): Likewise.
        (pp_cxx_right_bracket): Likewise.
        (pp_cxx_dot): Likewise.
        (pp_cxx_identifier): Likewise.
        (pp_cxx_tree_identifier): Likewise.
        (pp_cxx_ampersand): New macro.
        (pp_cxx_star): Likewise.
        (pp_cxx_arrow): Likewise.
        (pp_cxx_semicolon): Likewise.
        (pp_cxx_complement): Likewise.
        (pp_cxx_begin_template_argument_list): Declaree.
        (pp_cxx_end_template_argument_list): Likewise.
        (pp_cxx_colon_colon): likewise.

From-SVN: r82488
2004-05-31 15:25:51 +00:00
Eric Botcazou
d3157fb66d sol2.h (__enable_execute_stack): ANSIfy function definition.
* config/sol2.h (__enable_execute_stack): ANSIfy function
	definition.

From-SVN: r82487
2004-05-31 15:15:08 +00:00
Eric Botcazou
6661a85ff7 parser.c (cp_parser_simple_type_specifier): Explicitly test against NULL_TREE.
* parser.c (cp_parser_simple_type_specifier): Explicitly test
	against NULL_TREE.

From-SVN: r82486
2004-05-31 14:59:00 +00:00
Bryce McKinlay
1aae9cdcf2 jcf-write.c (generate_bytecode_conditional): Correct handling of unordered conditionals.
* jcf-write.c (generate_bytecode_conditional): Correct handling
	of unordered conditionals. Add comment.

From-SVN: r82485
2004-05-31 15:54:37 +01:00
Danny Smith
b47785f4ab * pex-win32.c (fix_argv): Expand comment.
From-SVN: r82482
2004-05-31 10:32:58 +00:00
Danny Smith
421563d59a c-incpath.c (add_path): Canonicalize paths to use '/' if HAVE_DOS_BASED_FILESYSTEM.
* c-incpath.c (add_path): Canonicalize paths to use '/' if
	HAVE_DOS_BASED_FILESYSTEM.

From-SVN: r82481
2004-05-31 10:30:00 +00:00
Steven Bosscher
1c052514f6 tree-ssa-dom.c (record_equivalences_from_incoming_edge): Only look at case labels if the immediate dominator is also the only predecessor.
* tree-ssa-dom.c (record_equivalences_from_incoming_edge):
	Only look at case labels if the immediate dominator is also
	the only predecessor.  Don't look for more case labels if the
	first seen is a case range.

From-SVN: r82480
2004-05-31 10:18:36 +00:00
Michael Koch
58128b9da1 SequenceInputStream.java: Rename enum to e because enum is a keyword in Java 1.5.
2004-05-31  Michael Koch  <konqueror@gmx.de>

	* java/io/SequenceInputStream.java:
	Rename enum to e because enum is a keyword in Java 1.5.

From-SVN: r82479
2004-05-31 09:23:05 +00:00
Michael Koch
771b9ca31f CompilerProcess.java: Fixed javadoc to by XHTML compliant.
2004-05-31  Michael Koch  <konqueror@gmx.de>

	* gnu/java/rmi/rmic/CompilerProcess.java:
	Fixed javadoc to by XHTML compliant.

From-SVN: r82478
2004-05-31 09:17:33 +00:00
Kazu Hirata
e784e64956 * builtins.c: Add a prototype for fold_builtin_strchr().
From-SVN: r82477
2004-05-31 09:13:33 +00:00
Kazu Hirata
324f9dfb93 call.c, [...]: Fix comment formatting.
* call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
	typeck.c: Fix comment formatting.

From-SVN: r82476
2004-05-31 08:42:32 +00:00
Paolo Bonzini
1999435c8a revert: combine.c (gen_binary): Remove.
2004-05-31  Paolo Bonzini  <bonzini@gnu.org>

	Revert this patch:
	2004-05-27  Paolo Bonzini  <bonzini@gnu.org>

	* combine.c (gen_binary): Remove.
	(known_cond, simplify_shift_const
	find_split_point, combine_simplify_rtx,
	simplify_if_then_else, simplify_set,
	simplify_logical, expand_field_assignment,
	extract_left_shift, force_to_mode,
	if_then_else_cond, apply_distributive_law,
	simplify_and_const_int, simplify_shift_const,
	gen_lowpart_for_combine, simplify_comparison,
	reversed_comparison): Replace with
	simplify_gen_binary, simplify_gen_relational or
	distribute_and_simplify_rtx.
	(distribute_and_simplify_rtx): New function.

From-SVN: r82475
2004-05-31 06:59:47 +00:00
John David Anglin
97509a89b1 pa.c (emit_move_sequence): Fix loading of non 14-bit CONST operands when generating PIC code.
* pa.c (emit_move_sequence): Fix loading of non 14-bit CONST operands
	when generating PIC code.

From-SVN: r82474
2004-05-31 02:07:40 +00:00
GCC Administrator
d1eea9c043 Daily bump.
From-SVN: r82472
2004-05-31 00:16:13 +00:00
Andrew Pinski
3c79fa86db c-decl.c (c_expand_body_1): Remove and fold back into ...
ChangeLog:
	* c-decl.c (c_expand_body_1): Remove and fold back into ...
	(c_expand_body): here.
	(c_expand_decl): Move to ...
	* c-common.c (c_expand_decl): Here and remove check for nested
	functions.
	* c-common.h (c_expand_decl): Add prototype.
	* c-tree.h (c_expand_decl): Remove.

cp/ChangeLog:
	* cp-lang.c (cp_expand_decl): Remove.
	(LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.

From-SVN: r82469
2004-05-30 16:53:32 -07:00
Roger Sayle
1b0f3e79b1 fold-const.c (combine_comparisons, [...]): Use constant_boolean_node where appropriate.
* fold-const.c (combine_comparisons, optimize_bit_field_compare,
	range_binop, fold_truthop, fold_binary_op_with_conditional_arg,
	fold_mathfn_compare, fold_inf_compare, fold,
	fold_relational_hi_lo, nondestructive_fold_binary_to_constant):
	Use constant_boolean_node where appropriate.  Don't bother using
	fold_convert on the second argument to omit_one_operand.

From-SVN: r82468
2004-05-30 22:23:19 +00:00