* cpplib.c (do_pragma_implementation): Fix off-by-one error
truncating a string. Don't assume tokens are nul terminated.
Problem noted by Andreas Jaeger <aj@suse.de>
From-SVN: r32507
* tree.h (record_layout_info_s): New structure.
(record_layout_info): New type.
(new_record_layout_info): New function.
(layout_field): Likewise.
(finish_record_layout): Likewise.
* stor-layout.c (layout_record): Remove.
(new_record_layout_info): New function.
(layout_field): New function, broken out from layout_record.
(finalize_record_size): Likewise.
(compute_record_mode): Likewise.
(finalize_type_size): New function, broken out from layout_type.
(finish_record_layout): Likewise.
(layout_type): Use them.
From-SVN: r32503
* cpphash.c: Don't include version.h.
(special_symbol) [case T_VERSION]: Look for the string in
hp->value.cpval; don't use version_string.
* cppinit.c (initialize_builtins): Set hp->value.cpval for
__VERSION__ to version_string.
* Makefile.in (cpphash.o): Update deps.
From-SVN: r32499
* cpplib.h (struct cpp_reader): Make hashtab and
all_include_files of type 'struct htab *'. Delete HASHSIZE
and ALL_INCLUDE_HASHSIZE macros.
* cpphash.h: Update prototypes.
(struct hashnode): Remove next, prev, and bucket_hdr members.
Make length a size_t. Add hash member.
(struct ihash): Remove next member. Add hash member. Make
name a flexible array member.
* cppfiles.c: Include hashtab.h.
(include_hash): Delete.
(IHASHSIZE): New macro.
(hash_IHASH, eq_IHASH, _cpp_init_include_hash): New functions.
(cpp_included): Do the hash lookup here.
(_cpp_find_include_file): Rewrite.
(cpp_read_file): Put the "fake" hash entry into the hash
table. Honor the control_macro, if it turns out we've seen
the file before. Don't push the buffer here.
(_cpp_read_include_file): Push the buffer here.
(OMODES): New macro. Use it whenever we call open(2).
* cpphash.c: Include hashtab.h.
(hash_HASHNODE, eq_HASHNODE, del_HASHNODE, dump_hash_helper,
_cpp_init_macro_hash, _cpp_dump_macro_hash, _cpp_make_hashnode,
_cpp_lookup_slot): New functions.
(HASHSIZE): new macro.
(hashf, _cpp_install, _cpp_delete_macro): Delete.
(_cpp_lookup): Use hashtab.h routines.
* cppinit.c: Include hashtab.h.
(cpp_reader_init): Call _cpp_init_macro_hash and
_cpp_init_include_hash. Don't allocate hashtab directly.
(cpp_cleanup): Just call htab_delete on pfile->hashtab and
pfile->all_include_files.
(initialize_builtins): Use _cpp_make_hashnode and
htab_find_slot to add hash entries.
(cpp_finish): Just call _cpp_dump_macro_hash.
* cpplib.c: Include hashtab.h.
(do_define): Use _cpp_lookup_slot and _cpp_make_hashnode to
create hash entries.
(do_pragma_poison, do_assert): Likewise.
(do_include): Don't push the buffer here. Don't increment
system_include_depth unless _cpp_read_include_file succeeds.
(do_undef, do_unassert): Use _cpp_lookup_slot and htab_clear_slot
or htab_remove_elt.
(do_pragma_implementation): Use alloca to create copy.
* Makefile.in: Update dependencies.
From-SVN: r32497
* libF77/configure.in: Define IEEE_COMPLEX_DIVIDE.
* libF77/[cz]_div.c: Arrange for compilation under
-DIEEE_COMPLEX_DIVIDE to make these routines
avoid calling sig_die when the denominator vanishes.
* libF77/s_rnge.c: Add casts for the case of
sizeof(ftnint) == sizeof(int) < sizeof(long).
* libI77/endfile.c: Set state to writing (b->uwrt = 1) when an
endfile statement requires copying the file
Also, supply a missing (long) cast in the sprintf call.
* libI77/sfe.c: Add #ifdef ALWAYS_FLUSH logic, for formatted I/O.
From-SVN: r32496
2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (whitespace_cr): Compress consecutive calls to warning().
(do_identifier): Ditto for error().
* pt.c (convert_nontype_argument): Ditto for cp_error().
(convert_template_argument): Ditto for cp_pedwarn().
From-SVN: r32492
2000-03-11 Neil Booth <NeilB@earthling.net>
* cppinit.c (struct pending option): Replace undef with a
pointer to a directive handling routine.
(struct cpp_pending): Replace separate assert_ and define_
lists with one directive_ list.
(new_pending_define): Rename new_pending_directive. Extra
argument is the directive's handling routine.
(handle_option): Update to use new_pending_directive.
From-SVN: r32481
* decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
* except.c (expand_end_eh_spec): Add the return type.
* rtti.c (throw_bad_cast): Add the parmtypes.
(throw_bad_typeid): Likewise.
* semantics.c (expand_stmt): Only leave out rtl for unused
artificials, and set DECL_IGNORED_P on them as well.
* decl.c (wrapup_globals_for_namespace): Likewise.
* decl.c (maybe_commonize_var): Skip all artificial decls.
* pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
From-SVN: r32475
* builtins.c (expand_builtin_strlen): Make sure that we have something
at the beginning of the sequence.
* toplev.c (rest_of_compilation): Also set TREE_NOTHROW for
deferred inlines.
* invoke.texi (C++ Dialect Options): Document -fno-enforce-eh-specs.
From-SVN: r32473
* config/mips/linux.h: Undefine MD_EXEC_PREFIX and
MD_STARTFILE_PREFIX since those are not needed on linux.
(ASM_FILE_START): New, from mips/gnu.h.
From-SVN: r32470
* lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
* cp-tree.h: Declare flag_enforce_eh_specs.
* decl.c (store_parm_decls, finish_function): Check it.
C library functions don't throw.
* Makefile.in (cfns.h): New target.
(except.o): Depend on it.
* Make-lang.in (cc1plus): Depend on cfns.gperf.
* cfns.gperf: New file.
* cfns.h: Generated.
* except.c: Include it.
(nothrow_libfn_p): New fn.
* decl.c (grokfndecl): Use it.
* cp-tree.h: Declare it.
From-SVN: r32469
* partition.h: New file.
Changes in libiberty:
* Makefile.in (CFILES): Add partition.c.
(REQUIRED_OFILES): Add partition.o.
(partition.o): New rule.
* partition.c: New file.
Changes in gcc:
* Makefile.in (ssa.o): New rule.
(OBJS): Add ssa.o.
(STAGESTUFF): Add *.ssa and *.ussa.
(mostlyclean): Delete *.ssa, *.ussa, */*.ssa, */*.ussa.
* rtl.def (PHI): New RTL expression.
* rtl.h (clear_log_links): New declaration.
(convert_to_ssa): Likewise.
(convert_from_ssa): Likewise.
* flow.c (split_edge): If the entry node falls through to the
split edge's source block, split the entry edge.
(clear_log_links): New function.
* toplev.c (ssa_dump): New variable.
(flag_ssa): Likewise.
(f_options): Add "ssa".
(compile_file): Create SSA dump files.
(rest_of_compilation): Go to and from SSA if enabled.
(decide_d_option): Handle -de for SSA dump files.
* ssa.c: New file.
From-SVN: r32465
* java/security/Key.java(serialVersionUID): Set to 0 for now.
* java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
* java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.
From-SVN: r32464
* java/security/AlgorithmParameterGeneratorSpi.java: New file.
* java/security/DigestException.java: New file.
* java/security/GeneralSecurityException.java: New file.
* java/security/InvalidAlgorithmParameterException.java: New file.
* java/security/InvalidKeyException.java: New file.
* java/security/InvalidParameterException.java: New file.
* java/security/Key.java: New file.
* java/security/KeyException.java: New file.
* java/security/KeyPair.java: New file.
* java/security/KeyPairGenerator.java: New file.
* java/security/KeyPairGeneratorSpi.java: New file.
* java/security/NoSuchProviderException.java: New file.
* java/security/PrivateKey.java: New file.
* java/security/Provider.java: New file.
* java/security/PublicKey.java: New file.
* java/security/SecureRandom.java: New file.
* java/security/Security.java: New file.
* java/security/Signature.java: New file.
* java/security/SignatureException.java: New file.
* java/security/interfaces/DSAKey.java: New file.
* java/security/interfaces/DSAParams.java: New file.
* java/security/interfaces/DSAPrivateKey.java: New file.
* java/security/interfaces/DSAPublicKey.java: New file.
* java/security/interfaces/RSAPrivateCrtKey.java: New file.
* java/security/interfaces/RSAPrivateKey.java: New file.
* java/security/interfaces/RSAPublicKey.java: New file.
* java/security/spec/AlgorithmParameterSpec.java: New file.
* java/security/spec/InvalidKeySpecException.java: New file.
* java/security/spec/InvalidParameterSpecException.java: New file.
* java/security/spec/KeySpec.java: New file.
* java/security/spec/RSAPrivateCrtKeySpec.java: New file.
* java/security/spec/RSAPrivateKeySpec.java: New file.
* java/security/spec/RSAPublicKeySpec.java: New file.
* Makefile.am: Added above java.security files.
* Makefile.in: Rebuilt.
* java/security/MessageDigest.java: Rewritten.
* java/security/SecureClassLoader.java: Added JDK1.2 comment.
From-SVN: r32461