1 2015-03-27 Tobias Burnus <burnus@net-b.de>
4 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
5 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
6 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
9 2015-03-27 Marek Polacek <polacek@redhat.com>
12 * semantics.c (finish_switch_cond): If the unlowered type is not an
13 enum, use the type of the condition.
15 2015-03-27 Jason Merrill <jason@redhat.com>
18 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
21 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
24 * init.c (build_vec_init): Fix initializing aggregates
27 2015-03-26 Jason Merrill <jason@redhat.com>
30 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
32 2015-03-25 Marek Polacek <polacek@redhat.com>
35 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
36 on an anonymous namespace.
38 2015-03-25 Marek Polacek <polacek@redhat.com>
41 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
43 2015-03-24 Jason Merrill <jason@redhat.com>
46 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
47 * parser.c (cp_parser_namespace_definition): Don't set it.
48 * name-lookup.c (handle_namespace_attrs): Check
49 DECL_NAMESPACE_ASSOCIATIONS instead.
52 * pt.c (get_mostly_instantiated_function_type): Just return the
53 type of the partially instantiated template in DECL_TI_TEMPLATE.
55 2015-03-20 Marek Polacek <polacek@redhat.com>
58 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
61 2015-03-20 Marek Polacek <polacek@redhat.com>
64 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
67 2015-03-19 Jason Merrill <jason@redhat.com>
70 Automatically propagate ABI tags to variables and functions
71 from their (return) type.
72 * class.c (check_tag): Handle variables and functions.
73 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
74 (mark_or_check_tags): Likewise.
75 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
76 (check_abi_tags): Add single argument overload for decls.
77 Handle inheriting tags for decls.
78 * mangle.c (write_mangled_name): Call it.
79 (mangle_return_type_p): Split out from write_encoding.
80 (unmangled_name_p): Split out from write_mangled_name.
81 (write_mangled_name): Ignore abi_tag on namespace.
82 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
83 * parser.c (cp_parser_namespace_definition): Set it.
84 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
85 about abi_tag attribute on non-inline namespace.
86 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
87 (handle_abi_tag_attribute): Allow tags on variables.
89 2015-03-19 Jakub Jelinek <jakub@redhat.com>
91 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
92 attribute for DECL_EXTERNAL VAR_DECLs.
94 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
97 * call.c (build_over_call): Pass the tsubst_flags_t argument to
99 * decl2.c (mark_used): Inline the require_deduced_type call and
100 guard the error call.
102 2015-03-16 Jason Merrill <jason@redhat.com>
105 * parser.c (cp_parser_template_name): Call strip_using_decl.
107 2015-03-16 Marek Polacek <polacek@redhat.com>
111 * decl.c (grokdeclarator): Allow volatile and constexpr together.
113 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
116 * decl.c (check_default_argument): Don't call
117 maybe_warn_zero_as_null_pointer_constant.
119 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
121 * cp-gimplify.c (simple_empty_class_p): New.
122 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
123 the code for empty class copies into simple_empty_class_p, and
124 adapt it to handle COMPOUND_EXPRs.
126 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
129 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
130 only if the location of newdecl doesn't match the location of olddecl.
132 2015-03-10 Jakub Jelinek <jakub@redhat.com>
135 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
138 2015-03-10 Jason Merrill <jason@redhat.com>
142 * pt.c (dependent_type_p_r): Check both class and alias template args.
144 2015-03-10 Jakub Jelinek <jakub@redhat.com>
147 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
148 before preparing arguments to warn_logical_not_parentheses.
149 Use maybe_constant_value on rhs.
151 2015-03-09 Jason Merrill <jason@redhat.com>
154 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
156 2015-03-09 Jakub Jelinek <jakub@redhat.com>
159 * parser.c (cp_parser_binary_expression): Don't warn for
160 !!x == y or !b == y where b is bool.
162 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
164 * ptree.c (cxx_print_lambda_node): New.
165 (cxx_print_xnode): Handle LAMBDA_EXPR.
167 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
170 * constexpr.c (cxx_eval_constant_expression): Remove assert in
171 RESULT_DECL handling.
173 2015-02-26 Marek Polacek <polacek@redhat.com>
176 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
177 a RETURN_EXPR if its operand is null.
179 2015-02-25 Jason Merrill <jason@redhat.com>
182 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
184 (constrain_visibility_for_template): Handle reference arguments.
187 * decl.c (start_preparsed_function): Use create_artificial_label
190 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
191 Jakub Jelinek <jakub@redhat.com>
194 * constexpr.c (check_constexpr_bind_expr_vars): Allow
195 implicit typedefs for lambda types.
197 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
200 * decl.c (lookup_and_check_tag): Use strip_using_decl.
202 2015-02-13 Jason Merrill <jason@redhat.com>
205 * pt.c (template_args_equal): Look through conversions here.
206 * tree.c (cp_tree_equal): Not here.
208 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
211 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
212 pragma_external context.
214 2015-02-13 Jason Merrill <jason@redhat.com>
217 * call.c (reference_binding): Don't look for bad conversion
220 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
223 * decl.c (make_typename_type): Pass tsubst_flags_t argument
224 to lookup_template_class.
226 2015-02-13 Jakub Jelinek <jakub@redhat.com>
229 * decl.c (start_preparsed_function): Use void_type_node instead
230 of NULL_TREE as LABEL_DECL type.
232 2015-02-12 Jason Merrill <jason@redhat.com>
235 * mangle.c (write_mangled_name): Fix test for variable template
238 * decl.c (begin_destructor_body): Condition clobber on
241 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
244 * parser.c (lookup_literal_operator): Return all candidates.
245 (cp_parser_userdef_char_literal): Simplify error handling.
246 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
247 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
248 Also give higher priority to standard string UDL operator.
250 2015-02-12 Jakub Jelinek <jakub@redhat.com>
253 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
254 * decl.c (poplevel): If functionbody, try not to create an extra
255 BLOCK for function body and use subblocks as that, if it is non-NULL
256 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
257 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
260 * except.c (check_noexcept_r): Return NULL for internal
263 2015-02-10 Jason Merrill <jason@redhat.com>
266 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
268 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
271 * method.c (use_thunk): Do not check for stdarg thunks.
273 2015-02-06 Jason Merrill <jason@redhat.com>
276 * init.c (build_vec_init): Handle default-initialized array with
277 constexpr default constructor.
279 2015-02-04 Jakub Jelinek <jakub@redhat.com>
283 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
285 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
288 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
289 for generated expressions.
291 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
294 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
297 2015-02-02 Jason Merrill <jason@redhat.com>
299 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
301 2015-01-30 Joseph Myers <joseph@codesourcery.com>
303 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
304 changed to pass input_location as first argument.
306 2015-01-29 Jakub Jelinek <jakub@redhat.com>
309 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
312 2015-01-29 Jason Merrill <jason@redhat.com>
315 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
316 erroneous return statement.
319 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
322 2015-01-27 Caroline Tice <cmtice@google.com>
324 Committing VTV Cywin/Ming patch for Patrick Wollgast
325 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
326 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
328 2015-01-27 Jason Merrill <jason@redhat.com>
331 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
332 current_function_decl.
335 * pt.c (finish_template_variable): Move from semantics.c.
336 Handle multiple template arg levels. Handle coercion here.
337 (lookup_template_variable): Not here.
339 2015-01-23 Jason Merrill <jason@redhat.com>
343 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
344 that has been completely split out.
347 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
351 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
354 2015-01-21 Jason Merrill <jason@redhat.com>
357 * constexpr.c (cxx_eval_constant_expression): Only shortcut
358 constant CONSTRUCTORs.
361 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
362 give a hard error in a template instantiation.
364 2015-01-21 Richard Biener <rguenther@suse.de>
367 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
368 for builtins the user declared correctly.
370 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
373 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
374 TREE_TYPE (elt) == error_mark_node.
376 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
378 PR tree-optimization/62053
379 * tree.c (build_cplus_array_type): Layout type after variants are set.
381 2015-01-15 Jakub Jelinek <jakub@redhat.com>
383 * cp-gimplify.c (cp_genericize_r): Call
384 cp_ubsan_maybe_instrument_member_call for member calls.
385 (cp_ubsan_check_member_access_r): New function.
386 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
387 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
388 cp_ubsan_instrument_member_accesses,
389 cp_ubsan_maybe_instrument_downcast,
390 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
391 * cp-ubsan.c: New file.
392 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
393 * constexpr.c (cxx_eval_call_expression): Return void_node
395 (potential_constant_expression_1): Return true for
396 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
397 * typeck.c (build_class_member_access_expr): Provide locus
399 (build_static_cast_1): Instrument downcasts.
400 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
401 add ubsan instrumentation for virtual_access.
402 * call.c: Include internal-fn.h.
403 (set_flags_from_callee): Handle internal calls.
405 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
408 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
409 and function templates, declared only in the class.
410 * decl.c (duplicate_decls): Reveal hidden friend functions or
411 function templates, if they are redeclared outside the class.
413 2015-01-15 Jason Merrill <jason@redhat.com>
416 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
419 * constexpr.c (potential_constant_expression_1): Handle reference
422 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
423 James Norris <jnorris@codesourcery.com>
424 Cesar Philippidis <cesar@codesourcery.com>
425 Ilmir Usmanov <i.usmanov@samsung.com>
426 Jakub Jelinek <jakub@redhat.com>
428 * parser.c: Include "gomp-constants.h".
429 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
430 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
431 Use OMP_CLAUSE_SET_MAP_KIND.
432 (cp_parser_omp_construct, cp_parser_pragma): Handle
433 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
434 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
435 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
436 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
437 "create", "delete", "deviceptr", "host", "num_gangs",
438 "num_workers", "present", "present_or_copy", "pcopy",
439 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
440 "present_or_create", "pcreate", "vector_length", "wait".
441 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
442 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
443 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
444 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
445 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
446 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
447 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
448 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
449 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
450 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
451 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
452 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
453 (cp_parser_oacc_parallel, cp_parser_oacc_update)
454 (cp_parser_oacc_wait): New functions.
455 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
456 (finish_oacc_parallel): New prototypes.
457 * semantics.c: Include "gomp-constants.h".
458 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
459 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
460 OMP_CLAUSE_SET_MAP_KIND.
461 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
462 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
463 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
464 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
467 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
470 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
473 2015-01-13 Jason Merrill <jason@redhat.com>
477 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
479 (cxx_eval_increment_expression): Likewise.
482 * pt.c (coerce_template_parameter_pack): Return NULL for a
483 zero-length fixed parameter pack with a pack expansion arg.
486 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
488 2015-01-12 Jason Merrill <jason@redhat.com>
491 * constexpr.c (cxx_eval_call_expression): A call to a void
492 function doesn't need to return a value.
494 2015-01-09 Michael Collison <michael.collison@linaro.org>
496 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
497 input.h, alias.h, symtab.h, options.h, fold-const.h,
498 wide-int.h, and inchash.h due to flattening of tree.h.
500 * constexpr.c: Ditto.
501 * cp-array-notation.c: Ditto.
502 * cp-gimplify.c: Ditto.
504 * cp-objcp-common.c: Ditto.
517 * name-lookup.c: Ditto.
525 * semantics.c: Ditto.
530 2015-01-08 Jason Merrill <jason@redhat.com>
532 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
533 * decl.c (compute_array_index_type): Likewise.
534 * init.c (build_vec_init): Likewise.
535 * typeck.c (cp_build_binary_op): Likewise.
537 2015-01-08 Jason Merrill <jason@redhat.com>
539 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
540 whether an initializer-list is too big for a VLA.
541 (throw_bad_array_length): Remove.
542 * cp-tree.h: Remove prototype.
544 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
547 * decl.c (grokfndecl): Add bool parameter.
548 (grokdeclarator): Adjust calls.
549 (start_decl): Don't set DECL_DELETED_FN here.
551 2015-01-06 Jason Merrill <jason@redhat.com>
553 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
557 * pt.c (type_dependent_expression_p): Handle variable templates.
558 * constexpr.c (potential_constant_expression_1): Use it.
561 * semantics.c (finish_offsetof): Handle templates here.
562 * parser.c (cp_parser_builtin_offsetof): Not here.
565 * semantics.c (process_outer_var_ref): Diagnose lambda in local
568 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
571 * class.c (check_field_decls): Make copy assignment operators
572 complex only in c++98 mode.
574 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
577 * class.c (check_for_override): Warn when a virtual function is an
578 override not marked override.
580 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
582 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
584 (get_basefndecls): Adjust.
586 2015-01-05 Jakub Jelinek <jakub@redhat.com>
588 Update copyright years.
590 2015-01-05 Marek Polacek <polacek@redhat.com>
593 * typeck.c (cp_build_array_ref): Pass loc down to
594 warn_array_subscript_with_type_char.
597 Copyright (C) 2015 Free Software Foundation, Inc.
599 Copying and distribution of this file, with or without modification,
600 are permitted in any medium without royalty provided the copyright
601 notice and this notice are preserved.