Philipp Thomas [Sun, 25 Jun 2000 02:45:23 +0000 (02:45 +0000)]
aclocal.m4 (AM_WITH_NLS): Set create_catalogs=no if no catalog compiler found.
* aclocal.m4 (AM_WITH_NLS): Set create_catalogs=no if no catalog
compiler found.
AM_GNU_GETTEXT: Don't set CATALOGS if create_catalogs=no.
* configure: Rebuilt.
avr-protos.h (avr_hard_regno_mode_ok): New prototype.
* config/avr/avr-protos.h (avr_hard_regno_mode_ok): New prototype.
* config/avr/avr.c (out_adj_frame_ptr, out_set_stack_ptr):
New functions, common code moved from function_{prologue,epilogue}
and extended to support the -mtiny-stack option.
(function_prologue, function_epilogue): Use them.
Use lo8/hi8 consistently for asm output readability.
(avr_hard_regno_mode_ok): New function.
* config/avr/avr.h (TARGET_SWITCHES): Fix typo. Add -mtiny-stack.
(UNITS_PER_WORD): Define as 4 (not 1) when compiling libgcc2.c.
(HARD_REGNO_MODE_OK): Call the avr_hard_regno_mode_ok function.
* config/avr/avr.md (*mov_sp_r): Add support for -mtiny-stack.
Write SPH before SPL.
(*movqi): No need to disable interrupts for just one "out"
in alternative 5. Change length attribute from 4 to 1.
* config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__):
Write SPH before SPL.
Benjamin Kosnik [Sat, 24 Jun 2000 00:56:05 +0000 (00:56 +0000)]
fstream.tcc (basic_filebuf::basic_filebuf(fd)): Use it.
2000-06-23 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* bits/fstream.tcc (basic_filebuf::basic_filebuf(fd)): Use it.
(basic_filebuf::close): Use it.
* bits/std_fstream.h (basic_filebuf): Remove default arguments for
filebuf ctor.
(basic_filebuf): Add _M_fileno_based data member.
As reported by brent verner <brent@rcfile.org>
* testsuite/27_io/filebuf_members.cc: New file.
* testsuite/27_io/filebuf_members-1.tst: New file.
Benjamin Kosnik [Sat, 24 Jun 2000 00:53:06 +0000 (00:53 +0000)]
filebuf_members.cc: New file.
2000-06-23 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* testsuite/27_io/filebuf_members.cc: New file.
* testsuite/27_io/filebuf_members-1.tst: New file.
* bits/fstream.tcc (basic_filebuf::basic_filebuf(fd)): Use it.
(basic_filebuf::close): Use it.
* bits/std_fstream.h (basic_filebuf): Remove default arguments for
filebuf ctor.
(basic_filebuf): Add _M_fileno_based data member.
* bits/std_fstream.h: Formatting tweaks.
* testsuite/27_io/ofstream_members.cc: New file.
* testsuite/27_io/ofstream_members-1.tst: New file.
* testsuite/27_io/ifstream_members.cc: New file.
* testsuite/27_io/ifstream_members-1.tst: New file.
Benjamin Kosnik [Fri, 23 Jun 2000 22:21:47 +0000 (22:21 +0000)]
std_fstream.h: Formatting tweaks.
2000-06-23 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* bits/std_fstream.h: Formatting tweaks.
* testsuite/27_io/ofstream_members.cc: New file.
* testsuite/27_io/ofstream_members-1.tst: New file.
* testsuite/27_io/ifstream_members.cc: New file.
* testsuite/27_io/ifstream_members-1.tst: New file.
Alex Samuel [Fri, 23 Jun 2000 03:58:44 +0000 (03:58 +0000)]
in include/ChangeLog:
* dyn-string.h (dyn_string_init, dyn_string_new,
dyn_string_delete, dyn_string_release, dyn_string_resize,
dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
dyn_string_append_char, dyn_string_substring_dyn_string_eq):
Define as same name with __cxa_ prepended, if IN_LIBGCC2.
(dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
dyn_string_append_char, dyn_string_substring): Change return type
to int.
in libiberty/ChangeLog:
* cp-demangle.c: Don't include ctype.h.
(IS_DIGIT): New macro.
(IS_ALPHA): Likewise. Use IS_DIGIT and IS_ALPHA throughout
instead of isdigit and isalpanum.
(demangling_def): Make name and next const pointers.
(STATUS_ALLOCATION_FAILED): New status code.
(dyn_string_append_space): Handle failure in
dyn_string_append_char.
(int_to_dyn_string): Likewise. Change return value to status_t.
(string_list_new): Handle failure of dyn_string_init.
(result_close_template_list): Change return type to status_t.
Handle failure in dyn_string_append.
(result_push): Change return value to status_t. Handle failure in
string_list_new. Handle failure of result_push throughout.
(substitution_add): Change return value to status_t. Handle
dyn_string failures. Handle failure of substitution_add
throughout.
(template_arg_list_new): Return NULL on allocation failure.
(result_append_string): Return STATUS_ALLOCATION_FAILED on error.
Handle error result throughout.
(result_append): Likewise.
(result_append_char): Likewise.
(result_append_space): Likewise.
(demangling_new): Make argument a const pointer. Handle
allocation failures.
(demangle_template_args): Handle failure in template_arg_list_new
and result_close_template_list.
(demangle_discriminator): Return if int_to_dyn_string fails.
(cp_demangle): Likewise.
(cp_demangle_type): New function.
(cplus_demangle_new_abi): Don't call dyn_string_delete. Abort on
memory allocation failure.
(main): Likewise.
* dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if
IN_LIBGCC2.
(dyn_string_init): Change return value to int. Handle
RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_release): Delete the dyn_string.
(dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_copy): Change return type to int.
(dyn_string_copy_cstr): Likewise.
(dyn_string_prepend): Likewise.
(dyn_string_prepend_cstr): Likewise.
(dyn_string_insert): Likewise.
(dyn_string_insert_cstr): Likewise.
(dyn_string_append): Likewise.
(dyn_string_append_cstr): Likewise.
(dyn_string_append_char): Likewise.
(dyn_string_substring): Likewise.
in gcc/cp/ChangeLog:
* Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
(cp-demangle.o): New rule.
(dyn-string.o): Likewise.
* inc/cxxabi.h (__cxa_demangle): New declaration.
Mark Mitchell [Fri, 23 Jun 2000 01:14:40 +0000 (01:14 +0000)]
cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
* cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
(BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
(lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
a tree, not an int.
(THUNK_GENERATE_WITH_VTABLE_P): New macro.
(make_thunk): Change prototype.
(emit_thunk): Rename to use_thunk.
(mangle_thunk): Change prototype.
* class.c (get_derived_offset): Simplify.
(copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
BV_GENERATE_THUNK_WITH_VTABLE_P.
(build_primary_vtable): Simplify.
(add_virtual_function): Use BV_FN, rather than TREE_VALUE.
(dfs_find_base): Remove.
(update_vtable_entry_for_fn): Correct bug in finding the base
where a virtual function was first declared. Figure out whether
or not to emit a vcall-thunk with the vtables in which it appears.
Correct logic for deciding whether to use an ordinary thunk, or a
vcall thunk.
(finish_struct_1): Remove unnecssary code.
(build_vtbl_initializer): Use ssize_int for the running counter of
negative indices.
(build_vtbl_initializer): Only use vcall thunks where necessary.
Mark thunks as needing to be emitted with their vtables, or not.
(build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
indices. Use size_binop.
(dfs_build_vcall_offset_vtbl_entries): Don't rely on
BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
size_binop.
(build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
(build_vtable_entry): Mark thunks as needing to be emitted with
their vtables, or not.
* decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
* decl2.c (mark_vtable_entries): Use use_thunk instead of
emit_thunk.
* dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
information.
* error.c (dump_expr): Use BV_FN.
* mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
not an int.
* method.c (make_thunk): Likewise.
(emit_thunk): Rename to use_thunk. Allow callers to decide
whether or not to actually emit the thunk. Adjust for changes in
representation of vcall offsets.
* search.c (dfs_get_pure_virtuals): Use BV_FN.
* semantics.c (emit_associated_thunks): New function.
(expand_body): Use it.
* ir.texi: Adjust decriptions of thunks.
Benjamin Kosnik [Thu, 22 Jun 2000 23:59:04 +0000 (23:59 +0000)]
[multiple changes]
2000-06-22 Steven King <sxking@uswest.net>
* acinclude.m4: Check for sinl, _sinl using 1 parameter.
2000-06-22 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT): Redo. Use the
same approach as GLIBCPP_CHECK_MATH_SUPPORT, only don't try to
link against libm and don't use -fno-builtins...
* math/mathconf.h: Change up builtin macros to new schema.
* bits/std_cmath.h: And here. Wheee!
* shadow/bits/std_cmath.h: And here.
* acconfig.h: Change up builtin macros here.
* math/cosf.c: Remove.
* math/fabsf.c: Likewise.
* math/sinf.c: Likewise.
* math/sqrtf.c: Likewise.
* math/Makefile.am (EXTRA_DIST): Remove those four files.
* math/Makefile.in: Regenerate.
Benjamin Kosnik [Thu, 22 Jun 2000 23:17:58 +0000 (23:17 +0000)]
acconfig.h: Change up builtin macros here.
2000-06-22 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* acconfig.h: Change up builtin macros here.
* acinclude.m4 (GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT): Redo. Use the
same approach as GLIBCPP_CHECK_MATH_SUPPORT, only don't try to
link against libm and don't use -fno-builtins...
* decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
an old OVERLOAD when we're declaring a non-function.
(pushdecl, destroy_local_var): Check for error_mark_node.
(warn_extern_redeclared_static): Also bail early if
we're a CONST_DECL.
(push_overloaded_decl): Ignore an old error_mark_node.
Nathan Sidwell [Thu, 22 Jun 2000 09:42:10 +0000 (09:42 +0000)]
varasm.c (constant_descriptor): Make contents unsigned char.
* varasm.c (constant_descriptor): Make contents unsigned char.
(mark_const_hash_entry): Adjust.
(const_hash): Just hash the code of unknown nodes.
(compare_constant_1): Adjust for unsigned char.
Use language specific expander on unknown nodes.
(record_constant_1): Likewise.
Benjamin Kosnik [Thu, 22 Jun 2000 06:19:44 +0000 (06:19 +0000)]
Fix alpha, powerpc build failures.
2000-06-21 Benjamin Kosnik <bkoz@soma.redhat.com>
Fix alpha, powerpc build failures.
* acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Substantially
re-write. Need to check for both proper declaration when using a
c++ compiler, and "C" linkage when linking. Do both, and if both
exist, then define the HAVE_* bits in config.h.
(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_n): New, uber-macros. Does all.
(GLIBCPP_CHECK_LINKER_FEATURES): Actually link and run this
program, doh.
* check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
* expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
screened by DECL_P.
* java-tree.def (CASE_EXPR): Marked 'e'.
(DEFAULT_EXPR): Likewise.
* jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
screened by DECL_P.
* jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
(generate_bytecode_insns): Test try_block for BLOCK before using
BLOCK_EXPR_BODY.
* parse.y (build_wfl_wrap): Added `location' argument. Set
EXPR_WFL_LINECOL accordingly.
(dim_expr:): Wrap constants with WFLs.
(method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
(resolve_package): Check for `stmt' not being a BLOCK before
building a debuggable statement with it.
(make_qualified_primary): Added extra parameter to build_wfl_wrap
invocation.
(resolve_field_access): Make sure `decl' is a DECL before treating
it as such.
(maybe_build_primttype_type_ref): Make sure `wfl''s node is an
IDENTIFIER_NODE before treating it as such.
(patch_new_array_init): Make sure `elt' is a TREE_LIST before
treating it as such.
(find_applicable_accessible_methods_list): CLASS_INTERFACE macro
to be applied only on non array types.
2000-06-16 Per Bothner <per@bothner.com>
* java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
define in terms of DECL_RESULT, as that fails when --enable-checking.
* parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
* parse.y (find_in_imports): Returned type changed to void,
leading comment fixed.
(register_package): New function.
(qualify_and_find): Likewise.
(package_declaration:): Use `register_package'.
(single_type_import_declaration:): Removed local variable
`node'. Added missing `;' for consistency.
(type_import_on_demand_declaration:): Use `chainon' to link new
entries.
(lookup_field_wrapper): Lookup local variables defined in outer
contexts first.
(java_complete_class): Don't reverse the list of imported on demand.
(do_resolve_class): Reorganized. Removed local variable
`original_name'. Call `qualify_and_find' with the current package
name, invoke `find_in_imports_on_demand' right after. Call
`qualify_and_find' with the packages we've seen so far. Fixed
operations numbering in comments.
(java_expand_class): Don't reverse `package_list'.
(find_most_specific_methods_list): New local variables `abstract'
and `candidates'. Use them to pick the right method.
(Fixes for the ENABLE_TREE_CHECKING Java run-time build problem:
http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00551.html)
Zack Weinberg [Wed, 21 Jun 2000 23:08:17 +0000 (23:08 +0000)]
cppfiles.c (cpp_make_system_header): New function.
* cppfiles.c (cpp_make_system_header): New function.
* cpplib.h: Prototype it.
* cpplib.c (do_line, do_pragma_system_header): Use it.
* fix-header.c (read_scan_file): Use it.
* fix-header.c (check_macro_names): Cast second arg of
cpp_defined to const unsigned char *.
(read_scan_file): Make getchar_call const unsigned char.
Zack Weinberg [Wed, 21 Jun 2000 18:33:51 +0000 (18:33 +0000)]
cppfiles.c: Include splay-tree.h, not hashtab.h.
* cppfiles.c: Include splay-tree.h, not hashtab.h.
(redundant_include_p, make_IHASH, hash_IHASH, eq_IHASH): Delete.
(destroy_include_file_node): New.
(_cpp_init_include_hash): Rename _cpp_init_include_table.
Create a splay tree, not a hash table.
(open_include_file): Look up the path in the include table,
do the multiple include optimization here, etc.
(cpp_included): Walk the path.
(find_include_file): Just walk the path calling
open_include_file, or call it directly for an absolute path.
(_cpp_fake_ihash): Rename _cpp_fake_include and update for new
scheme.
(read_include_file): Update for new scheme. Don't close the
file unless reading fails.
(_cpp_execute_include, cpp_read_file): Tweak for new scheme.
Bryce McKinlay [Wed, 21 Jun 2000 03:55:35 +0000 (04:55 +0100)]
ThreadGroup.java (add(Thread)): Rename to addThread() to comply with classpath VM spec.
2000-06-21 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/ThreadGroup.java (add(Thread)): Rename to addThread() to
comply with classpath VM spec.
(add(Group)): Rename to addGroup().
* java/lang/Thread.java (Thread): Use addThread().
* java/lang/natThread.cc (finish_): Use removeThread().
Bryce McKinlay [Tue, 20 Jun 2000 13:30:14 +0000 (13:30 +0000)]
ThreadGroup.java: Merged with classpath.
2000-06-20 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/ThreadGroup.java: Merged with classpath.
* prims.cc (_Jv_RunMain): Don't use \rain_group'.
* gnu/gcj/runtime/FirstThread.java: Remove ThreadGroup constructor
argument.
* java/lang/Thread.java (Thread): Bootstrap initial thread from
ThreadGroup.root if Thread.currentThread is null. Honour the
ThreadGroup's max priority setting.
Benjamin Kosnik [Mon, 19 Jun 2000 23:43:19 +0000 (23:43 +0000)]
[multiple changes]
2000-06-19 Raja R Harinath <harinath@cs.umn.edu>
* src/Makefile.am: change @WERROR@ to $(WERROR) so that this can
be overridden on the command line for individual files.
2000-06-19 Benjamin Kosnik <bkoz@soma.redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Can't use
AC_LANG_CPLUSPLUS as this tries to link in libstdc++, Which we are
building. Use -x c++ instead, which does not attempt to link
libstdc++.
Zack Weinberg [Mon, 19 Jun 2000 22:28:28 +0000 (22:28 +0000)]
c-parse.in (undeclared_variable_notice): Moved to c-typeck.c.
* c-parse.in (undeclared_variable_notice): Moved to c-typeck.c.
(primary: IDENTIFIER): Just call build_external_ref.
* c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c:
Regenerate.
* c-lex.c (lastiddecl): Remove.
(yylex): Replace all instances of lastiddecl with local
variables.
* c-typeck.c (build_external_ref): New function. Treat decls
with C_DECL_ANTICIPATED mostly the same as nonexistent decls.
Look up the decl from the id here. Call lookup_objc_ivar.
* c-lang.c (lookup_objc_ivar): Stub.
* objc/objc-act.c (lookup_objc_ivar): New function.
Benjamin Kosnik [Mon, 19 Jun 2000 22:20:15 +0000 (22:20 +0000)]
contribute.html: Add bits about getting to the LWG issues pages.
2000-06-19 Benjamin Kosnik <bkoz@soma.redhat.com>
* docs/17_intro/contribute.html: Add bits about getting to the LWG
issues pages.
* docs/documentation.html: Rename link to make more accurate and scary.
* docs/gccrebuild.html: Edit for clarity as these are no longer
separate projects.
* docs/install.html: Add bits about binutils for
-ffunction-sections, -fdata-sections, -Wl,--gc-sections
* configure.in: Add call for GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT.
* math/Makefile.am (EXTRA_DIST): Change USE_LONG_DOUBLE to
USE_COMPLEX_LONG_DOUBLE.
* acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Break into
GLIBCPP_CHECK_MATH_SUPPORT and GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT.
Works around irregularies in powerpc "C" compiler, but a good idea
anyway.
* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT):
New. Merge both old compiler bug checks for complex into this.
* cp/decl.c (initialize_local_var): Changed call to finish_expr_stmt
to call genrtl_expr_stmt when appropriate.
* cp/init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
begin_compound_expr to call genrtl_begin_stmt_expr and
genrtl_begin_compound_expr when appropriate.
(finish_init_stmts): Changed calls to finish_compound_expr and
finish_stmt_expr to call genrtl_finish_compound_expr and
genrtl_finish_stmt_expr when appropriate.
(expand_default_init): Changed call to finish_expr_stmt to call
genrtl_expr_stmt when appropriate.
(build_vec_init): Likewise.
* cp/parse.y (simple_stmt): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.
* cp/parse.c: Regenerated.
* cp/pt.c (tsubst_expr): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.