Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r179131
|
|
Core 234 - allow const objects with no initializer or
user-provided default constructor if the defaulted constructor
initializes all the subobjects.
PR c++/20039
PR c++/42844
* class.c (default_init_uninitialized_part): New.
* cp-tree.h: Declare it.
* decl.c (check_for_uninitialized_const_var): Use it.
* init.c (perform_member_init): Likewise.
(build_new_1): Likewise.
* method.c (walk_field_subobs): Likewise.
From-SVN: r179130
|
|
of static const floating types without constexpr)
/cp
2011-09-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50258
* decl.c (check_static_variable_definition): Allow in-class
initialization of static data member of non-integral type in
permissive mode.
/testsuite
2011-09-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50258
* g++.dg/cpp0x/constexpr-static8.C: New.
From-SVN: r179121
|
|
using_decl" on call to using'ed grandparent member function)
/cp
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* semantics.c (potential_constant_expression_1): Handle USING_DECL.
/testsuite
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* g++.dg/cpp0x/pr50491.C: New.
From-SVN: r179109
|
|
/cp
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* pt.c (invalid_nontype_parm_type_p): Handle NULLPTR_TYPE.
/testsuite
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* g++.dg/cpp0x/nullptr24.C: New.
From-SVN: r179096
|
|
/cp
2011-09-22 Jonathan Wakely <jwakely.gcc@gmail.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50344
* friend.c (make_friend_class): cv-qualification is ok in a
friend declaration.
/testsuite
2011-09-22 Jonathan Wakely <jwakely.gcc@gmail.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50344
* g++.dg/template/friend52.C: New.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r179088
|
|
__int128 and unsigned __int128 specializations)
/cp
2011-09-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50454
* decl.c (grokdeclarator): Consistently handle both __int128
and unsigned __int128 with -pedantic; suppress diagnostic in
system headers.
/testsuite
2011-09-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50454
* g++.dg/ext/int128-1.C: New.
* g++.dg/ext/int128-2.C: Likewise.
* g++.dg/ext/int128-2.h: Likewise.
From-SVN: r179042
|
|
* cp-tree.h (DECL_TEMPLOID_INSTANTIATION): New.
(DECL_GENERATED_P): New.
* class.c (finalize_literal_type_property): Use them.
* semantics.c (is_instantiation_of_constexpr): Likewise.
(register_constexpr_fundef): Likewise.
From-SVN: r179017
|
|
* call.c (convert_default_arg): Avoid redundant copy.
* tree.c (bot_manip): Copy everything.
From-SVN: r179016
|
|
functions.
* call.c (build_new_method_call_1): Use non-virtual lookup
for final virtual functions.
From-SVN: r179014
|
|
PR c++/50424
* call.c (set_flags_from_callee): Split out from build_call_a.
* cp-tree.h: Declare it.
* tree.c (bot_manip): Call it.
From-SVN: r178918
|
|
PR c++/50365
* parser.c (cp_parser_late_return_type_opt): Check quals parameter
for clearing current_class_ptr, too.
From-SVN: r178883
|
|
* name-lookup.c (lookup_arg_dependent): Use conditional
timevars.
* decl.c (xref_tag): Likewise.
From-SVN: r178860
|
|
/cp
2011-09-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50391
* pt.c (regenerate_decl_from_template): Don't pass an error_mark_node
to build_exception_variant.
/testsuite
2011-09-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50391
* g++.dg/cpp0x/noexcept15.C: New.
From-SVN: r178857
|
|
arguments
gcc/cp/
PR c++/48320
* pt.c (template_parameter_pack_p): Support TEMPLATE_PARM_INDEX
nodes. Add a comment.
(arg_from_parm_pack_p): New static function, factorized out from
tsubst_pack_expansion and extended to support non-type parameter
packs represented with TEMPLATE_PARM_INDEX nodes.
(tsubst_pack_expansion): Use arg_from_parm_pack_p.
gcc/testsuite/
PR c++/48320
* g++.dg/cpp0x/variadic116.C: New test case.
From-SVN: r178811
|
|
template parameters.
* pt.c (type_unification_real): Fix handling of DEDUCE_CONV
with no deducible template parameters.
* call.c (rejection_reason_code): Add rr_template_conversion.
(print_z_candidate): Handle it.
(template_conversion_rejection): New.
(build_user_type_conversion_1): Use it.
From-SVN: r178791
|
|
second conversion sequence.
* call.c (merge_conversion_sequences): Set bad_p and user_conv_p
on all of the second conversion sequence.
(build_user_type_conversion_1): Set bad_p on the ck_user conv.
(convert_like_real): Handle bad ck_ref_bind with user_conv_p in the
first section. Fix loop logic.
(initialize_reference): Call convert_like for diagnostics when
we have a (bad) conversion.
From-SVN: r178790
|
|
(convert_class_to_reference_1): Remove.
(reference_binding): Use build_user_type_conversion_1 instead.
From-SVN: r178789
|
|
* call.c (initialize_reference): Add flags parm.
* decl.c (grok_reference_init): Likewise.
(check_initializer): Pass it.
* typeck.c (convert_for_initialization): Likewise.
* cp-tree.h: Adjust.
From-SVN: r178788
|
|
* cp-tree.h (LOOKUP_NO_RVAL_BIND): New.
* call.c (conditional_conversion): Use it.
(reference_binding): Fix handling of xvalues.
From-SVN: r178787
|
|
forcing instantiation.
* call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P
before forcing instantiation.
From-SVN: r178786
|
|
incomplete type)
/cp
2011-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50324
* typeck2.c (digest_init_r): Call complete_type_or_maybe_complain
instead of complete_type_or_else.
/testsuite
2011-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50324
* g++.dg/cpp0x/sfinae28.C: New.
From-SVN: r178694
|
|
gcc/
* c-decl.c (lookup_name): Use the new
maybe_record_typedef_use.
(pushdecl): Use the new
record_locally_defined_typedef.
(store_parm_decls): Allocate cfun->language.
(finish_function): Use the new maybe_warn_unused_local_typedefs,
and free cfun->language.
(c_push_function_context): Allocate cfun->language here only if
needed.
(c_pop_function_context): Likewise, mark cfun->language
for collection only when it should be done.
* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
nodes.
* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
maybe_record_local_typedef_use.
gcc/c-family
* c-common.h (struct c_language_function::local_typedefs): New
field.
(record_locally_defined_typedef, maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Declare new functions.
* c-common.c (record_locally_defined_typedef)
(maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Define new functions.
* c.opt: Declare new -Wunused-local-typedefs flag.
gcc/cp
* name-lookup.c (pushdecl_maybe_friend_1): Use the new
record_locally_defined_typedef.
* decl.c (finish_function): Use the new
maybe_warn_unused_local_typedefs.
(grokfield): Use the new record_locally_defined_typedef.
* parser.c (lookup_name): Use the new maybe_record_typedef_use.
gcc/doc/
* invoke.texi: Update documentation for -Wunused-local-typedefs.
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs.C: New test file.
* c-c++-common/Wunused-local-typedefs.c: Likewise.
libstdc++-v3/
* include/ext/bitmap_allocator.h
(__detail::__mini_vector::__lower_bound): Remove unused typedef.
* src/istream.cc (std::operator>>(basic_istream<char>& __in,
basic_string<char>& __str)): Likewise.
(std::getline): Likewise.
* src/valarray.cc (__valarray_product): Likewise.
From-SVN: r178692
|
|
error_mark in comp_except_specs, at cp/typeck.c:1014 on empty noexcept)
/cp
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* decl.c (grokdeclarator): Check u.function.exception_specification
for error_mark_node.
/testsuite
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* g++.dg/cpp0x/noexcept14.C: New.
From-SVN: r178654
|
|
constexpr reference members)
PR c++/50298
* parser.c (cp_parser_member_declaration): Don't require a constant
rvalue here in C++0x.
From-SVN: r178652
|
|
template args.
* pt.c (type_unification_real): Correct complain arg for tsubsting
default template args.
From-SVN: r178651
|
|
From-SVN: r178650
|
|
PR c++/50296
* semantics.c (register_constexpr_fundef): Call is_valid_constexpr_fn.
(cx_check_missing_mem_inits): Handle bases and empty trivial members.
(validate_constexpr_fundecl): Remove.
* decl.c (start_preparsed_function): Don't call it.
* cp-tree.h: Don't declare it.
From-SVN: r178604
|
|
initializing a "T&&")
PR c++/49267
* call.c (reference_binding): Don't set is_lvalue for an rvalue
reference rfrom.
From-SVN: r178521
|
|
initializing a "T&&")
PR c++/49267
PR c++/49458
DR 1328
* call.c (reference_binding): Set rvaluedness_matches_p properly
for reference to function conversion ops.
(compare_ics): Adjust.
From-SVN: r178520
|
|
synthesized_default_constructor_is_constexpr.
* class.c (trivial_default_constructor_is_constexpr): Rename from
synthesized_default_constructor_is_constexpr.
(type_has_constexpr_default_constructor): Adjust.
(add_implicitly_declared_members): Call it instead.
(explain_non_literal_class): Explain about non-constexpr default ctor.
* cp-tree.h: Adjust.
* method.c (synthesized_method_walk): Adjust.
* semantics.c (explain_invalid_constexpr_fn): Handle defaulted
functions, too.
From-SVN: r178519
|
|
PR c++/50248
Core 1358
* init.c (perform_member_init): Don't diagnose missing inits here.
(emit_mem_initializers): Or here.
* method.c (process_subob_fn): Don't instantiate constexpr ctors.
* semantics.c (cx_check_missing_mem_inits): New.
(explain_invalid_constexpr_fn): Call it.
(register_constexpr_fundef): Likewise. Leave
DECL_DECLARED_CONSTEXPR_P set when the body is unsuitable.
(cxx_eval_call_expression): Adjust diagnostics.
(cxx_eval_constant_expression): Catch use of 'this' in a constructor.
From-SVN: r178518
|
|
PR c++/50084
* cp-tree.h (cp_decl_specifier_seq): Rename user_defined_type_p
to type_definition_p.
* parser.c (cp_parser_set_decl_spec_type): Likewise.
* decl.c (grokdeclarator): Check it.
From-SVN: r178340
|
|
function within a lambda expr without "this->")
PR c++/50089
* semantics.c (finish_id_expression): Use
current_nonlambda_class_type for qualified-ids.
From-SVN: r178339
|
|
PR c++/50114
* decl.c (poplevel): Disable for scope compatibility hack
in C++11 mode.
From-SVN: r178338
|
|
template function argument in a lambda)
PR c++/50220
* semantics.c (add_capture): Call complete_type for copy.
From-SVN: r178326
|
|
at cp/semantics.c:6527)
PR c++/50234
* semantics.c (cxx_eval_component_reference): Handle
value-initialization for omitted initializers.
From-SVN: r178325
|
|
lambda))
PR c++/50224
* semantics.c (finish_id_expression): Mark captured variables used.
From-SVN: r178277
|
|
PR c++/50207
* class.c (finish_struct_1): Complain if the first field is
artificial.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r178276
|
|
arguments)
PR c++/50209
Core DR 994
* parser.c (cp_parser_default_argument): Use
cp_parser_initializer_clause.
(cp_parser_late_parsing_default_args): Likewise.
From-SVN: r178275
|
|
Core DR 342
PR c++/48582
* pt.c (check_valid_ptrmem_cst_expr): A null member pointer value
is valid in C++11.
(convert_nontype_argument): Likewise. Implicitly convert nullptr
and do constant folding.
* mangle.c (write_template_arg_literal): Mangle null member
pointer values as 0.
* call.c (null_member_pointer_value_p): New.
* cp-tree.h: Declare it.
From-SVN: r178144
|
|
From-SVN: r178082
|
|
conversion)
PR c++/50157
* call.c (convert_like_real): Exit early if bad and !tf_error.
From-SVN: r178081
|
|
* typeck2.c (build_functional_cast): Don't try to avoid calling
build_value_init.
* pt.c (instantiate_class_template_1): Don't copy TYPE_HAS_* flags.
From-SVN: r177999
|
|
with noexcept)
PR c++/49045
Core 1321
* tree.c (dependent_name): New.
(cp_tree_equal): Two calls with the same dependent name are
equivalent even if the overload sets are different.
From-SVN: r177998
|
|
value is constant.
* tree.c (build_target_expr): Set TREE_CONSTANT on
literal TARGET_EXPR if the value is constant.
* typeck2.c (build_functional_cast): Don't set it here.
From-SVN: r177997
|
|
Core 903 (partial)
* call.c (null_ptr_cst_p): Only 0 qualifies in C++11.
From-SVN: r177996
|
|
Core 975
* decl.c (cxx_init_decl_processing): Initialize
dependent_lambda_return_type_node.
* cp-tree.h (cp_tree_index): Add CPTI_DEPENDENT_LAMBDA_RETURN_TYPE.
(dependent_lambda_return_type_node): Define.
(DECLTYPE_FOR_LAMBDA_RETURN): Remove.
* semantics.c (lambda_return_type): Handle overloaded function.
Use dependent_lambda_return_type_node instead of
DECLTYPE_FOR_LAMBDA_RETURN.
(apply_lambda_return_type): Don't check dependent_type_p.
* pt.c (tsubst_copy_and_build): Handle lambda return type deduction.
(instantiate_class_template_1): Likewise.
(tsubst): Don't use DECLTYPE_FOR_LAMBDA_RETURN.
* mangle.c (write_type): Likewise.
* typeck.c (structural_comptypes): Likewise.
(check_return_expr): Handle dependent_lambda_return_type_node.
From-SVN: r177995
|
|
initialization in member function of template)
PR c++/50024
* semantics.c (maybe_constant_value): Don't try to fold { }.
* pt.c (build_non_dependent_expr): Don't wrap { }.
* init.c (build_value_init): Allow scalar value-init in templates.
From-SVN: r177994
|
|
From-SVN: r177993
|