1 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
4 * typeck2.c (process_init_constructor_record): Do not warn about
5 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
7 2014-09-11 Jason Merrill <jason@redhat.com>
10 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
11 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
13 2014-09-10 Jason Merrill <jason@redhat.com>
16 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
17 (duplicate_decls, start_decl): Likewise.
18 * pt.c (check_explicit_specialization): Likewise.
19 (push_template_decl_real): Or static templates.
21 2014-09-08 Jason Merrill <jason@redhat.com>
23 * typeck.c (build_class_member_access_expr): Move
24 -Winvalid-offsetof code...
25 * semantics.c (finish_offsetof): ...here.
26 * parser.c (cp_parser_builtin_offsetof): Remember the location of
28 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
31 * pt.c (instantiate_decl): Handle recursive instantiation of
34 2014-09-05 Jason Merrill <jason@redhat.com>
37 * semantics.c (potential_constant_expression_1): Handle un-folded
38 pointer to member constants.
40 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
43 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
46 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
49 * class.c (check_field_decls): A class of literal type cannot have
50 volatile non-static data members and base classes.
51 (explain_non_literal_class): Update.
53 2014-09-02 Jakub Jelinek <jakub@redhat.com>
54 Balaji V. Iyer <balaji.v.iyer@intel.com>
55 Igor Zamyatin <igor.zamyatin@intel.com>
57 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
59 * parser.c (cp_parser_cilk_for): New function.
60 (cp_parser_cilk_grainsize): Likewise.
61 (cp_parser_statement): Added RID_CILK_FOR case.
62 (cp_parser_omp_for_cond): Added CILK_FOR check.
63 (cp_parser_omp_for_loop_init): Change function argument to accept
64 tree_code instead just a bool flag; change the check to use that
65 tree_code; check for initialization declaration in case of Cilk_for.
66 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
67 changed call to cp_parser_omp_for_loop_init according new arguments'
69 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
70 * pt.c (tsubst_expr): Added CILK_FOR case.
71 * semantics.c: Include convert.h.
72 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
73 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
74 (handle_omp_for_class_iterator): New argument lastp and its usage;
76 (finish_omp_for): Changed call to handle_omp_for_class_iterator
77 according new arguments' list; in case of Cilk_for save very first
78 decl and create empty stmt_list block; use block to build correct
81 2014-08-31 Jason Merrill <jason@redhat.com>
84 * optimize.c (cdtor_comdat_group): Just look at the
85 DECL_ASSEMBLER_NAME of the 'tors.
87 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
90 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
91 result of cxx_eval_constant_expression.
93 2014-08-26 Jason Merrill <jason@redhat.com>
96 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
97 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
98 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
101 2014-08-25 Jason Merrill <jason@redhat.com>
103 * pt.c (check_explicit_specialization): Don't complain about
104 non-template variable.
105 (template_for_substitution): Allow variable templates.
106 (check_template_variable): Fix logic for member var template.
107 * decl.c (start_decl): Don't complain about extra template header
110 * decl.c (start_decl): Look through member variable template.
111 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
112 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
115 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
118 * cp-tree.h (TFF_POINTER): Add.
119 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
121 * error.c (dump_type_suffix): Actually print the const and noreturn
122 attribute when appropriate.
124 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
126 * decl.c (compute_array_index_type, grokdeclarator,
127 undeduced_auto_decl): Change from cxx1y to cxx14.
128 *lambda.c(add_capture()): Change error message from C++1y to C++14.
129 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
130 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
131 cp_parser_decltype, cp_parser_conversion_type_id,
132 cp_parser_simple_type_specifier, cp_parser_type_id_1,
133 cp_parser_template_type_arg, cp_parser_std_attribute,
134 cp_parser_template_declaration_after_export): Ditto.
135 * pt.c (tsubst): Ditto.
136 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
137 * tree.c: Change comment.
138 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
139 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
141 2014-08-23 Jason Merrill <jason@redhat.com>
143 Allow non-constexpr variable templates.
144 * decl2.c (note_variable_template_instantiation): New.
145 * cp-tree.h: Declare it.
146 * pt.c (instantiate_decl): Call it.
147 (push_template_decl_real): Allow non-constexpr variable templates.
148 * semantics.c (finish_id_expression): Mark the variable template
149 instantiation as used.
150 * mangle.c (write_mangled_name): Variable template instantiations
152 * parser.c (cp_parser_init_declarator): Complain about
153 non-function implicit templates.
155 2014-08-22 Marek Polacek <polacek@redhat.com>
158 * parser.c (cp_parser_binary_expression): Check each LHS if it's
159 preceded with logical not. Adjust call to
160 warn_logical_not_parentheses.
162 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
165 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
166 declaration shadows a function declaration, unless the former
167 declares a function, pointer to function or pointer to member
168 function, because this is a common and valid case in real-world
170 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
173 2014-08-22 Jason Merrill <jason@redhat.com>
176 * class.c (outermost_open_class): Fix logic.
177 * decl.c (complete_vars): Fix logic.
179 2014-08-22 Jason Merrill <jason@redhat.com>
182 * class.c (outermost_open_class): New.
183 * cp-tree.h: Declare it.
184 * decl.c (maybe_register_incomplete_var): Use it.
185 (complete_vars): Handle any constant variable.
186 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
188 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
191 * cp-array-notation.c (build_array_notation_ref): Added correct
192 handling of case with incorrect array.
194 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
197 * error.c (cp_diagnostic_finalizer): Delete.
198 (init_error): Do not set diagnostic_finalizer here.
200 2014-08-19 Marek Polacek <polacek@redhat.com>
203 * call.c (build_new_op_1): Remember the type of arguments for
204 a comparison. If either operand of a comparison is a boolean
205 expression, call maybe_warn_bool_compare.
207 2014-08-19 Jason Merrill <jason@redhat.com>
209 PR tree-optimization/62091
210 * decl2.c (decl_needed_p): Return true for virtual functions when
215 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
218 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
220 * class.c (contains_empty_class_p): Remove.
222 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
224 * parser.c (cp_parser_expression): Add default arguments.
225 (cp_parser_primary_expression, cp_parser_postfix_expression,
226 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
227 cp_parser_unary_expression, cp_parser_direct_new_declarator,
228 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
229 cp_parser_lambda_body, cp_parser_expression_statement,
230 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
231 cp_parser_iteration_statement, cp_parser_jump_statement,
232 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
233 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
234 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
235 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
236 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
237 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
238 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
239 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
240 cp_parser_transaction_expression): Adjust.
242 2014-08-15 Jason Merrill <jason@redhat.com>
245 * pt.c (lookup_template_class_1): Revert recent change.
246 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
249 * pt.c (instantiate_class_template_1): Ignore lambda on
251 (push_template_decl_real): A lambda is not primary.
252 (lookup_template_class_1): Don't look for a lambda partial
254 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
255 currently in a function and the lambda living in a function.
256 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
258 2014-08-15 Richard Biener <rguenther@suse.de>
259 Jason Merrill <jason@redhat.com>
262 * tree.c (build_min_array_type, set_array_type_canon): Split out...
263 (build_cplus_array_type): ...from here. Only call build_array_type
266 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
270 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
274 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
275 cv-qualifiers of function types.
277 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
279 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
281 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
283 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
284 cp_build_array_ref, cp_build_function_call_vec): When a
285 pedwarn is suppressed under SFINAE, return error_mark_node.
287 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
288 tf_warning_or_error, where complain is a bool, glitch.
290 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
293 * decl.c (grokdeclarator): Move the check for friend initializers..
294 * decl2.c (grokfield) ..here. Postpone early return for friends
295 until after the initializer check.
297 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
300 * pt.c (coerce_template_parms): Improve error message vs default
303 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
305 * parser.c (cp_parser_init_declarator): Remove redundant check of
306 decl_specifiers->type.
308 2014-08-13 Jason Merrill <jason@redhat.com>
310 * call.c (build_x_va_arg): Support passing non-POD through ....
311 (convert_arg_to_ellipsis): Likewise.
313 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
315 * pt.c (lookup_template_variable): Make dependent variable templates
318 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
320 * parser.c (cp_parser_elaborated_type_specifier): Handle
321 specially cp_parser_template_id returning a BASELINK.
323 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
325 * parser.c (cp_parser_diagnose_invalid_type_name,
326 cp_parser_make_typename_type): Remove scope parameter.
327 (cp_parser_parse_and_diagnose_invalid_type_name,
328 cp_parser_elaborated_type_specifier): Adjust calls.
330 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
332 Reject virt-specifiers on friends and member templates
333 * friend.c (do_friend): Diagnose virt-specifiers.
334 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
336 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
338 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
339 return type to bool; in C++11 for constants give errors, not pedwarns.
340 * cp-tree.h (check_narrowing): Adjust declaration.
341 * call.c (convert_like_real): Update calls.
342 * semantics.c (finish_compound_literal): Likewise.
344 2014-08-08 Jason Merrill <jason@redhat.com>
346 * pt.c (lookup_template_class_1): Copy abi_tag.
348 2014-08-08 Kai Tietz <ktietz@redhat.com>
350 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
351 that we operate on a true inline.
353 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
355 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
356 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
358 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
361 * decl.c (build_enumerator): Handle class types with conversion
362 operators via perform_implicit_conversion_flags and
363 build_expr_type_conversion.
365 * cvt.c (build_expr_type_conversion): Replace pair of errors
368 2014-08-07 Jason Merrill <jason@redhat.com>
371 * parser.c (c_parse_file): Change sorry to fatal_error.
374 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
376 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
378 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
380 2014-08-06 Jason Merrill <jason@redhat.com>
382 * init.c (build_vec_init): Fix constant initialization of
384 (build_value_init_noctor): Call maybe_constant_init.
385 * semantics.c (maybe_constant_init): See through EXPR_STMT and
389 * init.c (build_vec_init): Reorganize earlier change a bit.
392 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
393 if we're just returning an INIT_EXPR.
395 2014-08-06 Jason Merrill <jason@redhat.com>
396 Braden Obrzut <admin@maniacsvault.net>
398 * pt.c (check_explicit_specialization): Don't test
399 DECL_DECLARED_INLINE_P for a variable template.
401 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
404 * typeck.c (cp_build_binary_op): Extend to more cases the
407 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
409 Implement constexpr variable templates
410 * decl.c (grokvardecl): Handle specializations of variable templates.
411 (grokdeclarator): Handle variable template id expressions and NULL_TREE
412 return from grokvardecl.
413 * decl2.c (check_member_template): Allow declaration of template member
415 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
417 * pt.c (check_template_variable): Accept variable temploids at
419 (push_template_decl_real): The current instantiation of a template
421 (determine_specialization): Accept variable templates.
422 (check_explicit_specialization): Handle and check for malformed
423 variable template specializations.
424 (lookup_template_variable): New.
425 (tsubst_decl): Handle variable template specializations.
426 (do_decl_instantiation): Handle template variables.
427 (instantiate_decl): Handle template variables.
428 * semantics.c (finish_template_variable): New.
429 (finish_id_expression): Instantiate variable templates.
430 * cp-tree.h (variable_template_p): New.
432 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
435 * decl.c (check_redeclaration_no_default_args): New.
436 (duplicate_decls): Use it, handle default arguments
437 in redeclarations of function templates.
439 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
441 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
443 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
445 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
446 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
447 instead of pointer_set.
449 2014-08-01 Jason Merrill <jason@redhat.com>
452 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
453 init-list for trailing elements.
454 * typeck2.c (process_init_constructor_array): Likewise.
456 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
459 * decl.c (duplicate_decls): Handle static member functions too.
461 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
463 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
466 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
469 * parser.c (cp_parser_array_notation): Added check for array_type.
471 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
474 * cp-array-notation.c (expand_array_notation_exprs): Handling of
475 DECL_EXPR improved. Changed handling for INIT_EXPR.
477 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
479 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
481 2014-08-01 Jakub Jelinek <jakub@redhat.com>
483 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
484 -fsanitize=alignment call ubsan_maybe_instrument_reference
485 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
486 for calls to member functions.
488 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
491 * typeck.c (maybe_warn_about_returning_address_of_local): Return
492 whether it is returning the address of a local variable.
493 (check_return_expr): Return 0 instead of the address of a local
496 2014-07-30 Jason Merrill <jason@redhat.com>
500 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
502 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
505 * pt.c (unify_arity): Add boolean parameter.
506 (unify_too_few_arguments): Likewise.
507 (type_unification_real): Diagnose correctly insufficient
508 arguments in the presence of trailing variadic parameters;
509 deducing multiple trailing packs as empty is fine.
511 2014-07-30 Jason Merrill <jason@redhat.com>
516 * decl2.c (mark_all_virtuals): New variable.
517 (maybe_emit_vtables): Check it instead of flag_devirtualize.
518 (cp_write_global_declarations): Set it and give helpful diagnostic
519 if it introduces errors.
520 * class.c (finish_struct_1): Check it.
524 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
525 (check_explicit_specialization): Clear it on specializations.
526 * decl.c (duplicate_decls, start_decl): Likewise.
527 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
528 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
529 linkage after setting the appropriate flags.
530 * tree.c (decl_linkage): Don't check DECL_COMDAT.
531 * decl2.c (mark_needed): Mark clones.
532 (import_export_decl): Not here.
534 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
536 Implement N4051 - Allow typename in a template template parameter
537 * parser.c (cp_parser_type_parameter_key): New funtion;
538 (cp_parser_token_is_type_parameter_key): Ditto;
539 (cp_parser_type_parameter): Look for type-parameter-key for all versions
540 but pedwarn for less than cxx1z.
542 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
545 * call.c (standard_conversion): Use resolve_nondeduced_context
546 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
548 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
551 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
554 2014-07-15 Jason Merrill <jason@redhat.com>
557 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
561 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
562 * class.c (finish_struct): Reject invalid definition of
563 std::initializer_list.
565 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
567 * call.c (convert_like_real): Call print_z_candidate and inform only
568 if permerror returns true.
570 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
572 * class.c (build_clone): Do not clear assembler names of
574 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
575 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
576 as a special case return sizeof (struct tree_decl_non_common)
578 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
579 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
580 * cp/cp-tree.h (tree_template_decl): New structure.
581 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
582 (union cp_lang_tree_node): Add template_decl.
583 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
585 2014-07-14 Jason Merrill <jason@redhat.com>
589 * pt.c (instantiate_decl): Don't check defer_ok for local class
592 2014-07-14 Jakub Jelinek <jakub@redhat.com>
595 * cp-tree.h (LITERAL_ZERO_P): Define.
596 * parser.c (cp_parser_parenthesized_expression_list): Add
597 want_literal_zero_p argument, if true, for literal zeros
598 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
599 (cp_parser_postfix_expression): Adjust
600 cp_parser_parenthesized_expression_list caller, handle
601 -Wmemset-transposed-args.
602 (literal_zeros): New variable.
604 2014-07-13 Jason Merrill <jason@redhat.com>
607 * semantics.c (is_instantiation_of_constexpr): Return true for
608 defaulted functions, too.
609 (explain_invalid_constexpr_fn): Only use
610 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
611 * method.c (explain_implicit_non_constexpr): Pass
612 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
615 * decl.c (check_initializer): Don't finish_compound_literal
616 on erroneous constexpr init.
619 * tree.c (bot_replace): Only replace a dummy 'this' parm.
622 * decl.c (create_array_type_for_decl): Only check for auto once.
625 * call.c (build_list_conv): Don't try to build a list of references.
627 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
629 PR C++/60209 - Declaration of user-defined literal operator cause error
630 * parser.c (cp_parser_operator): Fold treatment of strings
631 and user-defined string literals. Use the full string parser.
632 (cp_parser_string_literal): Add flag to not look for literal operator.
634 2014-07-11 Jason Merrill <jason@redhat.com>
638 * call.c (build_conditional_expr_1): Avoid reading freed memory.
640 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
643 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
645 * decl.c (check_initializer): Don't call check_narrowing here,
646 set LOOKUP_NO_NARROWING.
647 * typeck2.c (digest_init_r): Likewise.
649 2014-07-10 Jason Merrill <jason@redhat.com>
652 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
656 * decl2.c (mark_all_virtuals): New variable.
657 (maybe_emit_vtables): Check it instead of flag_devirtualize.
658 (cp_write_global_declarations): Set it and give helpful diagnostic
659 if it introduces errors.
660 * class.c (finish_struct_1): Check it.
661 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
663 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
666 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
667 outside class declaration, in friend declaration, and neither on
668 constructor nor conversion operator.
670 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
674 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
675 cv-qualifiers of function types.
677 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
678 Paolo Carlini <paolo.carlini@oracle.com>
681 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
684 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
686 * class.c (check_for_override): Wrap the 'final' and 'override'
687 keywords in %< and %>.
689 2014-07-06 Marek Polacek <polacek@redhat.com>
692 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
693 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
694 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
697 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
699 * pt.c (convert_template_argument): Use inform instead of error in
702 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
707 * parser.c (cp_parser_userdef_string_literal): Take a tree
709 (cp_parser_string_literal): Don't hack the token stream.
711 2014-06-30 Jason Merrill <jason@redhat.com>
715 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
717 * init.c (build_vtbl_address): Don't mark destructor.
718 * class.c (finish_struct_1): Add all classes to keyed_classes
722 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
725 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
727 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
728 TYPE_BINFO or TYPE_LANG_SPECIFIC.
729 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
730 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
731 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
732 * pt.c (unify): Also check whether the argument is a PMF.
734 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
737 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
738 a '[' can also start a primary-expression.
739 (cp_parser_cast_expression): Parse a cast-expression only tentatively
740 when cp_parser_tokens_start_cast_expression returns -1.
742 2014-06-30 Jason Merrill <jason@redhat.com>
745 * pt.c (unify_one_argument): Type/expression mismatch just causes
748 * semantics.c (simplify_aggr_init_expr): Remove remnants of
751 2014-06-30 Marek Polacek <polacek@redhat.com>
753 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
754 function has no_sanitize_undefined attribute.
755 * decl.c (compute_array_index_type): Don't instrument VLAs if the
756 function has no_sanitize_undefined attribute.
758 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
761 * cp-array-notation.c (expand_sec_reduce_builtin):
762 Check that bultin argument is correct.
763 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
765 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
769 * typeck.c (check_return_expr): Lookup as an rvalue even when the
770 types aren't the same.
772 2014-06-27 Jason Merrill <jason@redhat.com>
775 * error.c (dump_template_bindings): Don't tsubst in a clone.
777 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
780 * semantics.c (finish_compound_literal): Revert r204228.
782 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
784 * parser.c (cp_parser_compound_literal_p): New.
785 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
787 2014-06-26 Jason Merrill <jason@redhat.com>
789 * parser.c (cp_parser_for_init_statement): Change range-for error
792 N3994 Ranged-based for-loops: The Next Generation
793 * parser.c (cp_lexer_nth_token_is): New.
794 (cp_parser_for_init_statement): Allow "for (id : init)".
796 2014-06-26 Teresa Johnson <tejohnson@google.com>
798 * class.c (dump_class_hierarchy): Use saved dump files.
799 (dump_vtable): Ditto.
802 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
805 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
806 parameter lists outside of function parameter scope.
808 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
812 * typeck2.c (process_init_constructor_record): Do not complain about
813 uninitialized const members, because within aggregate-initialization,
814 members without explicit initializers are value-initialized.
816 2014-06-25 Jakub Jelinek <jakub@redhat.com>
818 * semantics.c (finish_omp_clauses): Make sure
819 OMP_CLAUSE_LINEAR_STEP has correct type.
821 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
823 * class.c (check_methods, create_vtable_ptr, determine_key_method,
824 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
826 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
827 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
828 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
829 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
831 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
834 * decl.c (grokdeclarator): Do not early check for operator-function-id
837 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
839 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
842 2014-06-24 Jakub Jelinek <jakub@redhat.com>
844 * parser.c (cp_parser_omp_for_loop): For
845 #pragma omp parallel for simd move lastprivate clause from parallel
846 to for rather than simd.
848 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
852 * decl.c (grokparms): Accept a single parameter of type 'void'.
854 2014-06-20 Jason Merrill <jason@redhat.com>
857 * call.c (add_function_candidate): Avoid special 'this' handling
858 if we have a ref-qualifier.
861 * call.c (build_over_call): Call build_this in template path.
863 2014-06-19 Jason Merrill <jason@redhat.com>
866 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
868 2014-06-18 Jason Merrill <jason@redhat.com>
871 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
872 ref-qualifier handling.
875 * pt.c (resolve_overloaded_unification): Preserve
876 ARGUMENT_PACK_EXPLICIT_ARGS.
878 2014-06-18 Jakub Jelinek <jakub@redhat.com>
880 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
882 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
884 2014-06-17 Jason Merrill <jason@redhat.com>
887 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
889 2014-06-15 Jason Merrill <jason@redhat.com>
892 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
895 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
897 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
899 * decl.c (grokvardecl): Fix pasto in previous patch.
901 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
903 * decl.c (duplicate_decls): Use set_decl_tls_model.
904 (grokdeclarator): Likewise.
905 * semantics.c (finish_id_expression): Check TLS only for
907 (finish_omp_threadprivate): Use decl_default_tls_model.
908 * decl2.c (get_guard): Likewise.
909 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
911 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
914 * decl.c (grokparms): Improve error message about void parameters.
915 * error.c (type_to_string): Fix aka cut off code.
917 2014-06-12 Jason Merrill <jason@redhat.com>
919 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
920 * cvt.c (type_promotes_to): Likewise.
921 * mangle.c (write_type, write_expression): Likewise.
922 (write_name, write_template_arg): Likewise.
923 (mangle_decl): Make alias based on flag_abi_compat_version.
924 Emit -Wabi warning here.
925 (finish_mangling_internal): Not here. Drop warn parm.
926 (finish_mangling_get_identifier, finish_mangling): Adjust.
927 (mangle_type_string, mangle_special_for_type): Adjust.
928 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
929 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
930 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
932 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
933 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
934 (layout_nonempty_base_or_field, end_of_class): Likewise.
935 (layout_empty_base, build_base_field, layout_class_type): Likewise.
936 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
937 (layout_virtual_bases): Likewise.
938 * decl.c (compute_array_index_type): Likewise.
939 * mangle.c (write_mangled_name, write_prefix): Likewise.
940 (write_template_prefix, write_integer_cst, write_expression): Likewise.
941 (write_template_arg, write_array_type): Likewise.
942 * method.c (lazily_declare_fn): Likewise.
943 * rtti.c (get_pseudo_ti_index): Likewise.
944 * typeck.c (comp_array_types): Likewise.
946 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
948 * vtable-class-hierarchy.c: Update handling for section names
949 that are no longer trees.
950 * decl.c (duplicate_decls): Likewise.
952 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
955 * parser.c (cp_parser_init_declarator): Actually pass friend_p
956 to cp_parser_declarator.
958 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
961 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
962 * name-lookup.c (validate_nonmember_using_decl): Adjust error
965 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
968 * parser.c (cp_parser_declarator): Add bool parameter.
969 (cp_parser_direct_declarator): Likewise, use it.
970 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
971 (cp_parser_condition, cp_parser_explicit_instantiation,
972 cp_parser_init_declarator, cp_parser_type_id_1,
973 cp_parser_parameter_declaration, cp_parser_exception_declaration,
974 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
975 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
977 * decl.c (grokdeclarator): Fix handling of friend declared in
978 namespace scope (g++.dg/parse/friend10.C).
980 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
982 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
984 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
985 (maybe_clone_body): Move symbol across comdat groups.
986 * method.c (use_thunk): Copy implicit section flag.
988 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
991 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
993 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
995 * method.c (use_thunk): Use set_decl_section_name.
996 * optimize.c (maybe_clone_body): Use set_decl_section_name.
997 * decl.c (duplicate_decls): Likewise.
998 * vtable-class-hierarchy.c: Likewise.
1000 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1003 * class.c (check_field_decls): In C++11 mode do not reject
1004 static data members and reference-type members in unions.
1006 2014-06-05 Jason Merrill <jason@redhat.com>
1009 * decl.c (check_initializer): Collapse a TREE_LIST here.
1010 * typeck2.c (store_init_value): Not here.
1012 2014-06-05 Richard Biener <rguenther@suse.de>
1013 Paolo Carlini <paolo.carlini@oracle.com>
1016 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1017 handling of empty classes.
1019 2014-06-04 Jason Merrill <jason@redhat.com>
1021 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1022 for noexcept and thread_local, too.
1025 * decl.c (check_initializer): Maybe clear
1026 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1028 2014-06-05 Richard Biener <rguenther@suse.de>
1031 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1032 warnings for accessing empty classes.
1034 2014-06-05 Marek Polacek <polacek@redhat.com>
1037 * parser.c (cp_parser_binary_expression): Warn when logical not is
1038 used on the left hand side operand of a comparison.
1040 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1043 * typeck.c (cp_build_modify_expr): Handle array of characters
1044 initialized by a string literal.
1045 * decl.c (check_initializer): Handle parenthesized string literal
1047 * typeck2.c (store_init_value): Remove redundant check.
1049 2014-06-04 Jason Merrill <jason@redhat.com>
1053 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1054 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1056 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1059 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1062 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1066 * call.c (standard_conversion): Convert nullptr to bool only
1067 in case of direct-initialization.
1068 (convert_like_real): Provide informative error message.
1070 2014-06-03 Marek Polacek <polacek@redhat.com>
1073 * semantics.c (finish_switch_cond): Warn if switch condition has
1076 2014-06-03 Jason Merrill <jason@redhat.com>
1079 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1080 variable to local_specializations.
1083 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1085 2014-06-02 Jason Merrill <jason@redhat.com>
1088 * decl.c (reshape_init_class): Handle un-folded
1089 constant-expressions.
1092 * pt.c (pack_deducible_p): Handle canonicalization.
1094 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1096 * pt.c (tsubst_function_type): Initialize arg_types.
1098 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1101 * class.c (handle_using_decl): Pass the correct scope to
1102 cp_emit_debug_info_for_using.
1104 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1108 * search.c (accessible_p): Use current_nonlambda_class_type.
1109 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1111 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1113 * decl.c: Include builtins.h.
1114 * semantics.c: Likewise.
1116 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1120 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1121 * pt.c (tsubst_function_type): Inject the this parameter; do the
1122 substitutions in the order mandated by the DR.
1123 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1124 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1125 (static_fn_type): Copy it.
1126 * decl2.c (build_memfn_type, change_return_type,
1127 cp_reconstruct_complex_type): Likewise.
1128 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1129 * tree.c (strip_typedefs): Likewise.
1130 * typeck.c (merge_types): Likewise.
1132 2014-05-30 Jason Merrill <jason@redhat.com>
1135 * pt.c (instantiate_decl): Check that defer_ok is not set for
1136 local class members.
1139 * pt.c (tsubst_init): Split out from...
1140 (tsubst_expr) [DECL_EXPR]: Here.
1141 (tsubst_copy) [VAR_DECL]: Use it.
1142 * semantics.c (finish_id_expression): Return the decl for static/const.
1144 2014-05-28 Jason Merrill <jason@redhat.com>
1147 * decl.c (cxx_comdat_group): Return a decl.
1148 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1150 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1154 * call.c (build_aggr_conv): Ignore passed in flags.
1155 (build_array_conv, build_complex_conv): Likewise.
1157 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1159 * optimize.c (maybe_thunk_body): Use set_comdat_group.
1160 (maybe_clone_body): Likewise.
1161 * decl.c (duplicate_decls): Update code duplicating comdat group;
1162 do not copy symtab pointer; before freeing newdecl remove it
1164 * decl2.c (constrain_visibility): Use set_comdat_group.
1166 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1168 * rtti.c: Include tm_p.h
1169 (emit_tinfo_decl): Force RTTI data to be aligned to required
1172 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1174 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1175 ignoring other target adjustments.
1177 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1179 * semantics.c (finish_omp_clauses): Remove duplicated variable
1182 * parser.c (cp_parser_omp_target): Return bool values.
1184 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1187 * lambda.c (add_capture): Enforce that capture by value requires
1189 * typeck2.c (cxx_incomplete_type_inform): Early return if
1190 TYPE_MAIN_DECL is null.
1192 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
1195 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1197 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1200 * lambda.c (build_capture_proxy, add_capture): Treat normal
1201 captures and init-captures identically.
1203 2014-05-21 Mark Wielaard <mjw@redhat.com>
1206 * cp-lang.c (cxx_enum_underlying_base_type): New function.
1207 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1209 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1211 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1212 * cp-array-notation.c (replace_invariant_exprs): Likewise.
1213 (expand_array_notation): Handle VOID_CST.
1214 * error.c (dump_expr): Likewise.
1215 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1216 (cxx_pretty_printer::expression): Likewise.
1217 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1218 * decl.c (register_dtor_fn): Likewise.
1219 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1220 (build_delete, push_base_cleanups): Likewise.
1221 * mangle.c (write_expression): Likewise.
1222 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1223 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1224 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1225 * tree.c (cp_tree_equal): Likewise.
1226 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1227 instead of void_zero_node.
1228 * typeck.c (check_return_expr): Likewise.
1229 * typeck2.c (build_functional_cast): Likewise.
1231 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
1234 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1236 (cp_parser_statement): ...here. Make sure only semicolon can go after
1239 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1244 * typeck2.c (digest_nsdmi_init): New.
1245 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1246 * init.c (get_nsdmi): Likewise.
1247 * cp-tree.h (digest_nsdmi_init): Declare.
1249 2014-05-20 Jason Merrill <jason@redhat.com>
1251 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1252 up a virtual function in a dummy object.
1254 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1257 * decl.c (duplicate_decls): Replace pair of warning_at with
1258 warning_at + inform.
1259 (maybe_commonize_var): Likewise.
1261 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1264 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1265 (tsubst_copy_and_build): Perform recursive substitutions in a
1266 deterministic order.
1268 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1271 * typeck2.c (cxx_incomplete_type_inform): New.
1272 (cxx_incomplete_type_diagnostic): Use it.
1273 * decl.c (grokdeclarator): Check the element type of an
1274 incomplete array type; call the above.
1275 * cp-tree.h (cxx_incomplete_type_inform): Declare.
1277 2014-05-19 Jason Merrill <jason@redhat.com>
1280 * pt.c (tsubst_copy): Don't check at_function_scope_p.
1281 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1283 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
1285 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1286 * parser.c (cp_parser_enum_specifier): Likewise.
1288 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1290 * class.c (sorted_fields_type_new): Adjust.
1291 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1292 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1293 * cp-tree.h: Remove usage of variable_size gty attribute.
1294 * decl.c (make_label_decl): Adjust.
1295 (check_goto): Likewise.
1296 (start_preparsed_function): Likewise.
1297 (save_function_data): Likewise.
1298 * lex.c (init_reswords): Likewise.
1299 (retrofit_lang_decl): Likewise.
1300 (cxx_dup_lang_specific_decl): Likewise.
1301 (copy_lang_type): Likewise.
1302 (cxx_make_type): Likewise.
1303 * name-lookup.c (binding_entry_make): Likewise.
1304 (binding_table_construct): Likewise.
1305 (binding_table_new): Likewise.
1306 (cxx_binding_make): Likewise.
1307 (pushdecl_maybe_friend_1): Likewise.
1308 (begin_scope): Likewise.
1309 (push_to_top_level): Likewise.
1310 * parser.c (cp_lexer_alloc): Likewise.
1311 (cp_lexer_new_from_tokens): Likewise.
1312 (cp_token_cache_new): Likewise.
1313 (cp_parser_context_new): Likewise.
1314 (cp_parser_new): Likewise.
1315 (cp_parser_nested_name_specifier_opt): Likewise.
1316 (cp_parser_template_id): Likewise.
1317 * pt.c (maybe_process_partial_specialization): Likewise.
1318 (register_specialization): Likewise.
1319 (add_pending_template): Likewise.
1320 (lookup_template_class_1): Likewise.
1321 (push_tinst_level): Likewise.
1322 * semantics.c (register_constexpr_fundef): Likewise.
1323 (cxx_eval_call_expression): Likewise.
1324 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1326 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
1329 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1330 when cp_parser_lookup_name sets ambiguous_decls.
1332 2014-05-15 Jason Merrill <jason@redhat.com>
1334 * call.c (print_conversion_rejection): Use loc consistently.
1336 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1338 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1339 * call.c (convert_like_real, build_new_method_call_1): Use it.
1340 * decl2.c (grokfield): Likewise.
1341 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1342 build_new_1): Likewise.
1343 * mangle.c (write_expression): Likewise.
1344 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1346 2014-05-14 Jason Merrill <jason@redhat.com>
1350 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1351 dropped cv-quals as a bad conversion.
1352 (convert_like_real) [ck_ref_bind]: Explain them.
1353 (compare_ics): Check badness before stripping reference
1354 bindings. Handle comparing bad reference bindings.
1355 * typeck.c (comp_cv_qualification): Add overload that just takes
1357 * cp-tree.h: Declare it.
1359 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1360 (arg_conversion_rejection, bad_arg_conversion_rejection)
1361 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1362 (add_function_candidate): Pass actual argument, rather than type, to
1363 bad_arg_conversion_rejection.
1364 (print_conversion_rejection): Explain what's wrong with the conversion.
1365 (print_z_candidates): Say "candidate:" before each candidate.
1366 (splice_viable): Be strict if we see a viable or template candidate.
1367 (build_user_type_conversion_1): Pass false to strict parameter.
1368 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1369 (build_new_op_1, build_new_method_call_1): Likewise.
1370 (build_op_call_1): Pass true to strict parameter.
1372 2014-05-13 Jason Merrill <jason@redhat.com>
1374 * call.c (print_error_for_call_failure): Say "no match" rather
1375 than "ambiguous" if there were no strict matches.
1376 (build_new_method_call_1): Likewise.
1379 * semantics.c (is_this_parameter): Allow capture proxies too.
1381 2014-05-12 Jason Merrill <jason@redhat.com>
1383 * call.c (maybe_print_user_conv_context): New.
1384 (convert_like_real): Use it. Print call context for bad
1385 user-defined conversion.
1386 (build_over_call): Print call context for bad 'this' conversion.
1388 * call.c (convert_like_real): Use inform for identifying the
1391 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1393 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1394 complain & tf_error is false.
1396 * decl.c (make_unbound_class_template): Prefer inform for
1397 "declared here"-type message.
1399 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1403 * lambda.c (lambda_expr_this_capture): Add new parameter
1404 add_capture_p controlling whether the functions will try to
1405 capture 'this' via the default capture.
1406 (maybe_resolve_dummy): Likewise.
1407 * cp-tree.h: Adjust prototypes.
1408 * call.c, semantics.c: Change callers of these functions.
1409 * call.c (build_new_method_call_1): Use the actual 'this' that
1410 would be potentially captured for the overload resolution, instead
1411 of the dummy object.
1413 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1415 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1417 (convert_nontype_argument): Adjust calls.
1418 (coerce_template_parameter_pack): Add missing complain & tf_error
1421 2014-05-09 Jason Merrill <jason@redhat.com>
1425 * call.c (build_conditional_expr_1, conditional_conversion): Handle
1426 non-class lvalues and xvalues that differ only in cv-qualifiers.
1430 * call.c (build_user_type_conversion_1): The copy-init temporary
1434 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1437 * call.c (build_conditional_expr_1): If overload resolution finds
1438 no match, just say "different types".
1441 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1444 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1445 if we didn't find a conversion.
1446 Don't accept a bad conversion too early.
1448 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1451 * typeck.c (convert_for_assignment): Provide an inform for pointers
1452 to incomplete class types.
1454 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1457 * pt.c (convert_nontype_argument): Protect all the error calls
1458 with complain & tf_error.
1460 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1463 * pt.c (instantiate_decl): Avoid generating the body of a
1466 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1469 * pt.c (maybe_begin_member_template_processing): Use
1470 uses_template_parms.
1472 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1473 Mike Stump <mikestump@comcast.net>
1474 Richard Sandiford <rdsandiford@googlemail.com>
1476 * call.c: Include wide-int.h.
1477 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1478 (convert_for_arg_passing): Likewise.
1479 * class.c: Include wide-int.h.
1480 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
1481 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1482 (include_empty_classes): Likewise
1483 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
1484 * cvt.c: Include wide-int.h.
1485 (ignore_overflows): Use wide_int_to_tree.
1486 * decl.c: Include wide-int.h.
1487 (check_array_designated_initializer): Use wide-int interfaces.
1488 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
1489 (finish_enum_value_list): Use signop.
1490 (build_enumerator): Use wide-int interfaces.
1491 * init.c: Include wide-int.h.
1492 (build_new_1): Use wide-int interfaces.
1493 * mangle.c: Include wide-int.h.
1494 (write_integer_cst): Use wide-int interfaces.
1495 (write_array_type): Likewise.
1496 * tree.c: Include wide-int.h.
1497 (cp_tree_equal): Use tree_int_cst_equal.
1498 * typeck2.c: Include wide-int.h.
1499 (process_init_constructor_array): Use wide-int interfaces.
1501 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1504 * decl.c (grokfndecl): Check duplicate_decls return value for
1506 * pt.c (instantiate_decl): A deleted function is defined.
1508 2014-05-02 Jason Merrill <jason@redhat.com>
1510 * decl2.c (vague_linkage_p): Local statics have vague linkage.
1513 * lambda.c (lambda_capture_field_type): Wrap anything dependent
1515 (add_capture): Check for VLA before calling it.
1516 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
1517 just the current one. Make non-static.
1518 * cp-tree.h: Declare it.
1519 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
1520 the operand was static or constant.
1522 2014-05-02 Marek Polacek <polacek@redhat.com>
1524 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
1527 2014-05-01 Marek Polacek <polacek@redhat.com>
1530 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
1531 between label and variable when warning about returning local address.
1533 2014-04-30 Jason Merrill <jason@redhat.com>
1536 * init.c (build_value_init): Don't try to call an array constructor.
1539 * typeck2.c (massage_init_elt): Use maybe_constant_init.
1541 2014-04-30 Marek Polacek <polacek@redhat.com>
1543 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
1544 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
1545 for non-integer types.
1547 2014-04-29 Jason Merrill <jason@redhat.com>
1550 Represent the unevaluated exception specification of an implicitly
1551 declared or deleted function with a simple placeholder, not a list
1553 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
1554 * except.c (unevaluated_noexcept_spec): New.
1555 * class.c (deduce_noexcept_on_destructor): Use it.
1556 * decl.c (check_redeclaration_exception_specification): Call
1557 maybe_instantiate_noexcept.
1558 (duplicate_decls): Call it before merge_types.
1559 (start_preparsed_function): Call maybe_instantiate_noexcept.
1560 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
1561 * init.c (get_nsdmi): Factor out of perform_member_init.
1562 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
1563 (walk_field_subobs): Consider NSDMI for EH spec.
1564 (get_defaulted_eh_spec): New.
1565 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
1566 (defaulted_late_check): Defer EH checking in non-template classes.
1567 (after_nsdmi_defaulted_late_checks): New.
1568 * parser.c (cp_parser_class_specifier_1): Use it.
1569 (unparsed_classes): New macro.
1570 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
1571 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
1572 Remove list-of-functions handling.
1573 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
1574 handling and FN parameter.
1575 * typeck.c (merge_types): Adjust.
1577 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
1580 * parser.c (cp_parser_alias_declaration): Check return value of
1583 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1585 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
1586 atomic-clause, allow comma in between atomic-clause and
1589 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
1592 * rtti.c (emit_support_tinfos): Do not iterate on
1593 registered_builtin_types (partial revert).
1595 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
1598 * semantics.c (apply_deduced_return_type): Complete non-void type
1599 before estimating whether the type is aggregate.
1601 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
1604 * rtti.c (emit_support_tinfo_1): New function, extracted from
1605 emit_support_tinfos.
1606 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
1608 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1611 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
1612 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1614 2014-04-18 Jason Merrill <jason@redhat.com>
1617 * call.c (reference_binding): Recurse on user-defined conversion.
1620 * call.c (standard_conversion): Don't try to apply restrict to void.
1622 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
1624 * decl.c (reshape_init_r): Handle a single element of vector type.
1626 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1629 * decl2.c (cplus_decl_attributes): Handle
1630 pointer-to-member-function declarations.
1632 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1635 * call.c (build_user_type_coversion): Use build_dummy_object
1636 to create the placeholder object for a constructor method call.
1637 (build_special_member_call): Likewise.
1638 (build_over_call): Check for the placeholder object with
1640 (build_new_method_call_1): Likewise. Don't attempt to resolve
1641 a dummy object for a constructor method call.
1643 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
1646 * friend.c (add_friend, make_friend_class): Move repeated friend
1647 warning under Wredundant_decls.
1649 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1651 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
1652 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1653 (do_class_using_decl): Likewise.
1654 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
1656 2014-04-15 Jakub Jelinek <jakub@redhat.com>
1659 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
1661 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1663 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
1665 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1667 * pt.c (mark_template_parm): Use template_parm_level_and_index.
1669 2014-04-11 Jason Merrill <jason@redhat.com>
1671 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
1673 (cp_lexer_get_preprocessor_token): Always clear it.
1674 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
1678 * decl.c (reshape_init_r): Handle a single element of class type.
1681 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
1682 built-in operator new.
1684 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1687 * name-lookup.c (parse_using_directive): Return early if the
1688 attribs argument is error_mark_node; use get_attribute_name.
1690 2014-04-11 Jason Merrill <jason@redhat.com>
1694 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
1695 * call.c (struct z_candidate): Add flags field.
1696 (add_candidate): Add flags parm.
1697 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
1698 (add_template_candidate_real): Pass it.
1699 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
1700 * tree.c (build_aggr_init_expr): Copy it.
1701 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
1703 2014-04-10 Richard Biener <rguenther@suse.de>
1704 Jakub Jelinek <jakub@redhat.com>
1707 * error.c (dump_decl) <case FUNCTION_DECL>: If
1708 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
1709 recurse on DECL_ABSTRACT_ORIGIN instead of printing
1712 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
1714 * pt.c (check_template_variable): Check for the return of pedwarn
1715 before emitting a note.
1716 * parser.c (cp_parser_lambda_introducer): Likewise.
1718 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1721 * pt.c (process_template_parm): For an invalid non-type parameter
1722 only set TREE_TYPE to error_mark_node.
1723 (push_inline_template_parms_recursive, comp_template_parms,
1724 redeclare_class_template, coerce_template_template_parm,
1725 coerce_template_template_parms, unify): Use error_operand_p.
1727 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
1729 * class.c (check_bases_and_members): Warn about non-virtual dtors
1730 in public bases only. Check warn_ecpp before complaining about
1731 non-polymorphic bases.
1733 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1735 * decl.c (duplicate_decls): Check for the return of warning_at
1736 before emitting a note.
1737 (warn_misplaced_attr_for_class_type): Likewise.
1738 (check_tag_decl): Likewise.
1740 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
1743 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
1745 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
1748 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
1749 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
1750 instantiating a variable-sized type.
1753 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
1755 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1757 * class.c (find_abi_tags_r): Check for the return of warning
1758 before emitting a note.
1759 (one_inherited_ctor): Likewise.
1761 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1763 * decl.c (duplicate_decls): Check for the return of permerror
1764 before emitting a note.
1766 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
1768 * class.c (accessible_nvdtor_p): New.
1769 (check_bases): Don't check base destructor here ...
1770 (check_bases_and_members): ... check them here. Trigger on
1771 Wnon-virtual-dtor flag.
1772 (finish_struct_1): Use accessible_nvdtor_p.
1774 2014-04-01 Jason Merrill <jason@redhat.com>
1776 * pt.c (process_partial_specialization): Say "not deducible"
1777 rather than "not used". Use inform.
1780 * pt.c (coerce_template_parms): Check that the pack expansion
1781 pattern works with the first matching parameter.
1783 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
1785 * init.c (perform_member_init): Homogenize uninitialized
1788 2014-04-01 Jason Merrill <jason@redhat.com>
1791 * call.c (build_array_conv): Call complete_type.
1794 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
1795 (picflag_from_initializer): Return it.
1796 (process_init_constructor): Handle it.
1799 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
1800 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
1801 * pt.c (get_template_info): Handle NAMESPACE_DECL.
1802 (most_general_template): Handle more kinds of template.
1803 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
1804 instantiations and specializations.
1806 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
1809 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
1810 COMPONENT_REFs and ARRAY_REFs sooner.
1812 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
1815 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
1816 usage in non-functions with pushed scope.
1818 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
1821 * name-lookup.h (cp_binding_level): New transient field defining_class_p
1822 to indicate whether a scope is in the process of defining a class.
1823 * semantics.c (begin_class_definition): Set defining_class_p.
1824 * name-lookup.c (leave_scope): Reset defining_class_p.
1825 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
1826 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
1827 unwinding to class-defining scope to handle the erroneous definition of
1828 a generic function of an arbitrarily nested class within an enclosing
1831 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
1834 * method.c (walk_field_subobs): Improve the diagnostic
1835 locations for both REFERENCE_TYPEs and non-static const members.
1836 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
1837 instead of %qD to be consistent with the c++11 diagnostic.
1839 2014-03-25 Jason Merrill <jason@redhat.com>
1843 * class.c (build_vtbl_initializer): Handle abstract dtors here.
1844 * search.c (get_pure_virtuals): Not here.
1847 * parser.c (cp_parser_lambda_expression): Don't parse the body of
1848 a lambda in unevaluated context.
1851 * decl.c (create_array_type_for_decl): Complain about array of auto.
1853 2014-03-25 Jakub Jelinek <jakub@redhat.com>
1856 * semantics.c (potential_constant_expression_1): Handle
1859 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
1862 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
1863 introducing an implicit function template parameter within an explicit
1866 2014-03-22 Jason Merrill <jason@redhat.com>
1869 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
1872 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1875 * name-lookup.c (push_class_level_binding_1): Check identifier_p
1876 on the name argument.
1878 2014-03-20 Jakub Jelinek <jakub@redhat.com>
1881 * init.c (build_zero_init_1): Ignore fields with error_mark_node
1884 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1887 * call.c (build_new_method_call_1): Handle pure virtuals called by
1890 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
1893 * parser.c (cp_parser_member_declaration): Don't allow
1894 finish_fully_implicit_template to consider friend declarations to be
1895 class member templates.
1896 (synthesize_implicit_template_parm): Handling winding back through class
1897 scope to the class being defined in order to inject a template argument
1901 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
1902 function scope as per cp_parser_skip_to_end_of_statement.
1904 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1907 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
1909 2014-03-14 Jason Merrill <jason@redhat.com>
1913 * search.c (get_pure_virtuals): Handle abstract dtor here.
1914 (dfs_get_pure_virtuals): Not here.
1917 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
1918 abstract class as pure.
1920 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1923 * pt.c (maybe_process_partial_specialization): Check return value
1924 of check_specialization_namespace.
1926 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1929 * semantics.c (finish_static_assert): Call cxx_constant_value only
1930 if require_potential_rvalue_constant_expression returns true.
1932 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
1935 * method.c (get_inherited_ctor): New.
1936 * cp-tree.h (get_inherited_ctor): Declare it.
1937 * semantics.c (is_valid_constexpr_fn): Use it.
1939 2014-03-10 Jason Merrill <jason@redhat.com>
1942 * call.c (convert_default_arg): Remove special handling for
1946 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
1947 when deciding whether to call push_template_decl for a member class.
1948 * pt.c (push_template_decl_real): Return after wrong levels error.
1950 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
1953 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
1954 lambda, remove the lambda's own template argument list prior to fetching
1958 * parser.c (cp_parser_parameter_declaration_clause): Move generic
1959 function template unwinding on error into a more general location, ...
1960 (cp_parser_skip_to_end_of_statement): ... here.
1962 2014-03-07 Jason Merrill <jason@redhat.com>
1964 * Make-lang.in (check_g++_parallelize): Split dg.exp.
1966 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
1967 we're in a trailing return type.
1969 * typeck.c (comp_template_parms_position): 'auto' and
1970 'decltype(auto)' are different from real template parms.
1972 * parser.c (cp_parser_using_declaration): Consume the semicolon
1973 after bare parameter pack error.
1975 * cp-tree.h (REF_PARENTHESIZED_P): New.
1976 * semantics.c (force_paren_expr): Set it.
1977 * pt.c (do_auto_deduction): Check it.
1978 (tsubst) [COMPONENT_REF]: Copy it.
1979 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
1981 * decl.c (create_array_type_for_decl): Only warn about invalid
1982 C++1y VLA if flag_iso or warn_vla>0.
1983 (grokdeclarator): Likewise.
1984 * pt.c (tsubst): Likewise.
1985 * semantics.c (finish_decltype_type): Likewise.
1986 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
1987 (cp_build_addr_expr_1): Likewise.
1988 * init.c (build_new_1): Improve diagnostics.
1990 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1993 * decl.c (check_initializer): Return NULL_TREE after error;
1994 consistently use inform.
1996 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1998 * decl.c (check_initializer): Remove dead code.
2000 2014-03-06 Marek Polacek <polacek@redhat.com>
2003 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2004 of checking tree code.
2006 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2008 * parser.c (cp_lexer_set_source_position): New.
2009 (cp_parser_mem_initializer): Use it.
2010 (cp_parser_postfix_open_square_expression): Likewise.
2011 (cp_parser_parenthesized_expression_list): Likewise.
2012 (cp_parser_new_initializer): Likewise.
2013 (cp_parser_jump_statement): Likewise.
2014 (cp_parser_initializer): Likewise.
2015 (cp_parser_functional_cast): Likewise.
2017 2014-03-05 Jason Merrill <jason@redhat.com>
2020 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2021 dependent expression.
2024 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2025 if re-parsing might succeed.
2026 * semantics.c (finish_id_expression): Use of a parameter outside
2027 the function body is a parse error.
2029 * parser.c (cp_parser_mem_initializer): Set input_location
2030 properly for init-list warning.
2031 (cp_parser_postfix_open_square_expression): Likewise.
2032 (cp_parser_parenthesized_expression_list): Likewise.
2033 (cp_parser_new_initializer): Likewise.
2034 (cp_parser_jump_statement): Likewise.
2035 (cp_parser_initializer): Likewise.
2036 (cp_parser_functional_cast): Likewise.
2038 2014-03-04 Jason Merrill <jason@redhat.com>
2041 * typeck2.c (process_init_constructor_record): Set
2042 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2046 * parser.c (cp_parser_direct_declarator): Set declarator to
2047 cp_error_declarator on invalid qualified-id.
2049 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2052 * parser.c (cp_parser_using_declaration): Early return when
2053 cp_parser_nested_name_specifier errors out.
2055 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2058 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2059 function scope on parse error in function parameter list.
2061 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2063 * method.c (implicitly_declare_fn): Remove redundant
2064 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2065 * semantics.c (is_instantiation_of_constexpr): Likewise.
2066 * error.c (dump_function_decl): Likewise.
2068 2014-03-01 Jason Merrill <jason@redhat.com>
2071 * semantics.c (begin_maybe_infinite_loop): Use
2072 fold_non_dependent_expr_sfinae.
2074 2014-02-28 Jason Merrill <jason@redhat.com>
2077 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2079 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2082 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2083 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2084 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2086 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2089 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2092 2014-02-27 Jason Merrill <jason@redhat.com>
2096 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2097 are not yet defined.
2099 2014-02-26 Jason Merrill <jason@redhat.com>
2103 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2104 * init.c (build_vtbl_address): Do it here.
2110 * pt.c (struct warning_sentinel): New.
2111 (tsubst_copy_and_build): Use it instead of
2112 c_inhibit_evaluation_warnings.
2113 * typeck.c (maybe_warn_about_useless_cast): Remove
2114 c_inhibit_evaluation_warnings check.
2117 * pt.c (get_template_parm_index): New.
2118 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2119 (process_template_parm): Allow bare packs in template template
2120 parm template parms.
2121 (coerce_template_parameter_pack): Handle fixed template template
2122 parm packs and fixed packs not at the end of the parm list.
2123 (coerce_template_parms): Handle template parm packs not at the end
2125 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2128 * pt.c (unify): Ignore alias templates when deducing a template
2134 * call.c (reference_binding): Recurse on user-defined conversion.
2135 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2137 2014-02-25 Jason Merrill <jason@redhat.com>
2140 * call.c (reference_binding): Recurse on user-defined conversion.
2141 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2143 * call.c (print_conversion_rejection): Handle n_arg of -2.
2144 (build_user_type_conversion_1): Pass it.
2147 * decl2.c (no_linkage_error): Handle C++98 semantics.
2148 (reset_type_linkage): Move from decl.c.
2149 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2150 (bt_reset_linkage_2, reset_decl_linkage): New.
2151 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2152 (cp_write_global_declarations): Move condition into no_linkage_error.
2153 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2154 * semantics.c (expand_or_defer_fn_1): Factor out
2155 tentative_decl_linkage.
2156 * cp-tree.h: Adjust.
2158 * decl2.c (finish_static_data_member_decl): Diagnose static data
2159 member in unnamed class.
2160 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2163 * class.c (clone_function_decl): Call note_vague_linkage_fn for
2164 defaulted virtual dtor.
2168 * pt.c (get_underlying_template): Fix equivalence calculation.
2170 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
2173 * parser.c (function_being_declared_is_template_p): Return false when
2174 processing a template parameter list.
2175 (cp_parser_parameter_declaration_clause): Don't set
2176 auto_is_implicit_function_template_parm_p when processing a
2177 template parameter list.
2179 * parser.c (synthesize_implicit_template_parm): Inject new template
2180 argument list appropriately when a generic member function
2181 of a class template is declared out-of-line.
2184 * parser.c (cp_parser_direct_declarator): Don't save and
2185 restore num_template_parameter_lists around call to
2186 cp_parser_parameter_declaration_list.
2187 (function_being_declared_is_template_p): New predicate.
2188 (cp_parser_parameter_declaration_list): Use
2189 function_being_declared_is_template_p as predicate for
2190 inspecting current function template parameter list length
2191 rather than num_template_parameter_lists.
2193 2014-02-24 Jason Merrill <jason@redhat.com>
2196 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2197 DECL_EXPR initialize a non-class iterator.
2200 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2202 2014-02-21 Jason Merrill <jason@redhat.com>
2205 * parser.c (cp_parser_type_name): Always check dependency.
2206 (cp_parser_type_specifier_seq): Call
2207 cp_parser_parse_and_diagnose_invalid_type_name.
2210 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2213 * parser.c (cp_parser_default_argument): Clear
2214 current_class_ptr/current_class_ref like tsubst_default_argument.
2217 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2218 than current_binding_level.
2221 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2224 * parser.c (cp_parser_enum_specifier): Call
2225 check_for_bare_parameter_packs.
2228 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2232 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2233 of the partial instantiation, not the most general template.
2234 (maybe_process_partial_specialization): Reassign everything on
2238 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2239 (check_explicit_specialization): Don't clone.
2242 * pt.c (coerce_template_parms): Bail if argument packing fails.
2245 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2246 Don't get confused by a CONSTRUCTOR that already has a type.
2249 * call.c (build_array_conv): Don't crash on VLA.
2252 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2255 * lambda.c (maybe_resolve_dummy): Don't try to capture this
2256 in declaration context.
2260 * pt.c (unify): Only unify if deducible. Handle 0-length list.
2263 * parser.c (cp_parser_direct_declarator): Don't wrap a
2264 type-dependent expression in a NOP_EXPR.
2267 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2272 * parser.c (cp_parser_template_argument): Restore dereference.
2273 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2274 (process_partial_specialization): Handle deref.
2277 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
2281 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2282 implicit_template_scope upon leaving an out-of-line generic member
2283 function definition.
2285 2014-02-20 Kai Tietz <ktietz@redhat.com>
2288 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2289 valued type argument as error_mark_node.
2292 * semantics.c (finish_fname): Handle error_mark_node.
2294 2014-02-19 Jason Merrill <jason@redhat.com>
2297 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2298 spec from template context.
2300 2014-02-19 Jakub Jelinek <jakub@redhat.com>
2303 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2304 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2307 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2309 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2312 * semantics.c (ensure_literal_type_for_constexpr_object): Use
2315 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2318 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2319 During error recovery allow_non_constant may be false.
2321 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
2324 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2325 scope whenever a template parameter list has been started, independent
2326 of whether the function call operator was well-formed or not.
2329 * parser.c (cp_parser_member_declaration): Pop fully implicit template
2330 scope for generic friend declarations as well as for non-friends.
2332 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
2335 * method.c (implicitly_declare_fn): A constructor of a class with
2336 virtual base classes isn't constexpr (7.1.5p4).
2338 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2340 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2342 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2345 * parser.c (cp_parser_omp_declare_reduction): Save and free
2348 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2352 * tree.c (handle_init_priority_attribute): Call default_conversion on
2353 the attribute argument.
2355 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2358 * method.c (synthesized_method_walk): If vbases is non-null but
2359 is_empty is true, likewise don't worry about the virtual bases.
2361 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2364 * typeck2.c (process_init_constructor_record): Just skip unnamed
2367 2014-01-31 Jason Merrill <jason@redhat.com>
2370 * pt.c (mark_decl_instantiated): Call mark_needed.
2373 * decl2.c (handle_tls_init): Handle null init fn.
2376 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2378 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2381 * class.c (build_vfield_ref): Early return error_mark_node if
2382 TYPE_VFIELD (type) is null.
2383 (build_base_path): Check return value of build_vfield_ref.
2385 2014-01-31 Jason Merrill <jason@redhat.com>
2388 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2389 [ck_list]: Check for error_mark_node.
2390 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2393 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2394 during partial ordering.
2396 2014-01-31 Marek Polacek <polacek@redhat.com>
2399 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2401 2014-01-30 Jason Merrill <jason@redhat.com>
2404 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2405 (local_specializations): New macro.
2406 * pt.c (local_specializations): Remove variable.
2408 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2411 * parser.c (make_string_pack): Use double_int::from_buffer.
2413 2014-01-30 Marek Polacek <polacek@redhat.com>
2416 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2418 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2419 with input_location.
2420 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2423 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2426 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2428 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2431 * pt.c (lookup_template_class_1): Check start_enum return value
2432 for error_mark_node.
2434 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2436 * decl.c (duplicate_decls, typename_hash, typename_compare):
2437 Use TYPE_IDENTIFIER.
2438 * error.c (dump_type): Likewise.
2439 * mangle.c (dump_substitution_candidates): Likewise.
2441 2014-01-30 Jason Merrill <jason@redhat.com>
2444 * decl2.c (attributes_naming_typedef_ok): New.
2445 * cp-tree.h: Declare it.
2446 * decl.c (grokdeclarator): Check it.
2447 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2449 2014-01-29 Jason Merrill <jason@redhat.com>
2452 * call.c (add_builtin_candidate): Catch dependent types.
2455 * pt.c (expand_template_argument_pack): Correct
2456 non_default_args_count calculation.
2459 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2462 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
2463 have a friend template in a class template.
2464 * pt.c (tsubst_friend_function): Look through it.
2465 (push_template_decl_real): A friend member template is
2468 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2471 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
2474 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2477 * pt.c (instantiate_template_1): Check for error_mark_node the second
2480 2014-01-29 Jason Merrill <jason@redhat.com>
2483 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
2484 cdtor_returns_this case.
2487 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
2489 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2492 * semantics.c (finish_omp_reduction_clause): Check type for
2495 2014-01-28 Jason Merrill <jason@redhat.com>
2498 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
2499 (tsubst_copy): Use it if lookup fails.
2502 * pt.c (tsubst_function_type): Make sure we keep the same function
2506 * semantics.c (build_anon_member_initialization): Stop walking
2507 when we run out of COMPONENT_REFs.
2510 * decl.c (lookup_and_check_tag): Ignore template parameters if
2511 scope == ts_current.
2512 * pt.c (check_template_shadow): Don't complain about the injected
2515 * decl.c (duplicate_decls): Tweak.
2518 * mangle.c (write_unqualified_name): Handle operator auto.
2520 2014-01-27 Jason Merrill <jason@redhat.com>
2524 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
2525 list-initialization. A conversion to rvalue ref that involves
2526 an lvalue-rvalue conversion is bad.
2527 (convert_like_real): Give helpful error message.
2530 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
2533 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
2537 * pt.c (template_parm_to_arg): Call convert_from_reference.
2538 (tsubst_template_arg): Don't strip reference refs.
2541 * call.c (build_aggr_conv): Reject value-initialization of reference.
2545 * call.c (convert_like_real): Give helpful error about excess braces
2546 for ck_rvalue of scalar type.
2549 * call.c (reference_binding): Only elide braces if the single
2550 element is reference-related.
2553 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
2557 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
2561 * decl.c (compute_array_index_type): Don't call
2562 maybe_constant_value for a non-integral expression.
2564 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2566 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
2568 * cp-gimplify.c (cp_genericize): Likewise.
2569 * decl.c (grokfndecl): Likewise.
2570 * parser.c (cp_parser_postfix_expression): Likewise.
2571 (cp_parser_postfix_open_square_expression): Likewise.
2572 (cp_parser_direct_declarator): Likewise.
2573 (is_cilkplus_vector_p): Likewise.
2574 (cp_parser_omp_clause_name): Likewise.
2575 (cp_parser_omp_all_clauses): Likewise.
2576 * pt.c (apply_late_template_attributes): Likewise.
2577 * typeck.c (cp_build_array_ref): Likewise.
2578 (cp_build_compound_expr): Likewise.
2579 (check_return_expr): Likewise.
2581 2014-01-24 Jason Merrill <jason@redhat.com>
2584 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
2589 * typeck2.c (process_init_constructor_array): Don't create
2592 2014-01-24 Jakub Jelinek <jakub@redhat.com>
2594 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
2595 handling for RANGE_ARRAY case.
2597 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2600 * name-lookup.c (push_using_directive): Use timevar_cond_start.
2602 2014-01-23 Marek Polacek <polacek@redhat.com>
2605 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
2607 2014-01-23 Marek Polacek <polacek@redhat.com>
2610 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2613 2014-01-23 Jason Merrill <jason@redhat.com>
2616 * cp-tree.h (struct language_function): Add infinite_loop and
2618 (current_function_infinite_loop): New.
2619 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
2620 (break_maybe_infinite_loop): New.
2621 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
2622 (finish_do_stmt, finish_for_cond, finish_for_stmt)
2623 (begin_range_for_stmt): Use them.
2624 * decl.c (finish_function): Don't warn about missing return
2625 if current_function_infinite_loop.
2626 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
2627 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
2629 * call.c (build_op_delete_call): Use make_tree_vector and
2630 release_tree_vector.
2632 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2635 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
2636 nested_name_specifier.
2638 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2640 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
2641 see if there is an attribute after function decl. If so, then
2643 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
2644 enabled function late parsing.
2645 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
2646 attribute for a SIMD-enabled function.
2647 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
2648 the function is used by SIMD-enabled function (indicated by NULL
2649 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
2650 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
2651 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
2652 vectorlength clause in SIMD-enabled function and #pragma SIMD's
2653 vectorlength clause. Added a new bool parameter to differentiate
2655 (cp_parser_cilk_simd_fn_vector_attrs): New function.
2656 (is_cilkplus_vector_p): Likewise.
2657 (cp_parser_late_parsing_elem_fn_info): Likewise.
2658 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
2659 and "vectorlength" clauses when Cilk Plus is enabled.
2660 (cp_parser_omp_clause_linear): Added a new parameter of type bool
2661 and emit a sorry message when step size is a parameter.
2662 * parser.h (cp_parser::cilk_simd_fn_info): New field.
2663 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
2665 * pt.c (apply_late_template_attributes): Likewise.
2667 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2670 * semantics.c (finish_omp_reduction_clause): Reject
2671 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2673 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
2676 * parser.c (cp_parser_class_head): Push the class before parsing
2677 the base-clause, pop after it.
2679 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
2681 * decl2.c (cpp_check): Revert prototype change.
2683 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2687 * init.c (build_value_init_noctor): Don't pass error_mark_node to
2690 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2693 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
2694 only when errorcount == 0.
2696 2014-01-17 Marek Polacek <polacek@redhat.com>
2699 * cvt.c (ocp_convert): Don't segfault on non-existing
2700 ENUM_UNDERLYING_TYPE.
2702 2014-01-16 Jason Merrill <jason@redhat.com>
2705 * tree.c (bot_manip): Update the location of builtin_LINE and
2708 2014-01-14 Jason Merrill <jason@redhat.com>
2711 * typeck2.c (massage_init_elt): New.
2712 (process_init_constructor_record)
2713 (process_init_constructor_union): Use it.
2714 (process_init_constructor_array): Use it. Use RANGE_EXPR.
2715 (split_nonconstant_init_1): Handle it.
2716 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
2718 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2721 * parser.c (cp_parser_postfix_expression): Added a new if-statement
2722 and replaced an existing if-statement with else-if statement.
2723 Changed an existing error message wording to match the one from the C
2726 2014-01-08 Jason Merrill <jason@redhat.com>
2729 * class.c (abi_tag_data): Add tags field.
2730 (check_abi_tags): Initialize it.
2731 (find_abi_tags_r): Support collecting missing tags.
2732 (mark_type_abi_tags): Don't look at template args.
2733 (inherit_targ_abi_tags): New.
2734 (check_bases_and_members): Use it.
2735 * cp-tree.h (ABI_TAG_IMPLICIT): New.
2736 * mangle.c (write_abi_tags): Check it.
2738 2014-01-07 Jason Merrill <jason@redhat.com>
2741 * pt.c (num_innermost_template_parms): New.
2742 (get_underlying_template): Use it.
2745 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
2747 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2749 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
2750 the letter of 20.11.6 about Base and Derived naming the same
2751 class type modulo cv-qualifiers.
2753 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
2756 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
2757 function as unimplemented for generic lambdas with varargs.
2760 * parser.c (cp_parser_template_parameter): Early out with
2761 error_mark_node if parameter declaration was not parsed.
2764 * parser.c (cp_parser_lambda_expression): Save/reset/restore
2765 auto_is_implicit_function_template_parm_p around lambda body.
2768 * parser.c (cp_parser_init_declarator): Undo fully implicit
2769 template parameter list when declarator is not a function.
2771 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
2774 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
2776 2014-01-03 Tobias Burnus <burnus@net-b.de>
2779 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
2781 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2785 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
2786 as include_std to perform_koenig_lookup.
2787 (cp_parser_postfix_expression): Adjust.
2788 * pt.c (tsubst_copy_and_build): Likewise.
2789 * semantics.c (perform_koenig_lookup): Remove bool parameter.
2790 (omp_reduction_lookup): Adjust.
2791 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
2792 (lookup_arg_dependent): Likewise.
2793 (lookup_function_nonclass): Adjust.
2794 * name-lookup.h: Adjust declaration.
2795 * cp-tree.h: Likewise.
2797 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2800 * parser.c (cp_parser_userdef_numeric_literal): Mention
2801 -fext-numeric-literals in the message.
2803 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2806 * call.c (build_conditional_expr_1): Check the return value of
2809 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2811 * call.c (convert_like_real): Check complain.
2813 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2816 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
2819 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2821 Update copyright years
2823 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2825 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
2826 the standard form for the copyright notice.
2828 Copyright (C) 2014 Free Software Foundation, Inc.
2830 Copying and distribution of this file, with or without modification,
2831 are permitted in any medium without royalty provided the copyright
2832 notice and this notice are preserved.