Age | Commit message (Collapse) | Author |
|
* semantics.c (finish_id_expression): Don't assume a dependent
member of the current instantiation isn't a valid integral
constant expression. Check dependent_scope_p.
* pt.c (dependent_scope_p): Check TYPE_P.
(tsubst_copy): If args is null, just return.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@145509 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
source-name.
PR c++/38030, 38850, 39070
* pt.c (type_dependent_expression_p_push): New fn.
(tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
substitution makes the call non-dependent. Preserve koenig_p.
* parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
for non-dependent calls.
* semantics.c (finish_call_expr): Revert earlier changes.
* cp-tree.h: Revert change to finish_call_expr prototype.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@145468 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@145308 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* opts.c (warning_disallowed_functions, warn_disallowed_functions,
warn_if_disallowed_function_p): Removed.
(common_handle_option): Don't handle OPT_Wdisallowed_function_list_.
* c-parser.c (c_parser_postfix_expression_after_primary): Don't call
warning_if_disallowed_function_p.
* flags.h (warn_if_disallowed_function_p,
warn_disallowed_functions): Removed.
* common.opt (Wdisallowed-function-list=): Removed.
* doc/invoke.texi (-Wdisallowed-function-list=): Removed.
* parser.c (cp_parser_postfix_expression): Don't call
warning_if_disallowed_function_p.
* gcc.dg/wdisallowed-functions-1.c: Removed.
* gcc.dg/wdisallowed-functions-2.c: Removed.
* gcc.dg/wdisallowed-functions-3.c: Removed.
* g++.dg/warn/Wdisallowed-functions-1.C: Removed.
* g++.dg/warn/Wdisallowed-functions-2.C: Removed.
* g++.dg/warn/Wdisallowed-functions-3.C: Removed.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@145200 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/38638
* parser.c (cp_parser_elaborated_type_specifier): If we have a
typename tag and don't have either a TYPE_DECL or a
TEMPLATE_ID_EXPR, set the type to NULL.
gcc/testsuite/
2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/38638
* g++.dg/template/typename17.C: New testcase.
* g++.dg/template/typename18.C: New testcase.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145107 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/37647
* decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
scope.
gcc/testsuite/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/37647
* g++.dg/parse/ctor9.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145105 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/29727
* decl.c (check_array_designated_initializer): Handle error_mark_node.
gcc/testsuite/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/29727
* g++.dg/init/error2.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145104 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* builtins.h (c_strlen): Do not warn here.
* c-typeck.c (build_binary_op): Adjust calls to pointer_int_sum.
* c-common.c (pointer_int_sum): Take an explicit location.
Warn about offsets out of bounds.
* c-common.h (pointer_int_sum): Adjust declaration.
gcc/cp/
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
gcc/testsuite/
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* gcc.dg/pr35652.C: New.
* g++.dg/warn/pr35652.C: New.
* gcc.dg/format/plus-1.c: Adjust message.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145102 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
PR C++/39380
* decl2.c (possibly_inlined_p): If java exceptions are in use
don't inline a decl unless it is explicitly marked inline.
* lex.c: (pragma_java_exceptions): New variable.
(handle_pragma_java_exceptions): Set pragma_java_exceptions.
* cp-tree.h (pragma_java_exceptions): Declare new variable.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145091 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* name-lookup.c (pushdecl_maybe_friend): Check default args later.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145042 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145015 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* c-parser.c (c_parser_omp_for_loop): Call c_parser_binary_expression
instead of c_parser_expression_conv, if original_code isn't one of the
4 allowed comparison codes, fail.
* semantics.c (handle_omp_for_class_iterator): Swap cond operands and
code if iter is the second operand.
* parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
argument. If it is set, don't build the toplevel expression with
build_x_binary_op, but build2.
(cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
callers.
(cp_parser_omp_for_cond): Don't assume the first operand of the
comparison must be decl.
* gcc.dg/gomp/pr39495-2.c: Remove xfails.
* testsuite/libgomp.c/loop-12.c: New test.
* testsuite/libgomp.c/loop-11.c: New test.
* testsuite/libgomp.c++/loop-11.C: New test.
* testsuite/libgomp.c++/loop-12.C: New test.
* testsuite/libgomp.c++/for-8.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145014 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(instantiate_decl): ...here.
(tsubst_pack_expansion): Handle being called in a late-specified
return type.
* libiberty/cp-demangle.c (d_expression): Handle pack expansion.
(d_find_pack): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM.
(d_print_subexpr): Don't wrap function parms in ().
(d_print_comp) [DEMANGLE_COMPONENT_PACK_EXPANSION]: Handle
not finding a pack.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145013 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
a parm with a parm.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145012 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* parser.c (cp_parser_direct_declarator): In a template, wrap
non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
* pt.c (tsubst): Preserve it in a partial instantiation.
(dependent_type_p_r): Don't check value_dependent_expression_p.
* decl.c (compute_array_index_type): Don't check
value_dependent_expression_p if TREE_SIDE_EFFECTS.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144988 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* typeck2.c (check_narrowing): Don't complain about loss of
precision when converting a floating-point constant.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144979 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* c-omp.c (c_finish_omp_for): Allow NE_EXPR with TREE_TYPE (decl)'s
minimum or maximum value.
* parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
(cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
* gcc.dg/gomp/pr39495-1.c: New test.
* gcc.dg/gomp/pr39495-2.c: New test.
* g++.dg/gomp/pr39495-1.C: New test.
* g++.dg/gomp/pr39495-2.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144965 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* matrix-reorg.c (struct matrix_info): Likewise.
* tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
* rtl.h (struct mem_attrs): Likewise.
* df.h (struct df): Likewise.
* tree-data-ref.h (struct data_dependence_relation): Likewise.
* ira-int.h (struct ira_allocno): Likewise.
* df-scan.c (struct df_collection_rec): Likewise.
* ira.c (struct equivalence): Likewise.
* function.c (struct temp_slot): Likewise.
* cfgloop.h (struct loop): Likewise.
* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
(eof_token): Adjust.
* include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144938 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39425
* parser.c (cp_parser_explicit_specialization): Don't skip the
rest of the specialization when begin_specialization returns
false.
gcc/testsuite/
2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39425
* g++.dg/template/pr39425.C: New.
* g++.dg/template/spec33.C: Updated.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144932 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* decl.c (grokfndecl): Set DECL_CONTEXT on parms.
(duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
* pt.c (check_explicit_specialization): Likewise.
(tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
local specialization.
* tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
* decl2.c (parm_index): New fn.
* semantics.c (finish_decltype_type): Don't use describable_type.
* mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
Give a sorry for unsupported codes rather than crash. Mangle
conversions with other than 1 operand. New mangling for PARM_DECL.
* operators.def (ALIGNOF_EXPR): Mangle as az.
* include/demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_FUNCTION_PARAM.
* libiberty/cp-demangle.c (d_make_function_param): new fn.
(cplus_demangle_mangled_name): Work around abi v2 bug.
(d_expr_primary): Likewise.
(cplus_demangle_operators): Add alignof ops.
(d_expression): Handle function parameters and conversions
with other than 1 operand.
(d_print_comp): Handle function parameters. Fix bug with
function used in type of function.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144924 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
cp/ChangeLog
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144922 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39475
* semantics.c (check_trait_type): New.
(finish_trait_expr): Use it.
/testsuite
2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39475
* g++.dg/ext/unary_trait_incomplete.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144919 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* name-lookup.c (do_namespace_alias): Don't call global_decl debug
hook at function scope.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144913 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL.
* name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
instead of calling imported_module_or_decl debug hook if
building_stmt_tree ().
* cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
is a NAMESPACE_DECL.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144912 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
DW_TAG_imported_module even if decl is IMPORTED_DECL with
NAMESPACE_DECL in its DECL_INITIAL.
* cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
on IMPORTED_DECL.
* g++.dg/debug/dwarf2/imported-module-2.C: Expect
DW_TAG_imported_module, not just any DW_TAG_imported prefixed tag.
* g++.dg/debug/dwarf2/imported-module-3.C: Likewise.
* g++.dg/debug/dwarf2/imported-module-4.C: Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144911 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* semantics.c (finish_switch_cond): Don't call get_unwidened.
* decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
instead of TREE_TYPE (cond).
* g++.dg/opt/switch2.C: Add -w to dg-options.
* g++.dg/warn/Wswitch-1.C: Adjust expected warnings.
* g++.dg/warn/switch1.C: New test.
* g++.dg/other/switch3.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144732 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39060
* parser.c (cp_parser_late_parsing_default_args): Continue
the loop when cp_parser_assignment_expression returns
error_mark_node.
gcc/testsuite/
2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39060
* g++.dg/other/new1.C: Adjusted.
* g++.dg/parse/crash40.C: Likewise.
* g++.dg/parse/defarg12.C: Likewise.
* g++.dg/template/error15.C: Likewise.
* g++.dg/other/pr39060.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144710 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* init.c (build_new_1): Don't use a VLA type.
(build_vec_init): Handle getting a pointer for BASE.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144697 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
PR c++/37520
* cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
when mangling symbols.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144692 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33492
* error.c (dump_expr): Don't try to print THROW_EXPRs in full.
/testsuite
2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33492
* g++.dg/other/error32.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144686 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
types.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144664 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* class.c (is_really_empty_class): New fn.
* cp-tree.h: Declare it.
* cp-objcp-common.c (cp_expr_size): Use it.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144643 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
* parser.c (cp_parser_postfix_expression): Call it for
TEMPLATE_ID_EXPR.
* tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
(get_first_fn): Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144636 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144619 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
PR c++/29469
PR c++/29607
* decl.c (make_typename_type): Do look inside currently open classes.
* parser.c (cp_parser_lookup_name): Likewise.
(cp_parser_template_name): Likewise.
* pt.c (dependent_scope_p): New function.
* cp-tree.h: Declare it.
* class.c (currently_open_class): Return fast if T isn't a class.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144618 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37789
* parser.c (cp_parser_mem_initializer): Return error_mark_node
if cp_parser_mem_initializer_id returns error_mark_node.
gcc/testsuite/
2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37789
* other/pr37789.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144451 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144448 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
PR c++/39242
* pt.c (instantiate_decl): Do not instantiate extern, non-inline
declared functions.
* g++.dg/template/instantiate10.C: New testcase.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144408 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
PR c++/36411
* pt.c (coerce_template_template_parms): Return 0 if parameter
is error_mark_node.
gcc/testsuite/
2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
PR c++/36411
* g++.dg/template/void14.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144396 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
deducing from an initializer list.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144392 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* decl.c (grokdeclarator): Handle ~identifier.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144314 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* c-common.c (c_determine_visibility): If visibility changed and
DECL_RTL has been already set, call make_decl_rtl to update symbol
flags.
* decl2.c (determine_visibility): If visibility changed and
DECL_RTL has been already set, call make_decl_rtl to update symbol
flags.
* gcc.dg/visibility-20.c: New test.
* g++.dg/ext/visibility/visibility-11.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144305 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* varasm.c (assemble_variable): Don't check DECL_NAME when
globalizing a variable.
gcc/cp/
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* cp-tree.h (maybe_commonize_var): New.
* decl.c (maybe_commonize_var): Make it extern.
* decl2.c (finish_anon_union): Call maybe_commonize_var.
gcc/testsuite/
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* g++.dg/abi/pr39188-1a.C: New.
* g++.dg/abi/pr39188-1b.C: Likewise.
* g++.dg/abi/pr39188-1.h: Likewise.
* g++.dg/abi/pr39188-2a.C: Likewise.
* g++.dg/abi/pr39188-2b.C: Likewise.
* g++.dg/abi/pr39188-2.h: Likewise.
* g++.dg/abi/pr39188-3a.C: Likewise.
* g++.dg/abi/pr39188-3b.C: Likewise.
* g++.dg/abi/pr39188-3.h: Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144297 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39219
* parser.c (cp_parser_enum_specifier): Apply all attributes.
gcc/testsuite/
2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39219
* g++.dg/parse/attr3.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144284 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tree-ssa-ccp.c (get_symbol_constant_value): Don't assume zero
value if DECL_EXTERNAL.
* tree-sra.c (sra_walk_gimple_assign): Likewise.
* target.h (gcc_target::binds_local_p): Clarify module.
* tree.h (TREE_PUBLIC): Clarify module.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144270 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* semantics.c (finish_call_expr): Change koenig_p parm to int.
If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
* cp-tree.h: Adjust prototype.
* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144161 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144139 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* decl2.c (cp_write_global_declarations):
Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144119 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144112 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* class.c (defaultable_fn_p): Handle ... properly.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@144092 138bc75d-0d04-0410-961f-82ee72b054a4
|