Commit Graph

49411 Commits

Author SHA1 Message Date
Mark Mitchell befcd99bcb re PR c++/10428 (struct <typedef'ed name> causes ICE in write_unscoped_name)
PR c++/10428
	* g++.dg/parse/elab1.C: New test.

	PR c++/10428
	* decl.c (check_elaborated_type_specifier): New function, split
	out from ...
	(xref_tag): ... here.  Use the new function in more places.

From-SVN: r65956
2003-04-22 21:05:58 +00:00
Kaveh R. Ghazi 52dd322420 vsnprintf.c (vsnprintf): Don't pad string with extra nulls.
* vsnprintf.c (vsnprintf): Don't pad string with extra nulls.
	(main): Test that we don't write too much data.

From-SVN: r65955
2003-04-22 19:58:57 +00:00
Neil Booth b78f9414c6 * cpplex.c (_cpp_get_fresh_line): Pop the buffer if return_at_eof.
From-SVN: r65954
2003-04-22 19:54:20 +00:00
Devang Patel df1b07f3b9 Remove conflict indicator.
From-SVN: r65953
2003-04-22 12:53:37 -07:00
Devang Patel f945b4e0f5 cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count.
* cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count.
        (_cpp_copy_replacement_text): Same.


        * gcc.dg/cpp/trad/funlike-5.c: New test.

From-SVN: r65952
2003-04-22 12:52:51 -07:00
Neil Booth 1067694a52 c-lex.c (c_lex): Handle CPP_OTHER differently.
* c-lex.c (c_lex): Handle CPP_OTHER differently.
	* cppexp.c (_cpp_parse_expr): Similarly.
	* cpplex.c (SPELL_CHAR): Remove.
	(_cpp_lex_direct): Stray chars are saved as byte strings.
	(cpp_spell_token, cpp_output_token, _cpp_equiv_token): Don't
	handle SPELL_CHAR.
	(cpp_avoid_paste): Update handling of CPP_OTHER.
	* cpplib.h: Spell CPP_OTHER like a number.
	(struct cpp_token): Remove member c.
	* cppmacro.c (stringify_arg): Update handling of CPP_OTHER.

From-SVN: r65951
2003-04-22 19:28:00 +00:00
Paolo Carlini 45aca21f40 std_streambuf.h (_S_pback_size, [...]): Move to basic_filebuf.
2003-04-22  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (_S_pback_size, _M_pback,
	_M_pback_cur_save, _M_pback_end_save, _M_pback_init,
	_M_pback_create(), _M_pback_destroy()): Move to basic_filebuf.
	(basic_streambuf::basic_streambuf()): Adjust.
	* include/std/std_fstream.h (_S_pback_size, _M_pback,
	_M_pback_cur_save, _M_pback_end_save, _M_pback_init,
	_M_pback_create(), _M_pback_destroy()): Moved here
	from basic_streambuf.
	* include/bits/fstream.tcc (basic_filebuf::basic_filebuf()):
	Adjust.
	(basic_filebuf::_S_pback_size): Add declaration.
	* include/bits/streambuf.tcc (basic_streambuf::_S_pback_size):
	Remove declaration.

From-SVN: r65950
2003-04-22 17:32:25 +00:00
David Turner 77c915d879 gbl-ctors.h: Add special license exception.
* gbl-ctors.h: Add special license exception.
	* libgcc2.h: Likewise.
	* tsystem.h: Likewise.
	* gcov-io.h: Likewise.

From-SVN: r65949
2003-04-22 17:21:04 +00:00
Kean Johnston 9074e16951 Added myself as SCO maintainer
From-SVN: r65946
2003-04-22 16:46:30 +00:00
David Edelsohn 85e50b6ba8 fold-const.c (fold_range_test): Use RANGE_TEST_NON_SHORT_CIRCUIT macro defaulting to original BRANCH_COST heuristic.
* fold-const.c (fold_range_test): Use RANGE_TEST_NON_SHORT_CIRCUIT
        macro defaulting to original BRANCH_COST heuristic.
        * doc/tm.texi (RANGE_TEST_NON_SHORT_CIRCUIT): Document.

        * config/rs6000/rs6000.h (RANGE_TEST_NON_SHORT_CIRCUIT): Define.

From-SVN: r65942
2003-04-22 11:01:18 -04:00
Andreas Tobler 256c249cf9 packed1.C: Fix dg options.
2003-04-21  Andreas Tobler <a.tobler@schweiz.ch>

        * g++.dg/other/packed1.C: Fix dg options.

From-SVN: r65941
2003-04-22 15:20:57 +02:00
Aldy Hernandez 00c060a4cc t-spe: Merge in t-fprules into file.
2003-04-22  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/t-spe: Merge in t-fprules into file.

        * config.gcc: Add t-spe to powerpc-eabispe.

From-SVN: r65938
2003-04-22 13:06:55 +00:00
Kean Johnston e4d72771c7 Fixed calls to putenv().
From-SVN: r65937
2003-04-22 12:44:06 +00:00
Nathan Sidwell ad27e65a22 stddef.h: Provide C++ safe offsetof.
.:	* ginclude/stddef.h: Provide C++ safe offsetof.
testsuite:
	* g++.dg/other/offsetof2.C: New test.

From-SVN: r65936
2003-04-22 12:28:51 +00:00
Richard Kenner 834277a89a Fix typo in comment.
From-SVN: r65935
2003-04-22 08:09:09 -04:00
J"orn Rennecke 277b3b18b3 function.c (purge_addressof_1): In (mem (addressof (reg))) case for reg notes...
* function.c (purge_addressof_1): In (mem (addressof (reg))) case
	for reg notes, if there are no substitutions, just use a SUBREG.

From-SVN: r65934
2003-04-22 12:41:58 +01:00
Mark Mitchell 6adb9463cd * rtti.c (throw_bad_typeid): Use build_cxx_call.
From-SVN: r65933
2003-04-22 07:48:02 +00:00
Mark Mitchell b2dd096b0c Makefile.in (calls.o): Depend on except.h.
* Makefile.in (calls.o): Depend on except.h.
	* calls.c: Include except.h.
	(emit_call_1): Call note_eh_region_may_contain_throw if
	appropriate.
	* except.c (eh_region): Add may_contain_throw.
	(expand_eh_region_end_cleanup): Do not include handler code when
	it cannot be reached.
	(note_eh_region_may_contain_throw): New function.
	* except.h (note_eh_region_may_contain_throw): New function.

	* call.c (build_over_call): Use build_cxx_call.
	(build_cxx_call): New method, split out of build_over_call.
	* cp-tree.h (language_function): Add can_throw.
	(build_cxx_call): Declare it.
	* decl.c (finish_function): If a function does not contain any
	calls to functions that can throw an exception, indicate that
	fact.
	* decl2.c (mark_used): Do not defer the instantiation of
	functions, if the current function does not throw.
	* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
	* pt.c (instantiate_decl): Make sure import_export_decl is called
	before emitting things.
	* rtti.c (throw_bad_cast): Use build_cxx_call.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (build_function_call): Likewise.

	* g++.dg/template/recurse.C: Adjust location of error messages.

From-SVN: r65929
2003-04-22 05:44:12 +00:00
GCC Administrator f71c12554b Daily bump.
From-SVN: r65928
2003-04-22 00:17:06 +00:00
Mark Mitchell bfc6c67ed6 winnt.c (i386_pe_mark_dllimport): Revert previous changes.
* config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous
	changes.

From-SVN: r65920
2003-04-21 23:23:39 +00:00
Richard Kenner 4f0baa737f Refine last change.
From-SVN: r65915
2003-04-21 18:39:26 -04:00
Olivier Hainque 3cd58fd7ce fold-const.c (fold, [...]): Restore a number of conversions required for type consistency and previously...
* fold-const.c (fold, case PLUS_EXPR and case MULT_EXPR): Restore
	a number of conversions required for type consistency and previously
	stripped off by STRIP_NOPS.

From-SVN: r65913
2003-04-21 18:27:49 -04:00
Richard Kenner 9e91ce11be rtl.texi (RTX_UNCHANGING_P): Point to true_dependence for details of conflict handling.
* doc/rtl.texi (RTX_UNCHANGING_P): Point to true_dependence for
	details of conflict handling.

From-SVN: r65912
2003-04-21 18:13:01 -04:00
Aldy Hernandez b6e59a3aed rs6000.c (rs6000_override_options): No SPE means 64-bit long doubles.
2003-04-21  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/rs6000.c (rs6000_override_options): No SPE means
        64-bit long doubles.

From-SVN: r65911
2003-04-21 21:47:58 +00:00
Aldy Hernandez 95b1c7b6db rs6000.c (rs6000_override_options): No SPE means 64-bit long doubles.
2003-04-21  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/rs6000.c (rs6000_override_options): No SPE means
        64-bit long doubles.

[[Split portion of a mixed commit.]]

From-SVN: r65910.2
2003-04-21 21:47:57 +00:00
Paolo Carlini 07c2b60df9 Consistently use _M_in_beg instead of eback(), _M_in_cur instead of gptr(), and so on.
2003-04-21  Paolo Carlini  <pcarlini@unitus.it>

	Consistently use _M_in_beg instead of eback(), _M_in_cur
	instead of gptr(), and so on.
	* include/bits/fstream.tcc (pbackfail, imbue): Here.
	* include/bits/sstream.tcc (pbackfail, seekoff, seekpos): Ditto.
	* include/bits/streambuf.tcc (sbumpc, sputbackc,
	__copy_streambufs): Ditto.
	* include/std/std_streambuf.h (sgetc): Ditto.

From-SVN: r65909
2003-04-21 21:44:44 +00:00
Richard Kenner 63f60ecb14 Revert hunks not part of last patch.
From-SVN: r65908
2003-04-21 17:35:44 -04:00
Olivier Hainque 0d2f38ee40 expmed.c (extract_bit_field): Reverse operands of && condition to prevent a potential division by zero in the...
* expmed.c (extract_bit_field): Reverse operands of && condition to
        prevent a potential division by zero in the previously first branch.
	* config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero.

From-SVN: r65907
2003-04-21 17:32:06 -04:00
Nathan Sidwell d79f9ec9ff commit two parts of my last patch that escaped, somehow
From-SVN: r65906
2003-04-21 21:23:43 +00:00
Olivier Hainque 6a48df451f calls.c (expand_call): Prevent sibcall optimization for calls to nested subprograms.
* calls.c (expand_call): Prevent sibcall optimization for calls to
	nested subprograms.

From-SVN: r65904
2003-04-21 17:08:50 -04:00
Richard Kenner 26b84487c7 fold-const.c (extract_muldiv, [...]): Detect case when conversion overflows.
* fold-const.c (extract_muldiv, case CONVERT_EXPR): Detect case
	when conversion overflows.

From-SVN: r65900
2003-04-21 16:58:05 -04:00
Richard Kenner 1a96dc4634 * stor-layout.c (layout_decl): Don't set DECL_SIZE_UNIT if already set.
From-SVN: r65899
2003-04-21 16:43:21 -04:00
Joel Brobecker c3cdeef417 dwarf2out.c (is_ada, [...]): New functions.
* dwarf2out.c (is_ada, is_ada_subrange_type): New functions.
	(subrange_type_die): Likewise.
	(modified_type_die): Emit a subrange_type DIE for Ada subrange types.
	(is_c_family, is_cxx, is_java, is_fortran): Return bool and clean up.

From-SVN: r65898
2003-04-21 16:39:04 -04:00
Nathan Sidwell ca29da4301 Break out coverage routines to new file.
* Makefile.in (COVERAGE_H): New variable
        (C_OBJS): Add coverage.o
        (coverage.o): New target.
        (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust
        dependencies.
        (GTFILES): Adjust.
        (gt-coverage.h): New target.
        (gt-profile.h): Remove.
        * profile.h: Remove. Move to ...
        * coverage.h: ... here. New. #include gcov-io.h.
        * gcov-io.h: Move function definitions to ...
        * gcov-io.c: ... here. New.
        * profile.c: Move coverage routines to coverage.c.
        (instrument_edges, get_exec_counts, branch_prob, init_branch_prob,
        end_branch_prob): Adjust.
        * coverage.c: New. Coverage routines from profile.c
        (coverage_counter_ref, coverage_init, coverage_finish,
        coverage_end_function, coverage_begin_output,
        coverage_counter_ref, get_coverage_counts): Define.
        * gcov-dump.c, gcov.c: #include gcov-io.c.
        * libgcov.c: Likewise. Adjust.
        * loop-init.c: Don't #include profile.h
        * tracer.c, predict.c, sched-ebb.c: Adjust #includes.
        * rtl.h: Add coverage prototypes.
        * toplev.c (compile_file): Init coverage, not branch_prob.
        Always call coverage_finish.
        (rest_of_compilation): Call coverage_end_function.

From-SVN: r65897
2003-04-21 19:48:10 +00:00
Janis Johnson 1774b2132f rs6000.md (*movsf_softfloat): Add "h" <- "0" case.
2003-04-21  Matt Kraai  <kraai@alumni.cmu.edu>

	* config/rs6000/rs6000.md (*movsf_softfloat): Add "h" <- "0" case.

From-SVN: r65896
2003-04-21 19:35:19 +00:00
Matt Kraai dd0fbae24a rs6000.md (*movsf_softfloat): Add "h" <- "0" case.
2003-04-21  Matt Kraai  <kraai@alumni.cmu.edu>

	* config/rs6000/rs6000.md (*movsf_softfloat): Add "h" <- "0" case.

From-SVN: r65895
2003-04-21 19:34:43 +00:00
Neil Booth 74eb4b3e2e c-ppoutput.c (cb_include): Don't take a cpp_token.
* c-ppoutput.c (cb_include): Don't take a cpp_token.
	* cppfiles.c: Don't undef strcmp.
	(find_include_file): Don't take a cpp_token.  Check for empty
	file names.
	(_cpp_execute_include, _cpp_compare_file_date): Don't take a cpp_token.
	(cpp_push_include): Simplify.
	* cpphash.h (_cpp_execute_include, _cpp_compare_file_date): Update.
	* cpplib.c (glue_header_name): Return the file name, not a cpp_token.
	(parse_include): Similary.  Don't check for zero-length filenames.
	(do_include_common, do_pragma_dependency): Update accordingly.
	* cpplib.h (struct cpp_callbacks): Change prototype of include.

From-SVN: r65894
2003-04-21 19:21:59 +00:00
Paolo Carlini 65085aa3ef sstream.tcc (pbackfail, overflow): Formatting fixes.
2003-04-21  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (pbackfail, overflow):
	Formatting fixes.

From-SVN: r65893
2003-04-21 18:46:44 +00:00
Nathan Sidwell dfd39a2e36 * MAINTAINERS (gcov): Add myself and Jan Hubicka.
From-SVN: r65892
2003-04-21 18:43:10 +00:00
Paolo Carlini 9d3e38ec59 std_streambuf.h (uflow()): It's used only by basic_stringbuf (i.e....
2003-04-21  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (uflow()): It's used only by
	basic_stringbuf (i.e., basic_filebuf provide its own uflow()),
	therefore do not consider the _M_buf_unified == true case.

	* include/std/std_streambuf.h (sgetc()): Restore __ret variable.

From-SVN: r65891
2003-04-21 18:11:51 +00:00
Richard Kenner 337f4314e6 expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p before clearing.
* expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p
	before clearing.

From-SVN: r65890
2003-04-21 13:50:51 -04:00
Mark Mitchell 3819b963dc winnt.c (i386_pe_mark_dllimport): Make the new RTL have the same form as the old RTL.
* config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL
	have the same form as the old RTL.

From-SVN: r65885
2003-04-21 15:20:39 +00:00
Loren J. Rittle b33ee5f132 configure.in (_XOPEN_SOURCE): Bump to 600.
* libI77/configure.in (_XOPEN_SOURCE): Bump to 600.
	* libI77/configure: Regenerate.
	* libU77/configure.in (_XOPEN_SOURCE): Bump to 600.
	* libU77/configure: Regenerate.

From-SVN: r65884
2003-04-21 13:37:48 +00:00
Andreas Jaeger 0e7a8c4b6f * cppcharset.c (_cpp_valid_ucn): Cast field precision to int.
From-SVN: r65883
2003-04-21 14:06:12 +02:00
Nathan Sidwell 8de9bb0eb6 re PR c++/9881 (What is an address constant expression?)
cp:
	PR c++/9881
	* typeck.c (build_unary_op): Fold all COMPONENT_REF addr
	expressions. Reverts my 2002-08-08 patch.

	* typeck.c (comp_ptr_ttypes_real): Swap final && operands for
	cheaper early exit.
testsuite:
	PR c++/9881
	* g++.dg/init/addr-const1.C: New test.
	* g++.dg/other/packed1.C: XFAIL on aligned architectures.

From-SVN: r65882
2003-04-21 11:16:57 +00:00
GCC Administrator 0f0b91be0a Daily bump.
From-SVN: r65877
2003-04-21 00:17:04 +00:00
Scott Gilbertson ebf96c133b Container.java (addImpl): Enable paint events if adding a lightweight to a heavyweight.
2003-04-20  Scott Gilbertson  <scottg@mantatest.com>

	* java/awt/Container.java (addImpl): Enable paint events if adding
	a lightweight to a heavyweight.
	(addNotify): Ensure that peer is created before
	addNotifyContainerChildren.
	(addNotifyContainerChildren): Enable paint events if a heavyweight
	container contains a lightweight.

From-SVN: r65870
2003-04-20 23:21:06 +00:00
Chris Lattner b39b808448 c-common.h, [...]: Rename genrtl_decl_cleanup to genrtl_cleanup_stmt.
* c-common.h, c-semantics.c: Rename genrtl_decl_cleanup to
	genrtl_cleanup_stmt.  Correct comment at head of
	genrtl_cleanup_stmt (no such thing as a DECL_CLEANUP).

	* stmt.c (struct nesting): Kill n_function_calls.
	(expand_start_bindings): Don't set
	thisblock->data.block.n_function_calls.
	(expand_end_bindings): Compare function_call_count against 0.
	(expand_cleanups): Kill DONT_DO argument; all callers passed
	NULL_TREE. All callers updated to match.

Co-Authored-By: Zack Weinberg <zack@codesourcery.com>

From-SVN: r65869
2003-04-20 22:58:28 +00:00
Tom Tromey 3bd417a700 BufferedReader.java, [...]: Imports from Classpath.
* java/io/BufferedReader.java, java/io/BufferedWriter.java,
	java/io/DataInput.java, java/io/DataOutput.java: Imports from
	Classpath.

From-SVN: r65868
2003-04-20 22:47:43 +00:00
Mohan Embar ef963bc8a1 jcf-io.c (find_class): use DIR_SEPARATOR instead of '/' when computing java source filename
2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>

	* jcf-io.c (find_class): use DIR_SEPARATOR instead of
	'/' when computing java source filename

From-SVN: r65867
2003-04-20 22:45:02 +00:00