2004-10-10 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc (_S_construct_pattern):
Give __ret a default value, thus avoiding spurious warnings.
* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Open either
words or linux.words, otherwise exit.
* testsuite/performance/27_io/ifstream_getline.cc: Slighlty tweak.
From-SVN: r88848
2004-10-09 Paolo Carlini <pcarlini@suse.de>
* include/std/std_memory.h (__get_temporary_buffer): Don't use
INT_MAX, prefer numeric_limits<ptrdiff_t>::max(), ok on 64-bit
platforms too.
* testsuite/20_util/memory/auto_ptr/assign_neg.cc: Adjust dg-error
line numbers.
From-SVN: r88814
2004-10-06 Benjamin Kosnik <bkoz@redhat.com>
Paolo Carlini <pcarlini@suse.de>
PR libstdc++/17780
* src/mt_allocator.cc (__pool<true>::_M_reserve_block): Revert
to old locking order.
Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
From-SVN: r88611
2004-10-06 Paolo Carlini <pcarlini@suse.de>
* include/std/std_sstream.h (_M_sync): When the caller is
setbuf, don't trust _M_string.capacity() to be the size of
the buffer area, use _M_string.size() in this case.
* testsuite/27_io/basic_stringbuf/setbuf/char/4.cc: New.
* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc: Likewise.
* include/bits/sstream.tcc (overflow): Avoid calling string::assign
unnecessarily when the current _M_string is empty.
2004-10-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algo.h (__reverse(bidirectional_iterator_tag)):
Avoid iterator postincrement.
(__rotate): Likewise.
* include/bits/stl_algo.h: Minor formatting tweaks.
2004-10-06 Christopher Jefferson <caj@cs.york.ac.uk>
* include/bits/stl_algo.h (__reverse(random_access_iterator_tag)):
Avoid iterator postincrement; fix swapping middle element with
itself on odd-length inputs.
From-SVN: r88593
2004-10-05 Christopher Jefferson <caj@cs.york.ac.uk>
* include/bits/stl_algobase.h (iter_swap): delegate to swap via
__iter_swap when iterator's value_types are equal.
(struct __iter_swap): New.
From-SVN: r88549
PR libstdc++/17505
* config/linker-map.gnu: Synchronize the current list of stub
functions from libmath.
Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>
From-SVN: r88540
* config/locale/generic/c_locale.cc (__convert_to_v): Use
_GLIBCXX_HAVE_STRTOF instead _GLIBCXX_USE_C99 to check for strtof.
Likewise, use _GLIBCXX_HAVE_STRTOLD instead of _GLIBCXX_USE_C99
to check for presence of strtold.
From-SVN: r88472
2004-10-01 Paolo Carlini <pcarlini@suse.de>
* include/bits/sstream.tcc (seekpos): Minor rearrangement of two
conditionals consistently with seekoff.
* include/std/std_sstream.h (setbuf): Avoid a string temporary.
(_M_sync): Simplify a bit, clean-up comment.
From-SVN: r88389
2004-09-29 Paolo Carlini <pcarlini@suse.de>
* include/std/std_sstream.h (basic_stringbuf(ios_base::openmode)):
Don't use _M_stringbuf_init, keep the pointers null, per 27.7.1.1.
(str()): Slightly tweak, protect from pptr() == 0.
(_M_update_egptr()): Likewise.
* include/bits/sstream.tcc (ssekoff, seekpos): In order to check
for an empty buffer use __beg instead of _M_string.capacity().
* testsuite/27_io/basic_stringbuf/cons/char/1.cc: New.
* testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_filebuf/cons/char/1.cc: New.
* testsuite/27_io/basic_filebuf/cons/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_streambuf/cons/char/1.cc: Update.
* testsuite/27_io/basic_streambuf/cons/wchar_t/1.cc: Likewise.
2004-09-29 Paolo Carlini <pcarlini@suse.de>
Benjamin Kosnik <bkoz@redhat.com>
* testsuite/testsuite_io.h (class constraint_buf): New, extended
and templatized version of constraint_filebuf; add typedefs for
streambuf/stringbuf/filebuf and wchar_t counterparts.
Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>
From-SVN: r88307
2004-09-24 Paolo Carlini <pcarlini@suse.de>
* src/localename.cc (locale::locale(const char*)): Minor tweaks:
rename a variable, move an assignment.
(locale::_Impl::_Impl(const char*, size_t)): Likewise, minor tweak.
From-SVN: r88043
gcc/cp:
* decl.c (grokfndecl): If ::main is found not to return int,
correct it after issuing a diagnostic.
(grokdeclarator): If the incoming type was error_mark_node, do
not complain about declaring something with no type.
(start_function): Change check for ::main not returning int to
an assertion, as grokfndecl now catches this when the user did it.
* init.c (perform_member_init, sort_mem_initializers)
(emit_mem_initializers): Make most diagnostics be issued on
the line of current_function_decl, not whatever the current
input line is.
* parser.c (cp_lexer_peek_token_emit_debug_info): Surround
definition and declaration with #ifdef ENABLE_CHECKING.
Avoid unnecessary use of fprintf.
(cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
definitions to avoid warnings.
(cp_lexer_new_main): Add assertion that first token is not a
padding token.
(cp_lexer_new_from_token_array): Fold into ...
(cp_lexer_new_from_tokens): ... here. Add assertion that
first token is not a padding token.
(cp_lexer_set_source_position_from_token): Move nearer to callers.
Remove unused lexer argument.
(cp_lexer_peek_token): Just print debugging report (if enabled)
and return lexer->next_token.
(cp_lexer_skip_purged_tokens): Delete.
(cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
inline, simplify bodies.
(cp_lexer_peek_nth_token): Add debugging report a la
cp_lexer_peek_token.
(cp_lexer_consume_token): Correct commentary. Advance over
purged tokens here. Set current source position here, from
token to be returned. Avoid unnecessary use of fprintf.
(cp_lexer_purge_token): Advance next_token pointer over this and
subsequent purged tokens.
(cp_parser_error): Adjust source position to that of the
peeked token.
(cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
(cp_parser_string_literal): Remove some excessive cleverness.
(cp_parser_enum_specifier): Call start_enum before consuming
the opening brace.
(cp_parser_member_declaration): Make the "extra semicolon"
diagnostic consistently-worded with the other place this is
diagnosed. Explicitly set the diagnostic location to the
location of the offending semicolon.
(cp_parser_enclosed_template_argument_list): Use %</%> quoting
in diagnostics. Do not use cp_parser_require. Set location
of diagnostics about improper use of '>>' to location of
offending token.
(cp_parser_late_parsing_for_member):
Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
(cp_parser_late_parsing_default_args): Likewise. Manually
move some logic outside the loop.
gcc/testsuite:
* g++.dg/ext/complit1.C
* g++.dg/other/error2.C
* g++.dg/other/nontype-1.C
* g++.dg/parse/crash11.C
* g++.dg/parse/crash12.C
* g++.dg/parse/error15.C
* g++.dg/parse/error4.C
* g++.dg/parse/tmpl-outside1.C
* g++.dg/parse/too-many-tmpl-args1.C
* g++.dg/template/dependent-expr3.C
* g++.dg/template/error10.C
* g++.dg/template/instantiate1.C
* g++.dg/template/vtable2.C
* g++.dg/warn/Wshadow-1.C
* g++.dg/warn/weak1.C
* g++.old-deja/g++.brendan/crash16.C
* g++.old-deja/g++.brendan/crash18.C
* g++.old-deja/g++.brendan/crash48.C
* g++.old-deja/g++.brendan/crash49.C
* g++.old-deja/g++.brendan/crash55.C
* g++.old-deja/g++.brendan/crash56.C
* g++.old-deja/g++.brendan/crash8.C
* g++.old-deja/g++.brendan/enum11.C
* g++.old-deja/g++.brendan/enum8.C
* g++.old-deja/g++.brendan/enum9.C
* g++.old-deja/g++.brendan/friend3.C
* g++.old-deja/g++.brendan/misc14.C
* g++.old-deja/g++.bugs/900402_02.C
* g++.old-deja/g++.bugs/900404_03.C
* g++.old-deja/g++.bugs/900404_04.C
* g++.old-deja/g++.bugs/900428_03.C
* g++.old-deja/g++.jason/crash4.C
* g++.old-deja/g++.jason/overload21.C
* g++.old-deja/g++.jason/redecl1.C
* g++.old-deja/g++.jason/report.C
* g++.old-deja/g++.jason/rfg10.C
* g++.old-deja/g++.jason/template30.C
* g++.old-deja/g++.law/arm12.C
* g++.old-deja/g++.law/ctors5.C
* g++.old-deja/g++.law/cvt20.C
* g++.old-deja/g++.law/init10.C
* g++.old-deja/g++.law/init8.C
* g++.old-deja/g++.law/visibility17.C
* g++.old-deja/g++.law/visibility7.C
* g++.old-deja/g++.mike/net8.C
* g++.old-deja/g++.mike/p646.C
* g++.old-deja/g++.mike/p700.C
* g++.old-deja/g++.mike/p701.C
* g++.old-deja/g++.mike/p811.C
* g++.old-deja/g++.ns/template13.C
* g++.old-deja/g++.other/array3.C
* g++.old-deja/g++.other/crash25.C
* g++.old-deja/g++.other/dtor3.C
* g++.old-deja/g++.other/dtor4.C
* g++.old-deja/g++.other/main1.C
* g++.old-deja/g++.other/warn7.C
* g++.old-deja/g++.pt/crash11.C
* g++.old-deja/g++.pt/crash36.C
* g++.old-deja/g++.pt/spec22.C
* g++.old-deja/g++.pt/spec9.C
* g++.old-deja/g++.pt/ttp52.C
* g++.old-deja/g++.robertl/eb103.C
* g++.old-deja/g++.robertl/eb121.C
* g++.old-deja/g++.robertl/eb22.C
* g++.old-deja/g++.robertl/eb8.C:
Update locations and/or regexps of dg-error markers.
Remove markers for some bogus messages that are no longer issued.
libstdc++-v3:
* testsuite/20_util/memory/auto_ptr/assign_neg.cc
* testsuite/23_containers/map/operators/1_neg.cc
* testsuite/23_containers/set/operators/1_neg.cc:
Update locations and/or regexps of dg-error markers.
From-SVN: r87985
2004-09-21 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12882 (cont)
* acinclude.m4 (GLIBCXX_CHECK_LFS): Check for fstat64 too.
* configure: Regenerate.
* config/io/basic_file_stdio.cc (__basic_file<>::showmanyc): When
_GLIBCXX_USE_LFS use fstat64 and lseek64, thus providing a non
trivial showmanyc for large files too.
From-SVN: r87797
2004-09-17 Paolo Carlini <pcarlini@suse.de>
* include/bits/fstream.tcc (xsgetn): Slightly tweak conditional,
as per Nathan's original suggestion.
From-SVN: r87647
2004-09-17 Paolo Carlini <pcarlini@suse.de>
Andrea Arcangeli <andrea@suse.de>
* config/io/basic_file_stdio.cc (__basic_file<>::close)): Don't
call unnecessarily sync, that is fflush: the library, since 3.4.0
does not use buffered fread/fwrite.
* include/bits/fstream.tcc (basic_filebuf<>::overflow): Likewise.
Co-Authored-By: Andrea Arcangeli <andrea@suse.de>
From-SVN: r87636
2004-09-14 Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (xsgetn): Slightly tweak the recent fix
for 11722: copy can replace move; the common case is __avail == 0.
From-SVN: r87501
2004-09-14 Paolo Carlini <pcarlini@suse.de>
* include/bits/cpp_type_traits.h: Rename __is_trivially_copyable
to __is_scalar, more clear and consistent with "tr1" naming.
* include/bits/stl_algobase.h: Update consistently throughout.
From-SVN: r87497
2004-09-13 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/11722
* include/std/std_fstream.h (xsgetn): Declare only.
* include/bits/fstream.tcc (xsgetn): Define, optimize for the
always_noconv() case: when __n > __buflen, copy the available
buffer and issue a direct read.
* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: New.
* include/bits/fstream.tcc (xsputn): Minor tweak, reorder a
conditional.
From-SVN: r87453
/
* configure.in: Remove target-libstdc++-v3 from noconfigdirs for
*-*-netware, but add target-libmudflap.
Consolidate *-*-netware targets (of which really only i?86 exists)
into a single entry.
* configure: Likewise.
gcc/
* config.gcc: Resurrect NetWare as a target. Handle special case of
Novell linker to be used (specified through --with-ld=) and threading
model of either Posix (default) or NKS.
* config/i386/i386.c (ix86_return_pops_args): Conditionalize popping
of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER.
* config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New.
* config/i386/netware.c, config/i386/netware.h: New.
* config/i386/nwld.c, config/i386/nwld.h: New.
* config/i386/netware-crt0.c: New.
* config/i386/netware-libgcc.c: New.
* config/i386/netware-libgcc.def: New.
* config/i386/netware-libgcc.exp: New.
* config/i386/t-netware, config/i386/t-nwld: New.
* gthr-nks.h: New.
* doc/install.texi: Document NKS threading model.
gcc/cp/
* g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
than "-lm".
gcc/testsuite/
* g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields.
* g++.old-deja/g++.jason/thunk2.C: xfail for NetWare.
* g++.old-deja/g++.law/profile1.C: xfail for NetWare.
* g++.old-deja/g++.other/store-expr1.C: xfail for NetWare.
* gcc.c-torture/compile/20001109-1.c: xfail for NetWare.
* gcc.c-torture/compile/20001109-2.c: xfail for NetWare.
* gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than
the non-portable bzero.
* gcc.dg/20010912-1.c: xfail for NetWare.
* gcc.dg/20020426-2.c: xfail for NetWare.
* gcc.dg/20021014-1.c: xfail for NetWare.
* gcc.dg/20021018-1.c: xfail for NetWare.
* gcc.dg/20030213-1.c: xfail for NetWare.
* gcc.dg/20030225-1.c: xfail for NetWare.
* gcc.dg/20030708-1.c: xfail for NetWare.
* gcc.dg/builtins-config.h: Also exclude NetWare.
* gcc.dg/format/format.h: Define restrict only if not already defined.
* gcc.dg/nest.c: xfail for NetWare.
* gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare.
* lib/target-supports.exp (check_visibility_available): Exclude
NetWare.
fixincludes/
* inclhack.def: Suppress exception_structure and math_exception
for NetWare headers.
* fixincl.x: Regenerate.
libstdc++-v3/
* crossconfig.m4: Add NetWare as a target.
* configure: Regenerate.
From-SVN: r87040
2004-09-02 Benjamin Kosnik <bkoz@redhat.com>
Leland Wang <llwang@infor.org>
PR libstdc++/17259
* include/ext/ropeimpl.h (rope::_S_compare): Use
_Rope_constants::_S_leaf.
Co-Authored-By: Leland Wang <llwang@infor.org>
From-SVN: r86973
2004-08-30 Phil Edwards <phil@codesourcery.com>
* docs/html/install.html: Update locales list (from Paolo).
Remove other redundant information and point to the GCC install
documentation.
From-SVN: r86800