* expr.h (store_by_pieces): Add prototype.
(can_store_by_pieces): Likewise.
* expr.c (struct store_by_pieces): Renamed from clear_by_pieces.
(can_store_by_pieces): New.
(store_by_pieces): New.
(clear_by_pieces): New.
(clear_by_pieces_1): New.
(store_by_pieces_1): Renamed from clear_by_pieces, handle storing
arbitrary compiler generated constants into memory block.
(store_by_pieces_2): Renamed from clear_by_pieces_1, likewise.
* builtins.c (c_readstr): New.
(builtin_memcpy_read_str): New.
(expand_builtin_memcpy): If src is string constant and
emit_block_move would move it by pieces, compute integer constants
from the string and store it into memory block instead.
(builtin_strncpy_read_str): New.
(expand_builtin_strncpy): If N is not constant zero and c_strlen does
not return INTEGER_CST, don't optimize.
If N is larger than strlen(src) + 1, try to copy the string
including padding with store_by_pieces.
(expand_builtin_strcmp): If both arguments have side effects, don't
optimize.
(expand_builtin_fputs): If STR has side effects, don't optimize.
* gcc.c-torture/execute/string-opt-5.c: Add some strcmp and strncpy
tests.
* gcc.c-torture/execute/string-opt-6.c: New test.
From-SVN: r37851
* java/util/zip/InflaterInputStream (read): Don't return -1 unless
the infate() call didn't deliver any output. Throw a ZipException if
the needsDictionary() call returns true.
* java/io/ByteArrayInputStream (read): Remove redundant bounds checks.
* java/io/InputStreamReader: Use the default buffer size for the
contained BufferedInputStream.
From-SVN: r37846
* gcc.dg/noncompile/940510-1.c: Update to test c89 functionality.
Move from here ...
* gcc.dg/940510-1.c: ... to here.
* gcc.dg/20000926-1.c: GNU C now allows initializations of
zero-size arrays in toplevel structures.
From-SVN: r37830
* cppmacro.c (cpp_scan_buffer_nooutput): Take a boolean
indicating whether to scan all buffers on the stack or
just one.
* cppinit.c (do_includes): Update.
* cppmain.c (main): Update.
* cpplib.h: Update prototype.
From-SVN: r37829
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
more time zone entries.
* java/text/SimpleDateFormat.java (format): Added case for
TIMEZONE_FIELD.
From-SVN: r37824
* loop.c (load_mems): Avoid using next_label to find end_label. If
jumping outside of the loop (other than loop end), don't hoist MEMs
out of loop.
* gcc.c-torture/execute/loop-8.c: New test.
From-SVN: r37823
2000-11-28 Geoffrey Keating <geoffk@redhat.com>
Felix Lee <flee@redhat.com>
* gen-params: Put in cases for O_EXCL, O_APPEND not being defined.
Co-Authored-By: Felix Lee <flee@redhat.com>
From-SVN: r37821
* tradcpp.c (enum node_type): New hash types T_ASSERT, T_UNASSERT.
(struct directive): Drop 4th argument from handlers.
(do_define, do_line, do_include, do_undef, do_else, do_elif,
do_endif): Similarly.
(do_assert, do_unassert, do_ifdef, do_ifndef): New handlers.
(do_ifxdef): Update as common handler of do_ifdef and do_ifndef.
(make_definition, make_undef): Take a const char*.
(make_assertion): New function.
(struct directive_table): Update.
(main): Handle -A command line argument.
(handle_directive): Drop fourth handler argument.
From-SVN: r37820
* system.h (IS_DIR_SEPARATOR): Use uppercase macro name.
(IS_ABSOLUTE_PATHNAME): New macro.
* gcc.c (find_a_file, process_command, do_spec_1, main): Use it.
From-SVN: r37818
cp:
* parse.y (base_class.1): Produce a _TYPE not a _DECL.
* semantics.c (finish_base_specifier): Accept a _TYPE not a
_DECL.
testsuite:
* g++.old-deja/g++.other/base1.C: New test.
From-SVN: r37817
2000-11-27 Benjamin Kosnik <bkoz@redhat.com>
* tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS.
* testsuite/22_locale/ctor_copy_dtor.cc: Adjust formatting.
* testsuite/27_io/istream_extractor_arith.cc (test11): New
testcase, based on libstdc++/90.
From-SVN: r37813
2000-11-28 Bryce McKinlay <bryce@abatross.co.nz>
* java/io/DataInputStream.java: Merge classpath docs. Call in.read()
directly rather than read() in all cases. Make primitive read
implementations more efficient, as defined in JDK online docs.
(skipBytes): Behave like the JDK's implementation.
* java/io/BufferedReader.java: Merge classpath docs. Check for a
closed stream with checkStatus() whenever an IOException can be
thrown.
(checkStatus): New private method.
From-SVN: r37810
* tradcpp.c (enum pending_dir_t, struct pending_dir): New.
(main): Allocate a pending directive set of these. Use it.
Merge handling of -D and -U. Update handling of pending
directives. Free the memory after use.
From-SVN: r37803