1 2015-03-27 Marek Polacek <polacek@redhat.com>
4 * semantics.c (finish_switch_cond): If the unlowered type is not an
5 enum, use the type of the condition.
7 2015-03-27 Jason Merrill <jason@redhat.com>
10 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
13 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
16 * init.c (build_vec_init): Fix initializing aggregates
19 2015-03-26 Jason Merrill <jason@redhat.com>
22 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
24 2015-03-25 Marek Polacek <polacek@redhat.com>
27 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
28 on an anonymous namespace.
30 2015-03-25 Marek Polacek <polacek@redhat.com>
33 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
35 2015-03-24 Jason Merrill <jason@redhat.com>
38 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
39 * parser.c (cp_parser_namespace_definition): Don't set it.
40 * name-lookup.c (handle_namespace_attrs): Check
41 DECL_NAMESPACE_ASSOCIATIONS instead.
44 * pt.c (get_mostly_instantiated_function_type): Just return the
45 type of the partially instantiated template in DECL_TI_TEMPLATE.
47 2015-03-20 Marek Polacek <polacek@redhat.com>
50 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
53 2015-03-20 Marek Polacek <polacek@redhat.com>
56 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
59 2015-03-19 Jason Merrill <jason@redhat.com>
62 Automatically propagate ABI tags to variables and functions
63 from their (return) type.
64 * class.c (check_tag): Handle variables and functions.
65 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
66 (mark_or_check_tags): Likewise.
67 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
68 (check_abi_tags): Add single argument overload for decls.
69 Handle inheriting tags for decls.
70 * mangle.c (write_mangled_name): Call it.
71 (mangle_return_type_p): Split out from write_encoding.
72 (unmangled_name_p): Split out from write_mangled_name.
73 (write_mangled_name): Ignore abi_tag on namespace.
74 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
75 * parser.c (cp_parser_namespace_definition): Set it.
76 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
77 about abi_tag attribute on non-inline namespace.
78 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
79 (handle_abi_tag_attribute): Allow tags on variables.
81 2015-03-19 Jakub Jelinek <jakub@redhat.com>
83 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
84 attribute for DECL_EXTERNAL VAR_DECLs.
86 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
89 * call.c (build_over_call): Pass the tsubst_flags_t argument to
91 * decl2.c (mark_used): Inline the require_deduced_type call and
94 2015-03-16 Jason Merrill <jason@redhat.com>
97 * parser.c (cp_parser_template_name): Call strip_using_decl.
99 2015-03-16 Marek Polacek <polacek@redhat.com>
103 * decl.c (grokdeclarator): Allow volatile and constexpr together.
105 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
108 * decl.c (check_default_argument): Don't call
109 maybe_warn_zero_as_null_pointer_constant.
111 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
113 * cp-gimplify.c (simple_empty_class_p): New.
114 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
115 the code for empty class copies into simple_empty_class_p, and
116 adapt it to handle COMPOUND_EXPRs.
118 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
121 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
122 only if the location of newdecl doesn't match the location of olddecl.
124 2015-03-10 Jakub Jelinek <jakub@redhat.com>
127 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
130 2015-03-10 Jason Merrill <jason@redhat.com>
134 * pt.c (dependent_type_p_r): Check both class and alias template args.
136 2015-03-10 Jakub Jelinek <jakub@redhat.com>
139 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
140 before preparing arguments to warn_logical_not_parentheses.
141 Use maybe_constant_value on rhs.
143 2015-03-09 Jason Merrill <jason@redhat.com>
146 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
148 2015-03-09 Jakub Jelinek <jakub@redhat.com>
151 * parser.c (cp_parser_binary_expression): Don't warn for
152 !!x == y or !b == y where b is bool.
154 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
156 * ptree.c (cxx_print_lambda_node): New.
157 (cxx_print_xnode): Handle LAMBDA_EXPR.
159 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
162 * constexpr.c (cxx_eval_constant_expression): Remove assert in
163 RESULT_DECL handling.
165 2015-02-26 Marek Polacek <polacek@redhat.com>
168 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
169 a RETURN_EXPR if its operand is null.
171 2015-02-25 Jason Merrill <jason@redhat.com>
174 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
176 (constrain_visibility_for_template): Handle reference arguments.
179 * decl.c (start_preparsed_function): Use create_artificial_label
182 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
183 Jakub Jelinek <jakub@redhat.com>
186 * constexpr.c (check_constexpr_bind_expr_vars): Allow
187 implicit typedefs for lambda types.
189 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
192 * decl.c (lookup_and_check_tag): Use strip_using_decl.
194 2015-02-13 Jason Merrill <jason@redhat.com>
197 * pt.c (template_args_equal): Look through conversions here.
198 * tree.c (cp_tree_equal): Not here.
200 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
203 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
204 pragma_external context.
206 2015-02-13 Jason Merrill <jason@redhat.com>
209 * call.c (reference_binding): Don't look for bad conversion
212 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
215 * decl.c (make_typename_type): Pass tsubst_flags_t argument
216 to lookup_template_class.
218 2015-02-13 Jakub Jelinek <jakub@redhat.com>
221 * decl.c (start_preparsed_function): Use void_type_node instead
222 of NULL_TREE as LABEL_DECL type.
224 2015-02-12 Jason Merrill <jason@redhat.com>
227 * mangle.c (write_mangled_name): Fix test for variable template
230 * decl.c (begin_destructor_body): Condition clobber on
233 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
236 * parser.c (lookup_literal_operator): Return all candidates.
237 (cp_parser_userdef_char_literal): Simplify error handling.
238 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
239 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
240 Also give higher priority to standard string UDL operator.
242 2015-02-12 Jakub Jelinek <jakub@redhat.com>
245 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
246 * decl.c (poplevel): If functionbody, try not to create an extra
247 BLOCK for function body and use subblocks as that, if it is non-NULL
248 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
249 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
252 * except.c (check_noexcept_r): Return NULL for internal
255 2015-02-10 Jason Merrill <jason@redhat.com>
258 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
260 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
263 * method.c (use_thunk): Do not check for stdarg thunks.
265 2015-02-06 Jason Merrill <jason@redhat.com>
268 * init.c (build_vec_init): Handle default-initialized array with
269 constexpr default constructor.
271 2015-02-04 Jakub Jelinek <jakub@redhat.com>
275 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
277 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
280 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
281 for generated expressions.
283 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
286 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
289 2015-02-02 Jason Merrill <jason@redhat.com>
291 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
293 2015-01-30 Joseph Myers <joseph@codesourcery.com>
295 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
296 changed to pass input_location as first argument.
298 2015-01-29 Jakub Jelinek <jakub@redhat.com>
301 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
304 2015-01-29 Jason Merrill <jason@redhat.com>
307 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
308 erroneous return statement.
311 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
314 2015-01-27 Caroline Tice <cmtice@google.com>
316 Committing VTV Cywin/Ming patch for Patrick Wollgast
317 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
318 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
320 2015-01-27 Jason Merrill <jason@redhat.com>
323 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
324 current_function_decl.
327 * pt.c (finish_template_variable): Move from semantics.c.
328 Handle multiple template arg levels. Handle coercion here.
329 (lookup_template_variable): Not here.
331 2015-01-23 Jason Merrill <jason@redhat.com>
335 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
336 that has been completely split out.
339 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
343 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
346 2015-01-21 Jason Merrill <jason@redhat.com>
349 * constexpr.c (cxx_eval_constant_expression): Only shortcut
350 constant CONSTRUCTORs.
353 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
354 give a hard error in a template instantiation.
356 2015-01-21 Richard Biener <rguenther@suse.de>
359 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
360 for builtins the user declared correctly.
362 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
365 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
366 TREE_TYPE (elt) == error_mark_node.
368 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
370 PR tree-optimization/62053
371 * tree.c (build_cplus_array_type): Layout type after variants are set.
373 2015-01-15 Jakub Jelinek <jakub@redhat.com>
375 * cp-gimplify.c (cp_genericize_r): Call
376 cp_ubsan_maybe_instrument_member_call for member calls.
377 (cp_ubsan_check_member_access_r): New function.
378 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
379 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
380 cp_ubsan_instrument_member_accesses,
381 cp_ubsan_maybe_instrument_downcast,
382 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
383 * cp-ubsan.c: New file.
384 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
385 * constexpr.c (cxx_eval_call_expression): Return void_node
387 (potential_constant_expression_1): Return true for
388 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
389 * typeck.c (build_class_member_access_expr): Provide locus
391 (build_static_cast_1): Instrument downcasts.
392 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
393 add ubsan instrumentation for virtual_access.
394 * call.c: Include internal-fn.h.
395 (set_flags_from_callee): Handle internal calls.
397 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
400 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
401 and function templates, declared only in the class.
402 * decl.c (duplicate_decls): Reveal hidden friend functions or
403 function templates, if they are redeclared outside the class.
405 2015-01-15 Jason Merrill <jason@redhat.com>
408 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
411 * constexpr.c (potential_constant_expression_1): Handle reference
414 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
415 James Norris <jnorris@codesourcery.com>
416 Cesar Philippidis <cesar@codesourcery.com>
417 Ilmir Usmanov <i.usmanov@samsung.com>
418 Jakub Jelinek <jakub@redhat.com>
420 * parser.c: Include "gomp-constants.h".
421 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
422 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
423 Use OMP_CLAUSE_SET_MAP_KIND.
424 (cp_parser_omp_construct, cp_parser_pragma): Handle
425 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
426 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
427 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
428 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
429 "create", "delete", "deviceptr", "host", "num_gangs",
430 "num_workers", "present", "present_or_copy", "pcopy",
431 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
432 "present_or_create", "pcreate", "vector_length", "wait".
433 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
434 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
435 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
436 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
437 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
438 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
439 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
440 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
441 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
442 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
443 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
444 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
445 (cp_parser_oacc_parallel, cp_parser_oacc_update)
446 (cp_parser_oacc_wait): New functions.
447 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
448 (finish_oacc_parallel): New prototypes.
449 * semantics.c: Include "gomp-constants.h".
450 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
451 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
452 OMP_CLAUSE_SET_MAP_KIND.
453 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
454 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
455 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
456 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
459 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
462 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
465 2015-01-13 Jason Merrill <jason@redhat.com>
469 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
471 (cxx_eval_increment_expression): Likewise.
474 * pt.c (coerce_template_parameter_pack): Return NULL for a
475 zero-length fixed parameter pack with a pack expansion arg.
478 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
480 2015-01-12 Jason Merrill <jason@redhat.com>
483 * constexpr.c (cxx_eval_call_expression): A call to a void
484 function doesn't need to return a value.
486 2015-01-09 Michael Collison <michael.collison@linaro.org>
488 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
489 input.h, alias.h, symtab.h, options.h, fold-const.h,
490 wide-int.h, and inchash.h due to flattening of tree.h.
492 * constexpr.c: Ditto.
493 * cp-array-notation.c: Ditto.
494 * cp-gimplify.c: Ditto.
496 * cp-objcp-common.c: Ditto.
509 * name-lookup.c: Ditto.
517 * semantics.c: Ditto.
522 2015-01-08 Jason Merrill <jason@redhat.com>
524 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
525 * decl.c (compute_array_index_type): Likewise.
526 * init.c (build_vec_init): Likewise.
527 * typeck.c (cp_build_binary_op): Likewise.
529 2015-01-08 Jason Merrill <jason@redhat.com>
531 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
532 whether an initializer-list is too big for a VLA.
533 (throw_bad_array_length): Remove.
534 * cp-tree.h: Remove prototype.
536 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
539 * decl.c (grokfndecl): Add bool parameter.
540 (grokdeclarator): Adjust calls.
541 (start_decl): Don't set DECL_DELETED_FN here.
543 2015-01-06 Jason Merrill <jason@redhat.com>
545 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
549 * pt.c (type_dependent_expression_p): Handle variable templates.
550 * constexpr.c (potential_constant_expression_1): Use it.
553 * semantics.c (finish_offsetof): Handle templates here.
554 * parser.c (cp_parser_builtin_offsetof): Not here.
557 * semantics.c (process_outer_var_ref): Diagnose lambda in local
560 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
563 * class.c (check_field_decls): Make copy assignment operators
564 complex only in c++98 mode.
566 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
569 * class.c (check_for_override): Warn when a virtual function is an
570 override not marked override.
572 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
574 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
576 (get_basefndecls): Adjust.
578 2015-01-05 Jakub Jelinek <jakub@redhat.com>
580 Update copyright years.
582 2015-01-05 Marek Polacek <polacek@redhat.com>
585 * typeck.c (cp_build_array_ref): Pass loc down to
586 warn_array_subscript_with_type_char.
589 Copyright (C) 2015 Free Software Foundation, Inc.
591 Copying and distribution of this file, with or without modification,
592 are permitted in any medium without royalty provided the copyright
593 notice and this notice are preserved.