1 2015-11-04 Cesar Philippidis <cesar@codesourcery.com>
3 * (cp_parser_oacc_single_int_clause): New function.
4 (cp_parser_oacc_clause_vector_length): Delete.
5 (cp_parser_omp_clause_num_gangs): Delete.
6 (cp_parser_omp_clause_num_workers): Delete.
7 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
8 for num_gangs, num_workers and vector_length.
10 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
12 * call.c (validate_conversion_obstack): Define unconditionally.
13 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
15 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
16 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
17 * mangle.c (add_substitution): Likewise.
18 * method.c (maybe_explain_implicit_delete): Likewise.
19 * parser.c (cp_parser_template_argument_list): Remove conditional
21 * pt.c (check_unstripped_args): Rename to...
22 (verify_unstripped_args): ... this and remove conditional compilation.
23 (retrieve_specialization): Guard call of verify_unstripped_args with
25 (template_parm_to_arg): Remove conditional compilation.
26 (template_parms_to_args, coerce_template_parameter_pack,
27 coerce_template_parms): Likewise.
28 (tsubst_copy): Use flag_checking.
29 (type_unification_real): Remove conditional compilation.
30 (build_non_dependent_expr): Use flag_checking.
31 * tree.c (build_target_expr): Remove conditional compilation, use
33 * typeck.c (comptypes): Likewise.
34 * typeck2.c (digest_init_r): Likewise.
36 2015-11-03 Jason Merrill <jason@redhat.com>
38 * pt.c (struct find_parameter_pack_data): Add
39 type_pack_expansion_p field.
40 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
41 (uses_parameter_packs, make_pack_expansion)
42 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
44 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
45 Chung-Lin Tang <cltang@codesourcery.com>
47 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
50 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
52 Remove the implementation of N3994, terse range-for loops.
53 * parser.c (cp_parser_for_init_statement): Remove the parsing
56 2015-10-31 Jason Merrill <jason@redhat.com>
58 Implement multiple 'auto' feature from Concepts TS.
59 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
60 (cp_parser_template_type_arg): Likewise.
61 (get_concept_from_constraint): Split out most logic to...
62 * constraint.cc (placeholder_extract_concept_and_args): ...here.
63 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
64 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
65 * cxx-pretty-print.h: Declare it.
66 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
67 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
68 (type_uses_auto): Use is_auto_r.
69 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
70 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
73 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
74 Return a meaningful value rather than error_mark_node.
75 (for_each_template_parm): Return a tree.
76 (uses_template_parms_level): Return bool.
79 * pt.c (unify): Don't diagnose no common base if we already have
81 (do_auto_deduction): Explain deduction failure.
83 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
86 * parser.c (synthesize_implicit_template_parm)
87 (finish_fully_implicit_template): Make static.
89 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
91 * call.c: Reorder #include's and remove duplicates.
93 * constexpr.c: Likewise.
94 * cp-array-notation.c: Likewise.
95 * cp-cilkplus.c: Likewise.
96 * cp-gimplify.c: Likewise.
97 * cp-lang.c: Likewise.
98 * cp-objcp-common.c: Likewise.
99 * cp-ubsan.c: Likewise.
101 * cxx-pretty-print.c: Likewise.
106 * except.c: Likewise.
108 * friend.c: Likewise.
110 * lambda.c: Likewise.
112 * mangle.c: Likewise.
113 * method.c: Likewise.
114 * name-lookup.c: Likewise.
115 * optimize.c: Likewise.
116 * parser.c: Likewise.
121 * search.c: Likewise.
122 * semantics.c: Likewise.
124 * typeck.c: Likewise.
125 * typeck2.c: Likewise.
126 * vtable-class-hierarchy.c: Likewise.
128 2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
131 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
132 functions consistently reset TREE_TYPE (decl) too.
134 2015-10-28 Jason Merrill <jason@redhat.com>
137 * class.c (type_has_user_provided_or_explicit_constructor): New.
138 (check_bases_and_members): Use it.
139 * cp-tree.h: Declare it.
141 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
142 Thomas Schwinge <thomas@codesourcery.com>
143 James Norris <jnorris@codesourcery.com>
144 Joseph Myers <joseph@codesourcery.com>
145 Julian Brown <julian@codesourcery.com>
146 Nathan Sidwell <nathan@codesourcery.com>
147 Bernd Schmidt <bschmidt@redhat.com>
149 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
151 (cp_parser_oacc_simple_clause): New.
152 (cp_parser_oacc_shape_clause): New.
153 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
154 (OACC_LOOP_CLAUSE_MASK): Likewise.
155 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
156 worker. Unify the handling of teams, tasks and vector_length with
157 the other loop shape clauses.
159 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
160 James Norris <jnorris@codesourcery.com>
161 Cesar Philippidis <cesar@codesourcery.com>
165 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
167 (finish_omp_construct): Declare function.
168 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
169 formal parameters, and handle these. Adjust all users.
170 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
172 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
174 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
175 (finish_omp_construct): ... this new function.
177 2015-10-25 Jason Merrill <jason@redhat.com>
180 * pt.c (process_partial_specialization): Handle error_mark_node
181 from most_specialized_partial_spec.
183 2015-10-23 Jason Merrill <jason@redhat.com>
189 * call.c (convert_like_real): Value-initialization can't use
190 explicit constructors in C++11 and up.
193 * constexpr.c (cxx_eval_store_expression): Always use *valp if
196 2015-10-22 Jason Merrill <jason@redhat.com>
198 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
199 (add_template_candidate_real): Handle it.
200 * pt.c (fn_type_unification): Handle it.
202 * call.c (add_conv_candidate): Remove first_arg parm.
203 (add_template_conv_candidate): Likewise.
204 (add_template_candidate_real): Don't pass it.
205 (build_op_call_1): Likewise.
207 2015-10-22 Richard Biener <rguenther@suse.de>
209 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
210 before folding a MINUS_EXPR.
211 (finish_omp_clauses): Likewise.
213 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
216 * parser.c (cp_parser_enum_specifier): Upon error_at set
217 nested_name_specifier to error_mark_node; improve error message.
219 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
222 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
223 which doesn't name a class or namespace.
225 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
227 * call.c (build_conditional_expr_1): Use boolean vector
228 type for vector comparison.
229 * typeck.c (build_vec_cmp): New.
230 (cp_build_binary_op): Use build_vec_cmp for comparison.
232 2015-10-20 Jason Merrill <jason@redhat.com>
235 * init.c (innermost_aggr_scope): New.
236 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
237 (sort_mem_initializers): Handle initializers for entire anonymous
240 2015-10-20 Marek Polacek <polacek@redhat.com>
242 * parser.c (is_cilkplus_vector_p): Don't define here.
244 2015-10-19 Jason Merrill <jason@redhat.com>
247 * semantics.c (force_paren_expr): Don't mess with hard register vars.
249 Implement N4268, Do constant evaluation of all non-type template args.
250 * parser.c (cp_parser_template_argument): For C++1z just parse a
252 * pt.c (convert_nontype_argument): For C++1z always call
253 maybe_constant_value.
255 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
257 (cxx_eval_component_reference): Like here.
258 * decl2.c (lower_var_init): And here.
259 (c_parse_final_cleanups): Call it.
260 * typeck2.c (digest_init_r): Not here.
261 * decl.c (complete_vars): Or here.
262 (cp_finish_decl): Add local statics to symbol table.
264 2015-10-17 Jason Merrill <jason@redhat.com>
267 * decl.c (implicit_default_ctor_p): New.
268 (start_preparsed_function): Don't clobber on entry to one.
270 2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
273 * constexpr.c (potential_constant_expression_1): Handle
274 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
275 BINARY_RIGHT_FOLD_EXPR.
277 2015-10-13 Jakub Jelinek <jakub@redhat.com>
278 Aldy Hernandez <aldyh@redhat.com>
280 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
281 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
282 (cp_genericize_r): Likewise.
283 (cxx_omp_finish_clause): Don't diagnose references.
284 (cxx_omp_disregard_value_expr): New function.
285 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
286 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
287 (DECL_OMP_PRIVATIZED_MEMBER): Define.
288 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
289 pop_omp_privatization_clauses, save_omp_privatization_clauses,
290 restore_omp_privatization_clauses, omp_privatize_field,
291 cxx_omp_disregard_value_expr): New prototypes.
292 (finish_omp_clauses): Add two new arguments.
293 (finish_omp_for): Add ORIG_DECLV argument.
294 * parser.c (cp_parser_lambda_body): Call
295 save_omp_privatization_clauses and restore_omp_privatization_clauses.
296 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
297 (cp_parser_omp_var_list_no_open): Handle structure elements for
298 map, to and from clauses. Handle array sections in reduction
299 clause. Parse this keyword. Formatting fixes.
300 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
302 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
303 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
304 cp_parser_omp_clause_defaultmap): New functions.
305 (cp_parser_omp_clause_ordered): Parse optional parameter.
306 (cp_parser_omp_clause_reduction): Handle array reductions.
307 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
308 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
310 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
311 (cp_parser_omp_clause_depend_sink): New function.
312 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
313 (cp_parser_omp_clause_map): Parse release/delete map kinds and
314 optional always modifier.
315 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
316 and finish_omp_clauses callers.
317 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
318 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
319 (OMP_CRITICAL_CLAUSE_MASK): Define.
320 (cp_parser_omp_critical): Parse critical clauses.
321 (cp_parser_omp_for_incr): Use cp_tree_equal if
322 processing_template_decl.
323 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
324 non-static data member iterators.
325 (cp_parser_omp_for_loop): Handle doacross loops, adjust
326 finish_omp_for and finish_omp_clauses callers.
327 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
328 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
329 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
330 (OMP_FOR_CLAUSE_MASK): Add linear clause.
331 (cp_parser_omp_for): Disallow ordered clause when combined with
332 distribute. Disallow linear clause when combined with distribute
333 and not combined with simd.
334 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
335 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
336 of tree, parse clauses and if depend clause is found, don't parse
338 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
339 Allow target parallel without for after it.
340 (OMP_TASK_CLAUSE_MASK): Add priority clause.
341 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
342 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
344 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
345 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
346 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
347 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
349 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
350 defaultmap and is_device_ptr clauses.
351 (cp_parser_omp_target): Parse target parallel and target simd. Set
352 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
353 and target exit data. Diagnose invalid map kinds.
354 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
355 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
356 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
358 (OMP_TASKLOOP_CLAUSE_MASK): Define.
359 (cp_parser_omp_taskloop): New function.
360 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
361 handle PRAGMA_OMP_TASKLOOP.
362 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
363 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
364 and pop_omp_privatization_clauses around parsing calls.
365 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
366 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
367 and finish_omp_clauses callers.
368 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
369 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
370 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
372 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
373 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
374 If ALLOW_FIELDS, handle non-static data members in the clauses.
375 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
376 (omp_parallel_combined_clauses): New variable.
377 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
378 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
379 Improve handling of clauses on combined constructs.
380 (tsubst_expr): Call push_omp_privatization_clauses and
381 pop_omp_privatization_clauses around instantiation of certain
382 OpenMP constructs, improve handling of clauses on combined
383 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
384 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
385 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
386 (instantiate_decl): Call save_omp_privatization_clauses and
387 restore_omp_privatization_clauses around instantiation.
388 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
389 * semantics.c (omp_private_member_map, omp_private_member_vec,
390 omp_private_member_ignore_next): New variables.
391 (finish_non_static_data_member): Return dummy decl for privatized
392 non-static data members.
393 (omp_clause_decl_field, omp_clause_printable_decl,
394 omp_note_field_privatization, omp_privatize_field): New functions.
395 (handle_omp_array_sections_1): Fix comment typo.
396 Add IS_OMP argument, handle structure element bases, diagnose
397 bitfields, pass IS_OMP recursively, diagnose known zero length
398 array sections in depend clauses, handle array sections in reduction
399 clause, diagnose negative length even for pointers.
400 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
401 types, pass IS_OMP down to handle_omp_array_sections_1, handle
402 array sections in reduction clause, set
403 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
404 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
405 (finish_omp_reduction_clause): Handle array sections and arrays.
406 Use omp_clause_printable_decl.
407 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
409 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
410 Handle new OpenMP 4.5 clauses and new restrictions for the old
411 ones, handle non-static data members, reject this keyword when not
413 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
414 save_omp_privatization_clauses, restore_omp_privatization_clauses):
416 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
417 Add collapse and ordered arguments. Fix handling of lastprivate
418 iterators in doacross loops.
419 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
420 adjust c_finish_omp_for, handle_omp_for_class_iterator and
421 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
422 loops with non-static data member iterators.
424 2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
427 * lambda.c (lambda_return_type): Return error_mark_node
428 instead of void_type_node for the error cases.
430 2015-10-08 Jason Merrill <jason@redhat.com>
432 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
433 * init.c (get_nsdmi): Use it.
434 * typeck2.c (massage_init_elt): Use it.
436 2015-10-07 Jason Merrill <jason@redhat.com>
439 * call.c (is_base_field_ref): New.
440 (unsafe_copy_elision_p): New.
441 (build_over_call): Use it.
443 2015-10-07 Marek Polacek <polacek@redhat.com>
446 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
448 2015-10-07 Marek Polacek <polacek@redhat.com>
450 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
451 (genericize_cp_loop): Likewise.
452 * decl.c (cxx_maybe_build_cleanup): Likewise.
453 * parser.c (cp_parser_binary_expression): Likewise.
454 (cp_parser_omp_for_loop): Likewise.
455 (cp_parser_omp_construct): Likewise.
456 * semantics.c (finish_transaction_stmt): Likewise.
457 (build_transaction_expr): Likewise.
459 2015-10-06 Jason Merrill <jason@redhat.com>
462 * parser.c (cp_parser_fold_expr_p): Remove.
464 (cp_parser_fold_expression): Take LHS as parameter.
465 (cp_parser_primary_expression): Call it after parsing an expression.
466 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
467 (cp_parser_expression): Ignore an operator followed by '...'.
469 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
470 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
472 2015-10-06 Marek Polacek <polacek@redhat.com>
475 * call.c (build_conditional_expr_1): Build the COND_EXPR with
478 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
481 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
482 reject default template arguments in out of class definitions
483 of members of non-template classes.
485 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
487 * tree.c (cp_tree_equal): Use real_equal instead of
490 2015-10-04 Jason Merrill <jason@redhat.com>
492 Implement N4514, C++ Extensions for Transactional Memory.
493 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
494 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
495 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
496 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
497 (make_call_declarator): Take tx_qualifier.
498 (cp_parser_tx_qualifier_opt): New.
499 (cp_parser_lambda_declarator_opt): Use it.
500 (cp_parser_direct_declarator): Likewise.
501 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
502 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
503 (cp_parser_std_attribute): Map optimize_for_synchronized to
504 transaction_callable.
505 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
506 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
507 * call.c (enum conversion_kind): Add ck_tsafe.
508 (standard_conversion): Handle transaction-safety conversion.
509 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
510 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
512 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
513 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
514 (can_convert_tx_safety): New.
515 * typeck.c (composite_pointer_type): Handle transaction-safety.
516 * name-lookup.h (enum scope_kind): Add sk_transaction.
517 * name-lookup.c (begin_scope): Handle it.
518 * semantics.c (begin_compound_stmt): Pass it.
519 * decl.c (check_previous_goto_1): Check it.
520 (struct named_label_entry): Add in_transaction_scope.
521 (poplevel_named_label_1): Set it.
522 (check_goto): Check it.
523 (duplicate_decls): A specialization can be transaction_safe
524 independently of its template.
525 (grokdeclarator): Handle tx-qualifier.
526 * rtti.c (ptr_initializer): Handle transaction-safe.
527 * search.c (check_final_overrider): Check transaction_safe_dynamic.
528 Don't check transaction_safe.
529 * mangle.c (write_function_type): Mangle transaction_safe here.
530 (write_CV_qualifiers_for_type): Not here.
531 (write_type): Preserve transaction_safe when stripping attributes.
532 * error.c (dump_type_suffix): Print transaction_safe.
534 2015-10-02 Marek Polacek <polacek@redhat.com>
537 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
538 down to cp_parser_selection_statement.
539 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
540 warn about duplicated if-else-if conditions.
541 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
542 it down to cp_parser_statement.
544 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
547 * name-lookup.c (push_binding): Make non-static.
548 * name-lookup.h (push_binding): Declare it.
549 * parser.c (cp_parser_range_for): Use it, get the range
550 declaration away from the scope until the range expression
551 has been parsed, then restore the declaration.
553 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
555 Fix small typos in the coding rule enforcement warnings.
556 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
559 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
561 * decl.c (xref_basetypes): Check virtual and/or multiple
563 * parser.c (cp_parser_namespace_definition): Check namespaces
565 * pt.c (push_template_decl_real): Check templates warning.
567 2015-09-22 Jason Merrill <jason@redhat.com>
569 * mangle.c (abi_warn_or_compat_version_crosses): New.
570 Use it instead of abi_version_crosses.
571 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
573 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
575 Complete the implementation of N4230, Nested namespace definition.
576 * parser.c (cp_parser_namespace_definition): Support namespace
577 attributes both before and after the namespace identifier.
579 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
581 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
583 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
585 Implement nested namespace definitions.
586 * parser.c (cp_parser_namespace_definition): Grok nested namespace
589 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
591 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
592 make it more similar to the C version.
594 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
595 Jason Merrill <jason@redhat.com>
597 Implement N4295 fold-expressions.
598 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
599 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
600 * cp-objcp-common.c (cp_common_init_ts): Handle them.
601 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
602 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
603 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
604 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
605 or_comma parameter to or_ttype.
606 (cp_parser_fold_operator, cp_parser_fold_expr_p)
607 (cp_parser_fold_expression): New.
608 (cp_parser_primary_expression): Use them.
609 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
610 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
611 (tsubst_binary_left_fold, expand_right_fold)
612 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
613 (tsubst_copy): Use them.
614 (type_dependent_expression_p): Handle fold-expressions.
615 * semantics.c (finish_unary_fold_expr)
616 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
617 (finish_binary_fold_expr): New.
619 2015-09-17 Richard Biener <rguenther@suse.de>
621 * cp-tree.h (note_decl_for_pch): Remove.
622 * class.c (build_clone): Do not call note_decl_for_pch.
623 * semantics.c (finish_member_declaration): Likewise.
624 (note_decl_for_pch): Remove.
625 * decl2.c (c_parse_final_cleanups): Mangle all globals before
628 2015-09-14 Jason Merrill <jason@redhat.com>
631 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
632 mangling with lower -fabi-version.
634 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
637 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
638 per the spirit of DR 1467).
640 2015-09-11 Mark Wielaard <mjw@redhat.com>
643 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
644 VAR_P TREE_READONLY override.
646 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
649 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
650 and set template_parameter_pack_p also when the type is null.
652 2015-09-09 Mark Wielaard <mjw@redhat.com>
654 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
657 2015-09-10 Jakub Jelinek <jakub@redhat.com>
660 * semantics.c (handle_omp_array_sections_1): Only run
661 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
662 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
663 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
664 is not a VAR_DECL/PARM_DECL.
667 * semantics.c (handle_omp_for_class_iterator): Don't wrap
668 error_mark_node into a NOP_EXPR to void_type_node.
670 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
673 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
675 2015-09-09 Jakub Jelinek <jakub@redhat.com>
678 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
679 before INTEGRAL_TYPE_P test.
681 2015-09-08 Jason Merrill <jason@redhat.com>
684 * pt.c (tsubst_copy_and_build): Handle variables like functions.
686 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
689 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
690 if the first argument isn't a template.
692 2015-09-03 Martin Sebor <msebor@redhat.com>
695 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
697 * expr.c (mark_rvalue_use): Use new argument.
698 * call.c (build_addr_func): Call decay_conversion with new
700 * pt.c (convert_template_argument): Call reject_gcc_builtin.
701 * typeck.c (decay_conversion): Use new argument.
702 (c_decl_implicit): Define.
704 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
707 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
709 (cp_gimplify_expr): Added a call to the function
710 cilk_cp_gimplify_call_params_in_spawned_fn.
712 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
715 * decl.c (smallest_type_quals_location): New.
716 (check_special_function_return_type): Use the latter; add int and
717 const location_t* parameters.
718 (grokdeclarator): Adjust check_special_function_return_type call.
720 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
723 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
724 case. Move label to COND_EXPR case. Remove checking of
727 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
730 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
733 2015-08-21 Jason Merrill <jason@redhat.com>
736 * constraint.cc (satisfy_implicit_conversion_constraint): Also
739 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
741 * decl.c (grokvardecl): Simplify the latter.
743 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
745 * decl.c (grokvardecl): Complete check added for c++/67065.
747 2015-08-20 Jason Merrill <jason@redhat.com>
749 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
751 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
754 * decl.c (grokvardecl): Reject 'main' as global variable.
756 2015-08-19 Jason Merrill <jason@redhat.com>
759 * search.c (protected_accessible_p): Remove redundant access_in_type.
760 Add otype parm instead of walking binfo.
761 (friend_accessible_p): Check SCOPE itself. Handle class
762 templates. Pass through otype.
763 (dfs_accessible_post): Handle all accessibility cases.
764 (dfs_accessible_pre): New.
765 (accessible_p): Use it. Don't check protected access here. Pass
766 decl and otype to dfs_walk.
767 (member_declared_in_type, dfs_access_in_type_pre): New.
768 (access_in_type): Use dfs_access_in_type_pre.
769 * friend.c (add_friend): Fix multiple friends with the same name.
771 * lambda.c (current_nonlambda_scope): New.
773 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
775 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
776 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
777 semantics.c, typeck2.c: Remove useless typedefs.
779 2015-08-18 Jason Merrill <jason@redhat.com>
782 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
785 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
788 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
790 2015-08-17 Jason Merrill <jason@redhat.com>
793 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
796 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
797 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
799 * constexpr.c (cxx_eval_store_expression): Don't set
800 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
802 (cxx_eval_array_reference): Check it.
804 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
806 2015-08-14 Jason Merrill <jason@redhat.com>
809 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
811 2015-08-12 Jason Merrill <jason@redhat.com>
814 * constexpr.c (cxx_eval_array_reference): Fix typo.
817 * constexpr.c (cxx_eval_array_reference): Handle sparse
821 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
822 * error.c (dump_template_bindings): Don't tsubst in that case.
825 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
826 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
828 2015-08-08 Jason Merrill <jason@redhat.com>
831 * pt.c (process_partial_specialization): Call
832 associate_classtype_constraints.
835 * constraint.cc (finish_template_introduction):
836 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
839 * pt.c (equal): Make sure tmpl is actually a template.
842 * call.c (joust): Only call more_constrained on decls.
844 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
845 Braden Obrzut <admin@maniacsvault.net>
846 Jason Merrill <jason@redhat.com>
847 Ville Voutilainen <ville.voutilainen@gmail.com>
849 Add C++ Concepts TS support.
850 * constraint.cc, logic.cc: New files.
851 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
852 (c++.tags): Also process .cc files.
853 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
854 (print_z_candidate): Handle it.
855 (constraint_failure): New.
856 (add_function_candidate): Check constraints.
857 (build_new_function_call): Handle evaluating concepts.
858 (joust): Check more_constrained.
859 * class.c (add_method): Check equivalently_constrained.
860 (build_clone): Copy constraints.
861 (currently_open_class): Return tree.
862 (resolve_address_of_overloaded_function): Check constraints.
863 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
864 (potential_constant_expression_1): Likewise.
865 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
866 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
867 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
868 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
869 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
870 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
871 * cp-tree.h (struct tree_constraint_info, check_nonnull)
872 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
873 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
874 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
875 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
876 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
877 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
878 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
879 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
880 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
881 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
882 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
883 (struct local_specialization_stack, enum auto_deduction_context)
884 (variable_concept_p, concept_template_p)
885 (struct deferring_access_check_sentinel): New.
886 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
887 (union lang_tree_node): Add constraint_info field.
888 (struct lang_decl_base): Add concept_p flag.
889 (enum cp_decl_spec): Add ds_concept.
890 (struct cp_declarator): Add requires_clause.
891 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
892 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
893 TRAIT_EXPR, *_CONSTR.
894 (pp_cxx_parameter_declaration_clause): Accept a chain of
896 (cxx_pretty_printer::declarator): Print requires-clause.
897 (pp_cxx_template_declaration): Likewise.
898 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
899 (pp_cxx_requires_clause, pp_cxx_requirement)
900 (pp_cxx_requirement_list, pp_cxx_requirement_body)
901 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
902 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
903 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
904 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
905 (pp_cxx_implicit_conversion_constraint)
906 (pp_cxx_argument_deduction_constraint)
907 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
908 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
909 * cxx-pretty-print.h: Declare them.
910 * decl.c (decls_match): Compare constraints.
911 (duplicate_decls): Likewise. Remove constraints before freeing.
912 (cxx_init_decl_processing): Call init_constraint_processing.
913 (cp_finish_decl): Diagnose concept without initializer.
914 (grokfndecl, grokvardecl): Handle concepts and constraints.
915 (grokdeclarator): Handle concept, requires-clause.
916 (grokparms): No longer static.
917 (xref_tag_1): Check constraints.
918 (finish_function): Call check_function_concept.
919 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
920 (check_concept_refinement, is_concept_var, check_concept_fn): New.
921 * decl2.c (check_classfn): Compare constraints.
922 (mark_used): Don't instantiate concepts.
923 * error.c (dump_template_decl): Print constraints.
924 (dump_function_decl): Likewise.
925 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
926 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
927 * method.c (implicitly_declare_fn): Copy constraints from
929 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
930 prevent_constrained_type_specifiers fields.
931 * parser.c (make_call_declarator): Add requires_clause parm.
932 (cp_parser_new): Clear prevent_constrained_type_specifiers.
933 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
934 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
935 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
936 (cp_parser_declaration): Handle concept introduction.
937 (cp_parser_member_declaration): Likewise.
938 (cp_parser_template_parameter): Handle constrained parameter.
939 (cp_parser_type_parameter): Handle constraints.
940 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
941 (cp_parser_template_id): Handle partial concept id.
942 (cp_parser_type_name): Add overload that takes typename_keyword_p.
943 Handle constrained parameter.
944 (cp_parser_nonclass_name): Handle concept names.
945 (cp_parser_alias_declaration): Handle constraints.
946 (cp_parser_late_return_type_opt): Also handle requires-clause.
947 (cp_parser_type_id_1): Handle deduction constraint.
948 (cp_parser_parameter_declaration): Handle constrained parameters.
949 (cp_parser_class_specifier_1): Handle constraints.
950 (cp_parser_template_declaration_after_parameters): Split out from
951 cp_parser_template_declaration_after_export.
952 (cp_parser_single_declaration): Handle constraints.
953 (synthesize_implicit_template_parm): Handle constraints.
954 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
955 (cp_parser_introduction_list, get_id_declarator)
956 (get_unqualified_id, is_constrained_parameter)
957 (cp_parser_check_constrained_type_parm)
958 (cp_parser_constrained_type_template_parm)
959 (cp_parser_constrained_template_template_parm)
960 (constrained_non_type_template_parm, finish_constrained_parameter)
961 (declares_constrained_type_template_parameter)
962 (declares_constrained_template_template_parameter)
963 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
964 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
965 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
966 (cp_parser_requires_expression)
967 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
968 (cp_parser_requirement_list, cp_parser_requirement)
969 (cp_parser_simple_requirement, cp_parser_type_requirement)
970 (cp_parser_compound_requirement, cp_parser_nested_requirement)
971 (cp_parser_template_introduction)
972 (cp_parser_explicit_template_declaration)
973 (get_concept_from_constraint): New.
974 * pt.c (local_specialization_stack): Implement.
975 (maybe_new_partial_specialization): New.
976 (maybe_process_partial_specialization): Use it.
977 (retrieve_local_specialization, register_local_specialization)
978 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
979 (tsubst_expr): No longer static.
980 (spec_hasher::equal): Compare constraints.
981 (determine_specialization): Handle constraints.
982 (check_explicit_specialization): Handle concepts.
983 (process_template_parm): Handle constraints.
984 (end_template_parm_list): Add overload taking no arguments.
985 (process_partial_specialization): Handle concepts and constraints.
986 Register partial specializations of variable templates.
987 (redeclare_class_template): Handle constraints.
988 (convert_template_argument): Handle WILDCARD_DECL. Check
989 is_compatible_template_arg.
990 (coerce_template_parameter_pack): Handle wildcard packs.
991 (coerce_template_parms): DR 1430 also applies to concepts. Add
992 overloads taking fewer parameters.
993 (lookup_template_class_1): Handle constraints.
994 (lookup_template_variable): Concepts are always bool.
995 (finish_template_variable): Handle concepts and constraints.
996 (tsubst_friend_class): Handle constraints.
997 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
998 (tsubst_pack_expansion): Handle local parameters.
999 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1000 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1001 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1002 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1003 (more_specialized_inst): Split out from most_specialized_instantiation.
1004 (most_specialized_partial_spec): Check constraints.
1005 (instantiate_decl): Never instantiate a concept.
1006 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1008 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1009 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1010 (do_auto_deduction): Add overload taking tsubst flags and context enum.
1012 (get_template_for_ordering, most_constrained_function)
1013 (is_compatible_template_arg, convert_wildcard_argument)
1014 (struct constr_entry, struct constr_hasher, decl_constraints)
1015 (valid_constraints_p, get_constraints, set_constraints)
1016 (remove_constraints, init_constraint_processing): New.
1017 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1018 * search.c (lookup_member): Do lookup in the open partial
1020 * semantics.c (finish_template_template_parm): Handle constraints.
1021 (fixup_template_type): New.
1022 (finish_template_type): Call it.
1023 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1024 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1025 (cp_walk_subtrees): Handle REQUIRES_EXPR.
1026 * typeck.c (cp_build_function_call_vec): Check constraints.
1028 2015-08-06 Jason Merrill <jason@redhat.com>
1031 * parser.c (cp_parser_primary_expression): Don't skip to the end
1032 of the statement if we're parsing tentatively.
1037 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1039 * pt.c (tsubst_copy_and_build): Check for argument substitution
1042 2015-08-05 Jason Merrill <jason@redhat.com>
1044 * pt.c (determine_specialization): Print candidates after 'no
1047 * decl.c (cp_finish_decl): Tidy.
1048 * typeck.c (finish_class_member_access_expr): Use
1049 type_dependent_expression_p.
1050 * semantics.c (finish_id_expression): Use
1051 type_dependent_expression_p. Don't build_qualified_name for a
1052 decl in non-dependent scope.
1053 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1054 identifier is dependent. Remove variable_template_p check.
1060 * pt.c (lookup_template_variable): Use NULL_TREE for type.
1061 (instantiate_template_1): Also set DECL_TI_ARGS based on
1062 the immediate parent.
1063 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1064 (finish_template_variable): Add complain parm.
1065 * cp-tree.h: Adjust.
1069 * semantics.c (finish_id_expression): Call convert_from_reference
1070 for variable template.
1072 2015-08-04 Jason Merrill <jason@redhat.com>
1074 * pt.c (lookup_template_class_1): Clear elt.spec.
1076 * tree.c (build_target_expr): Copy the location from value.
1078 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1080 * parser.c (cp_parser_selection_statement): Move handling of
1081 semicolon body to ...
1082 (cp_parser_implicitly_scoped_statement): .. here. Call
1083 warn_for_misleading_indentation even when the body is a
1084 semicolon. Extract token_indent_infos corresponding to the
1085 guard, body and next tokens. Adjust call to
1086 warn_for_misleading_indentation accordingly. Take
1087 token_indent_info argument.
1088 (cp_parser_already_scoped_statement): Likewise.
1089 (cp_parser_selection_statement, cp_parser_iteration_statement):
1090 Extract a token_indent_info corresponding to the guard token.
1092 2015-08-01 Caroline Tice <cmtice@google.com>
1095 * mangle.c : Add vtable-verify.h to include files.
1096 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
1097 is "<anon>" get the real mangled name for the class instead, and
1098 also store the real mangled name in a vector for use later.
1100 2015-07-31 Marek Polacek <polacek@redhat.com>
1103 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1106 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1108 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1109 in warning_at instead of "%q+D" in warning.
1110 (warn_hidden): Likewise but use location_of.
1111 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1112 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1113 (check_field_decls): Likewise for permerror.
1114 (explain_non_literal_class): Likewise for inform.
1115 (check_bases_and_members, layout_class_type): Likewise for warning_at.
1116 (note_name_declared_in_class): Use location_of in permerror.
1117 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1118 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1119 inform, and warning_at.
1120 (check_for_out_of_scope_variable): Likewise for warning_at and
1123 2015-07-30 Jason Merrill <jason@redhat.com>
1127 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1129 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
1131 * call.c (build_op_delete_call, convert_like_real, build_over_call):
1132 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1134 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1135 * decl.c (duplicate_decls): Likewise for warning/warning_at.
1136 * except.c (maybe_noexcept_warning): Likewise.
1137 * friend.c (make_friend_class): Likewise for inform.
1138 * mangle.c (mangle_decl): Likewise for warning/warning_at.
1139 * method.c (process_subob_fn, walk_field_subobs,
1140 maybe_explain_implicit_delete): Likewise for inform.
1141 * parser.c (cp_parser_lambda_introducer): Likewise.
1142 * pt.c (check_specialization_namespace,
1143 maybe_process_partial_specialization): Likewise for permerror.
1144 (redeclare_class_template): Likewise for inform_n.
1145 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1146 * search.c (check_final_overrider): Likewise.
1147 * semantics.c (process_outer_var_ref): Likewise.
1149 2015-07-27 Jason Merrill <jason@redhat.com>
1151 * constexpr.c (cxx_eval_call_expression): Don't add this call to
1152 the hash table if !depth_ok.
1154 2015-07-27 Marek Polacek <polacek@redhat.com>
1158 * call.c (build_new_op_1): Call warn_tautological_cmp.
1159 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1162 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
1165 * typeck.c (check_return_expr): Also do the basic return-value
1166 validity checking if processing_template_decl and yet types are
1167 not dependent. Remove obsolete code.
1169 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
1171 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1172 in warning_at instead of "%q+D" in warning.
1173 (warn_extern_redeclared_static): Likewise for inform.
1174 (check_redeclaration_no_default_args): Likewise for permerror.
1175 (duplicate_decls): Likewise.
1176 (check_previous_goto_1): Likewise for inform.
1177 (check_goto, start_decl, check_for_uninitialized_const_var,
1178 start_preparsed_function, finish_function§): Likewise.
1179 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1180 * init.c (sort_mem_initializers): Likewise.
1181 * typeck.c (convert_for_initialization): Likewise for inform.
1182 (maybe_warn_about_returning_address_of_local): Likewise.
1183 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1184 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1186 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
1189 * cvt.c (ocp_convert): Don't call scalar_constant_value when
1190 converting to a class type.
1192 2015-07-24 Jason Merrill <jason@redhat.com>
1195 * pt.c (splice_late_return_type): Correct deduced return type for
1196 abbreviated function template.
1198 2015-07-24 Richard Biener <rguenther@suse.de>
1200 * init.c (build_vec_init): Build iterator bound in the same
1201 type as the iterator.
1203 2015-07-23 Marek Polacek <polacek@redhat.com>
1206 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1208 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
1211 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1212 redundant error messages.
1214 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1216 * decl.c (grokdeclarator): For an erroneous template parameter
1217 propagate error_mark_node as type.
1219 2015-07-20 Marek Polacek <polacek@redhat.com>
1222 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1224 2015-07-15 Jason Merrill <jason@redhat.com>
1227 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1228 template if there is no type x in scope.
1230 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
1233 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1234 template template parm in the redeclaration.
1235 (lookup_template_class_1): Peel off irrelevant template levels
1236 from current_template_parms before augmenting the argument
1239 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
1242 * parser.c (cp_parser_sizeof_pack): Also consider template template
1245 2015-07-14 Jason Merrill <jason@redhat.com>
1247 * call.c (build_new_method_call_1): Call reshape_init.
1249 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
1251 * pt.c (check_template_shadow): Emit error + inform instead of
1254 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
1257 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1258 template parm type under C++11 and later.
1260 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1262 * call.c: Fix double word typos.
1263 * cp-array-notation.c: Same.
1266 * name-lookup.c: Same.
1269 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
1272 * pt.c (begin_template_parm_list): Add a dummy parameter level
1273 to current_template_parms.
1274 (end_template_parm_list): Remove the dummy parameter level
1275 before adding the real one.
1276 (tsubst): Don't attempt to substitute for template parameters
1277 corresponding to a dummy argument level.
1278 (template_parms_to_args): Remove obsolete hack for
1279 giving template template arguments the proper level.
1280 (splite_late_return_type): Remove obsolete hack for giving
1281 template template arguments the proper level.
1282 * error.c (dump_template_decl): Don't print dummy template
1285 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1288 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1289 the second step of copy-initialization.
1291 2015-07-10 Jason Merrill <jason@redhat.com>
1293 * pt.c (find_parameter_packs_r): Handle variable templates.
1294 (variable_template_specialization_p): New.
1295 * cp-tree.h: Declare it.
1297 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1299 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1301 * decl2.c (cpp_check): Revert latest change.
1303 2015-07-09 Jason Merrill <jason@redhat.com>
1305 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1306 value_dependent_expression_p.
1308 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1309 template_parameter_pack_p.
1310 * parser.c (declarator_can_be_parameter_pack): False if
1311 parameter_pack_p is set.
1312 (make_parameter_declarator): Add template_parameter_pack_p parm.
1313 (cp_parser_template_parameter): Remove parameter pack parsing.
1314 (cp_parser_parameter_declaration): Handle all parameter packs.
1315 Tweak default argument permerror.
1317 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1319 * parser.c (cp_parser_default_type_template_argument)
1320 (cp_parser_default_template_template_argument): Factor out from
1321 cp_parser_type_parameter.
1323 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1325 * typeck.c (warn_args_num): Rename to error_args_num.
1326 (convert_arguments): Adjust calls.
1328 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1330 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1332 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1334 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1336 2015-07-08 Jakub Jelinek <jakub@redhat.com>
1338 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1339 * pt.c (apply_late_template_attributes): Likewise.
1341 2015-07-08 Marek Polacek <polacek@redhat.com>
1344 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1345 accessing TYPE_LANG_SPECIFIC node.
1347 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1349 * call.c: Adjust includes.
1350 * class.c: Likewise.
1351 * constexpr.c: Likewise.
1352 * cp-array-notation.c: Likewise.
1353 * cp-gimplify.c: Likewise.
1354 * cp-lang.c: Likewise.
1355 * cp-objcp-common.c: Likewise.
1356 * cp-ubsan.c: Likewise.
1359 * decl2.c: Likewise.
1361 * error.c: Likewise.
1362 * except.c: Likewise.
1364 * friend.c: Likewise.
1366 * lambda.c: Likewise.
1368 * mangle.c: Likewise.
1369 * method.c: Likewise.
1370 * name-lookup.c: Likewise.
1371 * optimize.c: Likewise.
1372 * parser.c: Likewise.
1374 * ptree.c: Likewise.
1377 * search.c: Likewise.
1378 * semantics.c: Likewise.
1380 * typeck.c: Likewise.
1381 * typeck2.c: Likewise.
1383 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1385 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1387 2015-07-06 Jason Merrill <jason@redhat.com>
1389 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1390 for a template template parameter.
1391 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1392 by reduce_template_parm_level.
1394 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
1397 2015-07-02 Jason Merrill <jason@redhat.com>
1400 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
1401 TYPE_VALUES_RAW rather than TYPE_FIELDS.
1403 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
1405 * pt.c (type_dependent_expression_p): Handle expressions
1406 that refer to variable templates.
1408 2015-07-01 Jason Merrill <jason@redhat.com>
1410 * lex.c (init_reswords): s/CXX0X/CXX11/.
1411 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1413 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
1414 Attribute mangling is now -fabi-version=10.
1417 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
1418 * class.c (layout_nonempty_base_or_field): Warn if that affects
1419 the offset of a field.
1421 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
1424 * parser.c (cp_parser_check_std_attribute): New.
1425 (cp_parser_std_attribute_list): Call it.
1427 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
1430 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
1431 return 0 if tsubst returns a dependent type.
1433 2015-06-30 Jason Merrill <jason@redhat.com>
1436 * decl2.c (is_late_template_attribute): True for tls_model.
1439 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
1440 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
1441 (SET_DECL_GNU_TLS_P): New.
1442 * call.c (make_temporary_var_for_ref_to_temp): Use
1443 CP_DECL_THREAD_LOCAL_P.
1444 (set_up_extended_ref_temp): Likewise.
1445 * decl.c (duplicate_decls, expand_static_init): Likewise.
1446 (redeclaration_error_message, grokvardecl): Likewise.
1447 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
1448 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
1449 (handle_tls_init): Likewise.
1450 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1451 * semantics.c (finish_id_expression): Likewise.
1452 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
1453 (finish_omp_threadprivate): Likewise.
1454 * tree.c (decl_storage_duration): Likewise.
1455 * cp-gimplify.c (omp_var_to_track): Likewise.
1456 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
1457 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
1460 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1462 Implement N4197 - Adding u8 character literals
1463 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
1464 and CPP_UTF8CHAR_USERDEF tokens;
1465 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
1467 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1470 * decl.c (grokfndecl): Allow constexpr declarations of friend
1471 template specializations.
1473 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1476 * decl.c (finish_function): Call do_warn_unused_parameter.
1478 2015-06-29 Marek Polacek <polacek@redhat.com>
1481 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1482 (push_switch): Set OUTSIDE_RANGE_P.
1483 (pop_switch): Update c_do_switch_warnings call.
1484 (finish_case_label): Update c_add_case_label call.
1485 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1488 2015-06-27 Marek Polacek <polacek@redhat.com>
1490 * call.c: Use VECTOR_TYPE_P.
1491 * constexpr.c: Likewise.
1494 * decl2.c: Likewise.
1496 * semantics.c: Likewise.
1498 * typeck.c: Likewise.
1499 * typeck2.c: Likewise.
1501 2015-06-27 Marek Polacek <polacek@redhat.com>
1503 * call.c (set_up_extended_ref_temp): Use VAR_P.
1504 * class.c: Use VAR_P throughout.
1505 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1506 * cp-array-notation.c (make_triplet_val_inv): Likewise.
1507 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1509 * decl2.c: Likewise.
1510 * error.c (dump_decl): Use VAR_P.
1511 * mangle.c (decl_implicit_alias_p): Likewise.
1512 * parser.c: Use VAR_P throughout.
1514 * semantics.c: Likewise.
1515 * vtable-class-hierarchy.c: Likewise.
1516 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1518 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
1520 * pt.c (check_unstripped_args): Mark parameter as unused.
1522 2015-06-26 Jason Merrill <jason@redhat.com>
1525 * class.c (finish_struct): Call fixup_attribute_variants.
1528 * typeck2.c (merge_exception_specifiers): Allow different
1529 noexcept-specifiers if we've had errors.
1532 * pt.c (check_unstripped_args): Split out from...
1533 (retrieve_specialization): ...here. Allow typedefs in the type of
1534 a non-type argument.
1537 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
1539 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
1542 * typeck2.c (digest_init_r): Only expect reshaping if the class is
1545 2015-06-26 Marek Polacek <polacek@redhat.com>
1547 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
1548 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
1550 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1552 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
1553 * class.c: Likewise.
1554 * cp-ubsan.c: Likewise.
1556 * decl2.c: Likewise.
1557 * lambda.c: Likewise.
1558 * mangle.c: Likewise.
1559 * method.c: Likewise.
1560 * optimize.c: Likewise.
1561 * parser.c: Likewise.
1562 * semantics.c: Likewise.
1564 * vtable-class-hierarchy.c: Likewise.
1566 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1568 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
1569 rather than ggc_hasher.
1570 (constexpr_call_hasher): Likewise.
1571 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
1572 * decl.c (typename_hasher): Likewise.
1573 * mangle.c (conv_type_hasher): Likewise.
1574 * pt.c (spec_hasher): Likewise.
1575 * tree.c (cplus_array_hasher, list_hasher): Likewise.
1576 * typeck2.c (abstract_type_hasher): Likewise.
1578 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1580 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1581 rather than pointer_hash.
1582 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1583 * semantics.c (nrv_data): Likewise.
1584 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1586 2015-06-24 Jason Merrill <jason@redhat.com>
1589 * pt.c (dependent_type_p_r): Check for dependent alias template
1590 specialization sooner.
1593 * class.c (type_has_nontrivial_assignment): Remove.
1594 * cp-tree.h: Remove declaration.
1595 * init.c (vec_copy_assign_is_trivial): New.
1596 (build_vec_init): Use it.
1598 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
1600 Implement N3928 - Extending static_assert
1601 * parser.c (cp_parser_static_assert): Support static_assert with
1602 no message string. Supply an empty string in this case.
1603 * semantics.c (finish_static_assert): Don't try to print a message if
1604 the message strnig is empty.
1606 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
1609 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1610 implicit template parm if 'auto' is a placeholder for trailing
1613 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
1616 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1619 * parser.c (cp_parser_template_parameter_list): Update
1620 current_template_parms right after processing a paramater.
1621 * pt.c (template_parms_to_args): Remove obsolete hack for
1622 giving template template arguments the proper level.
1623 (check_default_tmpl_args): Account for tested template
1625 (splite_late_return_type): Remove obsolete hack for giving
1626 template template arguments the proper level.
1628 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1631 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
1633 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1636 * parser.c (cp_parser_template_parameter_list): Update
1637 current_template_parms right after processing a paramater.
1638 * pt.c (template_parms_to_args): Remove obsolete hack for
1639 giving template template arguments the proper level.
1640 (check_default_tmpl_args): Account for tested template
1642 (splite_late_return_type): Remove obsolete hack for giving
1643 template template arguments the proper level.
1645 2015-06-23 Jason Merrill <jason@redhat.com>
1648 * decl.c (grokfndecl): Check the linkage of ctype, not just
1650 * tree.c (no_linkage_check): Skip the 'this' pointer.
1653 * class.c (type_has_nontrivial_assignment): New.
1654 * init.c (build_vec_init): Use it.
1655 * cp-tree.h: Declare it.
1656 * method.c (trivial_fn_p): Templates aren't trivial.
1659 * decl.c (expand_static_init): Make sure the destructor is callable
1660 here even if we have an initializer.
1662 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
1664 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
1665 -fdump-ada-spec is passed.
1667 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
1669 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
1671 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1673 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
1675 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1677 * decl.c (grokdeclarator): Remove pointless code.
1679 2015-06-22 Jason Merrill <jason@redhat.com>
1682 * call.c (implicit_conversion): Only reshape for classes.
1684 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
1686 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
1688 * semantics.c (finish_omp_atomic): Likewise.
1689 * typeck.c (cp_build_array_ref): Likewise.
1691 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
1694 * call.c (build_new_op_1): Check tf_warning flag in all cases.
1696 2015-06-19 Jason Merrill <jason@redhat.com>
1699 * pt.c (instantiate_class_template_1): Clear
1700 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
1703 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1705 * typeck.c (merge_types): build_ptrmemfunc_type before applying
1706 quals and attributes.
1709 * constexpr.c (build_constexpr_constructor_member_initializers):
1710 Handle an empty STATEMENT_LIST.
1713 * pt.c (tsubst_copy_and_build): Register a capture proxy in
1714 local_specializations.
1716 2015-06-17 Jason Merrill <jason@redhat.com>
1719 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1721 (potential_constant_expression_1): Likewise.
1723 2015-06-17 Jason Merrill <jason@redhat.com>
1726 * call.c (implicit_conversion): Call reshape_init here, early.
1727 (build_aggr_conv): Not here.
1729 2015-06-17 Jakub Jelinek <jakub@redhat.com>
1732 * pt.c (tsubst_omp_clause_decl): New function.
1733 (tsubst_omp_clauses): Use it or tsubst_copy instead of
1734 tsubst_expr on OMP_CLAUSE_DECL.
1736 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1738 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1739 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1740 * decl.c (grokdeclarator, xref_tag_1): Likewise.
1741 * error.c (dump_aggr_type): likewise.
1742 * pt.c (push_template_decl_real): Likewise.
1743 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1745 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1747 * call.c: Do not include input.h, line-map.h or is-a.h.
1748 * class.c: Likewise.
1749 * constexpr.c: Likewise.
1750 * cp-array-notation.c: Likewise.
1751 * cp-gimplify.c: Likewise.
1752 * cp-lang.c: Likewise.
1753 * cp-objcp-common.c: Likewise.
1754 * cp-tree.h: Likewise.
1755 * cp-ubsan.c: Likewise.
1758 * decl2.c: Likewise.
1760 * error.c: Likewise.
1761 * except.c: Likewise.
1763 * friend.c: Likewise.
1765 * lambda.c: Likewise.
1767 * mangle.c: Likewise.
1768 * method.c: Likewise.
1769 * name-lookup.c: Likewise.
1770 * optimize.c: Likewise.
1771 * parser.c: Likewise.
1773 * ptree.c: Likewise.
1776 * search.c: Likewise.
1777 * semantics.c: Likewise.
1779 * typeck.c: Likewise.
1780 * typeck2.c: Likewise.
1781 * vtable-class-hierarchy.c: Likewise.
1783 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
1786 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1788 2015-06-16 Jason Merrill <jason@redhat.com>
1791 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1795 * tree.c (bot_manip): Remap SAVE_EXPR.
1798 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1800 2015-06-15 Nathan Sidwell <nathan@acm.org>
1803 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1804 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1805 protect it from recursive instantiation.
1807 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
1810 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1811 using a local type is pure virtual.
1813 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1815 * call.c: Remove comment documenting the long-deleted
1816 function build_method_call.
1818 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1821 * typeck.c (cp_build_binary_op): Warn when comparing an address
1822 of a reference against NULL.
1824 2015-06-12 Jason Merrill <jason@redhat.com>
1827 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1828 variables as DECL_NOT_REALLY_EXTERN.
1830 2015-06-11 Jason Merrill <jason@redhat.com>
1833 * constexpr.c (potential_constant_expression_1): Handle a
1834 DECL_EXPR of TYPE_DECL.
1837 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1840 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1842 * decl.c (cxx_init_decl_processing): Register the main
1843 translation unit through the new debug hook.
1845 2015-06-10 Jason Merrill <jason@redhat.com>
1848 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1849 * pt.c (push_template_decl_real): Set it.
1850 (dependent_alias_template_spec_p): Use it.
1851 (dependent_type_p_r): Use dependent_alias_template_spec_p.
1852 (uses_all_template_parms_data, uses_all_template_parms_r)
1853 (complex_alias_template_p): New.
1854 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1856 2015-06-09 Jason Merrill <jason@redhat.com>
1860 * typeck2.c (digest_init_r): Replace previous change with
1864 * semantics.c (process_outer_var_ref): Make sure the value is
1865 actually constant before returning it.
1866 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1869 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1872 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1873 * init.c (expand_default_init): Likewise.
1875 2015-06-09 Jason Merrill <jason@redhat.com>
1878 * tree.c (replace_placeholders_r): Handle placeholders for an
1880 * typeck2.c (store_init_value): Only replace_placeholders for
1881 objects of class type.
1883 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1885 * call.c : Adjust include files.
1886 * class.c : Likewise.
1887 * constexpr.c : Likewise.
1888 * cp-array-notation.c : Likewise.
1889 * cp-cilkplus.c : Likewise.
1890 * cp-gimplify.c : Likewise.
1891 * cp-lang.c : Likewise.
1892 * cp-objcp-common.c : Likewise.
1893 * cp-tree.h : Likewise.
1894 * cp-ubsan.c : Likewise.
1896 * decl.c : Likewise.
1897 * decl2.c : Likewise.
1898 * dump.c : Likewise.
1899 * error.c : Likewise.
1900 * except.c : Likewise.
1901 * expr.c : Likewise.
1902 * friend.c : Likewise.
1903 * init.c : Likewise.
1904 * lambda.c : Likewise.
1906 * mangle.c : Likewise.
1907 * method.c : Likewise.
1908 * name-lookup.c : Likewise.
1909 * optimize.c : Likewise.
1910 * parser.c : Likewise.
1912 * ptree.c : Likewise.
1913 * repo.c : Likewise.
1914 * rtti.c : Likewise.
1915 * search.c : Likewise.
1916 * semantics.c : Likewise.
1917 * tree.c : Likewise.
1918 * typeck.c : Likewise.
1919 * typeck2.c : Likewise.
1920 * vtable-class-hierarchy.c : Likewise.
1922 2015-06-05 Jason Merrill <jason@redhat.com>
1925 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1926 the expansion has extra args.
1927 (use_pack_expansion_extra_args_p): Return true in that case.
1930 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1931 dependent even if it has a type.
1933 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1935 * cp-objcp-common.c: Adjust comment for
1936 cxx_warn_unused_global_decl.
1937 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1938 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1939 * cp-tree.h (note_mangling_alias): Protoize.
1940 (cp_write_global_declarations): Remove.
1941 (cxx_post_compilation_parsing_cleanups): Protoize.
1942 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1944 * decl2.c (mangling_aliases): New global.
1945 (build_java_method_aliases): New. Adapted from
1946 collect_candidates_for_java_method_aliases.
1947 (collect_candidates_for_java_method_aliases): Remove.
1948 (build_java_method_aliases): Remove.
1949 (generate_mangling_aliases): New.
1950 (note_mangling_alias): New. Moved from mangle_decl.
1951 (locus_at_end_of_parsing): New global.
1952 (c_parse_final_cleanups): Rename from
1953 cp_write_global_declarations.
1954 Use locus_at_end_of_parsing.
1955 Call generate_mangling_aliases.
1956 Rename call to collect_candidates_for_java_method_aliases into
1957 build_java_method_aliases.
1958 Remove call to finalize_compilation_unit.
1959 Move vtable handling into cxx_post_compilation_parsing_cleanups.
1960 Do not call check_global_declarations or
1961 emit_debug_global_declarations.
1962 (cxx_post_compilation_parsing_cleanups): New.
1963 * mangle.c (mangle_decl): Move code to note_mangling_alias.
1964 * name-lookup.c (do_namespace_alias): Call early_global_decl.
1966 2015-06-05 Nathan Sidwell <nathan@acm.org>
1969 * parser.c (cp_parser_cache_defarg): Continue looking for
1970 declarators when scanning a potential template argument list of an
1973 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1975 * call.c: Adjust includes for restructured coretypes.h.
1976 * class.c: Likewise.
1977 * constexpr.c: Likewise.
1978 * cp-array-notation.c: Likewise.
1979 * cp-gimplify.c: Likewise.
1980 * cp-lang.c: Likewise.
1981 * cp-objcp-common.c: Likewise.
1982 * cp-tree.h: Likewise.
1983 * cp-ubsan.c: Likewise.
1986 * decl2.c: Likewise.
1988 * error.c: Likewise.
1989 * except.c: Likewise.
1991 * friend.c: Likewise.
1993 * lambda.c: Likewise.
1995 * mangle.c: Likewise.
1996 * method.c: Likewise.
1997 * name-lookup.c: Likewise.
1998 * optimize.c: Likewise.
1999 * parser.c: Likewise.
2001 * ptree.c: Likewise.
2004 * search.c: Likewise.
2005 * semantics.c: Likewise.
2007 * typeck.c: Likewise.
2008 * typeck2.c: Likewise.
2009 * vtable-class-hierarchy.c: Likewise.
2011 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2015 * cp-tree.h (get_guard_cond): Adjust declaration
2016 * decl.c (expand_static_init): Use atomic load acquire
2017 and adjust call to get_guard_cond.
2018 * decl2.c (build_atomic_load_byte): New function.
2019 (get_guard_cond): Handle thread_safety.
2020 (one_static_initialization_or_destruction): Adjust call to
2023 2015-06-03 Jason Merrill <jason@redhat.com>
2026 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2027 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2028 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2029 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2031 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2032 Paolo Carlini <paolo.carlini@oracle.com>
2035 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2036 use it in the diagnostic.
2037 (decay_conversion): Adjust call.
2038 * semantics.c (finish_decltype_type): Likewise.
2039 * call.c (resolve_args, build_new_op_1,
2040 perform_implicit_conversion_flags): Adjust calls.
2041 * cvt.c (ocp_convert, convert_to_void): Likewise.
2042 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2044 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2046 * decl.c (check_tag_decl): Use declspecs->locations as locations in
2047 error_at and warning_at calls.
2049 2015-06-03 Marek Polacek <polacek@redhat.com>
2052 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2053 (cp_genericize_r): Don't instrument static initializers.
2054 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2056 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2058 * decl.c (start_function): Call plugin before parsing.
2059 (finish_function): Call plugin after parsing.
2061 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
2063 * cp-tree.h (init_error): Remove declaration.
2064 * error.c (scratch_pretty_printer): Rename to ...
2065 (actual_pretty_printer): ... this.
2066 (cxx_pp): Constify and update accordingly.
2067 (init_error): Remove definition.
2068 * lex.c (cxx_init): Do not call init_error.
2070 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2073 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2075 2015-06-01 Jason Merrill <jason@redhat.com>
2078 * decl2.c (mark_used): Don't always instantiate constexpr fns.
2079 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2082 * mangle.c (attr_strcmp): New.
2083 (write_CV_qualifiers_for_type): Also write out attributes that
2084 affect type identity.
2085 (write_type): Strip all attributes after writing qualifiers.
2087 2015-05-31 Jason Merrill <jason@redhat.com>
2089 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2092 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2093 with the wrong type as non-constant.
2095 2015-05-27 Jason Merrill <jason@redhat.com>
2097 * decl.c (check_redeclaration_exception_specification): Depend on
2098 -Wsystem-headers rather than -pedantic.
2100 * decl.c (warn_extern_redeclared_static): Use the location of
2101 newdecl in diagnostics, not input_location.
2102 (validate_constexpr_redeclaration): Likewise.
2103 (check_redeclaration_no_default_args): Likewise.
2104 (duplicate_decls): Likewise.
2105 (check_redeclaration_exception_specification): Likewise.
2106 Change second diagnostic to inform.
2108 2015-05-24 Nathan Sidwell <nathan@acm.org>
2111 * decl.c (build_enumerator): Don't silently convert scoped enums.
2113 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
2116 * mangle.c (mangle_decl): Mangle anonymous namespace types as
2119 2015-05-23 Nathan Sidwell <nathan@acm.org>
2122 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2124 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2126 * Make-lang.in (check_g++_parallelize): Update comment.
2128 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2131 * decl.c (grokdeclarator): Use the correct location in error
2132 messages about 'explicit'.
2134 2015-05-22 Marek Polacek <polacek@redhat.com>
2135 Edward Smith-Rowland <3dw4rd@verizon.net>
2138 * cp-tree.h (build_enumerator): Update declaration.
2139 * decl.c (build_enumerator): Add attributes parameter. Call
2140 cplus_decl_attributes.
2141 * init.c (constant_value_1): Pass tf_none to mark_used.
2142 * parser.c (cp_parser_enumerator_definition): Parse attributes and
2143 pass them down to build_enumerator.
2144 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2145 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2147 2015-05-21 Nathan Sidwell <nathan@acm.org>
2150 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2152 2015-05-21 Marek Polacek <polacek@redhat.com>
2154 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2156 2015-05-20 Jason Merrill <jason@redhat.com>
2158 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2159 before register_specialization.
2161 * decl.c (grok_op_properties): Don't complain about size_t
2162 placement delete here.
2163 * call.c (second_parm_is_size_t): Split out from...
2164 (non_placement_deallocation_fn_p): ...here.
2165 (build_op_delete_call): Warn about size_t placement delete with
2168 2015-05-19 Nathan Sidwell <nathan@acm.org>
2171 * typeck.c (finish_class_member_access_expr): Diagnose failed
2172 lookup of enum class member.
2174 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2177 * parser.c (cp_parser_omp_for_loop): Don't add
2178 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2179 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2180 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2183 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2185 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2188 2015-05-18 Jason Merrill <jason@redhat.com>
2190 * pt.c (retrieve_specialization): Make sure our arguments have
2191 gone through strip_typedefs.
2193 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2194 (determine_specialization): Call coerce_template_parms.
2197 * pt.c (type_unification_real): Check convertibility here.
2198 (unify_one_argument): Not here.
2200 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2201 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2202 [TREE_LIST]: Fix no-change case.
2204 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2206 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2209 * error.c (cp_diagnostic_starter): Use diagnostic_location
2211 (cp_print_error_function): Likewise.
2212 (cp_printer): Replace locus pointer with accessor function.
2214 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2216 * parser.c (cp_parser_selection_statement): Add location and
2217 guard_kind arguments to calls to
2218 cp_parser_implicitly_scoped_statement.
2219 (cp_parser_iteration_statement): Likewise for calls to
2220 cp_parser_already_scoped_statement.
2221 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2222 "guard_kind" params; use them to warn for misleading
2224 (cp_parser_already_scoped_statement): Likewise.
2226 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
2228 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2229 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2230 * semantics.c (finish_member_declaration): Likewise.
2231 * method.c (lazily_declare_fn): Allways add method to main variant list.
2233 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
2236 * decl2.c (note_mangling_alias): Declare arguments as unused.
2238 2015-05-08 Jason Merrill <jason@redhat.com>
2240 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2243 2015-05-08 Jason Merrill <jason@redhat.com>
2245 * decl2.c (mangling_aliases): New variable.
2246 (note_mangling_alias, generate_mangling_aliases): New.
2247 (cp_write_global_declarations): Call generate_mangling_aliases.
2248 (generate_mangling_alias): Split out from...
2249 * mangle.c (mangle_decl): ...here.
2250 * cp-tree.h: Declare note_mangling_alias.
2252 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
2254 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2255 (build_java_method_aliases): Adapt to use create_same_body_alias
2256 instead of assemble_alias. Move variable declarations to
2257 definition and tidy up.
2258 (cp_write_global_declarations): Call build_java_method_aliases
2259 instead of collecting candidates first.
2261 2015-05-07 Jason Merrill <jason@redhat.com>
2264 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2265 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2266 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2267 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2268 (apply_late_template_attributes): Handle attribute pack expansion.
2270 2015-05-07 Marek Polacek <polacek@redhat.com>
2273 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2276 2015-05-07 Jason Merrill <jason@redhat.com>
2280 * typeck2.c (digest_init_r): Fix single element list.
2282 2015-05-05 Jason Merrill <jason@redhat.com>
2284 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2285 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2286 MUST_NOT_THROW_EXPR.
2287 (cp_genericize_data): Add try_block field.
2288 (cp_genericize_tree): Initialize it.
2289 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2292 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2295 * semantics.c (finish_call_expr): Check complain.
2297 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2298 maybe-in-charge constructor.
2300 * decl.c (start_decl): Don't push the plain VAR_DECL for a
2307 * call.c (convert_like_real): Check value-initialization before
2309 * typeck2.c (process_init_constructor_record): Don't set
2310 CONSTRUCTOR_IS_DIRECT_INIT.
2311 (process_init_constructor_array): Likewise.
2312 * init.c (build_vec_init): Likewise.
2314 2015-05-05 David Malcolm <dmalcolm@redhat.com>
2316 * parser.c (cp_parser_asm_definition): Only test for
2317 error_mark_node if "outputs" was just set. Likewise for "inputs".
2319 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2320 Jakub Jelinek <jakub@redhat.com>
2323 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2324 result in an actual error.
2326 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2327 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
2330 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2333 2015-04-30 David Malcolm <dmalcolm@redhat.com>
2335 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2338 2015-04-29 Jason Merrill <jason@redhat.com>
2341 * tree.c (apply_identity_attributes): Fix handling of classes.
2343 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2345 * parser.c (cp_parser_oacc_enter_exit_data): Use
2346 OMP_STANDALONE_CLAUSES.
2348 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
2351 * init.c (perform_member_init): Handle references for -Winit-self.
2353 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2355 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2356 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2358 2015-04-28 Jason Merrill <jason@redhat.com>
2361 * constexpr.c (cxx_eval_store_expression): Don't try to actually
2362 store an empty class.
2365 * constexpr.c (cxx_eval_builtin_function_call): Fix
2366 __builtin_constant_p.
2369 * tree.c (strip_typedefs): Add remove_attributes parm.
2370 (strip_typedefs_expr): Likewise.
2371 (apply_identity_attributes): New subroutine of strip_typedefs.
2372 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2373 (convert_nontype_argument, unify): Likewise.
2374 * cp-tree.h: Adjust.
2377 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2379 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2381 * class.c (layout_class_type): Remove check if
2382 PCC_BITFIELD_TYPE_MATTERS is defined.
2384 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2386 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2388 2015-04-24 Jason Merrill <jason@redhat.com>
2391 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2393 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2394 Remove obsolete code.
2395 [NE_EXPR]: Likewise.
2397 2015-04-23 Jason Merrill <jason@redhat.com>
2400 * pt.c (check_explicit_specialization): Don't
2401 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
2403 * decl.c (grokvardecl): Revert earlier fix.
2405 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
2408 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
2409 suppresses the diagnostic.
2411 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
2413 Reject trailing return type for an operator auto().
2414 * decl.c (grokdeclarator): Reject trailing return types for
2415 all conversion operators, don't handle conversion operators
2416 in the previous checks that deal with auto.
2418 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2420 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
2422 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2424 * class.c (resolve_address_of_overloaded_function, instantiate_type):
2425 Rename tsubst_flags_t parameter flags -> complain.
2427 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2429 * call.c (build_op_delete_call, build_over_call): Check mark_used
2431 * class.c (resolve_address_of_overloaded_function): Likewise.
2432 * decl.c (cxx_maybe_build_cleanup): Likewise.
2433 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
2434 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
2435 * rtti.c (build_dynamic_cast_1): Likewise.
2436 * semantics.c (process_outer_var_ref): Likewise.
2437 * typeck.c (build_class_member_access_expr,
2438 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
2440 2015-04-15 Jason Merrill <jason@redhat.com>
2442 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
2443 (build_constexpr_constructor_member_initializers): Loop to find
2445 * decl.c (start_preparsed_function): Clobber the object at the
2446 beginning of a constructor.
2448 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
2449 * method.c (implicitly_declare_fn): Likewise.
2450 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
2452 * decl2.c (determine_visibility): Use get_template_info.
2454 2015-04-15 Jason Merrill <jason@redhat.com>
2455 Marek Polacek <polacek@redhat.com>
2458 * lambda.c (lambda_expr_this_capture): In unevaluated context go
2459 through the normal loop, just don't capture.
2460 (maybe_resolve_dummy): Handle null return.
2462 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2464 * call.c (enforce_access): Emit error + inform.
2466 2015-04-15 Marek Polacek <polacek@redhat.com>
2468 * constexpr.c (use_new_call): Remove #define.
2469 (lookup_parameter_binding): Remove function.
2470 (cxx_bind_parameters_in_call): Remove unused code.
2471 (cxx_eval_call_expression): Likewise.
2472 (cxx_eval_constant_expression): Likewise.
2474 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
2476 * tree.c (replace_placeholders_t): Remove unused type.
2477 (replace_placeholders): Remove unused pset.
2479 2015-04-14 Jason Merrill <jason@redhat.com>
2481 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2484 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2487 * name-lookup.c (do_class_using_decl): Complain about specifying
2488 the current class even if there are dependent bases.
2490 2015-04-14 David Krauss <david_work@me.com>
2493 * decl.c (grokdeclarator): Do not flag friends with deduced return.
2495 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
2496 Jason Merrill <jason@redhat.com>
2499 * parser.c (cp_parser_class_name): Add enum_ok parameter.
2500 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2501 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2504 2015-04-12 Jakub Jelinek <jakub@redhat.com>
2507 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2508 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
2509 the expression to the original type at the end.
2511 2015-04-09 Jakub Jelinek <jakub@redhat.com>
2514 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2518 * tree.c (build_cplus_array_type): Layout type before variants are
2519 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2522 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2525 * lambda.c (add_capture): Use dependent_type_p for capture by
2528 2015-04-02 Marek Polacek <polacek@redhat.com>
2531 * constexpr.c (cxx_eval_pointer_plus_expression): Call
2532 cxx_eval_constant_expression on the first operand.
2534 2015-04-01 Jason Merrill <jason@redhat.com>
2537 * decl.c (make_typename_type): Handle seeing a variable template.
2539 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2542 * pt.c (instantiating_current_function_p): New.
2543 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
2544 * cp-tree.h (instantiating_current_function_p): Declare.
2546 2015-04-01 Jason Merrill <jason@redhat.com>
2549 * decl.c (grokvardecl): Don't call check_explicit_specialization
2550 for non-template members of a class template.
2552 2015-04-01 Marek Polacek <polacek@redhat.com>
2555 * class.c (finish_struct): Require that the second field of a
2556 user-defined initializer_list be of size type.
2558 2015-03-31 Marek Polacek <polacek@redhat.com>
2561 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
2562 checking for constness.
2564 2015-03-30 Marek Polacek <polacek@redhat.com>
2567 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
2568 *(&A[i] p+ j) => A[i + j] transformation here.
2569 (cxx_eval_pointer_plus_expression): New function.
2570 (cxx_eval_constant_expression): Use it here.
2572 2015-03-27 Tobias Burnus <burnus@net-b.de>
2575 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
2576 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
2577 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2580 2015-03-27 Marek Polacek <polacek@redhat.com>
2583 * semantics.c (finish_switch_cond): If the unlowered type is not an
2584 enum, use the type of the condition.
2586 2015-03-27 Jason Merrill <jason@redhat.com>
2589 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2592 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
2595 * init.c (build_vec_init): Fix initializing aggregates
2596 with empty init list.
2598 2015-03-26 Jason Merrill <jason@redhat.com>
2601 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2603 2015-03-25 Marek Polacek <polacek@redhat.com>
2606 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2607 on an anonymous namespace.
2609 2015-03-25 Marek Polacek <polacek@redhat.com>
2612 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2614 2015-03-24 Jason Merrill <jason@redhat.com>
2617 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2618 * parser.c (cp_parser_namespace_definition): Don't set it.
2619 * name-lookup.c (handle_namespace_attrs): Check
2620 DECL_NAMESPACE_ASSOCIATIONS instead.
2623 * pt.c (get_mostly_instantiated_function_type): Just return the
2624 type of the partially instantiated template in DECL_TI_TEMPLATE.
2626 2015-03-20 Marek Polacek <polacek@redhat.com>
2629 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
2632 2015-03-20 Marek Polacek <polacek@redhat.com>
2635 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
2638 2015-03-19 Jason Merrill <jason@redhat.com>
2641 Automatically propagate ABI tags to variables and functions
2642 from their (return) type.
2643 * class.c (check_tag): Handle variables and functions.
2644 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
2645 (mark_or_check_tags): Likewise.
2646 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
2647 (check_abi_tags): Add single argument overload for decls.
2648 Handle inheriting tags for decls.
2649 * mangle.c (write_mangled_name): Call it.
2650 (mangle_return_type_p): Split out from write_encoding.
2651 (unmangled_name_p): Split out from write_mangled_name.
2652 (write_mangled_name): Ignore abi_tag on namespace.
2653 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
2654 * parser.c (cp_parser_namespace_definition): Set it.
2655 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
2656 about abi_tag attribute on non-inline namespace.
2657 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
2658 (handle_abi_tag_attribute): Allow tags on variables.
2660 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2662 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
2663 attribute for DECL_EXTERNAL VAR_DECLs.
2665 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2668 * call.c (build_over_call): Pass the tsubst_flags_t argument to
2670 * decl2.c (mark_used): Inline the require_deduced_type call and
2671 guard the error call.
2673 2015-03-16 Jason Merrill <jason@redhat.com>
2676 * parser.c (cp_parser_template_name): Call strip_using_decl.
2678 2015-03-16 Marek Polacek <polacek@redhat.com>
2682 * decl.c (grokdeclarator): Allow volatile and constexpr together.
2684 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2687 * decl.c (check_default_argument): Don't call
2688 maybe_warn_zero_as_null_pointer_constant.
2690 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
2692 * cp-gimplify.c (simple_empty_class_p): New.
2693 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
2694 the code for empty class copies into simple_empty_class_p, and
2695 adapt it to handle COMPOUND_EXPRs.
2697 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
2700 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
2701 only if the location of newdecl doesn't match the location of olddecl.
2703 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2706 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2709 2015-03-10 Jason Merrill <jason@redhat.com>
2713 * pt.c (dependent_type_p_r): Check both class and alias template args.
2715 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2718 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2719 before preparing arguments to warn_logical_not_parentheses.
2720 Use maybe_constant_value on rhs.
2722 2015-03-09 Jason Merrill <jason@redhat.com>
2725 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2727 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2730 * parser.c (cp_parser_binary_expression): Don't warn for
2731 !!x == y or !b == y where b is bool.
2733 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
2735 * ptree.c (cxx_print_lambda_node): New.
2736 (cxx_print_xnode): Handle LAMBDA_EXPR.
2738 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
2741 * constexpr.c (cxx_eval_constant_expression): Remove assert in
2742 RESULT_DECL handling.
2744 2015-02-26 Marek Polacek <polacek@redhat.com>
2747 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2748 a RETURN_EXPR if its operand is null.
2750 2015-02-25 Jason Merrill <jason@redhat.com>
2753 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2755 (constrain_visibility_for_template): Handle reference arguments.
2758 * decl.c (start_preparsed_function): Use create_artificial_label
2761 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
2762 Jakub Jelinek <jakub@redhat.com>
2765 * constexpr.c (check_constexpr_bind_expr_vars): Allow
2766 implicit typedefs for lambda types.
2768 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2771 * decl.c (lookup_and_check_tag): Use strip_using_decl.
2773 2015-02-13 Jason Merrill <jason@redhat.com>
2776 * pt.c (template_args_equal): Look through conversions here.
2777 * tree.c (cp_tree_equal): Not here.
2779 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2782 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2783 pragma_external context.
2785 2015-02-13 Jason Merrill <jason@redhat.com>
2788 * call.c (reference_binding): Don't look for bad conversion
2789 if TO is incomplete.
2791 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2794 * decl.c (make_typename_type): Pass tsubst_flags_t argument
2795 to lookup_template_class.
2797 2015-02-13 Jakub Jelinek <jakub@redhat.com>
2800 * decl.c (start_preparsed_function): Use void_type_node instead
2801 of NULL_TREE as LABEL_DECL type.
2803 2015-02-12 Jason Merrill <jason@redhat.com>
2806 * mangle.c (write_mangled_name): Fix test for variable template
2809 * decl.c (begin_destructor_body): Condition clobber on
2812 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2815 * parser.c (lookup_literal_operator): Return all candidates.
2816 (cp_parser_userdef_char_literal): Simplify error handling.
2817 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
2818 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2819 Also give higher priority to standard string UDL operator.
2821 2015-02-12 Jakub Jelinek <jakub@redhat.com>
2824 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2825 * decl.c (poplevel): If functionbody, try not to create an extra
2826 BLOCK for function body and use subblocks as that, if it is non-NULL
2827 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
2828 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2831 * except.c (check_noexcept_r): Return NULL for internal
2834 2015-02-10 Jason Merrill <jason@redhat.com>
2837 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2839 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
2842 * method.c (use_thunk): Do not check for stdarg thunks.
2844 2015-02-06 Jason Merrill <jason@redhat.com>
2847 * init.c (build_vec_init): Handle default-initialized array with
2848 constexpr default constructor.
2850 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2854 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2856 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2859 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2860 for generated expressions.
2862 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2865 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2868 2015-02-02 Jason Merrill <jason@redhat.com>
2870 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2872 2015-01-30 Joseph Myers <joseph@codesourcery.com>
2874 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2875 changed to pass input_location as first argument.
2877 2015-01-29 Jakub Jelinek <jakub@redhat.com>
2880 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2883 2015-01-29 Jason Merrill <jason@redhat.com>
2886 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2887 erroneous return statement.
2890 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2893 2015-01-27 Caroline Tice <cmtice@google.com>
2895 Committing VTV Cywin/Ming patch for Patrick Wollgast
2896 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2897 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2899 2015-01-27 Jason Merrill <jason@redhat.com>
2902 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2903 current_function_decl.
2906 * pt.c (finish_template_variable): Move from semantics.c.
2907 Handle multiple template arg levels. Handle coercion here.
2908 (lookup_template_variable): Not here.
2910 2015-01-23 Jason Merrill <jason@redhat.com>
2914 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2915 that has been completely split out.
2918 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2922 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2925 2015-01-21 Jason Merrill <jason@redhat.com>
2928 * constexpr.c (cxx_eval_constant_expression): Only shortcut
2929 constant CONSTRUCTORs.
2932 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2933 give a hard error in a template instantiation.
2935 2015-01-21 Richard Biener <rguenther@suse.de>
2938 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2939 for builtins the user declared correctly.
2941 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2944 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2945 TREE_TYPE (elt) == error_mark_node.
2947 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
2949 PR tree-optimization/62053
2950 * tree.c (build_cplus_array_type): Layout type after variants are set.
2952 2015-01-15 Jakub Jelinek <jakub@redhat.com>
2954 * cp-gimplify.c (cp_genericize_r): Call
2955 cp_ubsan_maybe_instrument_member_call for member calls.
2956 (cp_ubsan_check_member_access_r): New function.
2957 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2958 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2959 cp_ubsan_instrument_member_accesses,
2960 cp_ubsan_maybe_instrument_downcast,
2961 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2962 * cp-ubsan.c: New file.
2963 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2964 * constexpr.c (cxx_eval_call_expression): Return void_node
2966 (potential_constant_expression_1): Return true for
2967 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2968 * typeck.c (build_class_member_access_expr): Provide locus
2970 (build_static_cast_1): Instrument downcasts.
2971 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2972 add ubsan instrumentation for virtual_access.
2973 * call.c: Include internal-fn.h.
2974 (set_flags_from_callee): Handle internal calls.
2976 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
2979 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2980 and function templates, declared only in the class.
2981 * decl.c (duplicate_decls): Reveal hidden friend functions or
2982 function templates, if they are redeclared outside the class.
2984 2015-01-15 Jason Merrill <jason@redhat.com>
2987 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2990 * constexpr.c (potential_constant_expression_1): Handle reference
2993 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2994 James Norris <jnorris@codesourcery.com>
2995 Cesar Philippidis <cesar@codesourcery.com>
2996 Ilmir Usmanov <i.usmanov@samsung.com>
2997 Jakub Jelinek <jakub@redhat.com>
2999 * parser.c: Include "gomp-constants.h".
3000 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3001 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3002 Use OMP_CLAUSE_SET_MAP_KIND.
3003 (cp_parser_omp_construct, cp_parser_pragma): Handle
3004 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3005 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3006 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3007 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3008 "create", "delete", "deviceptr", "host", "num_gangs",
3009 "num_workers", "present", "present_or_copy", "pcopy",
3010 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3011 "present_or_create", "pcreate", "vector_length", "wait".
3012 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3013 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3014 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3015 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3016 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3017 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3018 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3019 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3020 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3021 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3022 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3023 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3024 (cp_parser_oacc_parallel, cp_parser_oacc_update)
3025 (cp_parser_oacc_wait): New functions.
3026 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3027 (finish_oacc_parallel): New prototypes.
3028 * semantics.c: Include "gomp-constants.h".
3029 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3030 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3031 OMP_CLAUSE_SET_MAP_KIND.
3032 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3033 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3034 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3035 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3038 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
3041 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3042 self-initialization.
3044 2015-01-13 Jason Merrill <jason@redhat.com>
3048 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3049 pointer expressions.
3050 (cxx_eval_increment_expression): Likewise.
3053 * pt.c (coerce_template_parameter_pack): Return NULL for a
3054 zero-length fixed parameter pack with a pack expansion arg.
3057 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3059 2015-01-12 Jason Merrill <jason@redhat.com>
3062 * constexpr.c (cxx_eval_call_expression): A call to a void
3063 function doesn't need to return a value.
3065 2015-01-09 Michael Collison <michael.collison@linaro.org>
3067 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3068 input.h, alias.h, symtab.h, options.h, fold-const.h,
3069 wide-int.h, and inchash.h due to flattening of tree.h.
3071 * constexpr.c: Ditto.
3072 * cp-array-notation.c: Ditto.
3073 * cp-gimplify.c: Ditto.
3075 * cp-objcp-common.c: Ditto.
3088 * name-lookup.c: Ditto.
3089 * optimize.c: Ditto.
3096 * semantics.c: Ditto.
3101 2015-01-08 Jason Merrill <jason@redhat.com>
3103 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3104 * decl.c (compute_array_index_type): Likewise.
3105 * init.c (build_vec_init): Likewise.
3106 * typeck.c (cp_build_binary_op): Likewise.
3108 2015-01-08 Jason Merrill <jason@redhat.com>
3110 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3111 whether an initializer-list is too big for a VLA.
3112 (throw_bad_array_length): Remove.
3113 * cp-tree.h: Remove prototype.
3115 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
3118 * decl.c (grokfndecl): Add bool parameter.
3119 (grokdeclarator): Adjust calls.
3120 (start_decl): Don't set DECL_DELETED_FN here.
3122 2015-01-06 Jason Merrill <jason@redhat.com>
3124 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3128 * pt.c (type_dependent_expression_p): Handle variable templates.
3129 * constexpr.c (potential_constant_expression_1): Use it.
3132 * semantics.c (finish_offsetof): Handle templates here.
3133 * parser.c (cp_parser_builtin_offsetof): Not here.
3136 * semantics.c (process_outer_var_ref): Diagnose lambda in local
3139 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3142 * class.c (check_field_decls): Make copy assignment operators
3143 complex only in c++98 mode.
3145 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3148 * class.c (check_for_override): Warn when a virtual function is an
3149 override not marked override.
3151 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3153 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3155 (get_basefndecls): Adjust.
3157 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3159 Update copyright years.
3161 2015-01-05 Marek Polacek <polacek@redhat.com>
3164 * typeck.c (cp_build_array_ref): Pass loc down to
3165 warn_array_subscript_with_type_char.
3168 Copyright (C) 2015 Free Software Foundation, Inc.
3170 Copying and distribution of this file, with or without modification,
3171 are permitted in any medium without royalty provided the copyright
3172 notice and this notice are preserved.