Age | Commit message (Collapse) | Author | Files | Lines |
|
PR c++/20905
* parser.c (cp_parser_type_specifier_seq): Add is_condition
parameter.
(cp_parser_new_type_id): Pass it.
(cp_parser_condition): Likewise.
(cp_parser_conversion_type_id): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_type_specifier_seq): In a condition, do not allow
invalid type-specifier combinations.
(cp_parser_exception_declaration): Adjust call to
cp_parser_type_specifier_seq.
PR c++/20905
* g++.dg/parse/cond2.C: New test.
From-SVN: r97857
|
|
suppressed with -isystem)
* cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
* cp-tree.h (struct tinst_level): Add in_system_header_p.
(TINST_IN_SYSTEM_HEADER_P): New macro.
(make_tinst_level): Remove.
* pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
the instantiated class.
(push_tinst_level): Do not use make_tinst_level. Set
TINST_IN_SYSTEM_HEADER_P.
(pop_tinst_level): Likewise.
(instantiate_class_template): Set in_system_header.
(instantiate_pending_templates): Likewise.
* tree.c (make_tinst_level): Remove.
PR c++/20145
* g++.dg/warn/Wdtor1.C: New test.
From-SVN: r97854
|
|
* c-decl.c (finish_decl): Apply pending #pragma weak regardless of
scope.
cp:
* decl.c (start_decl): Apply pending #pragma weak regardless of
scope.
testsuite:
* gcc.dg/weak/weak-12.c, g++.dg/ext/weak2.C: New tests.
From-SVN: r97733
|
|
PR c++/20212
* pt.c (regenerate_decl_from_template): Copy attributes for
parameters from the pattern to the instantiation.
PR c++/20212
* g++.dg/warn/Wunused-11.C: New test.
From-SVN: r97726
|
|
From-SVN: r97723
|
|
PR c++/20734
* cp-tree.def (OFFSET_REF): Correct comments.
* init.c (build_offset_ref): Remove misleading comment.
* typeck.c (build_unary_op): Handle pointer-to-member creation
here, rather than ...
(unary_complex_lvalue): ... here.
PR c++/20734
* g++.dg/template/ptrmem13.C: New test.
From-SVN: r97696
|
|
PR c++/19312
* tree.c (stabilize_init): Don't bother trying to stabilize
something with no side-effects.
From-SVN: r97691
|
|
From-SVN: r97643
|
|
PR c++/20673
* decl.c (grokdeclarator): Correct attribute handling.
PR c++/20673
* g++.dg/ext/attrib21.C: New test.
From-SVN: r97640
|
|
PR c++/19159
* decl2.c (import_export_decl): Use non-COMDAT external linkage
for virtual tables, typeinfo, etc. that will be emitted in only
one translation unit on systems without weak symbols.
From-SVN: r97635
|
|
Enclosing class is template and have methods with the same name.)
PR c++/20679
* parser.c (cp_parser_template_name): Fix thinko.
PR c++/20679
* g++.dg/template/overload4.C: New test.
From-SVN: r97569
|
|
function returning null ptr)
cp:
PR c++/20746
* method.c (use_thunk): Protect covariant pointer return
adjustments from NULL pointers.
testsuite:
PR c++/20746
* g++.dg/abi/covariant5.C: New.
From-SVN: r97557
|
|
* decl2.c (finish_objects): Revert my previous patch.
(cp_finish_file): Likewise.
From-SVN: r97547
|
|
From-SVN: r97491
|
|
conversion "srp<int>" to "ptr<int>")
cp:
PR c++/20723
* pt.c (more_specialized_fn): Member functions are unordered wrt
non-members. Conversion operators are unordered wrt other
functions.
testsuite:
PR c++/20723
* g++.dg/template/spec22.C: New.
* g++.dg/template/spec23.C: New.
From-SVN: r97489
|
|
fn_type_unification call.
* call.c (add_template_candidates_real): Remove length parameter
from fn_type_unification call.
* class.c (resolve_address_of_overloaded_function): Likewise
* cp-tree.h (fn_type_unification): Remove length parameter.
* pt.c (get_bindings_overload): Remove.
(get_bindings_real): Rename to ...
(get_bindings): ... here. Remove length and strict
parameters. Change return type flag to boolean. Remove original
forwarding function.
(determine_specialization): Adjust get_bindings call.
(fn_type_unification): Remove length parameter. Adjust.
(type_unification_real): Remove length parameter. Adjust.
(resolve_overloaded_unification): Adjust get_bindings call.
(try_one_overload): Simplify confusing cascaded if control flow.
(unify): Remove length paramter from type_unification_real call.
(most_specialized_instantiation): Adjust get_bindings calls.
(most_specialized): Likewise.
From-SVN: r97379
|
|
cp:
PR c++/19203, implement DR 214
* call.c (joust): Use more_specialized_fn.
* cp-tree.h (DEDUCE_ORDER): Remove.
(more_specialized): Replace with ...
(more_specialized_fn): ... this.
* pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
case.
(type_unification_real): Remove DEDUCE_ORDER case.
(more_specialized): Replace with ...
(more_specialized_fn): ... this. Implement DR 214.
(most_specialized_instantiation): Use get_bindings_real directly.
testsuite:
PR c++/19203, DR 214
* g++.dg/parse/ambig3.C: Not ambiguous.
* g++.dg/template/spec20.C: New.
* g++.dg/template/spec21.C: New.
From-SVN: r97336
|
|
doc/
PR c++/18644
* doc/invoke.texi (-Wsynth): Don't document, as it now is void
of
semantics.
cp/
PR c++/18644
* call.c (build_new_op): Remove check for -Wsynth.
From-SVN: r97318
|
|
2005-03-31 Jan Hubicka <jh@suse.cz>
2004-11-02 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_varpool_node_name): New function.
(dump_cgraph_varpool_node): New function.
(dump_varpool): New function.
* cgraphunit.c (cgraph_optimize): Dump varpool.
2004-10-16 Jan Hubicka <jh@suse.cz>
* cgraph.c (decide_is_variable_needed): New function.
(cgraph_varpool_finalize_decl): Use it.
* cgraphunit.c (cgraph_optimize): Assemble_pending_decls when not doing
unit-at-a-time.
* final.c (output_addr_const): Do not call mark_referenced.
* passes.c (rest_of_decl_compilation): ifdef out DECL_RTL_SET_P hack;
always go via cgraph.
* toplev.c (wrapup_global_declarations): Kill non-unit-at-a-time code.
(check_global_declarations): Ifdef out code clearing DECL_RTL.
* tree-optimize.c (execute_inline): Mark functions called.
* i386.c (output_pic_addr_const): Do not call mark_decl_referenced.
2004-10-11 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_varpool_first_unanalyzed_node): New global voriable
(cgraph_varpool_last_needed_node): New static variable.
(enqueue_needed_varpool_node): Break out from ...; add items to the
end of queue; update first pointers.
(cgraph_varpool_mark_needed_node): ... here.
(cgraph_varpool_finalize_decl): Use enqueue_needed_varpool_node.
(cgraph_varpool_assemble_pending_decls): Move to cgraphunit.c
* cgraph.h (cgraph_varpool_node): Add analyzed field.
(cgraph_varpool_first_unanalyzed_node): Declare.
* cgraphunit.c: Include output.h.
(cgraph_varpool_analyze_pending_decls): New function.
(cgraph_varpool_assemble_pending_decls): Move from cgraph.c; bail out
for errors, analyze pending decls.
(cgraph_finalize_compilation_unit): Only analyze decls.
(cgraph_optimize): Assemble the decls after expanding.
From-SVN: r97287
|
|
PR c/20519
* c-decl.c (c_finish_incomplete_decl): Update complete_array_type call.
(build_compound_literal): Likewise. Propagate decl type into the
initializer.
(finish_decl): Likewise. Use new return value from complete_array_type
for zero sized arrays.
(complete_array_type): Move ...
* c-common.c (complete_array_type): ... here. Change first argument
to pointer-to-type-node. Consistently use sizetype for the index
except for zero sized arrays. Detect zero sized arrays for pedantic
mode diagnostics. Create a new type node instead of modifying the
old node in place.
* c-tree.h (complete_array_type): Move decl ...
* c-common.h (complete_array_type): ... here.
cp/
* decl.c (cp_complete_array_type): Rename from complete_array_type.
Use the new complete_array_type in c-common.c. Update all callers.
* cp-tree.h (cp_complete_array_type): Update to match.
From-SVN: r97223
|
|
2005-03-24 Geoffrey Keating <geoffk@apple.com>
* typeck.c (build_static_cast_1): Allow scalar_cast between
any integral, floating, or enumeration type.
Index: testsuite/ChangeLog
2005-03-24 Geoffrey Keating <geoffk@apple.com>
* g++.dg/expr/cast3.C: New.
From-SVN: r97019
|
|
target-independent point of view.
* typeck.c (comptypes): First determine if the types are compatible
from a target-independent point of view. Check target attributes
last.
* class.c (build_base_path):
(build_vbase_offset_vtbl_entries):
(add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
* error.c (dump_expr): Likewise.
* init.c (build_zero_init, expand_cleanup_for_base,
build_vec_delete_1): Likewise.
* mangle.c (write_integer_cst): Likewise.
* method.c (thunk_adjust): Likewise.
* pt.c (convert_nontype_argument, tsubst, unify): Likewise.
* tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
* typeck.c (build_ptrmemfunc_access_expr,
(get_member_function_from_ptrfunc): Likewise.
From-SVN: r96985
|
|
* langhooks.h (truthvalue_conversion): Remove.
* langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
LANG_HOOKS_TRUTHVALUE_CONVERSION.
* system.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Poison.
* gimplify.c (gimple_boolify): Don't use truthvalue_conversion.
* c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
ada:
* misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
cp:
* cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
fortran:
* f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
java:
* lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
treelang:
* treetree.c (LANG_HOOKS_TRUTHVALUE_CONVERSION,
tree_lang_truthvalue_conversion): Remove.
* tree-convert.c: Don't call truthvalue_conversion.
From-SVN: r96947
|
|
2005-03-18 Dale Johannese <dalej@apple.com>
* cp/tree.c (cp_tree_equal): Handle SSA_NAME.
From-SVN: r96938
|
|
* c-common.h (default_conversion): Remove.
(perform_integral_promotions): Add.
* c-tree.h (default_conversion): Add.
* c-typeck.c (perform_integral_promotions): New, split out from
default_conversion.
* c-common.c (check_case_value): Use perform_integral_promotions,
not default_conversion.
(c_add_case_label): Don't continue processing case label after
found to be pointer.
cp:
* cp-tree.h (perform_integral_promotions): Remove.
(default_conversion): Add.
From-SVN: r96916
|
|
* doc/extend.texi: Deprecate C++ min/max operators.
* parser.c (cp_parser_warn_min_max): New function.
(cp_parser_binary_expression): Use it.
(cp_parser_assignment_operator_opt): Likewise.
(cp_parser_operator): Likewise.
* g++.dg/opt/max1.C: Run with -Wno-deprecated.
* g++.dg/opt/pr7503-2.C: Likewise.
* g++.dg/opt/pr7503-3.C: Likewise.
* g++.dg/opt/pr7503-4.C: Likewise.
* g++.dg/opt/pr7503-5.C: Likewise.
* g++.dg/warn/minmax.C: New test.
From-SVN: r96899
|
|
PR c++/19980
* decl.c (start_preparsed_function): Robustify.
* g++.dg/template/redecl3.C: New test.
From-SVN: r96872
|
|
PR c++/20499
* parser.c (cp_parser_class_head): Return NULL_TREE when
encountering a redefinition.
* g++.dg/parse/error16.C: Tweak error markers.
From-SVN: r96870
|
|
cp:
PR c++/20465
PR c++/20381
* typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
template.
testsuite:
PR c++/20465
PR c++/20381
* g++.dg/template/ptrmem12.C: New.
From-SVN: r96862
|
|
2005-03-21 Paolo Carlini <pcarlini@suse.de>
PR c++/20461
PR c++/20536
* init.c (emit_mem_initializers): Don't crash on undefined
types.
2005-03-21 Paolo Carlini <pcarlini@suse.de>
PR c++/20147
* semantics.c (finish_stmt_expr_expr): Return immediately
if error_operand_p (expr).
From-SVN: r96784
|
|
without checking whether an lvalue.
* c-common.c (lvalue_or_else): Replace by lvalue_error; only give
diagnostic without checking whether an lvalue.
* c-common.h (lvalue_p): Remove.
(enum lvalue_use): Update comment.
(lvalue_or_else): Replace by lvalue_error.
* c-typeck.c (lvalue_p): Make static.
(lvalue_or_else): New. Call lvalue_error.
cp:
* cp-tree.h (lvalue_or_else, lvalue_p): New.
* typeck.c (lvalue_or_else): New. Call lvalue_error.
From-SVN: r96776
|
|
PR c++/20240
* decl.c (decls_match): Compare context of VAR_DECL.
* g++.dg/lookup/using13.C: New test.
From-SVN: r96725
|
|
PR c++/20333
* parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
Check the return value of cp_parser_nested_name_specifier.
* g++.dg/template/crash36.C: New test.
From-SVN: r96720
|
|
2005-03-18 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* parser.c (cp_parser_diagnose_invalid_type_name):
Check TYPE_BINFO (current_class_type) before attempting
to emit inform messages.
From-SVN: r96689
|
|
2005-03-17 Paolo Carlini <pcarlini@suse.de>
PR c++/19966
* cp-tree.h (grok_op_properties): Change return type to void.
* decl.c (grok_op_properties): Return early - don't check the
arity - in case of a static member or an operator that cannot
be non-member; tidy a bit.
From-SVN: r96609
|
|
cp:
PR c++/20186
* pt.c (contains_dependent_cast_p): Remove.
(fold_non_dependent_expr): Don't use it.
(value_dependent_expression_p): Use a switch statement.
reference_exprs can be dependent.
From-SVN: r96605
|
|
PR c++/4403
PR c++/9783, DR433
* name-lookup.c (pushtag): Skip template parameter scope when
scope is ts_global. Don't push tag into template parameter
scope.
* pt.c (instantiate_class_template): Reorder friend class
template substitution to handle non-dependent friend class
that hasn't been previously declared.
* g++.dg/template/friend34.C: New test.
* g++.dg/template/friend35.C: Likewise.
* g++.old-deja/g++.pt/inherit2.C: Remove XFAIL's.
From-SVN: r96432
|
|
Friend class name lookup 5/n
PR c++/1016
* cp-tree.h (pushtag): Adjust declaration.
* decl.c (lookup_and_check_tag): Call lookup_type_scope if
lookup_name fails.
(xref_tag): Adjust call to pushtag. Make hidden class visible.
(start_enum): Adjust call to pushtag.
* name-lookup.c (ambiguous_decl): Ignore hidden names.
(qualify_lookup): Change return type to bool.
(hidden_name_p): New function.
(lookup_namespace_name, unqualified_namespace_lookup,
lookup_name_real): Use it.
(lookup_type_scope): Update comments.
(maybe_process_template_type_declaration): Change parameter name
from globalize to is_friend.
(pushtag): Change globalize parameter of type int to tag_scope.
Hide name if introduced by friend declaration.
* name-lookup.h (hidden_name_p): Add declaration.
* parser.c (cp_parser_lookup_name): Don't deal with hidden name
here.
* pt.c (push_template_decl_real): Make hidden class template
visible.
(lookup_template_class, instantiate_class_template): Adjust call
to pushtag.
* semantics.c (begin_class_definition): Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast_1,
tinfo_base_init, emit_support_tinfos): Use ts_current instead of
ts_global.
* g++.dg/lookup/hidden-class1.C: New test.
* g++.dg/lookup/hidden-class2.C: Likewise.
* g++.dg/lookup/hidden-class3.C: Likewise.
* g++.dg/lookup/hidden-class4.C: Likewise.
* g++.dg/lookup/hidden-class5.C: Likewise.
* g++.dg/lookup/hidden-class6.C: Likewise.
* g++.dg/lookup/hidden-class7.C: Likewise.
* g++.dg/lookup/hidden-class8.C: Likewise.
* g++.dg/lookup/hidden-class9.C: Likewise.
* g++.dg/lookup/hidden-temp-class1.C: Likewise.
* g++.dg/lookup/hidden-temp-class2.C: Likewise.
* g++.dg/lookup/hidden-temp-class3.C: Likewise.
* g++.dg/lookup/hidden-temp-class4.C: Likewise.
* g++.dg/lookup/hidden-temp-class5.C: Likewise.
* g++.dg/lookup/hidden-temp-class6.C: Likewise.
* g++.dg/lookup/hidden-temp-class7.C: Likewise.
* g++.dg/lookup/hidden-temp-class8.C: Likewise.
* g++.dg/lookup/hidden-temp-class9.C: Likewise.
* g++.dg/lookup/hidden-temp-class10.C: Likewise.
* g++.dg/lookup/hidden-temp-class11.C: Likewise.
From-SVN: r96430
|
|
PR c++/20157
* pt.c (determine_specialization): Reject non-specializations.
PR c++/20157
* g++.dg/template/error18.C: New test.
From-SVN: r96414
|
|
* cp-tree.h (struct cp_declarator): New id_loc field.
* cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
location using c_lex_with_flags, instead of input_location.
(cp_parser_direct_declarator): Set declarator's id_loc from
cp_token's id_loc.
From-SVN: r96330
|
|
PR c++/18384, c++/18327
* decl.c (reshape_init_array): Use UHWI type for max_index_cst
and index. Convert max_index to size_type_node if it isn't
host_integerp (, 1).
* g++.dg/init/array19.C: New test.
From-SVN: r96236
|
|
PR c++/20208
* pt.c (tsubst_decl): Apply array-to-pointer and
function-to-pointer conversions to function arguments.
(regenerate_decl_from_template): Likewise.
PR c++/20208
* g++.dg/template/array13.C: New test.
From-SVN: r96197
|
|
accepted)
2005-03-09 Paolo Carlini <pcarlini@suse.de>
PR c++/16859
* decl.c (complete_array_type): In pedantic mode, return
3 for an empty initializer list as the initializer for an
array of unknown bound (8.5.1/4).
(maybe_deduce_size_from_array_init): Fix final test to use
the above.
From-SVN: r96194
|
|
cp:
PR c++/20186
* pt.c (contains_dependent_cast_p): New.
(fold_non_dependent_expr): Call it.
testsuite:
PR c++/20186
* g++.dg/template/non-dependent12.C: New.
From-SVN: r96190
|
|
is broken)
PR c++/20142
* cp-tree.h (target_type): Remove.
* decl.c (layout_var_decl): Remove #if 0'd code.
(cp_finish_decl): Remove dead code.
* init.c (build_vec_init): When determining whether or not the
element type has an asignment operator, look through all array
dimensions.
* typeck.c (target_type): Remove.
PR c++/20142
* g++.dg/init/array18.C: New test.
From-SVN: r96170
|
|
classes.
* class.c (finish_struct_1): Do not warn about non-virtual
destructors in Java classes.
* g++.dg/warn/Wnvdtor.C: New test.
From-SVN: r96054
|
|
PR c++/19311
* init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
* pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
for OFFSET_TYPE.
* typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
(build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
template.
* g++.dg/template/non-dependent11.C: New test.
From-SVN: r95933
|
|
the old one.
gcc/cp/ChangeLog:
* name-lookup.c (push_overloaded_decl): Don't error if the new
decl matches the old one.
* decl.c (redeclaration_error_message): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/overload/using2.C: New.
From-SVN: r95798
|
|
annotate_with_file_line...
* decl.c (finish_function): Use SET_EXPR_LOCATION instead of
unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
From-SVN: r95772
|
|
cp:
PR c++/20232
* class.c (update_vtable_entry_for_fn): Don't crash on invalid
covariancy.
* cp-tree.g (THUNK_TARGET): Expand comment.
* method.c (use_thunk): Make sure we also use the target, if that
is a thunk.
testsuite:
PR c++/20232
* g++.dg/inherit/covariant12.C: New.
From-SVN: r95733
|