* c-common.c (c_common_nodes_and_builtins): The first parameter to
__builtin_va_start and __builtin_va_copy is now either a 'va_list'
or a reference to a va_list.
* builtins.c (stabilize_va_list): Simplify now we don't have to
work around C array address decay.
* c-typeck.c (convert_for_assignment): Handle assignment to
a reference parameter by taking the address of the RHS.
* ginclude/stdarg.h (va_start): Don't take address of first parameter.
(va_copy): Likewise.
(__va_copy): Likewise.
* ginclude/varargs.h (va_start): Likewise.
(__va_copy): Likewise.
From-SVN: r32821
Undo effects of previous delta. Do not define ASM_SPEC and SUBTARGET_EXTRA_ASM_SPEC
oin arm.h as it conflicts with builds for non GAS using targets
From-SVN: r32816
gcc:
* except.c (add_eh_table_entry): Mark type_info's as referenced.
gcc/cp:
* rtti.c (get_tinfo_decl): Mark used.
(emit_tinfo_decl): Don't optimize polymorphic type_info. Only
mark as dealt with, if we output it.
From-SVN: r32799
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
when negative *before* using it as an array index.
* ChangeLog: Fixed typo.
(Fixes the following bogus patch:
http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00937.html)
From-SVN: r32793
2000-03-28 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c (hash_IHASH): Just return i->hash.
(cpp_included): Set dummy.hash using _cpp_calc_hash. Use
htab_find_with_hash.
(cpp_read_file): Likewise.
(find_include_file): Likewise. Properly initialize
ih->nshort. Share ih->name and ih->nshort if possible.
* cpphash.c (_cpp_calc_hash): New function.
(hash_HASHNODE): Just return h->hash.
(_cpp_lookup): Set dummy.hash using _cpp_calc_hash. Use
htab_find_with_hash.
* cpphash.h: Prototype _cpp_calc_hash.
* cppinit.c (initialize_builtins): Provide a valid hash
to _cpp_make_hashnode, using _cpp_calc_hash.
* cpphash.c (collect_expansion): # is not a special character
in object-like macros. In -traditional mode, /**/ is not
token paste at the beginning or end of the line.
* cpplib.c (do_include, do_import, do_include_next): If
parse_include fails, return immediately.
From-SVN: r32792
* config/arm/arm.md (return peepholes): Update to reflect the new
call insn patterns.
* config/arm/arm.c (arm_volatile_func): Also check
current_function_nothrow.
(output_return_instruction, output_func_prologue): Use it.
(arm_output_epilogue, arm_expand_prologue): Likewise.
From-SVN: r32788
* class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
vbase offset at index -3, not -1.
(build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
(dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
(build_rtti_vtbl_entries): New function.
(set_rtti_entry): Remove.
(build_primary_vtable): Don't use it.
(build_secondary_vtable): Likewise.
(start_vtable): Remove.
(first_vfun_index): New function.
(set_vindex): Likewise.
(add_virtual_function): Don't call start_vtable. Do call
set_vindex.
(set_primary_base): Rename parameter.
(determine_primary_base): Likewise.
(num_vfun_entries): Don't use skip_rtti_stuff.
(num_extra_vtbl_entries): Include RTTI information.
(build_vtbl_initializer): Use build_rtti_vtbl_entries.
(skip_rtti_stuff): Remove.
(dfs_modify_vtables): Don't use it.
(modify_all_vtables): Don't use start_vtable. Do use set_vindex.
(layout_nonempty_base_or_field): Update size handling.
(create_vtable_ptr): Tweak.
(layout_class_type): Adjust parameter names.
(finish_struct_1): Simplify.
* cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
(skip_rtti_stuff): Remove.
(first_vfun_index): New function.
(dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
(dfs_vtable_path_marked_real_bases_queue_p): Remove.
(marked_vtable_pathp): Declare.
(unmarked_vtable_pathp): Likewise.
* error.c (dump_expr): Use first_vfun_index to calculate vtable
offsets.
* rtti.c (build_headof): Look for RTTI at negative offsets.
(get_tinfo_decl_dynamic): Likewise.
(tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
here.
(create_pseudo_type_info): Do it here instead. Adjust so that
vptr points at first virtual function.
* search.c (marked_vtable_pathp): Make it global.
(unmarked_vtable_pathp): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
(dfs_vtable_path_marked_real_bases_queue_p): Likewise.
(dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
(get_pure_virtuals): Likewise.
(expand_upcast_fixups): Likewise.
* tree.c (debug_binfo): Likewise.
* tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
negative offset.
From-SVN: r32787
* expr.c (store_constructor): SIZE now signed.
For EXPR_SIZE, don't evaluate size; just needed if constant.
* fold-const.c (fold): Fix a number of cases when folded tree is
wrong type.
* function.c (flush_addressof): Reenable.
* tree.h (flush_addressof): Likewise.
* toplev.c (independent_decode_option): Look at strings_processed.
* config/alpha/alpha.h (MINIMUM_ATOMIC_ALIGNMENT): Cast to unsigned.
From-SVN: r32783
* regmove.c (struct csa_memlist): Make mem field rtx *.
(record_one_stack_ref): Accept rtx * instead of rtx as parameter.
(try_apply_stack_adjustment): Replace whole MEM rtx.
(combine_stack_adjustments_for_block): Update calls
to record_one_stack_ref.
From-SVN: r32782
* (cpplex.c) _cpp_read_and_prescan. Mark end of input buffer with
'\\' rather than a null character, so nulls are not special. Fix
"\\\n" handling in end-of-buffer conditions. Use trigraph map to
speed trigraph conversion.
(_cpp_init_input_buffer) Initialize trigraph map.
From-SVN: r32781
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
to 0 when it reaches -1.
2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (get_constant): Properly cast `num' during the
invocation of `add_double call'.
* jcf-write.c (push_long_const): Properly cast `lo' before
comparing it to short bounds.
* parse-scan.y (interface_declaration:): Rule re-arrange so that
`interface_body:' is reduced after the current interface is
pushed.
2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (inner_qualifier, inner_qualifier_length): New
static globals.
(push_class_context, pop_class_context): New function.
(class_body:): Call pop_class_context.
(interface_body:): Likewise.
(INNER_QUALIFIER): New macro.
(report_class_declaration): Changed output format and use
INNER_QUALIFIER. Call push_class_context.
From-SVN: r32779
* Makefile.in: New #defines and friends for Thread.h.
* posix-threads.cc: (struct starter): Remove `object'.
(_Jv_CondWait): Use interruptable condition variables and new
recursive mutexes. New return codes on interrupt or non-ownership
of mutex.
(_Jv_CondNotify): Ditto.
(_Jv_CondNotifyAll): Ditto.
(_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt
the target thread by signaling its wait condition.
(_Jv_ThreadInitData): Set `thread_obj' in the thread data struct,
not the starter struct. Initialize wait_mutex and wait_cond.
(_Jv_MutexLock): New recursive mutex implementation. Moved from
posix-threads.h.
(_Jv_MutexUnlock): Ditto.
(really_start): Set info->data->thread from pthread_self() to work
around a race condition. Destroy wait_mutex and wait_cond when run()
returns.
* java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
`isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
set.
startable_flag: New private field.
(Thread): Initialize `startable_flag'.
(toString): Check for null thread group.
* java/lang/natThread.cc: (struct natThread): New fields
`join_mutex', `join_cond'. Removed fields `joiner', `next'.
(class locker): Removed.
(initialize_native): Initialize `join_cond' and `join_mutex'.
(interrupt): Now just calls _Jv_ThreadInterrupt().
(join): Simplified. Just wait on the target thread's join condition.
(finish_): Remove join list code. Unset thread group. Signal
potential joiners by notifying the dying threads join_cond.
(start): Check for illegal restarts.
* java/lang/natObject.cc: Check for return value of _Jv_CondWait and
act appropriatly.
* include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
#defines and #ifdefs.
(struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
`wait_mutex', `next'.
(struct _Jv_ConditionVariable_t): Define as a struct instead of
directly mapping to pthread_cond_t.
(struct _Jv_Mutex_t): New recursive implementation.
(_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check.
_Jv_HaveCondDestroy: Never define this for posix-threads.
(_Jv_CondNotify): Remove inline implementation(s), prototype instead.
(_Jv_CondNotifyAll): Ditto.
(_Jv_MutexLock): Ditto.
(_Jv_MutexUnlock): Ditto.
(_Jv_MutexInit): Changed to reflect new mutex implementation.
(_Jv_MutexDestroy): Ditto.
(_Jv_CondDestroy): Removed.
(_Jv_PthreadGetMutex): Removed.
* include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an
error. Add a FIXME about this.
(_Jv_CondNotifyAll): Ditto.
* win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess
_JV_NOT_OWNER on other errors. Add FIXME.
From-SVN: r32773