1 2015-06-05 Jason Merrill <jason@redhat.com>
4 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
5 dependent even if it has a type.
7 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9 * cp-objcp-common.c: Adjust comment for
10 cxx_warn_unused_global_decl.
11 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
12 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
13 * cp-tree.h (note_mangling_alias): Protoize.
14 (cp_write_global_declarations): Remove.
15 (cxx_post_compilation_parsing_cleanups): Protoize.
16 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
18 * decl2.c (mangling_aliases): New global.
19 (build_java_method_aliases): New. Adapted from
20 collect_candidates_for_java_method_aliases.
21 (collect_candidates_for_java_method_aliases): Remove.
22 (build_java_method_aliases): Remove.
23 (generate_mangling_aliases): New.
24 (note_mangling_alias): New. Moved from mangle_decl.
25 (locus_at_end_of_parsing): New global.
26 (c_parse_final_cleanups): Rename from
27 cp_write_global_declarations.
28 Use locus_at_end_of_parsing.
29 Call generate_mangling_aliases.
30 Rename call to collect_candidates_for_java_method_aliases into
31 build_java_method_aliases.
32 Remove call to finalize_compilation_unit.
33 Move vtable handling into cxx_post_compilation_parsing_cleanups.
34 Do not call check_global_declarations or
35 emit_debug_global_declarations.
36 (cxx_post_compilation_parsing_cleanups): New.
37 * mangle.c (mangle_decl): Move code to note_mangling_alias.
38 * name-lookup.c (do_namespace_alias): Call early_global_decl.
40 2015-06-05 Nathan Sidwell <nathan@acm.org>
43 * parser.c (cp_parser_cache_defarg): Continue looking for
44 declarators when scanning a potential template argument list of an
47 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
49 * call.c: Adjust includes for restructured coretypes.h.
51 * constexpr.c: Likewise.
52 * cp-array-notation.c: Likewise.
53 * cp-gimplify.c: Likewise.
54 * cp-lang.c: Likewise.
55 * cp-objcp-common.c: Likewise.
56 * cp-tree.h: Likewise.
57 * cp-ubsan.c: Likewise.
71 * name-lookup.c: Likewise.
72 * optimize.c: Likewise.
79 * semantics.c: Likewise.
82 * typeck2.c: Likewise.
83 * vtable-class-hierarchy.c: Likewise.
85 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
89 * cp-tree.h (get_guard_cond): Adjust declaration
90 * decl.c (expand_static_init): Use atomic load acquire
91 and adjust call to get_guard_cond.
92 * decl2.c (build_atomic_load_byte): New function.
93 (get_guard_cond): Handle thread_safety.
94 (one_static_initialization_or_destruction): Adjust call to
97 2015-06-03 Jason Merrill <jason@redhat.com>
100 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
101 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
102 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
103 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
105 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
106 Paolo Carlini <paolo.carlini@oracle.com>
109 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
110 use it in the diagnostic.
111 (decay_conversion): Adjust call.
112 * semantics.c (finish_decltype_type): Likewise.
113 * call.c (resolve_args, build_new_op_1,
114 perform_implicit_conversion_flags): Adjust calls.
115 * cvt.c (ocp_convert, convert_to_void): Likewise.
116 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
118 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
120 * decl.c (check_tag_decl): Use declspecs->locations as locations in
121 error_at and warning_at calls.
123 2015-06-03 Marek Polacek <polacek@redhat.com>
126 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
127 (cp_genericize_r): Don't instrument static initializers.
128 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
130 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
132 * decl.c (start_function): Call plugin before parsing.
133 (finish_function): Call plugin after parsing.
135 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
137 * cp-tree.h (init_error): Remove declaration.
138 * error.c (scratch_pretty_printer): Rename to ...
139 (actual_pretty_printer): ... this.
140 (cxx_pp): Constify and update accordingly.
141 (init_error): Remove definition.
142 * lex.c (cxx_init): Do not call init_error.
144 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
147 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
149 2015-06-01 Jason Merrill <jason@redhat.com>
152 * decl2.c (mark_used): Don't always instantiate constexpr fns.
153 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
156 * mangle.c (attr_strcmp): New.
157 (write_CV_qualifiers_for_type): Also write out attributes that
158 affect type identity.
159 (write_type): Strip all attributes after writing qualifiers.
161 2015-05-31 Jason Merrill <jason@redhat.com>
163 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
166 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
167 with the wrong type as non-constant.
169 2015-05-27 Jason Merrill <jason@redhat.com>
171 * decl.c (check_redeclaration_exception_specification): Depend on
172 -Wsystem-headers rather than -pedantic.
174 * decl.c (warn_extern_redeclared_static): Use the location of
175 newdecl in diagnostics, not input_location.
176 (validate_constexpr_redeclaration): Likewise.
177 (check_redeclaration_no_default_args): Likewise.
178 (duplicate_decls): Likewise.
179 (check_redeclaration_exception_specification): Likewise.
180 Change second diagnostic to inform.
182 2015-05-24 Nathan Sidwell <nathan@acm.org>
185 * decl.c (build_enumerator): Don't silently convert scoped enums.
187 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
190 * mangle.c (mangle_decl): Mangle anonymous namespace types as
193 2015-05-23 Nathan Sidwell <nathan@acm.org>
196 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
198 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
200 * Make-lang.in (check_g++_parallelize): Update comment.
202 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
205 * decl.c (grokdeclarator): Use the correct location in error
206 messages about 'explicit'.
208 2015-05-22 Marek Polacek <polacek@redhat.com>
209 Edward Smith-Rowland <3dw4rd@verizon.net>
212 * cp-tree.h (build_enumerator): Update declaration.
213 * decl.c (build_enumerator): Add attributes parameter. Call
214 cplus_decl_attributes.
215 * init.c (constant_value_1): Pass tf_none to mark_used.
216 * parser.c (cp_parser_enumerator_definition): Parse attributes and
217 pass them down to build_enumerator.
218 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
219 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
221 2015-05-21 Nathan Sidwell <nathan@acm.org>
224 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
226 2015-05-21 Marek Polacek <polacek@redhat.com>
228 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
230 2015-05-20 Jason Merrill <jason@redhat.com>
232 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
233 before register_specialization.
235 * decl.c (grok_op_properties): Don't complain about size_t
236 placement delete here.
237 * call.c (second_parm_is_size_t): Split out from...
238 (non_placement_deallocation_fn_p): ...here.
239 (build_op_delete_call): Warn about size_t placement delete with
242 2015-05-19 Nathan Sidwell <nathan@acm.org>
245 * typeck.c (finish_class_member_access_expr): Diagnose failed
246 lookup of enum class member.
248 2015-05-19 Jakub Jelinek <jakub@redhat.com>
251 * parser.c (cp_parser_omp_for_loop): Don't add
252 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
253 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
254 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
257 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
259 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
262 2015-05-18 Jason Merrill <jason@redhat.com>
264 * pt.c (retrieve_specialization): Make sure our arguments have
265 gone through strip_typedefs.
267 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
268 (determine_specialization): Call coerce_template_parms.
271 * pt.c (type_unification_real): Check convertibility here.
272 (unify_one_argument): Not here.
274 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
275 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
276 [TREE_LIST]: Fix no-change case.
278 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
280 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
283 * error.c (cp_diagnostic_starter): Use diagnostic_location
285 (cp_print_error_function): Likewise.
286 (cp_printer): Replace locus pointer with accessor function.
288 2015-05-12 David Malcolm <dmalcolm@redhat.com>
290 * parser.c (cp_parser_selection_statement): Add location and
291 guard_kind arguments to calls to
292 cp_parser_implicitly_scoped_statement.
293 (cp_parser_iteration_statement): Likewise for calls to
294 cp_parser_already_scoped_statement.
295 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
296 "guard_kind" params; use them to warn for misleading
298 (cp_parser_already_scoped_statement): Likewise.
300 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
302 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
303 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
304 * semantics.c (finish_member_declaration): Likewise.
305 * method.c (lazily_declare_fn): Allways add method to main variant list.
307 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
310 * decl2.c (note_mangling_alias): Declare arguments as unused.
312 2015-05-08 Jason Merrill <jason@redhat.com>
314 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
317 2015-05-08 Jason Merrill <jason@redhat.com>
319 * decl2.c (mangling_aliases): New variable.
320 (note_mangling_alias, generate_mangling_aliases): New.
321 (cp_write_global_declarations): Call generate_mangling_aliases.
322 (generate_mangling_alias): Split out from...
323 * mangle.c (mangle_decl): ...here.
324 * cp-tree.h: Declare note_mangling_alias.
326 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
328 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
329 (build_java_method_aliases): Adapt to use create_same_body_alias
330 instead of assemble_alias. Move variable declarations to
331 definition and tidy up.
332 (cp_write_global_declarations): Call build_java_method_aliases
333 instead of collecting candidates first.
335 2015-05-07 Jason Merrill <jason@redhat.com>
338 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
339 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
340 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
341 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
342 (apply_late_template_attributes): Handle attribute pack expansion.
344 2015-05-07 Marek Polacek <polacek@redhat.com>
347 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
350 2015-05-07 Jason Merrill <jason@redhat.com>
354 * typeck2.c (digest_init_r): Fix single element list.
356 2015-05-05 Jason Merrill <jason@redhat.com>
358 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
359 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
361 (cp_genericize_data): Add try_block field.
362 (cp_genericize_tree): Initialize it.
363 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
366 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
369 * semantics.c (finish_call_expr): Check complain.
371 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
372 maybe-in-charge constructor.
374 * decl.c (start_decl): Don't push the plain VAR_DECL for a
381 * call.c (convert_like_real): Check value-initialization before
383 * typeck2.c (process_init_constructor_record): Don't set
384 CONSTRUCTOR_IS_DIRECT_INIT.
385 (process_init_constructor_array): Likewise.
386 * init.c (build_vec_init): Likewise.
388 2015-05-05 David Malcolm <dmalcolm@redhat.com>
390 * parser.c (cp_parser_asm_definition): Only test for
391 error_mark_node if "outputs" was just set. Likewise for "inputs".
393 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
394 Jakub Jelinek <jakub@redhat.com>
397 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
398 result in an actual error.
400 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
401 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
404 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
407 2015-04-30 David Malcolm <dmalcolm@redhat.com>
409 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
412 2015-04-29 Jason Merrill <jason@redhat.com>
415 * tree.c (apply_identity_attributes): Fix handling of classes.
417 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
419 * parser.c (cp_parser_oacc_enter_exit_data): Use
420 OMP_STANDALONE_CLAUSES.
422 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
425 * init.c (perform_member_init): Handle references for -Winit-self.
427 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
429 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
430 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
432 2015-04-28 Jason Merrill <jason@redhat.com>
435 * constexpr.c (cxx_eval_store_expression): Don't try to actually
436 store an empty class.
439 * constexpr.c (cxx_eval_builtin_function_call): Fix
440 __builtin_constant_p.
443 * tree.c (strip_typedefs): Add remove_attributes parm.
444 (strip_typedefs_expr): Likewise.
445 (apply_identity_attributes): New subroutine of strip_typedefs.
446 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
447 (convert_nontype_argument, unify): Likewise.
451 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
453 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
455 * class.c (layout_class_type): Remove check if
456 PCC_BITFIELD_TYPE_MATTERS is defined.
458 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
460 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
462 2015-04-24 Jason Merrill <jason@redhat.com>
465 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
467 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
468 Remove obsolete code.
471 2015-04-23 Jason Merrill <jason@redhat.com>
474 * pt.c (check_explicit_specialization): Don't
475 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
477 * decl.c (grokvardecl): Revert earlier fix.
479 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
482 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
483 suppresses the diagnostic.
485 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
487 Reject trailing return type for an operator auto().
488 * decl.c (grokdeclarator): Reject trailing return types for
489 all conversion operators, don't handle conversion operators
490 in the previous checks that deal with auto.
492 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
494 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
496 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
498 * class.c (resolve_address_of_overloaded_function, instantiate_type):
499 Rename tsubst_flags_t parameter flags -> complain.
501 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
503 * call.c (build_op_delete_call, build_over_call): Check mark_used
505 * class.c (resolve_address_of_overloaded_function): Likewise.
506 * decl.c (cxx_maybe_build_cleanup): Likewise.
507 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
508 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
509 * rtti.c (build_dynamic_cast_1): Likewise.
510 * semantics.c (process_outer_var_ref): Likewise.
511 * typeck.c (build_class_member_access_expr,
512 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
514 2015-04-15 Jason Merrill <jason@redhat.com>
516 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
517 (build_constexpr_constructor_member_initializers): Loop to find
519 * decl.c (start_preparsed_function): Clobber the object at the
520 beginning of a constructor.
522 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
523 * method.c (implicitly_declare_fn): Likewise.
524 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
526 * decl2.c (determine_visibility): Use get_template_info.
528 2015-04-15 Jason Merrill <jason@redhat.com>
529 Marek Polacek <polacek@redhat.com>
532 * lambda.c (lambda_expr_this_capture): In unevaluated context go
533 through the normal loop, just don't capture.
534 (maybe_resolve_dummy): Handle null return.
536 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
538 * call.c (enforce_access): Emit error + inform.
540 2015-04-15 Marek Polacek <polacek@redhat.com>
542 * constexpr.c (use_new_call): Remove #define.
543 (lookup_parameter_binding): Remove function.
544 (cxx_bind_parameters_in_call): Remove unused code.
545 (cxx_eval_call_expression): Likewise.
546 (cxx_eval_constant_expression): Likewise.
548 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
550 * tree.c (replace_placeholders_t): Remove unused type.
551 (replace_placeholders): Remove unused pset.
553 2015-04-14 Jason Merrill <jason@redhat.com>
555 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
558 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
561 * name-lookup.c (do_class_using_decl): Complain about specifying
562 the current class even if there are dependent bases.
564 2015-04-14 David Krauss <david_work@me.com>
567 * decl.c (grokdeclarator): Do not flag friends with deduced return.
569 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
570 Jason Merrill <jason@redhat.com>
573 * parser.c (cp_parser_class_name): Add enum_ok parameter.
574 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
575 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
578 2015-04-12 Jakub Jelinek <jakub@redhat.com>
581 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
582 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
583 the expression to the original type at the end.
585 2015-04-09 Jakub Jelinek <jakub@redhat.com>
588 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
592 * tree.c (build_cplus_array_type): Layout type before variants are
593 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
596 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
599 * lambda.c (add_capture): Use dependent_type_p for capture by
602 2015-04-02 Marek Polacek <polacek@redhat.com>
605 * constexpr.c (cxx_eval_pointer_plus_expression): Call
606 cxx_eval_constant_expression on the first operand.
608 2015-04-01 Jason Merrill <jason@redhat.com>
611 * decl.c (make_typename_type): Handle seeing a variable template.
613 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
616 * pt.c (instantiating_current_function_p): New.
617 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
618 * cp-tree.h (instantiating_current_function_p): Declare.
620 2015-04-01 Jason Merrill <jason@redhat.com>
623 * decl.c (grokvardecl): Don't call check_explicit_specialization
624 for non-template members of a class template.
626 2015-04-01 Marek Polacek <polacek@redhat.com>
629 * class.c (finish_struct): Require that the second field of a
630 user-defined initializer_list be of size type.
632 2015-03-31 Marek Polacek <polacek@redhat.com>
635 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
636 checking for constness.
638 2015-03-30 Marek Polacek <polacek@redhat.com>
641 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
642 *(&A[i] p+ j) => A[i + j] transformation here.
643 (cxx_eval_pointer_plus_expression): New function.
644 (cxx_eval_constant_expression): Use it here.
646 2015-03-27 Tobias Burnus <burnus@net-b.de>
649 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
650 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
651 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
654 2015-03-27 Marek Polacek <polacek@redhat.com>
657 * semantics.c (finish_switch_cond): If the unlowered type is not an
658 enum, use the type of the condition.
660 2015-03-27 Jason Merrill <jason@redhat.com>
663 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
666 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
669 * init.c (build_vec_init): Fix initializing aggregates
670 with empty init list.
672 2015-03-26 Jason Merrill <jason@redhat.com>
675 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
677 2015-03-25 Marek Polacek <polacek@redhat.com>
680 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
681 on an anonymous namespace.
683 2015-03-25 Marek Polacek <polacek@redhat.com>
686 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
688 2015-03-24 Jason Merrill <jason@redhat.com>
691 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
692 * parser.c (cp_parser_namespace_definition): Don't set it.
693 * name-lookup.c (handle_namespace_attrs): Check
694 DECL_NAMESPACE_ASSOCIATIONS instead.
697 * pt.c (get_mostly_instantiated_function_type): Just return the
698 type of the partially instantiated template in DECL_TI_TEMPLATE.
700 2015-03-20 Marek Polacek <polacek@redhat.com>
703 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
706 2015-03-20 Marek Polacek <polacek@redhat.com>
709 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
712 2015-03-19 Jason Merrill <jason@redhat.com>
715 Automatically propagate ABI tags to variables and functions
716 from their (return) type.
717 * class.c (check_tag): Handle variables and functions.
718 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
719 (mark_or_check_tags): Likewise.
720 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
721 (check_abi_tags): Add single argument overload for decls.
722 Handle inheriting tags for decls.
723 * mangle.c (write_mangled_name): Call it.
724 (mangle_return_type_p): Split out from write_encoding.
725 (unmangled_name_p): Split out from write_mangled_name.
726 (write_mangled_name): Ignore abi_tag on namespace.
727 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
728 * parser.c (cp_parser_namespace_definition): Set it.
729 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
730 about abi_tag attribute on non-inline namespace.
731 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
732 (handle_abi_tag_attribute): Allow tags on variables.
734 2015-03-19 Jakub Jelinek <jakub@redhat.com>
736 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
737 attribute for DECL_EXTERNAL VAR_DECLs.
739 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
742 * call.c (build_over_call): Pass the tsubst_flags_t argument to
744 * decl2.c (mark_used): Inline the require_deduced_type call and
745 guard the error call.
747 2015-03-16 Jason Merrill <jason@redhat.com>
750 * parser.c (cp_parser_template_name): Call strip_using_decl.
752 2015-03-16 Marek Polacek <polacek@redhat.com>
756 * decl.c (grokdeclarator): Allow volatile and constexpr together.
758 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
761 * decl.c (check_default_argument): Don't call
762 maybe_warn_zero_as_null_pointer_constant.
764 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
766 * cp-gimplify.c (simple_empty_class_p): New.
767 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
768 the code for empty class copies into simple_empty_class_p, and
769 adapt it to handle COMPOUND_EXPRs.
771 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
774 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
775 only if the location of newdecl doesn't match the location of olddecl.
777 2015-03-10 Jakub Jelinek <jakub@redhat.com>
780 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
783 2015-03-10 Jason Merrill <jason@redhat.com>
787 * pt.c (dependent_type_p_r): Check both class and alias template args.
789 2015-03-10 Jakub Jelinek <jakub@redhat.com>
792 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
793 before preparing arguments to warn_logical_not_parentheses.
794 Use maybe_constant_value on rhs.
796 2015-03-09 Jason Merrill <jason@redhat.com>
799 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
801 2015-03-09 Jakub Jelinek <jakub@redhat.com>
804 * parser.c (cp_parser_binary_expression): Don't warn for
805 !!x == y or !b == y where b is bool.
807 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
809 * ptree.c (cxx_print_lambda_node): New.
810 (cxx_print_xnode): Handle LAMBDA_EXPR.
812 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
815 * constexpr.c (cxx_eval_constant_expression): Remove assert in
816 RESULT_DECL handling.
818 2015-02-26 Marek Polacek <polacek@redhat.com>
821 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
822 a RETURN_EXPR if its operand is null.
824 2015-02-25 Jason Merrill <jason@redhat.com>
827 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
829 (constrain_visibility_for_template): Handle reference arguments.
832 * decl.c (start_preparsed_function): Use create_artificial_label
835 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
836 Jakub Jelinek <jakub@redhat.com>
839 * constexpr.c (check_constexpr_bind_expr_vars): Allow
840 implicit typedefs for lambda types.
842 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
845 * decl.c (lookup_and_check_tag): Use strip_using_decl.
847 2015-02-13 Jason Merrill <jason@redhat.com>
850 * pt.c (template_args_equal): Look through conversions here.
851 * tree.c (cp_tree_equal): Not here.
853 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
856 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
857 pragma_external context.
859 2015-02-13 Jason Merrill <jason@redhat.com>
862 * call.c (reference_binding): Don't look for bad conversion
865 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
868 * decl.c (make_typename_type): Pass tsubst_flags_t argument
869 to lookup_template_class.
871 2015-02-13 Jakub Jelinek <jakub@redhat.com>
874 * decl.c (start_preparsed_function): Use void_type_node instead
875 of NULL_TREE as LABEL_DECL type.
877 2015-02-12 Jason Merrill <jason@redhat.com>
880 * mangle.c (write_mangled_name): Fix test for variable template
883 * decl.c (begin_destructor_body): Condition clobber on
886 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
889 * parser.c (lookup_literal_operator): Return all candidates.
890 (cp_parser_userdef_char_literal): Simplify error handling.
891 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
892 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
893 Also give higher priority to standard string UDL operator.
895 2015-02-12 Jakub Jelinek <jakub@redhat.com>
898 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
899 * decl.c (poplevel): If functionbody, try not to create an extra
900 BLOCK for function body and use subblocks as that, if it is non-NULL
901 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
902 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
905 * except.c (check_noexcept_r): Return NULL for internal
908 2015-02-10 Jason Merrill <jason@redhat.com>
911 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
913 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
916 * method.c (use_thunk): Do not check for stdarg thunks.
918 2015-02-06 Jason Merrill <jason@redhat.com>
921 * init.c (build_vec_init): Handle default-initialized array with
922 constexpr default constructor.
924 2015-02-04 Jakub Jelinek <jakub@redhat.com>
928 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
930 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
933 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
934 for generated expressions.
936 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
939 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
942 2015-02-02 Jason Merrill <jason@redhat.com>
944 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
946 2015-01-30 Joseph Myers <joseph@codesourcery.com>
948 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
949 changed to pass input_location as first argument.
951 2015-01-29 Jakub Jelinek <jakub@redhat.com>
954 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
957 2015-01-29 Jason Merrill <jason@redhat.com>
960 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
961 erroneous return statement.
964 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
967 2015-01-27 Caroline Tice <cmtice@google.com>
969 Committing VTV Cywin/Ming patch for Patrick Wollgast
970 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
971 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
973 2015-01-27 Jason Merrill <jason@redhat.com>
976 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
977 current_function_decl.
980 * pt.c (finish_template_variable): Move from semantics.c.
981 Handle multiple template arg levels. Handle coercion here.
982 (lookup_template_variable): Not here.
984 2015-01-23 Jason Merrill <jason@redhat.com>
988 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
989 that has been completely split out.
992 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
996 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
999 2015-01-21 Jason Merrill <jason@redhat.com>
1002 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1003 constant CONSTRUCTORs.
1006 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1007 give a hard error in a template instantiation.
1009 2015-01-21 Richard Biener <rguenther@suse.de>
1012 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1013 for builtins the user declared correctly.
1015 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1018 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1019 TREE_TYPE (elt) == error_mark_node.
1021 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1023 PR tree-optimization/62053
1024 * tree.c (build_cplus_array_type): Layout type after variants are set.
1026 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1028 * cp-gimplify.c (cp_genericize_r): Call
1029 cp_ubsan_maybe_instrument_member_call for member calls.
1030 (cp_ubsan_check_member_access_r): New function.
1031 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1032 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1033 cp_ubsan_instrument_member_accesses,
1034 cp_ubsan_maybe_instrument_downcast,
1035 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1036 * cp-ubsan.c: New file.
1037 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1038 * constexpr.c (cxx_eval_call_expression): Return void_node
1040 (potential_constant_expression_1): Return true for
1041 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1042 * typeck.c (build_class_member_access_expr): Provide locus
1044 (build_static_cast_1): Instrument downcasts.
1045 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1046 add ubsan instrumentation for virtual_access.
1047 * call.c: Include internal-fn.h.
1048 (set_flags_from_callee): Handle internal calls.
1050 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1053 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1054 and function templates, declared only in the class.
1055 * decl.c (duplicate_decls): Reveal hidden friend functions or
1056 function templates, if they are redeclared outside the class.
1058 2015-01-15 Jason Merrill <jason@redhat.com>
1061 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1064 * constexpr.c (potential_constant_expression_1): Handle reference
1067 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1068 James Norris <jnorris@codesourcery.com>
1069 Cesar Philippidis <cesar@codesourcery.com>
1070 Ilmir Usmanov <i.usmanov@samsung.com>
1071 Jakub Jelinek <jakub@redhat.com>
1073 * parser.c: Include "gomp-constants.h".
1074 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1075 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1076 Use OMP_CLAUSE_SET_MAP_KIND.
1077 (cp_parser_omp_construct, cp_parser_pragma): Handle
1078 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1079 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1080 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1081 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1082 "create", "delete", "deviceptr", "host", "num_gangs",
1083 "num_workers", "present", "present_or_copy", "pcopy",
1084 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1085 "present_or_create", "pcreate", "vector_length", "wait".
1086 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1087 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1088 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1089 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1090 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1091 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1092 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1093 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1094 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1095 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1096 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1097 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1098 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1099 (cp_parser_oacc_wait): New functions.
1100 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1101 (finish_oacc_parallel): New prototypes.
1102 * semantics.c: Include "gomp-constants.h".
1103 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1104 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1105 OMP_CLAUSE_SET_MAP_KIND.
1106 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1107 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1108 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1109 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1112 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1115 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1116 self-initialization.
1118 2015-01-13 Jason Merrill <jason@redhat.com>
1122 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1123 pointer expressions.
1124 (cxx_eval_increment_expression): Likewise.
1127 * pt.c (coerce_template_parameter_pack): Return NULL for a
1128 zero-length fixed parameter pack with a pack expansion arg.
1131 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1133 2015-01-12 Jason Merrill <jason@redhat.com>
1136 * constexpr.c (cxx_eval_call_expression): A call to a void
1137 function doesn't need to return a value.
1139 2015-01-09 Michael Collison <michael.collison@linaro.org>
1141 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1142 input.h, alias.h, symtab.h, options.h, fold-const.h,
1143 wide-int.h, and inchash.h due to flattening of tree.h.
1145 * constexpr.c: Ditto.
1146 * cp-array-notation.c: Ditto.
1147 * cp-gimplify.c: Ditto.
1149 * cp-objcp-common.c: Ditto.
1162 * name-lookup.c: Ditto.
1163 * optimize.c: Ditto.
1170 * semantics.c: Ditto.
1175 2015-01-08 Jason Merrill <jason@redhat.com>
1177 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1178 * decl.c (compute_array_index_type): Likewise.
1179 * init.c (build_vec_init): Likewise.
1180 * typeck.c (cp_build_binary_op): Likewise.
1182 2015-01-08 Jason Merrill <jason@redhat.com>
1184 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1185 whether an initializer-list is too big for a VLA.
1186 (throw_bad_array_length): Remove.
1187 * cp-tree.h: Remove prototype.
1189 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1192 * decl.c (grokfndecl): Add bool parameter.
1193 (grokdeclarator): Adjust calls.
1194 (start_decl): Don't set DECL_DELETED_FN here.
1196 2015-01-06 Jason Merrill <jason@redhat.com>
1198 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1202 * pt.c (type_dependent_expression_p): Handle variable templates.
1203 * constexpr.c (potential_constant_expression_1): Use it.
1206 * semantics.c (finish_offsetof): Handle templates here.
1207 * parser.c (cp_parser_builtin_offsetof): Not here.
1210 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1213 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1216 * class.c (check_field_decls): Make copy assignment operators
1217 complex only in c++98 mode.
1219 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1222 * class.c (check_for_override): Warn when a virtual function is an
1223 override not marked override.
1225 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1227 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1229 (get_basefndecls): Adjust.
1231 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1233 Update copyright years.
1235 2015-01-05 Marek Polacek <polacek@redhat.com>
1238 * typeck.c (cp_build_array_ref): Pass loc down to
1239 warn_array_subscript_with_type_char.
1242 Copyright (C) 2015 Free Software Foundation, Inc.
1244 Copying and distribution of this file, with or without modification,
1245 are permitted in any medium without royalty provided the copyright
1246 notice and this notice are preserved.