Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r194903
|
|
PR c++/55419
PR c++/55753
* pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
TREE_CONSTANT.
From-SVN: r194870
|
|
PR c++/55842
* semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
From-SVN: r194869
|
|
PR c++/55856
* semantics.c (build_data_member_initialization): Handle DECL_EXPR.
From-SVN: r194865
|
|
PR c++/53650
* call.c (type_has_extended_temps): New.
* cp-tree.h: Declare it.
* decl.c (check_initializer): Use build_aggr_init for arrays
if it is false.
* init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
From-SVN: r194860
|
|
From-SVN: r194840
|
|
abstract base class constructor fails)
PR c++/54325
* call.c (build_new_method_call_1): Don't use build_value_init for
user-provided default constructors.
From-SVN: r194820
|
|
From-SVN: r194816
|
|
PR c++/55804
PR c++/55032
PR c++/55245
* tree.c (build_array_type_1): Revert earlier change.
* cp/tree.c (build_cplus_array_type): Copy layout information
to main variant if necessary.
From-SVN: r194811
|
|
* rtti.c (LONGPTR_T): New helper-macro.
(get_pseudo_ti_init): Initialize offset_type by LONGPTR_T
type instead of 'long' type.
(create_tinfo_types): Use for offset/flags field LONGPTR_T
type instead of 'long' type.
From-SVN: r194745
|
|
Before this patch, function multiversioning determines that two functions
are different by comparing the arch type and isa flags that are set
after the target string is processed. This leads to cases where the
versions become identical when the command-line target options are
altered.
This patch modifies the function version determination to
just compare the target string.
2012-12-27 Sriraman Tallam <tmsriram@google.com>
* doc/tm.texi.in (TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS): Document
new target hook.
* doc/tm.texi: Regenerate.
* c-family/c-common.c (handle_target_attribute): Retain target attribute
for targets that support versioning.
* target.def (supports_function_versions): New hook.
* cp/class.c (add_method): Remove calls
to DECL_FUNCTION_SPECIFIC_TARGET.
* config/i386/i386.c (ix86_function_versions): Use target string
to check for function versions instead of target flags.
* (ix86_supports_function_versions): New function.
* (is_function_default_version): Check target string.
* TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS: New macro.
2012-12-27 Sriraman Tallam <tmsriram@google.com>
* testsuite/g++.dg/mv1.C: Remove target options.
* testsuite/g++.dg/mv2.C: Ditto.
* testsuite/g++.dg/mv3.C: Ditto.
* testsuite/g++.dg/mv4.C: Ditto.
* testsuite/g++.dg/mv5.C: Ditto.
From-SVN: r194730
|
|
PR c++/55724
* pt.c (type_unification_real): Re-combine post-deduction loops.
From-SVN: r194620
|
|
PR c++/55685
* pt.c (tsubst_copy_and_build): Don't use SIZEOF_EXPR_TYPE_P in
templates.
From-SVN: r194517
|
|
PR c++/42315
* decl.c (maybe_deduce_size_from_array_init): Don't change the
variable type.
From-SVN: r194509
|
|
PR c++/55652
* typeck2.c (merge_exception_specifiers): Don't call operand_equal_p
if noex is NULL.
* g++.dg/cpp0x/noexcept19.C: New test.
From-SVN: r194479
|
|
PR c++/54883
* decl2.c (min_vis_r): Handle anon visibility for enums.
From-SVN: r194430
|
|
2012-12-11 Marc Glisse <marc.glisse@inria.fr>
PR c++/53094
cp/
* tree.c (cp_tree_equal): Handle VECTOR_CST.
* semantics.c (cxx_eval_bare_aggregate): Protect a dereference.
Handle VECTOR_CST.
testsuite/
* g++.dg/cpp0x/constexpr-53094-1.C: New testcase.
* g++.dg/cpp0x/constexpr-53094-2.C: Likewise.
* g++.dg/cpp0x/constexpr-53094-3.C: Likewise.
From-SVN: r194421
|
|
not used" with an "enum class"-typed variable is casted to double for the use)
PR c++/55643
* expr.c (mark_exp_read): Handle FLOAT_EXPR similarly to NOP_EXPR.
* g++.dg/warn/Wunused-var-19.C: New test.
From-SVN: r194415
|
|
PR c++/54416
* pt.c (maybe_process_partial_specialization): Don't accept
definition of a specialization without the appropriate header.
From-SVN: r194408
|
|
From-SVN: r194407
|
|
directly addressable)
PR c++/55619
* semantics.c (finish_asm_stmt): Don't call decay_conversion
on input operands that can be only in memory.
* g++.dg/ext/asm12.C: New test.
From-SVN: r194404
|
|
* Make-lang.in (cp/typeck.o): Add dependency on $(PARAMS_H).
(cp/name-lookup.o): Likewise.
From-SVN: r194369
|
|
From-SVN: r194363
|
|
specialization of non-type parameter)
PR c++/55127
* search.c (accessible_in_template_p): New.
* cp-tree.h: Declare it.
* pt.c (instantiation_dependent_scope_ref_p): New.
(value_dependent_expression_p): Use it.
(instantiation_dependent_r): Likewise.
* semantics.c (finish_decltype_type): Handle SCOPE_REF.
From-SVN: r194318
|
|
PR c++/55419
* tree.c (build_target_expr): Don't set TREE_CONSTANT.
From-SVN: r194317
|
|
PR c++/55513
* semantics.c (cxx_eval_builtin_function_call): Set non_constant_p
after folding.
From-SVN: r194316
|
|
2012-12-07 Paolo Carlini <paolo.carlini@oracle.com>
* tree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.
(build_cplus_new): Adjust.
* cp-tree.h: Adjust declaration.
* init.c (build_value_init): Adjust.
From-SVN: r194312
|
|
Consider this invalid example given in the PR, where T is not defined:
1 template<typename>
2 struct X {
3 using type = T;
4 };
g++ yields the confusing diagnostics:
test.cc:3:10: error: expected nested-name-specifier before 'type'
using type = T;
^
test.cc:3:10: error: using-declaration for non-member at class scope
test.cc:3:15: error: expected ';' before '=' token
using type = T;
^
test.cc:3:15: error: expected unqualified-id before '=' token
I think this is because in cp_parser_member_declaration we tentatively
parse an alias declaration; we then have a somewhat meaningful
diagnostic which alas is not emitted because we are parsing
tentatively. As the parsing didn't succeed (because the input is
invalid) we try to parse a using declaration, which fails as well; but
then the diagnostic emitted is the one for the failed attempt at
parsing a using declaration, not an alias declaration. Oops.
The idea of this patch is to commit the tentative parse when we see
the '=' token in the alias-declaration. That way any error encounter
after that token is reported to the user.
We are now getting the following output:
test.cc:3:18: erreur: expected type-specifier before ‘T’
using type = T;
^
test.cc:3:18: erreur: ‘T’ does not name a type
I don't really like the "before 'T'" there, but I think we maybe could
revisit the format of what cp_parser_error emits in general, now that
we have caret diagnostics; We could maybe do away with the "before T"
altogether?
In the mean time, it seems to me that this patch brings an improvement
over what we already have in trunk, and the issue above could be
addressed separately.
Tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* parser.c (cp_parser_alias_declaration): Commit to tentative
parse when see the '=' token. Get out if the type-id is invalid.
Update function comment.
(cp_parser_member_declaration): Don't try to parse a using
declaration if we know that we expected an alias declaration; that
is, if we see the '=' token after the identifier.
gcc/testsuite/
* g++.dg/cpp0x/alias-decl-28.C: New test.
* g++.dg/cpp0x/alias-decl-16.C: Update.
From-SVN: r194306
|
|
abstract base class constructor fails)
PR c++/54325
* tree.c (build_aggr_init_expr): Don't check for abstract class.
From-SVN: r194284
|
|
PR c++/55058
* pt.c (tsubst): Keep the quals when looking through a typedef.
From-SVN: r194282
|
|
errors)
PR c++/55249
* tree.c (build_vec_init_elt): Use the type of the initializer.
From-SVN: r194281
|
|
base, member typedef and ctor-initializer)
PR c++/54744
* pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
* init.c (expand_member_init): Check for being in a template first.
* parser.c (cp_parser_mem_initializer_list): Only check class types
for equivalence to the current class.
From-SVN: r194267
|
|
static member of reference type)
PR c++/54913
* semantics.c (finish_qualified_id_expr): convert_from_reference
after building a SCOPE_REF.
From-SVN: r194266
|
|
#defined/typedef'd)
PR c++/54207
* except.c (build_noexcept_spec): Avoid direct comparison
with boolean_true_node or boolean_false_node, instead use
operand_equal_p and/or INTEGER_CST check.
* pt.c (tsubst_exception_specification): Likewise.
* typeck2.c (merge_exception_specifiers): Likewise.
* g++.dg/cpp0x/noexcept18.C: New test.
From-SVN: r194263
|
|
PR c++/55573
* semantics.c (adjust_temp_type): Handle VECTOR_CST.
* g++.dg/cpp0x/constexpr-55573.C: New test.
From-SVN: r194262
|
|
PR c++/54947
* parser.c (cp_parser_initializer_list): Don't require an
expression in [] to be constant until we know it's a C99
designator.
From-SVN: r194256
|
|
inline function)
PR c++/55015
PR c++/53821
* semantics.c (maybe_add_lambda_conv_op): Revert earlier change.
* decl.c (start_preparsed_function): Make local class methods comdat
in templates, too.
From-SVN: r194251
|
|
PR c++/54653
* parser.c (cp_parser_class_head): A partial specialization scope
counts as a template.
* pt.c (tsubst_template_parms): Handle template template parm parms.
(tsubst_decl) [TEMPLATE_DECL]: Handle getting a template template
argument back.
From-SVN: r194249
|
|
for late-specified function result type)
PR c++/55564
* pt.c (unify) [ARRAY_TYPE]: Unify the element type before the bounds.
From-SVN: r194248
|
|
/cp
2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54170
* cvt.c (cp_convert_to_pointer): Don't discard side-effects from
expressions of nullptr_t.
* typeck.c (build_ptrmemfunc): Likewise.
/testsuite
2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54170
* g++.dg/cpp0x/lambda/lambda-nullptr.C: New.
From-SVN: r194098
|
|
PR c++/55542
* pt.c (make_ith_pack_parameter_name): Return NULL if
name is NULL.
(tsubst_decl): Call make_ith_pack_parameter_name even if
DECL_NAME is NULL.
* g++.dg/cpp0x/vt-55542.C: New test.
From-SVN: r194010
|
|
PR c++/53137
* pt.c (tsubst_expr) [DECL_EXPR]: Set LAMBDA_EXPR_THIS_CAPTURE here.
(tsubst_copy_and_build) [LAMBDA_EXPR]: And clear it here.
(instantiate_class_template_1): Not here.
From-SVN: r193954
|
|
2012-11-29 Marc Glisse <marc.glisse@inria.fr>
PR c++/53094
gcc/
* fold-const.c (fold): Replace a CONSTRUCTOR with a VECTOR_CST.
gcc/cp/
* cvt.c (ocp_convert): Call convert_to_vector.
gcc/testsuite/
* g++.dg/ext/vector20.C: New testcase.
From-SVN: r193938
|
|
3 for native x86_64-w64-mingw32)
PR target/53912
* class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t.
(dump_vtable): Likewise.
From-SVN: r193934
|
|
gcc/c-family/
2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/52654
* c-common.h (overflow_type): New enum.
(build_userdef_literal): Add overflow_type argument.
(tree_userdef_literal): Add overflow_type.
(USERDEF_LITERAL_OVERFLOW): New access macro.
* c-common.c (build_userdef_literal): Add overflow_type
argument.
* c-lex.c (c_lex_with_flags): Add overflow_type to
build_userdef_literal calls.
(interpret_integer, interpret_float): Add overflow_type argument.
gcc/cp/
2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/52654
* parser.c (cp_parser_string_literal): Add overflow_type arg.
(cp_parser_userdef_numeric_literal): Warn on numeric overflow.
gcc/testsuite/
2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/52654
* g++.dg/cpp0x/udlit-overflow.C: New.
* g++.dg/cpp0x/udlit-overflow-neg.C: New.
From-SVN: r193918
|
|
component of $PATH)
2012-11-28 Andrew Pinski <apinski@cavium.com>
PR bootstrap/54279
* configure.ac (CXX_FOR_TARGET): Change over to use xg++.
* configure: Regenerate.
* Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Change over to use xg++.
* Makefile.in: Regenerate.
2012-11-28 Andrew Pinski <apinski@cavium.com>
PR bootstrap/54279
* Makefile.in (${QMTEST_DIR}/context): Use xg++ instead of g++.
2012-11-28 Andrew Pinski <apinski@cavium.com>
PR bootstrap/54279
* Make-lang.in (g++$(exeext)): Rename to
(xg++$(exeext)): This.
(g++-cross$(exeext)): Use xg++$(exeext) instead of g++$(exeext).
(c++.start.encap): Likewise.
(c++.install-common): Likewise.
2012-11-28 Andrew Pinski <apinski@cavium.com>
PR bootstrap/54279
* lib/g++.exp (g++_init): Search for xg++ instead of g++ in the build
directories.
* lib/obj-c++.exp (obj-c++_init): Likewise.
2012-11-28 Andrew Pinski <apinski@cavium.com>
PR bootstrap/54279
* scripts/testsuite_flags.in (--build-cxx): Use xg++ instead of g++.
* testsuite/lib/libstdc++.exp (libstdc++_init): Likewise.
From-SVN: r193910
|
|
/cp
2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55446
* init.c (build_vec_init): Do not early return error_mark_mode
when integer_all_onesp (maxindex).
/testsuite
2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55446
* g++.dg/init/new41.C: New.
From-SVN: r193785
|
|
case with throw and default)
PR c++/54046
* Makefile.in (gimple-low.o): Depend on langhooks.h.
* gimple-low.c: Include langhooks.c.
(block_may_fallthru): Handle TARGET_EXPR and ERROR_MARK,
by default call lang_hooks.block_may_fallthru.
* langhooks.h (struct lang_hooks): Add block_may_fallthru
langhook.
* langhooks-def.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
(LANG_HOOKS_INITIALIZER): Use it.
* cp-objcp-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Redefine.
* cp-objcp-common.c (cxx_block_may_fallthru): New function.
* cp-tree.h (cxx_block_may_fallthru): New prototype.
* g++.dg/warn/Wreturn-type-8.C: New test.
From-SVN: r193762
|
|
value(s) in implicitly_declare_fn() method.c:1623)
2012-11-23 Markus Trippelsdorf <markus@trippelsdorf.de>
PR c++/55418
* method.c (implicitly_declare_fn): Properly initialize trivial_p.
From-SVN: r193758
|
|
PR c++/55137
* semantics.c (verify_constant): Track overflow separately.
(reduced_constant_expression_p): Don't check it here.
(cxx_eval_constant_expression): Check it on CSTs.
(cxx_eval_outermost_constant_expr): Treat overflows as non-constant
at this point, but still return the folded version.
(potential_constant_expression_1): Don't check overflow.
From-SVN: r193727
|