1 2015-03-25 Marek Polacek <polacek@redhat.com>
4 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
5 on an anonymous namespace.
7 2015-03-25 Marek Polacek <polacek@redhat.com>
10 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
12 2015-03-24 Jason Merrill <jason@redhat.com>
15 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
16 * parser.c (cp_parser_namespace_definition): Don't set it.
17 * name-lookup.c (handle_namespace_attrs): Check
18 DECL_NAMESPACE_ASSOCIATIONS instead.
21 * pt.c (get_mostly_instantiated_function_type): Just return the
22 type of the partially instantiated template in DECL_TI_TEMPLATE.
24 2015-03-20 Marek Polacek <polacek@redhat.com>
27 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
30 2015-03-20 Marek Polacek <polacek@redhat.com>
33 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
36 2015-03-19 Jason Merrill <jason@redhat.com>
39 Automatically propagate ABI tags to variables and functions
40 from their (return) type.
41 * class.c (check_tag): Handle variables and functions.
42 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
43 (mark_or_check_tags): Likewise.
44 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
45 (check_abi_tags): Add single argument overload for decls.
46 Handle inheriting tags for decls.
47 * mangle.c (write_mangled_name): Call it.
48 (mangle_return_type_p): Split out from write_encoding.
49 (unmangled_name_p): Split out from write_mangled_name.
50 (write_mangled_name): Ignore abi_tag on namespace.
51 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
52 * parser.c (cp_parser_namespace_definition): Set it.
53 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
54 about abi_tag attribute on non-inline namespace.
55 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
56 (handle_abi_tag_attribute): Allow tags on variables.
58 2015-03-19 Jakub Jelinek <jakub@redhat.com>
60 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
61 attribute for DECL_EXTERNAL VAR_DECLs.
63 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
66 * call.c (build_over_call): Pass the tsubst_flags_t argument to
68 * decl2.c (mark_used): Inline the require_deduced_type call and
71 2015-03-16 Jason Merrill <jason@redhat.com>
74 * parser.c (cp_parser_template_name): Call strip_using_decl.
76 2015-03-16 Marek Polacek <polacek@redhat.com>
80 * decl.c (grokdeclarator): Allow volatile and constexpr together.
82 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
85 * decl.c (check_default_argument): Don't call
86 maybe_warn_zero_as_null_pointer_constant.
88 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
90 * cp-gimplify.c (simple_empty_class_p): New.
91 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
92 the code for empty class copies into simple_empty_class_p, and
93 adapt it to handle COMPOUND_EXPRs.
95 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
98 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
99 only if the location of newdecl doesn't match the location of olddecl.
101 2015-03-10 Jakub Jelinek <jakub@redhat.com>
104 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
107 2015-03-10 Jason Merrill <jason@redhat.com>
111 * pt.c (dependent_type_p_r): Check both class and alias template args.
113 2015-03-10 Jakub Jelinek <jakub@redhat.com>
116 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
117 before preparing arguments to warn_logical_not_parentheses.
118 Use maybe_constant_value on rhs.
120 2015-03-09 Jason Merrill <jason@redhat.com>
123 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
125 2015-03-09 Jakub Jelinek <jakub@redhat.com>
128 * parser.c (cp_parser_binary_expression): Don't warn for
129 !!x == y or !b == y where b is bool.
131 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
133 * ptree.c (cxx_print_lambda_node): New.
134 (cxx_print_xnode): Handle LAMBDA_EXPR.
136 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
139 * constexpr.c (cxx_eval_constant_expression): Remove assert in
140 RESULT_DECL handling.
142 2015-02-26 Marek Polacek <polacek@redhat.com>
145 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
146 a RETURN_EXPR if its operand is null.
148 2015-02-25 Jason Merrill <jason@redhat.com>
151 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
153 (constrain_visibility_for_template): Handle reference arguments.
156 * decl.c (start_preparsed_function): Use create_artificial_label
159 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
160 Jakub Jelinek <jakub@redhat.com>
163 * constexpr.c (check_constexpr_bind_expr_vars): Allow
164 implicit typedefs for lambda types.
166 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
169 * decl.c (lookup_and_check_tag): Use strip_using_decl.
171 2015-02-13 Jason Merrill <jason@redhat.com>
174 * pt.c (template_args_equal): Look through conversions here.
175 * tree.c (cp_tree_equal): Not here.
177 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
180 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
181 pragma_external context.
183 2015-02-13 Jason Merrill <jason@redhat.com>
186 * call.c (reference_binding): Don't look for bad conversion
189 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
192 * decl.c (make_typename_type): Pass tsubst_flags_t argument
193 to lookup_template_class.
195 2015-02-13 Jakub Jelinek <jakub@redhat.com>
198 * decl.c (start_preparsed_function): Use void_type_node instead
199 of NULL_TREE as LABEL_DECL type.
201 2015-02-12 Jason Merrill <jason@redhat.com>
204 * mangle.c (write_mangled_name): Fix test for variable template
207 * decl.c (begin_destructor_body): Condition clobber on
210 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
213 * parser.c (lookup_literal_operator): Return all candidates.
214 (cp_parser_userdef_char_literal): Simplify error handling.
215 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
216 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
217 Also give higher priority to standard string UDL operator.
219 2015-02-12 Jakub Jelinek <jakub@redhat.com>
222 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
223 * decl.c (poplevel): If functionbody, try not to create an extra
224 BLOCK for function body and use subblocks as that, if it is non-NULL
225 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
226 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
229 * except.c (check_noexcept_r): Return NULL for internal
232 2015-02-10 Jason Merrill <jason@redhat.com>
235 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
237 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
240 * method.c (use_thunk): Do not check for stdarg thunks.
242 2015-02-06 Jason Merrill <jason@redhat.com>
245 * init.c (build_vec_init): Handle default-initialized array with
246 constexpr default constructor.
248 2015-02-04 Jakub Jelinek <jakub@redhat.com>
252 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
254 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
257 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
258 for generated expressions.
260 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
263 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
266 2015-02-02 Jason Merrill <jason@redhat.com>
268 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
270 2015-01-30 Joseph Myers <joseph@codesourcery.com>
272 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
273 changed to pass input_location as first argument.
275 2015-01-29 Jakub Jelinek <jakub@redhat.com>
278 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
281 2015-01-29 Jason Merrill <jason@redhat.com>
284 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
285 erroneous return statement.
288 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
291 2015-01-27 Caroline Tice <cmtice@google.com>
293 Committing VTV Cywin/Ming patch for Patrick Wollgast
294 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
295 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
297 2015-01-27 Jason Merrill <jason@redhat.com>
300 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
301 current_function_decl.
304 * pt.c (finish_template_variable): Move from semantics.c.
305 Handle multiple template arg levels. Handle coercion here.
306 (lookup_template_variable): Not here.
308 2015-01-23 Jason Merrill <jason@redhat.com>
312 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
313 that has been completely split out.
316 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
320 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
323 2015-01-21 Jason Merrill <jason@redhat.com>
326 * constexpr.c (cxx_eval_constant_expression): Only shortcut
327 constant CONSTRUCTORs.
330 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
331 give a hard error in a template instantiation.
333 2015-01-21 Richard Biener <rguenther@suse.de>
336 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
337 for builtins the user declared correctly.
339 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
342 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
343 TREE_TYPE (elt) == error_mark_node.
345 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
347 PR tree-optimization/62053
348 * tree.c (build_cplus_array_type): Layout type after variants are set.
350 2015-01-15 Jakub Jelinek <jakub@redhat.com>
352 * cp-gimplify.c (cp_genericize_r): Call
353 cp_ubsan_maybe_instrument_member_call for member calls.
354 (cp_ubsan_check_member_access_r): New function.
355 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
356 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
357 cp_ubsan_instrument_member_accesses,
358 cp_ubsan_maybe_instrument_downcast,
359 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
360 * cp-ubsan.c: New file.
361 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
362 * constexpr.c (cxx_eval_call_expression): Return void_node
364 (potential_constant_expression_1): Return true for
365 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
366 * typeck.c (build_class_member_access_expr): Provide locus
368 (build_static_cast_1): Instrument downcasts.
369 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
370 add ubsan instrumentation for virtual_access.
371 * call.c: Include internal-fn.h.
372 (set_flags_from_callee): Handle internal calls.
374 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
377 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
378 and function templates, declared only in the class.
379 * decl.c (duplicate_decls): Reveal hidden friend functions or
380 function templates, if they are redeclared outside the class.
382 2015-01-15 Jason Merrill <jason@redhat.com>
385 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
388 * constexpr.c (potential_constant_expression_1): Handle reference
391 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
392 James Norris <jnorris@codesourcery.com>
393 Cesar Philippidis <cesar@codesourcery.com>
394 Ilmir Usmanov <i.usmanov@samsung.com>
395 Jakub Jelinek <jakub@redhat.com>
397 * parser.c: Include "gomp-constants.h".
398 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
399 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
400 Use OMP_CLAUSE_SET_MAP_KIND.
401 (cp_parser_omp_construct, cp_parser_pragma): Handle
402 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
403 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
404 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
405 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
406 "create", "delete", "deviceptr", "host", "num_gangs",
407 "num_workers", "present", "present_or_copy", "pcopy",
408 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
409 "present_or_create", "pcreate", "vector_length", "wait".
410 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
411 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
412 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
413 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
414 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
415 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
416 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
417 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
418 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
419 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
420 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
421 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
422 (cp_parser_oacc_parallel, cp_parser_oacc_update)
423 (cp_parser_oacc_wait): New functions.
424 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
425 (finish_oacc_parallel): New prototypes.
426 * semantics.c: Include "gomp-constants.h".
427 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
428 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
429 OMP_CLAUSE_SET_MAP_KIND.
430 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
431 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
432 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
433 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
436 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
439 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
442 2015-01-13 Jason Merrill <jason@redhat.com>
446 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
448 (cxx_eval_increment_expression): Likewise.
451 * pt.c (coerce_template_parameter_pack): Return NULL for a
452 zero-length fixed parameter pack with a pack expansion arg.
455 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
457 2015-01-12 Jason Merrill <jason@redhat.com>
460 * constexpr.c (cxx_eval_call_expression): A call to a void
461 function doesn't need to return a value.
463 2015-01-09 Michael Collison <michael.collison@linaro.org>
465 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
466 input.h, alias.h, symtab.h, options.h, fold-const.h,
467 wide-int.h, and inchash.h due to flattening of tree.h.
469 * constexpr.c: Ditto.
470 * cp-array-notation.c: Ditto.
471 * cp-gimplify.c: Ditto.
473 * cp-objcp-common.c: Ditto.
486 * name-lookup.c: Ditto.
494 * semantics.c: Ditto.
499 2015-01-08 Jason Merrill <jason@redhat.com>
501 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
502 * decl.c (compute_array_index_type): Likewise.
503 * init.c (build_vec_init): Likewise.
504 * typeck.c (cp_build_binary_op): Likewise.
506 2015-01-08 Jason Merrill <jason@redhat.com>
508 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
509 whether an initializer-list is too big for a VLA.
510 (throw_bad_array_length): Remove.
511 * cp-tree.h: Remove prototype.
513 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
516 * decl.c (grokfndecl): Add bool parameter.
517 (grokdeclarator): Adjust calls.
518 (start_decl): Don't set DECL_DELETED_FN here.
520 2015-01-06 Jason Merrill <jason@redhat.com>
522 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
526 * pt.c (type_dependent_expression_p): Handle variable templates.
527 * constexpr.c (potential_constant_expression_1): Use it.
530 * semantics.c (finish_offsetof): Handle templates here.
531 * parser.c (cp_parser_builtin_offsetof): Not here.
534 * semantics.c (process_outer_var_ref): Diagnose lambda in local
537 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
540 * class.c (check_field_decls): Make copy assignment operators
541 complex only in c++98 mode.
543 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
546 * class.c (check_for_override): Warn when a virtual function is an
547 override not marked override.
549 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
551 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
553 (get_basefndecls): Adjust.
555 2015-01-05 Jakub Jelinek <jakub@redhat.com>
557 Update copyright years.
559 2015-01-05 Marek Polacek <polacek@redhat.com>
562 * typeck.c (cp_build_array_ref): Pass loc down to
563 warn_array_subscript_with_type_char.
566 Copyright (C) 2015 Free Software Foundation, Inc.
568 Copying and distribution of this file, with or without modification,
569 are permitted in any medium without royalty provided the copyright
570 notice and this notice are preserved.