cp:
* typeck.c (build_static_cast): Allow enum to enum conversions
as per DR 128.
testsuite:
* g++.old-deja/g++.other/enum3.C: New test.
From-SVN: r40187
cp:
* class.c (check_field_decls): Pointers to member do not a
non-pod struct make, as per DR 148.
testsuite:
* g++.old-deja/g++.other/pod1.C: New test.
From-SVN: r40186
cp:
* call.c (joust): cp_pedwarn when using gnu extension concerning
worst conversion sequences.
testsuite:
* g++.old-deja/g++.ext/overload1.C: New test.
From-SVN: r40182
* cppfiles.c (struct include_file): Update.
(stack_include_file): Use search_from.
(cpp_included, find_include_file): Update.
(cpp_execute_include): Update. ptr->name may not be
null terminated. Use the new search_from member variable
of cpp_buffer.
(_cpp_compare_file_date): Similarly.
(search_from): New function, similiar to actual_directory.
(actual_directory): Delete.
(remap_filename): Update. loc->name may not be null terminated.
(struct file_name_list): Rename search_path. Update.
* cpphash.h (struct cpp_buffer): Delete actual_dir. New members
search_from and dir.
(struct cpp_reader): Remove actual_dirs.
* cppinit.c (struct cpp_pending): Update for renamed objects.
(append_include_chain, remove_dup_dir, remove_dup_dirs,
merge_include_chains, cpp_destroy, cpp_start_read): Similarly.
* cpplib.h (struct cpp_options): Similarly.
From-SVN: r40178
* java/math/BigInteger.java
* gnu/gcj/math/MPN.java (rshift0): New method handles zero shift count.
(rshift(int[],int[],int,int): Removed - not needed.
(gcd): Use rshift0 rather than rshift.
* java/math/BigInteger.java (setShiftRight): Likewise.
(divide): Simplify by using rshift0.
(divide): Zero-extend results if high-order bit set.
From-SVN: r40177
* cpplib.c (_cpp_init_stacks): Cast enum for comparison.
* cppexp.c (lex): Cast enums for comparison.
* cppinit.c (parse_option): Cast enum for comparison.
* cpplex.c (cpp_spell_token): Cast enums to int for minus.
(cpp_output_token): Likewise.
(cpp_can_paste): Cast enums for comparsion and plus/minus.
(cpp_avoid_paste): Cast enums for minus and comparison.
From-SVN: r40174
* gcc.c, cp/lang-specs.h, f/lang-specs.h, java/lang-specs.h,
objc/lang-specs.h: Add zero initializer for cpp_spec field to
all array elements.
* cp/lang-specs.h: Don't put an #ifdef inside the initializer
list; set a default for CPLUSPLUS_CPP_SPEC and use it.
From-SVN: r40173
* cpphash.h (struct cpp_reader): Add print_version field.
* cppinit.c (cpp_handle_option): For -v, -version, and --version,
just set print_version and other flags as appropriate.
(cpp_post_options): Print version here if print_version is set.
* toplev.c (exit_after_options): New flag.
(independent_decode_option): Don't exit here; just set
exit_after_options.
(main): Exit after calling lang_hooks.post_options if
exit_after_options is true.
* cppinit.c (append_include_chain): Drop never-used case QUOTE.
(merge_include_chains): Adjust comment to match code.
From-SVN: r40171
* stringpool.c (set_identifier): New function.
* tree.h: Prototype it.
* c-parse.in: Kill D_YES. If compiled for objc, call
save_and_forget_protocol_qualifiers from init_reswords.
* objc/objc-act.c (remember_protocol_qualifiers,
forget_protocol_qualifiers): Don't diddle C_IS_RESERVED_WORD.
Swap out the non-keyword IDENTIFIER_NODEs for keyword ones, or
vice versa.
(save_and_forget_protocol_qualifiers): New function.
* c-lex.h: Prototype save_and_forget_protocol_qualifiers.
From-SVN: r40170
2001-03-01 Diego Novillo <dnovillo@redhat.com>
* c-semantics.c (prune_unused_decls): Return error_mark_node
instead of (tree) 1 to stop traversing the tree chain.
From-SVN: r40166
cp:
Implement using decls inside template functions.
* decl2.c (validate_nonmember_using_decl): Don't special case
fake_std_node in the global namespace. Don't reject early when
processing a template.
(do_local_using_decl): Add to statement tree. Don't do further
processing when building a template.
* pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
testsuite:
* g++.old-deja/g++.pt/using1.C: New test.
From-SVN: r40151
cp:
* decl2.c (do_nonmember_using_decl): Don't complain if we find
same function. Do complain about ambiguating extern "C"
declarations.
testsuite:
* g++.old-deja/g++.other/using9.C: New test.
From-SVN: r40148
* i386.md (sse_mov?fcc*): New patterns and splitters.
* i386.c (ix86_expand_movcc): Work post-reload; recognize
the SSE based conditional moves.
From-SVN: r40133
* i386.md (sse_setccsf, sse_setccdf): New.
(sse_cmp* patterns): Use '%D' instead of outputtting condition
flag directly.
* i386.c (sse_comparison_operator): Accept the supported unordered
comparses; be ready for fast_math.
(print_operand): Support 'D'.
From-SVN: r40131
* caller-save.c (reg_save_code, reg_restore_code): Index by mode, not
NREGS.
(insert_save, insert_restore): New parameter save_mode.
(init_caller_save): Update initialization of reg_save_code
and reg_restore_code.
(save_call_clobbered_regs): Compute save_modes and update calls to
reg_save_code and reg_restore_code.
(insert_restore): Unsignetize numbers; use save_modes to choose mode
of spill; update use of reg_restore_code.
(insert_save): Likewise.
* i386.h (HARD_REGNO_CALLER_SAVE_MODE): Update.
* c4x.h (HARD_REGNO_CALLER_SAVE_MODE): Update.
* regs.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise.
From-SVN: r40120