Age | Commit message (Collapse) | Author | Files | Lines |
|
PR c++/38950
* pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
From-SVN: r144139
|
|
PR c++/39153
* decl2.c (cp_write_global_declarations):
Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
From-SVN: r144119
|
|
members)
PR c++/30111
* init.c (build_value_init_noctor): Split out from...
(build_value_init): ...here.
(expand_aggr_init_1): Handle value-initialization.
* cp-tree.h: Add declaration.
* class.c (type_has_user_provided_constructor):
Handle non-class arguments.
From-SVN: r144112
|
|
PR c++/38649
* class.c (defaultable_fn_p): Handle ... properly.
From-SVN: r144092
|
|
affects caller's variable when passed as rvalue)
PR c++/36744
* tree.c (lvalue_p_1): Condition rvalue ref handling on
treat_class_rvalues_as_lvalues, too.
From-SVN: r144091
|
|
/cp
2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34397
* typeck.c (build_x_array_ref): New.
* cp-tree.h: Declare it.
* pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
/testsuite
2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34397
* g++.dg/template/crash88.C: New.
* g++.dg/template/crash89.C: Likewise.
From-SVN: r144083
|
|
PR c++/39109
* semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
* init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
* tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
* cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
for build_value_init TARGET_EXPR.
* cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
From-SVN: r144044
|
|
/cp
2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35147
PR c++/37737
* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
/testsuite
2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35147
PR c++/37737
* g++.dg/cpp0x/vt-35147.C: New.
* g++.dg/cpp0x/vt-37737-1.C: Likewise.
* g++.dg/cpp0x/vt-37737-2.C: Likewise.
From-SVN: r144001
|
|
PR c++/39095
* operators.def: Use COMPONENT_REF code for ->/pt operator again,
remove ./dt operator.
* mangle.c (write_expression): Handle COMPONENT_REF after handling
ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
write_string ("dt") instead of using operators.def.
* g++.dg/abi/mangle31.C: New test.
From-SVN: r143933
|
|
pedantic.
* typeck.c (cp_build_unary_op): Only complain about taking address
of main if pedantic.
From-SVN: r143911
|
|
PR inline-asm/39059
* c-parser.c (c_parser_postfix_expression): If fixed point is not
supported, don't accept FIXED_CSTs.
* c-decl.c (finish_declspecs): Error if fixed point is not supported
and _Sat is used without _Fract/_Accum. Set specs->type to
integer_type_node for cts_fract/cts_accum if fixed point is not
supported.
* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
* gcc.dg/nofixed-point-2.c: New test.
* g++.dg/ext/fixed1.C: Adjust expected diagnostics.
* g++.dg/ext/fixed2.C: Likewise.
* g++.dg/other/error25.C: Likewise.
* g++.dg/lookup/crash7.C: Likewise.
* g++.dg/cpp0x/decltype-38655.C: Likewise.
From-SVN: r143900
|
|
PR c++/39056
* typeck2.c (digest_init_r): Don't call process_init_constructor
for COMPLEX_TYPE.
* g++.dg/cpp0x/initlist13.C: New test.
From-SVN: r143899
|
|
gcc/cp:
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
* pt.c (convert_nontype_argument_function): Expect expr to be an
ADDR_EXPR.
PR c++/37314
* typeck.c (merge_types): Call resolve_typename_type if only
one type is a typename.
gcc/testsuite:
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
* g++.dg/template/func2.C: New test.
PR c++/37314
* g++.dg/template/typename15.C: New.
* g++.dg/template/typename16.C: New.
From-SVN: r143898
|
|
PR c++/39054
* parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
in BIT_NOT_EXPR.
From-SVN: r143876
|
|
/cp
2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39053
* parser.c (cp_parser_pure_specifier): If there are no tokens left
do not call cp_lexer_consume_token.
/testsuite
2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39053
* g++.dg/parse/crash52.C: New.
From-SVN: r143861
|
|
block after "for" and "while")
PR c++/39028
* parser.c (cp_parser_already_scoped_statement): Handle __label__
declarations.
* g++.dg/ext/label12.C: New test.
From-SVN: r143797
|
|
supported by dump_expr)
/cp
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33465
* error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
/testsuite
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33465
* g++.dg/parse/error34.C: New.
* g++.dg/parse/error35.C: Likewise.
/cp
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38655
* error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
/testsuite
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38655
* g++.dg/cpp0x/decltype-38655.C: New.
From-SVN: r143790
|
|
2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
* typeck.c (invalid_nonstatic_memfn_p): Use
DECL_NONSTATIC_MEMBER_FUNCTION_P.
From-SVN: r143761
|
|
/cp
2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37554
* call.c (build_over_call): If convert_for_arg_passing returns
error_mark_node unconditionally return it.
/testsuite
2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37554
* g++.dg/parse/crash51.C: New.
* g++.old-deja/g++.pt/crash9.C: Adjust.
From-SVN: r143711
|
|
is alreay known.
* c-decl.c (finish_struct): Move code to set DECL_PACKED after
DECL_BIT_FIELD is alreay known. Also inherit packed for bitfields
regardless of their type.
* c-common.c (handle_packed_attribute): Don't ignore packed on
bitfields.
* c.opt (Wpacked-bitfield-compat): New warning option.
* stor-layout.c (place_field): Warn if offset of a field changed.
* doc/extend.texi (packed): Mention the ABI change.
* doc/invoke.texi (-Wpacked-bitfield-compat): Document.
(Warning Options): Add it to the list.
cp/
* class.c (check_field_decls): Also inherit packed for bitfields
regardless of their type.
testsuite/
* gcc.dg/bitfld-15.c, gcc.dg/bitfld-16.c,
gcc.dg/bitfld-17.c,gcc.dg/bitfld-18.c: New tests.
* g++.dg/ext/bitfield2.C, g++.dg/ext/bitfield3.C,
g++.dg/ext/bitfield4.C, g++.dg/ext/bitfield5.C: New tests.
From-SVN: r143584
|
|
From-SVN: r143562
|
|
gcc/ChangeLog:
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* c-decl.c: (clone_underlying_type): Move this ...
* c-common.c (set_underlying_type): ... here.
Also, make sure the function properly sets TYPE_STUB_DECL() on
the newly created typedef variant type.
(is_typedef_decl ): New entry point.
* tree.h: Added a new member member_types_needing_access_check to
struct tree_decl_non_common.
(set_underlying_type): New entry point.
(is_typedef_type): Likewise.
gcc/cp/ChangeLog/
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* decl2.c (grokfield): when a typedef appears in a
class, create the typedef variant type node for it.
(save_template_attributes): Creating typedef variant type node
here is now useless.
* decl.c (grokdeclarator): If the typedef'ed struct/class was
anonymous, set the proper type name to all its type variants.
* name-lookup.c (pushdecl_maybe_friend): Reuse the
set_underlying_type function to install typedef variant types.
* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
macro.
(append_type_to_template_for_access_check): New entry points.
* semantics.c (check_accessibility_of_qualified_id):
When a typedef that is a member of a class appears in a template,
add it to the template. It will be ...
* pt.c (instantiate_class_template, instantiate_template ): ... access
checked at template instantiation time.
(tsubst): Handle the case of being called with NULL args.
(resolve_type_name_type): The type name should be the name of the
main type variant.
(append_type_to_template_for_access_check): New entry point.
gcc/testsuite/ChangeLog
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* g++.dg/template/typedef11.C: New test.
* g++.dg/template/typedef12.C: Likewise.
* g++.dg/template/typedef13.C: Likewise.
* g++.dg/template/typedef14.C: Likewise.
* g++.dg/template/sfinae3.C: Compile this pedantically.
The only errors expected should be the one saying the typedef is ill
formed.
* g++.old-deja/g++.pt/typename8.C: Likewise.
* g++.dg/template/access11.C: Update this.
libstdc++-v3/ChangeLog:
2009-01-21 Dodji Seketeli <dodji@redhat.com>
* include/ext/bitmap_allocator.h: the typedefs should be made public
if we want them to be accessible. This has been revealed by the patch
that fixes PR c++/26693 in g++.
From-SVN: r143546
|
|
template and is dependent)
PR c++/23287
* parser.c (cp_parser_unqualified_id): In a template,
accept ~identifier.
* typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
From-SVN: r143502
|
|
PR c++/38877
* tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
* init.c (build_new): Don't call describable_type unless we
have an auto.
From-SVN: r143446
|
|
PR c++/29470
* pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
From-SVN: r143445
|
|
PR c++/38579
* search.c (protected_accessible_p): N doesn't vary.
From-SVN: r143439
|
|
called from within a template function)
PR c++/38850
* pt.c (tsubst_copy_and_build): Tell finish_call_expr to
accept hidden friends.
From-SVN: r143422
|
|
2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/29388
* decl.c (grokdeclarator): Check for a non namespace/class context.
2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/29388
* g++.dg/template/error37.C: New testcase.
From-SVN: r143411
|
|
PR c++/36334
PR c++/37646
* tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
a function isn't necessarily an lvalue. Take tree, not const_tree.
(lvalue_p, real_lvalue_p): Take tree, not const_tree.
* typeck.c (lvalue_or_else): Likewise.
* cp-tree.h: Adjust prototypes.
From-SVN: r143404
|
|
PR c++/38357
* pt.c (tsubst): Check for NULL args.
From-SVN: r143402
|
|
gcc/cp/ChangeLog:
2009-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* name-lookup.c (pushtag): Don't create members to types that are not
being created.
gcc/testsuite/ChangeLog:
2009-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* g++.dg/parse/crash50.C: New test.
From-SVN: r143392
|
|
PR c++/37862
* parser.c: Pass cp_id_kind computed in
cp_parser_postfix_dot_deref_expression to
cp_parser_primary_expression.
* g++.cp/parse/pr37862.C: New test.
From-SVN: r143369
|
|
PR c++/38795
* tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
as CAST_EXPR.
* g++.dg/cpp0x/pr38795.C: New test.
From-SVN: r143351
|
|
From-SVN: r143321
|
|
PR c++/35109
* name-lookup.c (lookup_name_real): Keep looking past a hidden
binding.
Co-Authored-By: Steve Ellcey <sje@cup.hp.com>
From-SVN: r143320
|
|
gcc/cp/ChangeLog:
2009-01-12 Dodji Seketeli <dodji@redhat.com>
PR c++/36019
* pt.c (parameter_of_template_p): New function.
* cp-tree.h: Declare it.
* name-lookup.c (binding_to_template_parms_of_scope_p): New
function.
(outer_binding): Take template parameters in account when looking for
a name binding.
gcc/testsuite/ChangeLog:
2009-01-12 Dodji Seketeli <dodji@redhat.com>
PR c++/36019
* g++.dg/lookup/hidden-class12.C: New test.
* g++.dg/lookup/hidden-class13.C: New test.
* g++.dg/lookup/hidden-class14.C: New test.
* g++.dg/lookup/hidden-class15.C: New test.
* g++.dg/lookup/hidden-class16.C: New test.
From-SVN: r143315
|
|
PR c++/31488
* tree.c (pod_type_p): Return 1 for structs created by the back end.
From-SVN: r143308
|
|
PR c/32041
* c-parser.c (c_parser_postfix_expression): Allow `->' in
offsetof member-designator, handle it as `[0].'.
* parser.c (cp_parser_builtin_offsetof): Allow `->' in
offsetof member-designator, handle it as `[0].'.
* gcc.dg/pr32041.c: New test.
* g++.dg/parse/offsetof9.C: New test.
From-SVN: r143305
|
|
PR c++/38794
* decl.c (start_function): If grokdeclarator hasn't returned
FUNCTION_DECL nor error_mark_node, issue diagnostics.
* g++.dg/parse/typedef9.C: New test.
From-SVN: r143292
|
|
with IF_STMT)
PR c++/36254
* cp-gimplify.c (genericize_if_stmt): Renamed from ...
(gimplify_if_stmt): ... this.
(cp_gimplify_expr): Don't handle IF_STMT here.
(cp_genericize_r): Call genericize_if_stmt for IF_STMT.
* g++.dg/warn/Wreturn-type-5.C: New test.
From-SVN: r143281
|
|
PR c++/38648
* typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
* g++.dg/expr/string-1.C: New test.
* g++.dg/expr/string-2.C: New test.
From-SVN: r143245
|
|
PR c++/36695
* typeck2.c (build_functional_cast): Check for reference type and NULL
PARMS.
* g++.dg/ext/complex4.C: New test.
* g++.dg/ext/complex5.C: New test.
* g++.dg/init/reference1.C: New test.
* g++.dg/init/reference2.C: New test.
* g++.dg/init/reference3.C: New test.
From-SVN: r143244
|
|
From-SVN: r143212
|
|
PR c++/35335
* error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
* g++.dg/other/error31.C: New testcase.
From-SVN: r143210
|
|
PR c++/37877
* parser.c (cp_parser_class_specifier): Clear
parser->in_unbraced_linkage_specification_p while parsing class
specifiers.
* g++.dg/parse/linkage3.C: New test.
From-SVN: r143206
|
|
PR c++/38725
* semantics.c (finish_goto_stmt): Convert destination to
void *.
* g++.dg/ext/label11.C: New test.
From-SVN: r143177
|
|
with default type.)
PR c++/35297
PR c++/35477
PR c++/35784
PR c++/36846
PR c++/38276
* pt.c (check_default_tmpl_args): Don't complain about
out-of-order parameter packs in the enclosing class
or parameter packs after default args.
(coerce_template_parms): If we have more than one
parameter pack, don't flatten argument packs.
(template_args_equal): Handle argument packs.
(comp_template_args): Don't flatten argument packs.
(check_instantiated_arg): Split out from...
(check_instantiated_args): Here. Handle arg packs.
(convert_template_argument): Just check that nontype argument
packs have the right type.
From-SVN: r143166
|
|
PR c++/38698
* typeck2.c (process_init_constructor_union): Handle union with
no fields.
* mangle.c (write_expression): Remove mangling for zero-operand
casts.
From-SVN: r143111
|
|
gcc/cp/ChangeLog:
2009-01-05 Dodji Seketeli <dodji@redhat.com>
PR c++/38472
* typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
Promotion should be done only for integral or enumeration types.
gcc/testsuite/ChangeLog:
2009-01-05 Dodji Seketeli <dodji@redhat.com>
PR c++/38472
* g++.dg/conversion/usual-arith-conv.C: New test.
From-SVN: r143101
|
|
PR c++/38701
* decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
defaulting.
PR c++/38702
* class.c (defaultable_fn_p): Only operator== can be a copy
assignment operator.
From-SVN: r143082
|