1 2015-04-22 Release Manager
5 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
9 2015-04-12 Jakub Jelinek <jakub@redhat.com>
12 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
13 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
14 the expression to the original type at the end.
16 2015-04-09 Jakub Jelinek <jakub@redhat.com>
19 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
23 * tree.c (build_cplus_array_type): Layout type before variants are
24 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
27 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
30 * lambda.c (add_capture): Use dependent_type_p for capture by
33 2015-04-02 Marek Polacek <polacek@redhat.com>
36 * constexpr.c (cxx_eval_pointer_plus_expression): Call
37 cxx_eval_constant_expression on the first operand.
39 2015-04-01 Jason Merrill <jason@redhat.com>
42 * decl.c (make_typename_type): Handle seeing a variable template.
44 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
47 * pt.c (instantiating_current_function_p): New.
48 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
49 * cp-tree.h (instantiating_current_function_p): Declare.
51 2015-04-01 Jason Merrill <jason@redhat.com>
54 * decl.c (grokvardecl): Don't call check_explicit_specialization
55 for non-template members of a class template.
57 2015-04-01 Marek Polacek <polacek@redhat.com>
60 * class.c (finish_struct): Require that the second field of a
61 user-defined initializer_list be of size type.
63 2015-03-31 Marek Polacek <polacek@redhat.com>
66 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
67 checking for constness.
69 2015-03-30 Marek Polacek <polacek@redhat.com>
72 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
73 *(&A[i] p+ j) => A[i + j] transformation here.
74 (cxx_eval_pointer_plus_expression): New function.
75 (cxx_eval_constant_expression): Use it here.
77 2015-03-27 Tobias Burnus <burnus@net-b.de>
80 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
81 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
82 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
85 2015-03-27 Marek Polacek <polacek@redhat.com>
88 * semantics.c (finish_switch_cond): If the unlowered type is not an
89 enum, use the type of the condition.
91 2015-03-27 Jason Merrill <jason@redhat.com>
94 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
97 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
100 * init.c (build_vec_init): Fix initializing aggregates
101 with empty init list.
103 2015-03-26 Jason Merrill <jason@redhat.com>
106 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
108 2015-03-25 Marek Polacek <polacek@redhat.com>
111 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
112 on an anonymous namespace.
114 2015-03-25 Marek Polacek <polacek@redhat.com>
117 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
119 2015-03-24 Jason Merrill <jason@redhat.com>
122 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
123 * parser.c (cp_parser_namespace_definition): Don't set it.
124 * name-lookup.c (handle_namespace_attrs): Check
125 DECL_NAMESPACE_ASSOCIATIONS instead.
128 * pt.c (get_mostly_instantiated_function_type): Just return the
129 type of the partially instantiated template in DECL_TI_TEMPLATE.
131 2015-03-20 Marek Polacek <polacek@redhat.com>
134 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
137 2015-03-20 Marek Polacek <polacek@redhat.com>
140 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
143 2015-03-19 Jason Merrill <jason@redhat.com>
146 Automatically propagate ABI tags to variables and functions
147 from their (return) type.
148 * class.c (check_tag): Handle variables and functions.
149 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
150 (mark_or_check_tags): Likewise.
151 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
152 (check_abi_tags): Add single argument overload for decls.
153 Handle inheriting tags for decls.
154 * mangle.c (write_mangled_name): Call it.
155 (mangle_return_type_p): Split out from write_encoding.
156 (unmangled_name_p): Split out from write_mangled_name.
157 (write_mangled_name): Ignore abi_tag on namespace.
158 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
159 * parser.c (cp_parser_namespace_definition): Set it.
160 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
161 about abi_tag attribute on non-inline namespace.
162 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
163 (handle_abi_tag_attribute): Allow tags on variables.
165 2015-03-19 Jakub Jelinek <jakub@redhat.com>
167 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
168 attribute for DECL_EXTERNAL VAR_DECLs.
170 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
173 * call.c (build_over_call): Pass the tsubst_flags_t argument to
175 * decl2.c (mark_used): Inline the require_deduced_type call and
176 guard the error call.
178 2015-03-16 Jason Merrill <jason@redhat.com>
181 * parser.c (cp_parser_template_name): Call strip_using_decl.
183 2015-03-16 Marek Polacek <polacek@redhat.com>
187 * decl.c (grokdeclarator): Allow volatile and constexpr together.
189 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
192 * decl.c (check_default_argument): Don't call
193 maybe_warn_zero_as_null_pointer_constant.
195 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
197 * cp-gimplify.c (simple_empty_class_p): New.
198 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
199 the code for empty class copies into simple_empty_class_p, and
200 adapt it to handle COMPOUND_EXPRs.
202 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
205 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
206 only if the location of newdecl doesn't match the location of olddecl.
208 2015-03-10 Jakub Jelinek <jakub@redhat.com>
211 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
214 2015-03-10 Jason Merrill <jason@redhat.com>
218 * pt.c (dependent_type_p_r): Check both class and alias template args.
220 2015-03-10 Jakub Jelinek <jakub@redhat.com>
223 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
224 before preparing arguments to warn_logical_not_parentheses.
225 Use maybe_constant_value on rhs.
227 2015-03-09 Jason Merrill <jason@redhat.com>
230 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
232 2015-03-09 Jakub Jelinek <jakub@redhat.com>
235 * parser.c (cp_parser_binary_expression): Don't warn for
236 !!x == y or !b == y where b is bool.
238 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
240 * ptree.c (cxx_print_lambda_node): New.
241 (cxx_print_xnode): Handle LAMBDA_EXPR.
243 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
246 * constexpr.c (cxx_eval_constant_expression): Remove assert in
247 RESULT_DECL handling.
249 2015-02-26 Marek Polacek <polacek@redhat.com>
252 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
253 a RETURN_EXPR if its operand is null.
255 2015-02-25 Jason Merrill <jason@redhat.com>
258 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
260 (constrain_visibility_for_template): Handle reference arguments.
263 * decl.c (start_preparsed_function): Use create_artificial_label
266 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
267 Jakub Jelinek <jakub@redhat.com>
270 * constexpr.c (check_constexpr_bind_expr_vars): Allow
271 implicit typedefs for lambda types.
273 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
276 * decl.c (lookup_and_check_tag): Use strip_using_decl.
278 2015-02-13 Jason Merrill <jason@redhat.com>
281 * pt.c (template_args_equal): Look through conversions here.
282 * tree.c (cp_tree_equal): Not here.
284 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
287 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
288 pragma_external context.
290 2015-02-13 Jason Merrill <jason@redhat.com>
293 * call.c (reference_binding): Don't look for bad conversion
296 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
299 * decl.c (make_typename_type): Pass tsubst_flags_t argument
300 to lookup_template_class.
302 2015-02-13 Jakub Jelinek <jakub@redhat.com>
305 * decl.c (start_preparsed_function): Use void_type_node instead
306 of NULL_TREE as LABEL_DECL type.
308 2015-02-12 Jason Merrill <jason@redhat.com>
311 * mangle.c (write_mangled_name): Fix test for variable template
314 * decl.c (begin_destructor_body): Condition clobber on
317 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
320 * parser.c (lookup_literal_operator): Return all candidates.
321 (cp_parser_userdef_char_literal): Simplify error handling.
322 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
323 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
324 Also give higher priority to standard string UDL operator.
326 2015-02-12 Jakub Jelinek <jakub@redhat.com>
329 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
330 * decl.c (poplevel): If functionbody, try not to create an extra
331 BLOCK for function body and use subblocks as that, if it is non-NULL
332 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
333 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
336 * except.c (check_noexcept_r): Return NULL for internal
339 2015-02-10 Jason Merrill <jason@redhat.com>
342 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
344 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
347 * method.c (use_thunk): Do not check for stdarg thunks.
349 2015-02-06 Jason Merrill <jason@redhat.com>
352 * init.c (build_vec_init): Handle default-initialized array with
353 constexpr default constructor.
355 2015-02-04 Jakub Jelinek <jakub@redhat.com>
359 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
361 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
364 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
365 for generated expressions.
367 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
370 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
373 2015-02-02 Jason Merrill <jason@redhat.com>
375 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
377 2015-01-30 Joseph Myers <joseph@codesourcery.com>
379 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
380 changed to pass input_location as first argument.
382 2015-01-29 Jakub Jelinek <jakub@redhat.com>
385 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
388 2015-01-29 Jason Merrill <jason@redhat.com>
391 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
392 erroneous return statement.
395 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
398 2015-01-27 Caroline Tice <cmtice@google.com>
400 Committing VTV Cywin/Ming patch for Patrick Wollgast
401 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
402 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
404 2015-01-27 Jason Merrill <jason@redhat.com>
407 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
408 current_function_decl.
411 * pt.c (finish_template_variable): Move from semantics.c.
412 Handle multiple template arg levels. Handle coercion here.
413 (lookup_template_variable): Not here.
415 2015-01-23 Jason Merrill <jason@redhat.com>
419 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
420 that has been completely split out.
423 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
427 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
430 2015-01-21 Jason Merrill <jason@redhat.com>
433 * constexpr.c (cxx_eval_constant_expression): Only shortcut
434 constant CONSTRUCTORs.
437 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
438 give a hard error in a template instantiation.
440 2015-01-21 Richard Biener <rguenther@suse.de>
443 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
444 for builtins the user declared correctly.
446 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
449 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
450 TREE_TYPE (elt) == error_mark_node.
452 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
454 PR tree-optimization/62053
455 * tree.c (build_cplus_array_type): Layout type after variants are set.
457 2015-01-15 Jakub Jelinek <jakub@redhat.com>
459 * cp-gimplify.c (cp_genericize_r): Call
460 cp_ubsan_maybe_instrument_member_call for member calls.
461 (cp_ubsan_check_member_access_r): New function.
462 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
463 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
464 cp_ubsan_instrument_member_accesses,
465 cp_ubsan_maybe_instrument_downcast,
466 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
467 * cp-ubsan.c: New file.
468 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
469 * constexpr.c (cxx_eval_call_expression): Return void_node
471 (potential_constant_expression_1): Return true for
472 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
473 * typeck.c (build_class_member_access_expr): Provide locus
475 (build_static_cast_1): Instrument downcasts.
476 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
477 add ubsan instrumentation for virtual_access.
478 * call.c: Include internal-fn.h.
479 (set_flags_from_callee): Handle internal calls.
481 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
484 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
485 and function templates, declared only in the class.
486 * decl.c (duplicate_decls): Reveal hidden friend functions or
487 function templates, if they are redeclared outside the class.
489 2015-01-15 Jason Merrill <jason@redhat.com>
492 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
495 * constexpr.c (potential_constant_expression_1): Handle reference
498 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
499 James Norris <jnorris@codesourcery.com>
500 Cesar Philippidis <cesar@codesourcery.com>
501 Ilmir Usmanov <i.usmanov@samsung.com>
502 Jakub Jelinek <jakub@redhat.com>
504 * parser.c: Include "gomp-constants.h".
505 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
506 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
507 Use OMP_CLAUSE_SET_MAP_KIND.
508 (cp_parser_omp_construct, cp_parser_pragma): Handle
509 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
510 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
511 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
512 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
513 "create", "delete", "deviceptr", "host", "num_gangs",
514 "num_workers", "present", "present_or_copy", "pcopy",
515 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
516 "present_or_create", "pcreate", "vector_length", "wait".
517 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
518 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
519 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
520 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
521 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
522 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
523 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
524 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
525 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
526 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
527 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
528 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
529 (cp_parser_oacc_parallel, cp_parser_oacc_update)
530 (cp_parser_oacc_wait): New functions.
531 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
532 (finish_oacc_parallel): New prototypes.
533 * semantics.c: Include "gomp-constants.h".
534 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
535 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
536 OMP_CLAUSE_SET_MAP_KIND.
537 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
538 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
539 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
540 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
543 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
546 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
549 2015-01-13 Jason Merrill <jason@redhat.com>
553 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
555 (cxx_eval_increment_expression): Likewise.
558 * pt.c (coerce_template_parameter_pack): Return NULL for a
559 zero-length fixed parameter pack with a pack expansion arg.
562 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
564 2015-01-12 Jason Merrill <jason@redhat.com>
567 * constexpr.c (cxx_eval_call_expression): A call to a void
568 function doesn't need to return a value.
570 2015-01-09 Michael Collison <michael.collison@linaro.org>
572 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
573 input.h, alias.h, symtab.h, options.h, fold-const.h,
574 wide-int.h, and inchash.h due to flattening of tree.h.
576 * constexpr.c: Ditto.
577 * cp-array-notation.c: Ditto.
578 * cp-gimplify.c: Ditto.
580 * cp-objcp-common.c: Ditto.
593 * name-lookup.c: Ditto.
601 * semantics.c: Ditto.
606 2015-01-08 Jason Merrill <jason@redhat.com>
608 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
609 * decl.c (compute_array_index_type): Likewise.
610 * init.c (build_vec_init): Likewise.
611 * typeck.c (cp_build_binary_op): Likewise.
613 2015-01-08 Jason Merrill <jason@redhat.com>
615 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
616 whether an initializer-list is too big for a VLA.
617 (throw_bad_array_length): Remove.
618 * cp-tree.h: Remove prototype.
620 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
623 * decl.c (grokfndecl): Add bool parameter.
624 (grokdeclarator): Adjust calls.
625 (start_decl): Don't set DECL_DELETED_FN here.
627 2015-01-06 Jason Merrill <jason@redhat.com>
629 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
633 * pt.c (type_dependent_expression_p): Handle variable templates.
634 * constexpr.c (potential_constant_expression_1): Use it.
637 * semantics.c (finish_offsetof): Handle templates here.
638 * parser.c (cp_parser_builtin_offsetof): Not here.
641 * semantics.c (process_outer_var_ref): Diagnose lambda in local
644 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
647 * class.c (check_field_decls): Make copy assignment operators
648 complex only in c++98 mode.
650 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
653 * class.c (check_for_override): Warn when a virtual function is an
654 override not marked override.
656 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
658 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
660 (get_basefndecls): Adjust.
662 2015-01-05 Jakub Jelinek <jakub@redhat.com>
664 Update copyright years.
666 2015-01-05 Marek Polacek <polacek@redhat.com>
669 * typeck.c (cp_build_array_ref): Pass loc down to
670 warn_array_subscript_with_type_char.
673 Copyright (C) 2015 Free Software Foundation, Inc.
675 Copying and distribution of this file, with or without modification,
676 are permitted in any medium without royalty provided the copyright
677 notice and this notice are preserved.