1 2015-11-20 Jakub Jelinek <jakub@redhat.com>
4 * cp-tree.h (defer_mangling_aliases): Declare.
5 (generate_mangling_aliases): New prototype.
6 * decl2.c (defer_mangling_aliases): New variable.
7 (note_mangling_alias): Use !defer_mangling_aliases
9 (generate_mangling_aliases): No longer static. Clear
10 defer_mangling_aliases.
11 * optimize.c (maybe_thunk_body): Defer emitting mangling aliases
12 if !defer_mangling_aliases until the fns are put into the same
15 2015-11-19 David Malcolm <dmalcolm@redhat.com>
17 * cp-tree.h (lookup_member_fuzzy): New decl.
18 * search.c: Include spellcheck.h.
19 (class lookup_field_fuzzy_info): New class.
20 (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): New.
21 (lookup_field_fuzzy_info::fuzzy_lookup_field): New.
22 (lookup_field_fuzzy_r): New.
23 (lookup_member_fuzzy): New.
24 * typeck.c (finish_class_member_access_expr): When issuing
25 a "has no member named" error, call lookup_member_fuzzy, and
26 offer any result as a suggestion.
28 2015-11-19 Torvald Riegel <triegel@redhat.com>
30 * except.c (do_free_exception): Use transactional wrapper.
32 2015-11-19 Jason Merrill <jason@redhat.com>
35 * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
36 * parser.c (cp_parser_sizeof_pack): Set it.
37 * pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
38 (tsubst_pack_expansion): Improve T... shortcut for expression packs.
40 2015-11-19 Ryan Burn <contact@rnburn.com>
43 * pt.c (find_parameter_packs_r) [DECLTYPE_TYPE]: When traversing
44 the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false.
46 2015-11-19 Jakub Jelinek <jakub@redhat.com>
47 Manuel López-Ibáñez <manu@gcc.gnu.org>
50 * decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
51 emit_diagnostic instead of permerror.
52 (check_previous_goto_1): Adjust identify_goto callers, treat all
53 cases but crossing initialization and entering scope of decl with
54 non-trivial dtor as unconditional hard errors.
55 (check_goto): Use identify_goto. Treat all cases but crossing
56 initialization and entering scope of decl with non-trivial dtor
57 as unconditional hard errors.
59 2015-11-19 Cesar Philippidis <cesar@codesourcery.com>
61 * parser.h (struct cp_omp_declare_simd_data): Add clauses member.
62 (struct cp_parser): Change type the of oacc_routine to
63 cp_omp_declare_simd_data.
64 * parser.c (cp_ensure_no_oacc_routine): Rework to use
65 cp_omp_declare_simd_data.
66 (cp_parser_simple_declaration): Remove boolean first. Update call to
67 cp_parser_init_declarator. Don't NULL out oacc_routine.
68 (cp_parser_init_declarator): Remove boolean first parameter. Update
69 calls to cp_finalize_oacc_routine.
70 (cp_parser_late_return_type_opt): Handle acc routines.
71 (cp_parser_member_declaration): Remove first variable. Handle
72 acc routines like omp declare simd.
73 (cp_parser_function_definition_from_specifiers_and_declarator): Update
74 call to cp_finalize_oacc_routine.
75 (cp_parser_single_declaration): Update call to
76 cp_parser_init_declarator.
77 (cp_parser_save_member_function_body): Remove first_decl parameter.
78 Update call to cp_finalize_oacc_routine.
79 (cp_parser_finish_oacc_routine): Delete.
80 (cp_parser_oacc_routine): Rework to use cp_omp_declare_simd_data.
81 (cp_parser_late_parsing_oacc_routine): New function.
82 (cp_finalize_oacc_routine): Remove first argument. Add more error
83 handling and set the acc routine and 'omp declare target' attributes.
84 (cp_parser_pragma): Remove unnecessary call to
85 cp_ensure_no_oacc_routine.
87 2015-11-17 Cesar Philippidis <cesar@codesourcery.com>
89 * cp-gimplify.c (cp_fold_r): Add support for OACC_LOOP.
91 2015-11-17 Jason Merrill <jason@redhat.com>
94 * typeck.c (build_static_cast_1): Force a NOP when converting to
97 * cp-tree.h (LITERAL_ZERO_P): Remove.
98 * parser.c (cp_parser_postfix_expression, literal_zeros)
99 (cp_parser_parenthesized_expression_list): Don't mess with it.
101 * parser.c (cp_parser_unary_expression): Fold -constant here.
102 * typeck.c (cp_build_unary_op): Not here.
105 * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
108 2015-11-16 Jason Merrill <jason@redhat.com>
110 * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
111 to fold arguments to __builtin_constant_p.
113 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
115 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
116 "simd" attribute as well. Update error message.
118 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
120 * parser.c (cp_parser_omp_declare_target): Adjust.
122 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
124 * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
126 2015-11-14 Jason Merrill <jason@redhat.com>
129 * call.c (build_new_op_1): Don't fold arguments to
130 warn_tautological_cmp.
132 2015-11-14 Jakub Jelinek <jakub@redhat.com>
134 * semantics.c (finish_omp_clauses): Don't mark
135 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
137 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
138 Marek Polacek <polacek@redhat.com>
139 Jason Merrill <jason@redhat.com>
141 * call.c (build_conditional_expr_1, convert_like_real)
142 (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
143 (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
144 * class.c (build_base_path, determine_primary_bases)
145 (update_vtable_entry_for_fn, check_bitfield_decl)
146 (layout_nonempty_base_or_field, layout_empty_base)
147 (propagate_binfo_offsets, include_empty_classes)
148 (layout_class_type, build_vbase_offset_vtbl_entries): Use
150 * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
151 (cxx_eval_call_expression): Handle MEM_REF.
152 (cxx_eval_pointer_plus_expression): Fold the second operand.
153 (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
154 (fold_simple_1, fold_simple): New.
155 (maybe_constant_value_1): Factor out from maybe_constant_value.
156 (cv_cache, maybe_constant_value): Cache results.
157 (maybe_constant_init): Handle null input.
158 (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
159 * cp-array-notation.c (build_array_notation_ref): Fold operands.
160 * cp-gimplify.c (cp_fold_r, cp_fold): New.
161 (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
162 (cp_genericize): Fold everything.
163 (contains_label_1, contains_label_p): New.
164 (cp_fold, cp_fully_fold): New.
165 * cp-tree.h (class cache_map): New.
166 * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
167 (cp_convert_and_check): Use cp_fully_fold.
168 (convert, convert_force): Don't fold.
169 * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
170 (compute_array_index_type): Use cp_fully_fold.
171 (build_enumerator): Use fold_convert.
172 * decl2.c (get_guard_cond, set_guard): Use fold_convert.
173 * init.c (build_zero_init_1): Fold zero-initializers.
174 (build_new_1): Fold nelts calculations.
175 (build_vec_delete_1): Fold conversions.
176 (build_vec_init): Fold maxindex.
177 * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
178 (cp_parser_question_colon_clause): Fold LHS.
179 * pt.c (convert_nontype_argument): Fold nullptr conversion.
180 * semantics.c (finish_unary_op_expr): Fold for warnings.
181 (handle_omp_array_sections_1): Fold length and low bound.
182 (handle_omp_for_class_iterator): Fold various things.
183 * tree.c (builtin_valid_in_constant_expr_p): Add
184 BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
185 (convert_bitfield_to_declared_type): Don't fold.
186 (handle_init_priority_attribute): Fold.
187 (fold_if_not_in_template): Remove.
188 * typeck.c (decay_conversion, build_class_member_access_expr)
189 (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
190 (cp_pointer_int_sum, pointer_diff): Don't fold.
191 (cp_build_binary_op): Fold for warnings and PMF ops.
192 (cp_build_unary_op): Fold negation of a constant, nothing else.
193 (expand_ptrmemfunc_cst): Fold operations.
194 * typeck2.c (split_nonconstant_init): Fold initializer.
195 (store_init_value): Likewise.
196 (check_narrowing): Try folding.
197 * config-lang.in (gtfiles): Add cp-gimplify.c.
199 2015-11-13 David Malcolm <dmalcolm@redhat.com>
201 * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
203 2015-11-12 James Norris <jnorris@codesourcery.com>
205 * parser.c (cp_parser_oacc_declare): Remove unused.
207 2015-11-12 James Norris <jnorris@codesourcery.com>
208 Joseph Myers <joseph@codesourcery.com>
210 * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
212 (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
213 and PRAGMA_OMP_CLAUSE_LINK.
214 (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
215 and PRAGMA_OMP_CLAUSE_LINK.
216 (OACC_DECLARE_CLAUSE_MASK): New definition.
217 (cp_parser_oacc_declare): New function.
218 (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
219 * pt.c (tsubst_expr): Handle OACC_DECLARE.
221 2015-11-12 Jason Merrill <jason@redhat.com>
223 * pt.c (check_explicit_specialization): Check the namespace after
224 we choose a template.
226 2015-11-11 Jason Merrill <jason@redhat.com>
228 * decl.c (duplicate_decls): When combining typedefs, remove the
229 new type from the variants list.
231 2015-11-11 Jason Merrill <jason@redhat.com>
233 * pt.c (instantiate_class_template_1): Set function_depth around
234 instantiation of lambda op().
236 2015-11-11 Marek Polacek <polacek@redhat.com>
240 * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
241 checking the size of an array.
243 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
246 * parser.h (cp_token): Update pragma_kind to 8.
248 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
250 * call.c: Remove unused header files.
252 * constexpr.c: Likewise.
253 * cp-array-notation.c: Likewise.
254 * cp-cilkplus.c: Likewise.
255 * cp-gimplify.c: Likewise.
256 * cp-lang.c: Likewise.
257 * cp-objcp-common.c: Likewise.
258 * cp-ubsan.c: Likewise.
260 * cxx-pretty-print.c: Likewise.
265 * except.c: Likewise.
267 * friend.c: Likewise.
268 * g++spec.c: Likewise.
270 * lambda.c: Likewise.
272 * mangle.c: Likewise.
273 * method.c: Likewise.
274 * name-lookup.c: Likewise.
275 * optimize.c: Likewise.
276 * parser.c: Likewise.
281 * search.c: Likewise.
282 * semantics.c: Likewise.
284 * typeck.c: Likewise.
285 * typeck2.c: Likewise.
286 * vtable-class-hierarchy.c: Likewise.
288 2015-11-09 Cesar Philippidis <cesar@codesourcery.com>
290 * parser.c (cp_finalize_oacc_routine): New boolean first argument.
291 (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
292 (cp_parser_simple_declaration): Maintain a boolean first to keep track
293 of each new declarator. Propagate it to cp_parser_init_declarator.
294 (cp_parser_init_declarator): New boolean first argument. Propagate it
295 to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
296 (cp_parser_member_declaration): Likewise.
297 (cp_parser_single_declaration): Update call to
298 cp_parser_init_declarator.
299 (cp_parser_save_member_function_body): New boolean first_decl argument.
300 Propagate it to cp_finalize_oacc_routine.
301 (cp_parser_finish_oacc_routine): New boolean first argument. Use it to
302 determine if multiple declarators follow a routine construct.
303 (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
305 2015-10-19 Martin Sebor <msebor@redhat.com>
309 * call.c (build_operator_new_call): Do not assume size_check
310 is non-null, analogously to the top half of the function.
311 * init.c (build_new_1): Detect and diagnose array sizes in
312 excess of the maximum of roughly SIZE_MAX / 2.
313 Insert a runtime check only for arrays with a non-constant size.
314 (build_new): Detect and diagnose negative array sizes.
316 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
317 Cesar Philippidis <cesar@codesourcery.com>
318 James Norris <jnorris@codesourcery.com>
319 Julian Brown <julian@codesourcery.com>
320 Nathan Sidwell <nathan@codesourcery.com>
322 * parser.h (struct cp_parser): Add oacc_routine field.
323 * parser.c (cp_ensure_no_oacc_routine): New.
324 (cp_parser_new): Initialize oacc_routine field.
325 (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
326 (cp_parser_namespace_definition,
327 cp_parser_class_specifier_1): Likewise.
328 (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
329 (cp_parser_function_definition,
330 cp_parser_save_member_function_body): Likewise.
331 (OACC_ROUTINE_CLAUSE_MASK): New.
332 (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
333 cp_finalize_oacc_routine): New.
334 (cp_parser_pragma): Adjust omp_declare_simd checking. Call
335 cp_ensure_no_oacc_routine.
336 (cp_parser_pragma): Add OpenACC routine handling.
338 2015-11-08 Martin Sebor <msebor@redhat.com>
341 * cp/init.c (warn_placement_new_too_small): Convert integer
342 operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
345 2015-11-06 David Malcolm <dmalcolm@redhat.com>
347 * error.c (cp_printer): Update for new "caret_p" param for
348 textinfo::set_location.
349 (pedwarn_cxx98): Update for change in signature of
352 2015-11-06 Jason Merrill <jason@redhat.com>
354 Support non-type constrained-type-specifiers.
355 * parser.c (check_type_concept): Remove.
356 (cp_parser_maybe_constrained_type_specifier): Don't call it.
357 (synthesize_implicit_template_parm): Handle non-type and template
358 template parameters. Also compare extra args. Return the decl.
359 (cp_parser_template_argument): Handle constrained-type-specifiers for
360 non-type template parameters.
361 (finish_constrained_template_template_parm): Split out from
362 cp_parser_constrained_template_template_parm.
363 (cp_parser_nonclass_name): Move some logic into
364 cp_parser_maybe_concept_name.
365 (cp_parser_init_declarator): Fix error recovery.
366 (get_concept_from_constraint): Remove.
367 (cp_parser_simple_type_specifier): Adjust for
368 synthesize_implicit_template_parm returning the decl.
369 * constraint.cc (placeholder_extract_concept_and_args)
370 (equivalent_placeholder_constraints): Also handle TYPE_DECL
373 * pt.c (push_inline_template_parms_recursive): Don't recreate the
376 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
378 * init.c (warn_placement_new_too_small): Use %wu format
379 rather than %lu when printing bytes_avail.
381 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
382 Thomas Schwinge <thomas@codesourcery.com>
383 James Norris <jnorris@codesourcery.com>
385 * parser.c (cp_parser_omp_clause_name): Add support for
386 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
387 (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
389 (cp_parser_oacc_clause_tile): New function.
390 (cp_parser_omp_clause_default): Add is_oacc argument. Handle
391 default(none) in OpenACC.
392 (cp_parser_oacc_all_clauses): Add support for
393 (cp_parser_omp_all_clauses): Update call to
394 cp_parser_omp_clause_default.
395 PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
396 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
398 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
399 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
401 (cp_parser_oacc_update): Update the error message for missing clauses.
402 * semantics.c (finish_omp_clauses): Add support for
403 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
405 2015-11-05 Martin Sebor <msebor@redhat.com>
408 * cp/init.c (warn_placement_new_too_small): Avoid assuming
409 the size of the first operand of placement new or its type
412 2015-11-05 Martin Sebor <msebor@redhat.com>
415 * cp/init.c (warn_placement_new_too_small): New function.
416 (build_new_1): Call it.
418 2015-11-05 Paolo Carlini <paolo.carlini@oracle.com>
421 * parser.c (cp_parser_lambda_body): Check lambda_return_type
423 * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
424 member function used invalidly.
426 2015-11-05 Jakub Jelinek <jakub@redhat.com>
427 Ilya Verbin <ilya.verbin@intel.com>
429 * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
430 (omp_privatize_field): Add SHARED argument.
431 * parser.c: Include context.h.
432 (cp_parser_omp_clause_schedule): Parse schedule
433 modifiers, diagnose monotonic together with nonmonotonic.
434 (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse
435 parameter name as linear step as id-expression rather than expression.
436 (cp_parser_omp_all_clauses): Adjust caller.
437 (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
438 initialize it. Adjust omp_privatize_field caller.
439 (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
441 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
442 (cp_parser_omp_target_data,
443 cp_parser_omp_target_enter_data,
444 cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
445 and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
446 (cp_parser_omp_target): Likewise. Evaluate num_teams and
447 thread_limit expressions on combined target teams before the target.
448 (cp_parser_omp_declare_target): If decl has "omp declare target" or
449 "omp declare target link" attribute, and cgraph or varpool node already
450 exists, then set corresponding flags. Call finish_omp_clauses
451 in the parenthesized extended-list syntax case. Call
452 cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
453 (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
454 instead of cp_parser_skip_to_pragma_eol.
455 * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
456 inside declare target.
457 * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
458 use tsubst_omp_clause_decl instead of tsubst_expr on
459 OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared
461 (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
462 (tsubst_find_omp_teams): New function.
463 (tsubst_expr): Evaluate num_teams and thread_limit expressions on
464 combined target teams before the target. Use OMP_FOR_ORIG_DECLS for
465 all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for
467 * semantics.c (omp_privatize_field): Add SHARED argument, if true,
468 always create artificial var and never put it into the hash table
470 (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
471 Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
472 (handle_omp_array_sections): For structure element
473 based array sections use GOMP_MAP_ALWAYS_POINTER instead of
474 GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF,
475 either into the constant offset, or for variable low-bound using
477 (finish_omp_clauses): Adjust omp_privatize_field caller. Drop
478 generic_field_head, structure elements are now always mapped even
479 as array section bases, diagnose same var in data sharing and
480 mapping clauses. For references map what they refer to using
481 GOMP_MAP_ALWAYS_POINTER for structure elements and
482 GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step
483 on declare simd is neither a constant nor a uniform parameter.
484 Allow non-static data members on shared clauses. Look through
485 POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic
486 modifier on kinds other than dynamic or guided or nonmonotonic
487 modifier together with ordered clause. Diagnose the same var or
488 function appearing multiple times on the same directive. Fix up
489 wording for the to clause if t is neither a FUNCTION_DECL nor a
490 VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
491 (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call
492 c_omp_check_loop_iv_exprs on cond.
493 (finish_omp_for): Add ORIG_INITS argument. Call
494 c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust
495 handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv.
497 (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
499 2015-11-04 Cesar Philippidis <cesar@codesourcery.com>
501 * (cp_parser_oacc_single_int_clause): New function.
502 (cp_parser_oacc_clause_vector_length): Delete.
503 (cp_parser_omp_clause_num_gangs): Delete.
504 (cp_parser_omp_clause_num_workers): Delete.
505 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
506 for num_gangs, num_workers and vector_length.
508 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
510 * call.c (validate_conversion_obstack): Define unconditionally.
511 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
513 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
514 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
515 * mangle.c (add_substitution): Likewise.
516 * method.c (maybe_explain_implicit_delete): Likewise.
517 * parser.c (cp_parser_template_argument_list): Remove conditional
519 * pt.c (check_unstripped_args): Rename to...
520 (verify_unstripped_args): ... this and remove conditional compilation.
521 (retrieve_specialization): Guard call of verify_unstripped_args with
523 (template_parm_to_arg): Remove conditional compilation.
524 (template_parms_to_args, coerce_template_parameter_pack,
525 coerce_template_parms): Likewise.
526 (tsubst_copy): Use flag_checking.
527 (type_unification_real): Remove conditional compilation.
528 (build_non_dependent_expr): Use flag_checking.
529 * tree.c (build_target_expr): Remove conditional compilation, use
531 * typeck.c (comptypes): Likewise.
532 * typeck2.c (digest_init_r): Likewise.
534 2015-11-03 Jason Merrill <jason@redhat.com>
536 * pt.c (struct find_parameter_pack_data): Add
537 type_pack_expansion_p field.
538 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
539 (uses_parameter_packs, make_pack_expansion)
540 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
542 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
543 Chung-Lin Tang <cltang@codesourcery.com>
545 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
548 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
550 Remove the implementation of N3994, terse range-for loops.
551 * parser.c (cp_parser_for_init_statement): Remove the parsing
552 of a terse range-for.
554 2015-10-31 Jason Merrill <jason@redhat.com>
556 Implement multiple 'auto' feature from Concepts TS.
557 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
558 (cp_parser_template_type_arg): Likewise.
559 (get_concept_from_constraint): Split out most logic to...
560 * constraint.cc (placeholder_extract_concept_and_args): ...here.
561 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
562 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
563 * cxx-pretty-print.h: Declare it.
564 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
565 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
566 (type_uses_auto): Use is_auto_r.
567 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
568 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
571 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
572 Return a meaningful value rather than error_mark_node.
573 (for_each_template_parm): Return a tree.
574 (uses_template_parms_level): Return bool.
577 * pt.c (unify): Don't diagnose no common base if we already have
579 (do_auto_deduction): Explain deduction failure.
581 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
584 * parser.c (synthesize_implicit_template_parm)
585 (finish_fully_implicit_template): Make static.
587 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
589 * call.c: Reorder #include's and remove duplicates.
591 * constexpr.c: Likewise.
592 * cp-array-notation.c: Likewise.
593 * cp-cilkplus.c: Likewise.
594 * cp-gimplify.c: Likewise.
595 * cp-lang.c: Likewise.
596 * cp-objcp-common.c: Likewise.
597 * cp-ubsan.c: Likewise.
599 * cxx-pretty-print.c: Likewise.
604 * except.c: Likewise.
606 * friend.c: Likewise.
608 * lambda.c: Likewise.
610 * mangle.c: Likewise.
611 * method.c: Likewise.
612 * name-lookup.c: Likewise.
613 * optimize.c: Likewise.
614 * parser.c: Likewise.
619 * search.c: Likewise.
620 * semantics.c: Likewise.
622 * typeck.c: Likewise.
623 * typeck2.c: Likewise.
624 * vtable-class-hierarchy.c: Likewise.
626 2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
629 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
630 functions consistently reset TREE_TYPE (decl) too.
632 2015-10-28 Jason Merrill <jason@redhat.com>
635 * class.c (type_has_user_provided_or_explicit_constructor): New.
636 (check_bases_and_members): Use it.
637 * cp-tree.h: Declare it.
639 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
640 Thomas Schwinge <thomas@codesourcery.com>
641 James Norris <jnorris@codesourcery.com>
642 Joseph Myers <joseph@codesourcery.com>
643 Julian Brown <julian@codesourcery.com>
644 Nathan Sidwell <nathan@codesourcery.com>
645 Bernd Schmidt <bschmidt@redhat.com>
647 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
649 (cp_parser_oacc_simple_clause): New.
650 (cp_parser_oacc_shape_clause): New.
651 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
652 (OACC_LOOP_CLAUSE_MASK): Likewise.
653 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
654 worker. Unify the handling of teams, tasks and vector_length with
655 the other loop shape clauses.
657 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
658 James Norris <jnorris@codesourcery.com>
659 Cesar Philippidis <cesar@codesourcery.com>
663 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
665 (finish_omp_construct): Declare function.
666 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
667 formal parameters, and handle these. Adjust all users.
668 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
670 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
672 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
673 (finish_omp_construct): ... this new function.
675 2015-10-25 Jason Merrill <jason@redhat.com>
678 * pt.c (process_partial_specialization): Handle error_mark_node
679 from most_specialized_partial_spec.
681 2015-10-23 Jason Merrill <jason@redhat.com>
687 * call.c (convert_like_real): Value-initialization can't use
688 explicit constructors in C++11 and up.
691 * constexpr.c (cxx_eval_store_expression): Always use *valp if
694 2015-10-22 Jason Merrill <jason@redhat.com>
696 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
697 (add_template_candidate_real): Handle it.
698 * pt.c (fn_type_unification): Handle it.
700 * call.c (add_conv_candidate): Remove first_arg parm.
701 (add_template_conv_candidate): Likewise.
702 (add_template_candidate_real): Don't pass it.
703 (build_op_call_1): Likewise.
705 2015-10-22 Richard Biener <rguenther@suse.de>
707 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
708 before folding a MINUS_EXPR.
709 (finish_omp_clauses): Likewise.
711 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
714 * parser.c (cp_parser_enum_specifier): Upon error_at set
715 nested_name_specifier to error_mark_node; improve error message.
717 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
720 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
721 which doesn't name a class or namespace.
723 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
725 * call.c (build_conditional_expr_1): Use boolean vector
726 type for vector comparison.
727 * typeck.c (build_vec_cmp): New.
728 (cp_build_binary_op): Use build_vec_cmp for comparison.
730 2015-10-20 Jason Merrill <jason@redhat.com>
733 * init.c (innermost_aggr_scope): New.
734 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
735 (sort_mem_initializers): Handle initializers for entire anonymous
738 2015-10-20 Marek Polacek <polacek@redhat.com>
740 * parser.c (is_cilkplus_vector_p): Don't define here.
742 2015-10-19 Jason Merrill <jason@redhat.com>
745 * semantics.c (force_paren_expr): Don't mess with hard register vars.
747 Implement N4268, Do constant evaluation of all non-type template args.
748 * parser.c (cp_parser_template_argument): For C++1z just parse a
750 * pt.c (convert_nontype_argument): For C++1z always call
751 maybe_constant_value.
753 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
755 (cxx_eval_component_reference): Like here.
756 * decl2.c (lower_var_init): And here.
757 (c_parse_final_cleanups): Call it.
758 * typeck2.c (digest_init_r): Not here.
759 * decl.c (complete_vars): Or here.
760 (cp_finish_decl): Add local statics to symbol table.
762 2015-10-17 Jason Merrill <jason@redhat.com>
765 * decl.c (implicit_default_ctor_p): New.
766 (start_preparsed_function): Don't clobber on entry to one.
768 2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
771 * constexpr.c (potential_constant_expression_1): Handle
772 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
773 BINARY_RIGHT_FOLD_EXPR.
775 2015-10-13 Jakub Jelinek <jakub@redhat.com>
776 Aldy Hernandez <aldyh@redhat.com>
778 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
779 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
780 (cp_genericize_r): Likewise.
781 (cxx_omp_finish_clause): Don't diagnose references.
782 (cxx_omp_disregard_value_expr): New function.
783 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
784 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
785 (DECL_OMP_PRIVATIZED_MEMBER): Define.
786 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
787 pop_omp_privatization_clauses, save_omp_privatization_clauses,
788 restore_omp_privatization_clauses, omp_privatize_field,
789 cxx_omp_disregard_value_expr): New prototypes.
790 (finish_omp_clauses): Add two new arguments.
791 (finish_omp_for): Add ORIG_DECLV argument.
792 * parser.c (cp_parser_lambda_body): Call
793 save_omp_privatization_clauses and restore_omp_privatization_clauses.
794 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
795 (cp_parser_omp_var_list_no_open): Handle structure elements for
796 map, to and from clauses. Handle array sections in reduction
797 clause. Parse this keyword. Formatting fixes.
798 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
800 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
801 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
802 cp_parser_omp_clause_defaultmap): New functions.
803 (cp_parser_omp_clause_ordered): Parse optional parameter.
804 (cp_parser_omp_clause_reduction): Handle array reductions.
805 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
806 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
808 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
809 (cp_parser_omp_clause_depend_sink): New function.
810 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
811 (cp_parser_omp_clause_map): Parse release/delete map kinds and
812 optional always modifier.
813 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
814 and finish_omp_clauses callers.
815 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
816 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
817 (OMP_CRITICAL_CLAUSE_MASK): Define.
818 (cp_parser_omp_critical): Parse critical clauses.
819 (cp_parser_omp_for_incr): Use cp_tree_equal if
820 processing_template_decl.
821 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
822 non-static data member iterators.
823 (cp_parser_omp_for_loop): Handle doacross loops, adjust
824 finish_omp_for and finish_omp_clauses callers.
825 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
826 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
827 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
828 (OMP_FOR_CLAUSE_MASK): Add linear clause.
829 (cp_parser_omp_for): Disallow ordered clause when combined with
830 distribute. Disallow linear clause when combined with distribute
831 and not combined with simd.
832 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
833 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
834 of tree, parse clauses and if depend clause is found, don't parse
836 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
837 Allow target parallel without for after it.
838 (OMP_TASK_CLAUSE_MASK): Add priority clause.
839 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
840 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
842 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
843 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
844 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
845 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
847 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
848 defaultmap and is_device_ptr clauses.
849 (cp_parser_omp_target): Parse target parallel and target simd. Set
850 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
851 and target exit data. Diagnose invalid map kinds.
852 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
853 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
854 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
856 (OMP_TASKLOOP_CLAUSE_MASK): Define.
857 (cp_parser_omp_taskloop): New function.
858 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
859 handle PRAGMA_OMP_TASKLOOP.
860 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
861 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
862 and pop_omp_privatization_clauses around parsing calls.
863 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
864 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
865 and finish_omp_clauses callers.
866 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
867 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
868 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
870 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
871 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
872 If ALLOW_FIELDS, handle non-static data members in the clauses.
873 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
874 (omp_parallel_combined_clauses): New variable.
875 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
876 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
877 Improve handling of clauses on combined constructs.
878 (tsubst_expr): Call push_omp_privatization_clauses and
879 pop_omp_privatization_clauses around instantiation of certain
880 OpenMP constructs, improve handling of clauses on combined
881 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
882 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
883 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
884 (instantiate_decl): Call save_omp_privatization_clauses and
885 restore_omp_privatization_clauses around instantiation.
886 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
887 * semantics.c (omp_private_member_map, omp_private_member_vec,
888 omp_private_member_ignore_next): New variables.
889 (finish_non_static_data_member): Return dummy decl for privatized
890 non-static data members.
891 (omp_clause_decl_field, omp_clause_printable_decl,
892 omp_note_field_privatization, omp_privatize_field): New functions.
893 (handle_omp_array_sections_1): Fix comment typo.
894 Add IS_OMP argument, handle structure element bases, diagnose
895 bitfields, pass IS_OMP recursively, diagnose known zero length
896 array sections in depend clauses, handle array sections in reduction
897 clause, diagnose negative length even for pointers.
898 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
899 types, pass IS_OMP down to handle_omp_array_sections_1, handle
900 array sections in reduction clause, set
901 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
902 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
903 (finish_omp_reduction_clause): Handle array sections and arrays.
904 Use omp_clause_printable_decl.
905 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
907 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
908 Handle new OpenMP 4.5 clauses and new restrictions for the old
909 ones, handle non-static data members, reject this keyword when not
911 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
912 save_omp_privatization_clauses, restore_omp_privatization_clauses):
914 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
915 Add collapse and ordered arguments. Fix handling of lastprivate
916 iterators in doacross loops.
917 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
918 adjust c_finish_omp_for, handle_omp_for_class_iterator and
919 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
920 loops with non-static data member iterators.
922 2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
925 * lambda.c (lambda_return_type): Return error_mark_node
926 instead of void_type_node for the error cases.
928 2015-10-08 Jason Merrill <jason@redhat.com>
930 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
931 * init.c (get_nsdmi): Use it.
932 * typeck2.c (massage_init_elt): Use it.
934 2015-10-07 Jason Merrill <jason@redhat.com>
937 * call.c (is_base_field_ref): New.
938 (unsafe_copy_elision_p): New.
939 (build_over_call): Use it.
941 2015-10-07 Marek Polacek <polacek@redhat.com>
944 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
946 2015-10-07 Marek Polacek <polacek@redhat.com>
948 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
949 (genericize_cp_loop): Likewise.
950 * decl.c (cxx_maybe_build_cleanup): Likewise.
951 * parser.c (cp_parser_binary_expression): Likewise.
952 (cp_parser_omp_for_loop): Likewise.
953 (cp_parser_omp_construct): Likewise.
954 * semantics.c (finish_transaction_stmt): Likewise.
955 (build_transaction_expr): Likewise.
957 2015-10-06 Jason Merrill <jason@redhat.com>
960 * parser.c (cp_parser_fold_expr_p): Remove.
962 (cp_parser_fold_expression): Take LHS as parameter.
963 (cp_parser_primary_expression): Call it after parsing an expression.
964 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
965 (cp_parser_expression): Ignore an operator followed by '...'.
967 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
968 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
970 2015-10-06 Marek Polacek <polacek@redhat.com>
973 * call.c (build_conditional_expr_1): Build the COND_EXPR with
976 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
979 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
980 reject default template arguments in out of class definitions
981 of members of non-template classes.
983 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
985 * tree.c (cp_tree_equal): Use real_equal instead of
988 2015-10-04 Jason Merrill <jason@redhat.com>
990 Implement N4514, C++ Extensions for Transactional Memory.
991 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
992 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
993 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
994 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
995 (make_call_declarator): Take tx_qualifier.
996 (cp_parser_tx_qualifier_opt): New.
997 (cp_parser_lambda_declarator_opt): Use it.
998 (cp_parser_direct_declarator): Likewise.
999 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
1000 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
1001 (cp_parser_std_attribute): Map optimize_for_synchronized to
1002 transaction_callable.
1003 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
1004 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
1005 * call.c (enum conversion_kind): Add ck_tsafe.
1006 (standard_conversion): Handle transaction-safety conversion.
1007 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
1008 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
1010 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
1011 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
1012 (can_convert_tx_safety): New.
1013 * typeck.c (composite_pointer_type): Handle transaction-safety.
1014 * name-lookup.h (enum scope_kind): Add sk_transaction.
1015 * name-lookup.c (begin_scope): Handle it.
1016 * semantics.c (begin_compound_stmt): Pass it.
1017 * decl.c (check_previous_goto_1): Check it.
1018 (struct named_label_entry): Add in_transaction_scope.
1019 (poplevel_named_label_1): Set it.
1020 (check_goto): Check it.
1021 (duplicate_decls): A specialization can be transaction_safe
1022 independently of its template.
1023 (grokdeclarator): Handle tx-qualifier.
1024 * rtti.c (ptr_initializer): Handle transaction-safe.
1025 * search.c (check_final_overrider): Check transaction_safe_dynamic.
1026 Don't check transaction_safe.
1027 * mangle.c (write_function_type): Mangle transaction_safe here.
1028 (write_CV_qualifiers_for_type): Not here.
1029 (write_type): Preserve transaction_safe when stripping attributes.
1030 * error.c (dump_type_suffix): Print transaction_safe.
1032 2015-10-02 Marek Polacek <polacek@redhat.com>
1035 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
1036 down to cp_parser_selection_statement.
1037 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
1038 warn about duplicated if-else-if conditions.
1039 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
1040 it down to cp_parser_statement.
1042 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1045 * name-lookup.c (push_binding): Make non-static.
1046 * name-lookup.h (push_binding): Declare it.
1047 * parser.c (cp_parser_range_for): Use it, get the range
1048 declaration away from the scope until the range expression
1049 has been parsed, then restore the declaration.
1051 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
1053 Fix small typos in the coding rule enforcement warnings.
1054 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
1057 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
1059 * decl.c (xref_basetypes): Check virtual and/or multiple
1060 inheritance warning.
1061 * parser.c (cp_parser_namespace_definition): Check namespaces
1063 * pt.c (push_template_decl_real): Check templates warning.
1065 2015-09-22 Jason Merrill <jason@redhat.com>
1067 * mangle.c (abi_warn_or_compat_version_crosses): New.
1068 Use it instead of abi_version_crosses.
1069 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
1071 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1073 Complete the implementation of N4230, Nested namespace definition.
1074 * parser.c (cp_parser_namespace_definition): Support namespace
1075 attributes both before and after the namespace identifier.
1077 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
1079 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
1081 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
1083 Implement nested namespace definitions.
1084 * parser.c (cp_parser_namespace_definition): Grok nested namespace
1087 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1089 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
1090 make it more similar to the C version.
1092 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
1093 Jason Merrill <jason@redhat.com>
1095 Implement N4295 fold-expressions.
1096 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
1097 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
1098 * cp-objcp-common.c (cp_common_init_ts): Handle them.
1099 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
1100 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
1101 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
1102 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
1103 or_comma parameter to or_ttype.
1104 (cp_parser_fold_operator, cp_parser_fold_expr_p)
1105 (cp_parser_fold_expression): New.
1106 (cp_parser_primary_expression): Use them.
1107 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
1108 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
1109 (tsubst_binary_left_fold, expand_right_fold)
1110 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
1111 (tsubst_copy): Use them.
1112 (type_dependent_expression_p): Handle fold-expressions.
1113 * semantics.c (finish_unary_fold_expr)
1114 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
1115 (finish_binary_fold_expr): New.
1117 2015-09-17 Richard Biener <rguenther@suse.de>
1119 * cp-tree.h (note_decl_for_pch): Remove.
1120 * class.c (build_clone): Do not call note_decl_for_pch.
1121 * semantics.c (finish_member_declaration): Likewise.
1122 (note_decl_for_pch): Remove.
1123 * decl2.c (c_parse_final_cleanups): Mangle all globals before
1126 2015-09-14 Jason Merrill <jason@redhat.com>
1129 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
1130 mangling with lower -fabi-version.
1132 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
1135 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
1136 per the spirit of DR 1467).
1138 2015-09-11 Mark Wielaard <mjw@redhat.com>
1141 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
1142 VAR_P TREE_READONLY override.
1144 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
1147 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
1148 and set template_parameter_pack_p also when the type is null.
1150 2015-09-09 Mark Wielaard <mjw@redhat.com>
1152 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
1155 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1158 * semantics.c (handle_omp_array_sections_1): Only run
1159 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
1160 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
1161 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
1162 is not a VAR_DECL/PARM_DECL.
1165 * semantics.c (handle_omp_for_class_iterator): Don't wrap
1166 error_mark_node into a NOP_EXPR to void_type_node.
1168 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1171 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
1173 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1176 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
1177 before INTEGRAL_TYPE_P test.
1179 2015-09-08 Jason Merrill <jason@redhat.com>
1182 * pt.c (tsubst_copy_and_build): Handle variables like functions.
1184 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
1187 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
1188 if the first argument isn't a template.
1190 2015-09-03 Martin Sebor <msebor@redhat.com>
1193 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
1195 * expr.c (mark_rvalue_use): Use new argument.
1196 * call.c (build_addr_func): Call decay_conversion with new
1198 * pt.c (convert_template_argument): Call reject_gcc_builtin.
1199 * typeck.c (decay_conversion): Use new argument.
1200 (c_decl_implicit): Define.
1202 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
1205 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
1207 (cp_gimplify_expr): Added a call to the function
1208 cilk_cp_gimplify_call_params_in_spawned_fn.
1210 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
1213 * decl.c (smallest_type_quals_location): New.
1214 (check_special_function_return_type): Use the latter; add int and
1215 const location_t* parameters.
1216 (grokdeclarator): Adjust check_special_function_return_type call.
1218 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
1221 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
1222 case. Move label to COND_EXPR case. Remove checking of
1225 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1228 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
1229 only on class types.
1231 2015-08-21 Jason Merrill <jason@redhat.com>
1234 * constraint.cc (satisfy_implicit_conversion_constraint): Also
1235 check for NULL_TREE.
1237 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1239 * decl.c (grokvardecl): Simplify the latter.
1241 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1243 * decl.c (grokvardecl): Complete check added for c++/67065.
1245 2015-08-20 Jason Merrill <jason@redhat.com>
1247 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
1249 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
1252 * decl.c (grokvardecl): Reject 'main' as global variable.
1254 2015-08-19 Jason Merrill <jason@redhat.com>
1257 * search.c (protected_accessible_p): Remove redundant access_in_type.
1258 Add otype parm instead of walking binfo.
1259 (friend_accessible_p): Check SCOPE itself. Handle class
1260 templates. Pass through otype.
1261 (dfs_accessible_post): Handle all accessibility cases.
1262 (dfs_accessible_pre): New.
1263 (accessible_p): Use it. Don't check protected access here. Pass
1264 decl and otype to dfs_walk.
1265 (member_declared_in_type, dfs_access_in_type_pre): New.
1266 (access_in_type): Use dfs_access_in_type_pre.
1267 * friend.c (add_friend): Fix multiple friends with the same name.
1269 * lambda.c (current_nonlambda_scope): New.
1271 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1273 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
1274 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
1275 semantics.c, typeck2.c: Remove useless typedefs.
1277 2015-08-18 Jason Merrill <jason@redhat.com>
1280 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
1283 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
1286 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
1288 2015-08-17 Jason Merrill <jason@redhat.com>
1291 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
1294 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
1295 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
1297 * constexpr.c (cxx_eval_store_expression): Don't set
1298 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
1300 (cxx_eval_array_reference): Check it.
1302 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
1304 2015-08-14 Jason Merrill <jason@redhat.com>
1307 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
1309 2015-08-12 Jason Merrill <jason@redhat.com>
1312 * constexpr.c (cxx_eval_array_reference): Fix typo.
1315 * constexpr.c (cxx_eval_array_reference): Handle sparse
1319 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
1320 * error.c (dump_template_bindings): Don't tsubst in that case.
1323 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
1324 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
1326 2015-08-08 Jason Merrill <jason@redhat.com>
1329 * pt.c (process_partial_specialization): Call
1330 associate_classtype_constraints.
1333 * constraint.cc (finish_template_introduction):
1334 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1337 * pt.c (equal): Make sure tmpl is actually a template.
1340 * call.c (joust): Only call more_constrained on decls.
1342 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
1343 Braden Obrzut <admin@maniacsvault.net>
1344 Jason Merrill <jason@redhat.com>
1345 Ville Voutilainen <ville.voutilainen@gmail.com>
1347 Add C++ Concepts TS support.
1348 * constraint.cc, logic.cc: New files.
1349 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
1350 (c++.tags): Also process .cc files.
1351 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
1352 (print_z_candidate): Handle it.
1353 (constraint_failure): New.
1354 (add_function_candidate): Check constraints.
1355 (build_new_function_call): Handle evaluating concepts.
1356 (joust): Check more_constrained.
1357 * class.c (add_method): Check equivalently_constrained.
1358 (build_clone): Copy constraints.
1359 (currently_open_class): Return tree.
1360 (resolve_address_of_overloaded_function): Check constraints.
1361 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
1362 (potential_constant_expression_1): Likewise.
1363 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
1364 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
1365 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
1366 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
1367 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
1368 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
1369 * cp-tree.h (struct tree_constraint_info, check_nonnull)
1370 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
1371 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
1372 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
1373 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
1374 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
1375 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
1376 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
1377 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
1378 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
1379 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
1380 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
1381 (struct local_specialization_stack, enum auto_deduction_context)
1382 (variable_concept_p, concept_template_p)
1383 (struct deferring_access_check_sentinel): New.
1384 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
1385 (union lang_tree_node): Add constraint_info field.
1386 (struct lang_decl_base): Add concept_p flag.
1387 (enum cp_decl_spec): Add ds_concept.
1388 (struct cp_declarator): Add requires_clause.
1389 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1390 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
1391 TRAIT_EXPR, *_CONSTR.
1392 (pp_cxx_parameter_declaration_clause): Accept a chain of
1394 (cxx_pretty_printer::declarator): Print requires-clause.
1395 (pp_cxx_template_declaration): Likewise.
1396 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
1397 (pp_cxx_requires_clause, pp_cxx_requirement)
1398 (pp_cxx_requirement_list, pp_cxx_requirement_body)
1399 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
1400 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
1401 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
1402 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
1403 (pp_cxx_implicit_conversion_constraint)
1404 (pp_cxx_argument_deduction_constraint)
1405 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
1406 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
1407 * cxx-pretty-print.h: Declare them.
1408 * decl.c (decls_match): Compare constraints.
1409 (duplicate_decls): Likewise. Remove constraints before freeing.
1410 (cxx_init_decl_processing): Call init_constraint_processing.
1411 (cp_finish_decl): Diagnose concept without initializer.
1412 (grokfndecl, grokvardecl): Handle concepts and constraints.
1413 (grokdeclarator): Handle concept, requires-clause.
1414 (grokparms): No longer static.
1415 (xref_tag_1): Check constraints.
1416 (finish_function): Call check_function_concept.
1417 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
1418 (check_concept_refinement, is_concept_var, check_concept_fn): New.
1419 * decl2.c (check_classfn): Compare constraints.
1420 (mark_used): Don't instantiate concepts.
1421 * error.c (dump_template_decl): Print constraints.
1422 (dump_function_decl): Likewise.
1423 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
1424 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
1425 * method.c (implicitly_declare_fn): Copy constraints from
1427 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
1428 prevent_constrained_type_specifiers fields.
1429 * parser.c (make_call_declarator): Add requires_clause parm.
1430 (cp_parser_new): Clear prevent_constrained_type_specifiers.
1431 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
1432 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
1433 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
1434 (cp_parser_declaration): Handle concept introduction.
1435 (cp_parser_member_declaration): Likewise.
1436 (cp_parser_template_parameter): Handle constrained parameter.
1437 (cp_parser_type_parameter): Handle constraints.
1438 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
1439 (cp_parser_template_id): Handle partial concept id.
1440 (cp_parser_type_name): Add overload that takes typename_keyword_p.
1441 Handle constrained parameter.
1442 (cp_parser_nonclass_name): Handle concept names.
1443 (cp_parser_alias_declaration): Handle constraints.
1444 (cp_parser_late_return_type_opt): Also handle requires-clause.
1445 (cp_parser_type_id_1): Handle deduction constraint.
1446 (cp_parser_parameter_declaration): Handle constrained parameters.
1447 (cp_parser_class_specifier_1): Handle constraints.
1448 (cp_parser_template_declaration_after_parameters): Split out from
1449 cp_parser_template_declaration_after_export.
1450 (cp_parser_single_declaration): Handle constraints.
1451 (synthesize_implicit_template_parm): Handle constraints.
1452 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1453 (cp_parser_introduction_list, get_id_declarator)
1454 (get_unqualified_id, is_constrained_parameter)
1455 (cp_parser_check_constrained_type_parm)
1456 (cp_parser_constrained_type_template_parm)
1457 (cp_parser_constrained_template_template_parm)
1458 (constrained_non_type_template_parm, finish_constrained_parameter)
1459 (declares_constrained_type_template_parameter)
1460 (declares_constrained_template_template_parameter)
1461 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
1462 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1463 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
1464 (cp_parser_requires_expression)
1465 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
1466 (cp_parser_requirement_list, cp_parser_requirement)
1467 (cp_parser_simple_requirement, cp_parser_type_requirement)
1468 (cp_parser_compound_requirement, cp_parser_nested_requirement)
1469 (cp_parser_template_introduction)
1470 (cp_parser_explicit_template_declaration)
1471 (get_concept_from_constraint): New.
1472 * pt.c (local_specialization_stack): Implement.
1473 (maybe_new_partial_specialization): New.
1474 (maybe_process_partial_specialization): Use it.
1475 (retrieve_local_specialization, register_local_specialization)
1476 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
1477 (tsubst_expr): No longer static.
1478 (spec_hasher::equal): Compare constraints.
1479 (determine_specialization): Handle constraints.
1480 (check_explicit_specialization): Handle concepts.
1481 (process_template_parm): Handle constraints.
1482 (end_template_parm_list): Add overload taking no arguments.
1483 (process_partial_specialization): Handle concepts and constraints.
1484 Register partial specializations of variable templates.
1485 (redeclare_class_template): Handle constraints.
1486 (convert_template_argument): Handle WILDCARD_DECL. Check
1487 is_compatible_template_arg.
1488 (coerce_template_parameter_pack): Handle wildcard packs.
1489 (coerce_template_parms): DR 1430 also applies to concepts. Add
1490 overloads taking fewer parameters.
1491 (lookup_template_class_1): Handle constraints.
1492 (lookup_template_variable): Concepts are always bool.
1493 (finish_template_variable): Handle concepts and constraints.
1494 (tsubst_friend_class): Handle constraints.
1495 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
1496 (tsubst_pack_expansion): Handle local parameters.
1497 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1498 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1499 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1500 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1501 (more_specialized_inst): Split out from most_specialized_instantiation.
1502 (most_specialized_partial_spec): Check constraints.
1503 (instantiate_decl): Never instantiate a concept.
1504 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1506 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1507 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1508 (do_auto_deduction): Add overload taking tsubst flags and context enum.
1510 (get_template_for_ordering, most_constrained_function)
1511 (is_compatible_template_arg, convert_wildcard_argument)
1512 (struct constr_entry, struct constr_hasher, decl_constraints)
1513 (valid_constraints_p, get_constraints, set_constraints)
1514 (remove_constraints, init_constraint_processing): New.
1515 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1516 * search.c (lookup_member): Do lookup in the open partial
1518 * semantics.c (finish_template_template_parm): Handle constraints.
1519 (fixup_template_type): New.
1520 (finish_template_type): Call it.
1521 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1522 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1523 (cp_walk_subtrees): Handle REQUIRES_EXPR.
1524 * typeck.c (cp_build_function_call_vec): Check constraints.
1526 2015-08-06 Jason Merrill <jason@redhat.com>
1529 * parser.c (cp_parser_primary_expression): Don't skip to the end
1530 of the statement if we're parsing tentatively.
1535 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1537 * pt.c (tsubst_copy_and_build): Check for argument substitution
1540 2015-08-05 Jason Merrill <jason@redhat.com>
1542 * pt.c (determine_specialization): Print candidates after 'no
1545 * decl.c (cp_finish_decl): Tidy.
1546 * typeck.c (finish_class_member_access_expr): Use
1547 type_dependent_expression_p.
1548 * semantics.c (finish_id_expression): Use
1549 type_dependent_expression_p. Don't build_qualified_name for a
1550 decl in non-dependent scope.
1551 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1552 identifier is dependent. Remove variable_template_p check.
1558 * pt.c (lookup_template_variable): Use NULL_TREE for type.
1559 (instantiate_template_1): Also set DECL_TI_ARGS based on
1560 the immediate parent.
1561 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1562 (finish_template_variable): Add complain parm.
1563 * cp-tree.h: Adjust.
1567 * semantics.c (finish_id_expression): Call convert_from_reference
1568 for variable template.
1570 2015-08-04 Jason Merrill <jason@redhat.com>
1572 * pt.c (lookup_template_class_1): Clear elt.spec.
1574 * tree.c (build_target_expr): Copy the location from value.
1576 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1578 * parser.c (cp_parser_selection_statement): Move handling of
1579 semicolon body to ...
1580 (cp_parser_implicitly_scoped_statement): .. here. Call
1581 warn_for_misleading_indentation even when the body is a
1582 semicolon. Extract token_indent_infos corresponding to the
1583 guard, body and next tokens. Adjust call to
1584 warn_for_misleading_indentation accordingly. Take
1585 token_indent_info argument.
1586 (cp_parser_already_scoped_statement): Likewise.
1587 (cp_parser_selection_statement, cp_parser_iteration_statement):
1588 Extract a token_indent_info corresponding to the guard token.
1590 2015-08-01 Caroline Tice <cmtice@google.com>
1593 * mangle.c : Add vtable-verify.h to include files.
1594 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
1595 is "<anon>" get the real mangled name for the class instead, and
1596 also store the real mangled name in a vector for use later.
1598 2015-07-31 Marek Polacek <polacek@redhat.com>
1601 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1604 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1606 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1607 in warning_at instead of "%q+D" in warning.
1608 (warn_hidden): Likewise but use location_of.
1609 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1610 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1611 (check_field_decls): Likewise for permerror.
1612 (explain_non_literal_class): Likewise for inform.
1613 (check_bases_and_members, layout_class_type): Likewise for warning_at.
1614 (note_name_declared_in_class): Use location_of in permerror.
1615 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1616 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1617 inform, and warning_at.
1618 (check_for_out_of_scope_variable): Likewise for warning_at and
1621 2015-07-30 Jason Merrill <jason@redhat.com>
1625 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1627 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
1629 * call.c (build_op_delete_call, convert_like_real, build_over_call):
1630 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1632 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1633 * decl.c (duplicate_decls): Likewise for warning/warning_at.
1634 * except.c (maybe_noexcept_warning): Likewise.
1635 * friend.c (make_friend_class): Likewise for inform.
1636 * mangle.c (mangle_decl): Likewise for warning/warning_at.
1637 * method.c (process_subob_fn, walk_field_subobs,
1638 maybe_explain_implicit_delete): Likewise for inform.
1639 * parser.c (cp_parser_lambda_introducer): Likewise.
1640 * pt.c (check_specialization_namespace,
1641 maybe_process_partial_specialization): Likewise for permerror.
1642 (redeclare_class_template): Likewise for inform_n.
1643 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1644 * search.c (check_final_overrider): Likewise.
1645 * semantics.c (process_outer_var_ref): Likewise.
1647 2015-07-27 Jason Merrill <jason@redhat.com>
1649 * constexpr.c (cxx_eval_call_expression): Don't add this call to
1650 the hash table if !depth_ok.
1652 2015-07-27 Marek Polacek <polacek@redhat.com>
1656 * call.c (build_new_op_1): Call warn_tautological_cmp.
1657 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1660 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
1663 * typeck.c (check_return_expr): Also do the basic return-value
1664 validity checking if processing_template_decl and yet types are
1665 not dependent. Remove obsolete code.
1667 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
1669 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1670 in warning_at instead of "%q+D" in warning.
1671 (warn_extern_redeclared_static): Likewise for inform.
1672 (check_redeclaration_no_default_args): Likewise for permerror.
1673 (duplicate_decls): Likewise.
1674 (check_previous_goto_1): Likewise for inform.
1675 (check_goto, start_decl, check_for_uninitialized_const_var,
1676 start_preparsed_function, finish_function§): Likewise.
1677 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1678 * init.c (sort_mem_initializers): Likewise.
1679 * typeck.c (convert_for_initialization): Likewise for inform.
1680 (maybe_warn_about_returning_address_of_local): Likewise.
1681 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1682 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1684 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
1687 * cvt.c (ocp_convert): Don't call scalar_constant_value when
1688 converting to a class type.
1690 2015-07-24 Jason Merrill <jason@redhat.com>
1693 * pt.c (splice_late_return_type): Correct deduced return type for
1694 abbreviated function template.
1696 2015-07-24 Richard Biener <rguenther@suse.de>
1698 * init.c (build_vec_init): Build iterator bound in the same
1699 type as the iterator.
1701 2015-07-23 Marek Polacek <polacek@redhat.com>
1704 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1706 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
1709 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1710 redundant error messages.
1712 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1714 * decl.c (grokdeclarator): For an erroneous template parameter
1715 propagate error_mark_node as type.
1717 2015-07-20 Marek Polacek <polacek@redhat.com>
1720 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1722 2015-07-15 Jason Merrill <jason@redhat.com>
1725 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1726 template if there is no type x in scope.
1728 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
1731 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1732 template template parm in the redeclaration.
1733 (lookup_template_class_1): Peel off irrelevant template levels
1734 from current_template_parms before augmenting the argument
1737 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
1740 * parser.c (cp_parser_sizeof_pack): Also consider template template
1743 2015-07-14 Jason Merrill <jason@redhat.com>
1745 * call.c (build_new_method_call_1): Call reshape_init.
1747 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
1749 * pt.c (check_template_shadow): Emit error + inform instead of
1752 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
1755 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1756 template parm type under C++11 and later.
1758 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1760 * call.c: Fix double word typos.
1761 * cp-array-notation.c: Same.
1764 * name-lookup.c: Same.
1767 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
1770 * pt.c (begin_template_parm_list): Add a dummy parameter level
1771 to current_template_parms.
1772 (end_template_parm_list): Remove the dummy parameter level
1773 before adding the real one.
1774 (tsubst): Don't attempt to substitute for template parameters
1775 corresponding to a dummy argument level.
1776 (template_parms_to_args): Remove obsolete hack for
1777 giving template template arguments the proper level.
1778 (splite_late_return_type): Remove obsolete hack for giving
1779 template template arguments the proper level.
1780 * error.c (dump_template_decl): Don't print dummy template
1783 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1786 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1787 the second step of copy-initialization.
1789 2015-07-10 Jason Merrill <jason@redhat.com>
1791 * pt.c (find_parameter_packs_r): Handle variable templates.
1792 (variable_template_specialization_p): New.
1793 * cp-tree.h: Declare it.
1795 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1797 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1799 * decl2.c (cpp_check): Revert latest change.
1801 2015-07-09 Jason Merrill <jason@redhat.com>
1803 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1804 value_dependent_expression_p.
1806 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1807 template_parameter_pack_p.
1808 * parser.c (declarator_can_be_parameter_pack): False if
1809 parameter_pack_p is set.
1810 (make_parameter_declarator): Add template_parameter_pack_p parm.
1811 (cp_parser_template_parameter): Remove parameter pack parsing.
1812 (cp_parser_parameter_declaration): Handle all parameter packs.
1813 Tweak default argument permerror.
1815 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1817 * parser.c (cp_parser_default_type_template_argument)
1818 (cp_parser_default_template_template_argument): Factor out from
1819 cp_parser_type_parameter.
1821 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1823 * typeck.c (warn_args_num): Rename to error_args_num.
1824 (convert_arguments): Adjust calls.
1826 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1828 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1830 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1832 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1834 2015-07-08 Jakub Jelinek <jakub@redhat.com>
1836 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1837 * pt.c (apply_late_template_attributes): Likewise.
1839 2015-07-08 Marek Polacek <polacek@redhat.com>
1842 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1843 accessing TYPE_LANG_SPECIFIC node.
1845 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1847 * call.c: Adjust includes.
1848 * class.c: Likewise.
1849 * constexpr.c: Likewise.
1850 * cp-array-notation.c: Likewise.
1851 * cp-gimplify.c: Likewise.
1852 * cp-lang.c: Likewise.
1853 * cp-objcp-common.c: Likewise.
1854 * cp-ubsan.c: Likewise.
1857 * decl2.c: Likewise.
1859 * error.c: Likewise.
1860 * except.c: Likewise.
1862 * friend.c: Likewise.
1864 * lambda.c: Likewise.
1866 * mangle.c: Likewise.
1867 * method.c: Likewise.
1868 * name-lookup.c: Likewise.
1869 * optimize.c: Likewise.
1870 * parser.c: Likewise.
1872 * ptree.c: Likewise.
1875 * search.c: Likewise.
1876 * semantics.c: Likewise.
1878 * typeck.c: Likewise.
1879 * typeck2.c: Likewise.
1881 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1883 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1885 2015-07-06 Jason Merrill <jason@redhat.com>
1887 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1888 for a template template parameter.
1889 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1890 by reduce_template_parm_level.
1892 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
1895 2015-07-02 Jason Merrill <jason@redhat.com>
1898 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
1899 TYPE_VALUES_RAW rather than TYPE_FIELDS.
1901 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
1903 * pt.c (type_dependent_expression_p): Handle expressions
1904 that refer to variable templates.
1906 2015-07-01 Jason Merrill <jason@redhat.com>
1908 * lex.c (init_reswords): s/CXX0X/CXX11/.
1909 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1911 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
1912 Attribute mangling is now -fabi-version=10.
1915 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
1916 * class.c (layout_nonempty_base_or_field): Warn if that affects
1917 the offset of a field.
1919 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
1922 * parser.c (cp_parser_check_std_attribute): New.
1923 (cp_parser_std_attribute_list): Call it.
1925 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
1928 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
1929 return 0 if tsubst returns a dependent type.
1931 2015-06-30 Jason Merrill <jason@redhat.com>
1934 * decl2.c (is_late_template_attribute): True for tls_model.
1937 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
1938 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
1939 (SET_DECL_GNU_TLS_P): New.
1940 * call.c (make_temporary_var_for_ref_to_temp): Use
1941 CP_DECL_THREAD_LOCAL_P.
1942 (set_up_extended_ref_temp): Likewise.
1943 * decl.c (duplicate_decls, expand_static_init): Likewise.
1944 (redeclaration_error_message, grokvardecl): Likewise.
1945 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
1946 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
1947 (handle_tls_init): Likewise.
1948 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1949 * semantics.c (finish_id_expression): Likewise.
1950 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
1951 (finish_omp_threadprivate): Likewise.
1952 * tree.c (decl_storage_duration): Likewise.
1953 * cp-gimplify.c (omp_var_to_track): Likewise.
1954 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
1955 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
1958 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1960 Implement N4197 - Adding u8 character literals
1961 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
1962 and CPP_UTF8CHAR_USERDEF tokens;
1963 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
1965 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1968 * decl.c (grokfndecl): Allow constexpr declarations of friend
1969 template specializations.
1971 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1974 * decl.c (finish_function): Call do_warn_unused_parameter.
1976 2015-06-29 Marek Polacek <polacek@redhat.com>
1979 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1980 (push_switch): Set OUTSIDE_RANGE_P.
1981 (pop_switch): Update c_do_switch_warnings call.
1982 (finish_case_label): Update c_add_case_label call.
1983 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1986 2015-06-27 Marek Polacek <polacek@redhat.com>
1988 * call.c: Use VECTOR_TYPE_P.
1989 * constexpr.c: Likewise.
1992 * decl2.c: Likewise.
1994 * semantics.c: Likewise.
1996 * typeck.c: Likewise.
1997 * typeck2.c: Likewise.
1999 2015-06-27 Marek Polacek <polacek@redhat.com>
2001 * call.c (set_up_extended_ref_temp): Use VAR_P.
2002 * class.c: Use VAR_P throughout.
2003 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
2004 * cp-array-notation.c (make_triplet_val_inv): Likewise.
2005 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
2007 * decl2.c: Likewise.
2008 * error.c (dump_decl): Use VAR_P.
2009 * mangle.c (decl_implicit_alias_p): Likewise.
2010 * parser.c: Use VAR_P throughout.
2012 * semantics.c: Likewise.
2013 * vtable-class-hierarchy.c: Likewise.
2014 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
2016 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
2018 * pt.c (check_unstripped_args): Mark parameter as unused.
2020 2015-06-26 Jason Merrill <jason@redhat.com>
2023 * class.c (finish_struct): Call fixup_attribute_variants.
2026 * typeck2.c (merge_exception_specifiers): Allow different
2027 noexcept-specifiers if we've had errors.
2030 * pt.c (check_unstripped_args): Split out from...
2031 (retrieve_specialization): ...here. Allow typedefs in the type of
2032 a non-type argument.
2035 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
2037 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
2040 * typeck2.c (digest_init_r): Only expect reshaping if the class is
2043 2015-06-26 Marek Polacek <polacek@redhat.com>
2045 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
2046 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
2048 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2050 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
2051 * class.c: Likewise.
2052 * cp-ubsan.c: Likewise.
2054 * decl2.c: Likewise.
2055 * lambda.c: Likewise.
2056 * mangle.c: Likewise.
2057 * method.c: Likewise.
2058 * optimize.c: Likewise.
2059 * parser.c: Likewise.
2060 * semantics.c: Likewise.
2062 * vtable-class-hierarchy.c: Likewise.
2064 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2066 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
2067 rather than ggc_hasher.
2068 (constexpr_call_hasher): Likewise.
2069 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
2070 * decl.c (typename_hasher): Likewise.
2071 * mangle.c (conv_type_hasher): Likewise.
2072 * pt.c (spec_hasher): Likewise.
2073 * tree.c (cplus_array_hasher, list_hasher): Likewise.
2074 * typeck2.c (abstract_type_hasher): Likewise.
2076 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2078 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
2079 rather than pointer_hash.
2080 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
2081 * semantics.c (nrv_data): Likewise.
2082 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
2084 2015-06-24 Jason Merrill <jason@redhat.com>
2087 * pt.c (dependent_type_p_r): Check for dependent alias template
2088 specialization sooner.
2091 * class.c (type_has_nontrivial_assignment): Remove.
2092 * cp-tree.h: Remove declaration.
2093 * init.c (vec_copy_assign_is_trivial): New.
2094 (build_vec_init): Use it.
2096 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
2098 Implement N3928 - Extending static_assert
2099 * parser.c (cp_parser_static_assert): Support static_assert with
2100 no message string. Supply an empty string in this case.
2101 * semantics.c (finish_static_assert): Don't try to print a message if
2102 the message strnig is empty.
2104 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
2107 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
2108 implicit template parm if 'auto' is a placeholder for trailing
2111 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
2114 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2117 * parser.c (cp_parser_template_parameter_list): Update
2118 current_template_parms right after processing a paramater.
2119 * pt.c (template_parms_to_args): Remove obsolete hack for
2120 giving template template arguments the proper level.
2121 (check_default_tmpl_args): Account for tested template
2123 (splite_late_return_type): Remove obsolete hack for giving
2124 template template arguments the proper level.
2126 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2129 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2131 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2134 * parser.c (cp_parser_template_parameter_list): Update
2135 current_template_parms right after processing a paramater.
2136 * pt.c (template_parms_to_args): Remove obsolete hack for
2137 giving template template arguments the proper level.
2138 (check_default_tmpl_args): Account for tested template
2140 (splite_late_return_type): Remove obsolete hack for giving
2141 template template arguments the proper level.
2143 2015-06-23 Jason Merrill <jason@redhat.com>
2146 * decl.c (grokfndecl): Check the linkage of ctype, not just
2148 * tree.c (no_linkage_check): Skip the 'this' pointer.
2151 * class.c (type_has_nontrivial_assignment): New.
2152 * init.c (build_vec_init): Use it.
2153 * cp-tree.h: Declare it.
2154 * method.c (trivial_fn_p): Templates aren't trivial.
2157 * decl.c (expand_static_init): Make sure the destructor is callable
2158 here even if we have an initializer.
2160 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2162 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
2163 -fdump-ada-spec is passed.
2165 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
2167 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
2169 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2171 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
2173 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2175 * decl.c (grokdeclarator): Remove pointless code.
2177 2015-06-22 Jason Merrill <jason@redhat.com>
2180 * call.c (implicit_conversion): Only reshape for classes.
2182 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
2184 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
2186 * semantics.c (finish_omp_atomic): Likewise.
2187 * typeck.c (cp_build_array_ref): Likewise.
2189 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
2192 * call.c (build_new_op_1): Check tf_warning flag in all cases.
2194 2015-06-19 Jason Merrill <jason@redhat.com>
2197 * pt.c (instantiate_class_template_1): Clear
2198 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
2201 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
2203 * typeck.c (merge_types): build_ptrmemfunc_type before applying
2204 quals and attributes.
2207 * constexpr.c (build_constexpr_constructor_member_initializers):
2208 Handle an empty STATEMENT_LIST.
2211 * pt.c (tsubst_copy_and_build): Register a capture proxy in
2212 local_specializations.
2214 2015-06-17 Jason Merrill <jason@redhat.com>
2217 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
2219 (potential_constant_expression_1): Likewise.
2221 2015-06-17 Jason Merrill <jason@redhat.com>
2224 * call.c (implicit_conversion): Call reshape_init here, early.
2225 (build_aggr_conv): Not here.
2227 2015-06-17 Jakub Jelinek <jakub@redhat.com>
2230 * pt.c (tsubst_omp_clause_decl): New function.
2231 (tsubst_omp_clauses): Use it or tsubst_copy instead of
2232 tsubst_expr on OMP_CLAUSE_DECL.
2234 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2236 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
2237 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
2238 * decl.c (grokdeclarator, xref_tag_1): Likewise.
2239 * error.c (dump_aggr_type): likewise.
2240 * pt.c (push_template_decl_real): Likewise.
2241 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
2243 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2245 * call.c: Do not include input.h, line-map.h or is-a.h.
2246 * class.c: Likewise.
2247 * constexpr.c: Likewise.
2248 * cp-array-notation.c: Likewise.
2249 * cp-gimplify.c: Likewise.
2250 * cp-lang.c: Likewise.
2251 * cp-objcp-common.c: Likewise.
2252 * cp-tree.h: Likewise.
2253 * cp-ubsan.c: Likewise.
2256 * decl2.c: Likewise.
2258 * error.c: Likewise.
2259 * except.c: Likewise.
2261 * friend.c: Likewise.
2263 * lambda.c: Likewise.
2265 * mangle.c: Likewise.
2266 * method.c: Likewise.
2267 * name-lookup.c: Likewise.
2268 * optimize.c: Likewise.
2269 * parser.c: Likewise.
2271 * ptree.c: Likewise.
2274 * search.c: Likewise.
2275 * semantics.c: Likewise.
2277 * typeck.c: Likewise.
2278 * typeck2.c: Likewise.
2279 * vtable-class-hierarchy.c: Likewise.
2281 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
2284 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
2286 2015-06-16 Jason Merrill <jason@redhat.com>
2289 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
2293 * tree.c (bot_manip): Remap SAVE_EXPR.
2296 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
2298 2015-06-15 Nathan Sidwell <nathan@acm.org>
2301 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
2302 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
2303 protect it from recursive instantiation.
2305 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
2308 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
2309 using a local type is pure virtual.
2311 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2313 * call.c: Remove comment documenting the long-deleted
2314 function build_method_call.
2316 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2319 * typeck.c (cp_build_binary_op): Warn when comparing an address
2320 of a reference against NULL.
2322 2015-06-12 Jason Merrill <jason@redhat.com>
2325 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
2326 variables as DECL_NOT_REALLY_EXTERN.
2328 2015-06-11 Jason Merrill <jason@redhat.com>
2331 * constexpr.c (potential_constant_expression_1): Handle a
2332 DECL_EXPR of TYPE_DECL.
2335 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
2338 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2340 * decl.c (cxx_init_decl_processing): Register the main
2341 translation unit through the new debug hook.
2343 2015-06-10 Jason Merrill <jason@redhat.com>
2346 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
2347 * pt.c (push_template_decl_real): Set it.
2348 (dependent_alias_template_spec_p): Use it.
2349 (dependent_type_p_r): Use dependent_alias_template_spec_p.
2350 (uses_all_template_parms_data, uses_all_template_parms_r)
2351 (complex_alias_template_p): New.
2352 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
2354 2015-06-09 Jason Merrill <jason@redhat.com>
2358 * typeck2.c (digest_init_r): Replace previous change with
2362 * semantics.c (process_outer_var_ref): Make sure the value is
2363 actually constant before returning it.
2364 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
2367 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2370 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
2371 * init.c (expand_default_init): Likewise.
2373 2015-06-09 Jason Merrill <jason@redhat.com>
2376 * tree.c (replace_placeholders_r): Handle placeholders for an
2378 * typeck2.c (store_init_value): Only replace_placeholders for
2379 objects of class type.
2381 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2383 * call.c : Adjust include files.
2384 * class.c : Likewise.
2385 * constexpr.c : Likewise.
2386 * cp-array-notation.c : Likewise.
2387 * cp-cilkplus.c : Likewise.
2388 * cp-gimplify.c : Likewise.
2389 * cp-lang.c : Likewise.
2390 * cp-objcp-common.c : Likewise.
2391 * cp-tree.h : Likewise.
2392 * cp-ubsan.c : Likewise.
2394 * decl.c : Likewise.
2395 * decl2.c : Likewise.
2396 * dump.c : Likewise.
2397 * error.c : Likewise.
2398 * except.c : Likewise.
2399 * expr.c : Likewise.
2400 * friend.c : Likewise.
2401 * init.c : Likewise.
2402 * lambda.c : Likewise.
2404 * mangle.c : Likewise.
2405 * method.c : Likewise.
2406 * name-lookup.c : Likewise.
2407 * optimize.c : Likewise.
2408 * parser.c : Likewise.
2410 * ptree.c : Likewise.
2411 * repo.c : Likewise.
2412 * rtti.c : Likewise.
2413 * search.c : Likewise.
2414 * semantics.c : Likewise.
2415 * tree.c : Likewise.
2416 * typeck.c : Likewise.
2417 * typeck2.c : Likewise.
2418 * vtable-class-hierarchy.c : Likewise.
2420 2015-06-05 Jason Merrill <jason@redhat.com>
2423 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
2424 the expansion has extra args.
2425 (use_pack_expansion_extra_args_p): Return true in that case.
2428 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
2429 dependent even if it has a type.
2431 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2433 * cp-objcp-common.c: Adjust comment for
2434 cxx_warn_unused_global_decl.
2435 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
2436 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
2437 * cp-tree.h (note_mangling_alias): Protoize.
2438 (cp_write_global_declarations): Remove.
2439 (cxx_post_compilation_parsing_cleanups): Protoize.
2440 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
2442 * decl2.c (mangling_aliases): New global.
2443 (build_java_method_aliases): New. Adapted from
2444 collect_candidates_for_java_method_aliases.
2445 (collect_candidates_for_java_method_aliases): Remove.
2446 (build_java_method_aliases): Remove.
2447 (generate_mangling_aliases): New.
2448 (note_mangling_alias): New. Moved from mangle_decl.
2449 (locus_at_end_of_parsing): New global.
2450 (c_parse_final_cleanups): Rename from
2451 cp_write_global_declarations.
2452 Use locus_at_end_of_parsing.
2453 Call generate_mangling_aliases.
2454 Rename call to collect_candidates_for_java_method_aliases into
2455 build_java_method_aliases.
2456 Remove call to finalize_compilation_unit.
2457 Move vtable handling into cxx_post_compilation_parsing_cleanups.
2458 Do not call check_global_declarations or
2459 emit_debug_global_declarations.
2460 (cxx_post_compilation_parsing_cleanups): New.
2461 * mangle.c (mangle_decl): Move code to note_mangling_alias.
2462 * name-lookup.c (do_namespace_alias): Call early_global_decl.
2464 2015-06-05 Nathan Sidwell <nathan@acm.org>
2467 * parser.c (cp_parser_cache_defarg): Continue looking for
2468 declarators when scanning a potential template argument list of an
2471 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2473 * call.c: Adjust includes for restructured coretypes.h.
2474 * class.c: Likewise.
2475 * constexpr.c: Likewise.
2476 * cp-array-notation.c: Likewise.
2477 * cp-gimplify.c: Likewise.
2478 * cp-lang.c: Likewise.
2479 * cp-objcp-common.c: Likewise.
2480 * cp-tree.h: Likewise.
2481 * cp-ubsan.c: Likewise.
2484 * decl2.c: Likewise.
2486 * error.c: Likewise.
2487 * except.c: Likewise.
2489 * friend.c: Likewise.
2491 * lambda.c: Likewise.
2493 * mangle.c: Likewise.
2494 * method.c: Likewise.
2495 * name-lookup.c: Likewise.
2496 * optimize.c: Likewise.
2497 * parser.c: Likewise.
2499 * ptree.c: Likewise.
2502 * search.c: Likewise.
2503 * semantics.c: Likewise.
2505 * typeck.c: Likewise.
2506 * typeck2.c: Likewise.
2507 * vtable-class-hierarchy.c: Likewise.
2509 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2513 * cp-tree.h (get_guard_cond): Adjust declaration
2514 * decl.c (expand_static_init): Use atomic load acquire
2515 and adjust call to get_guard_cond.
2516 * decl2.c (build_atomic_load_byte): New function.
2517 (get_guard_cond): Handle thread_safety.
2518 (one_static_initialization_or_destruction): Adjust call to
2521 2015-06-03 Jason Merrill <jason@redhat.com>
2524 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2525 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2526 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2527 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2529 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2530 Paolo Carlini <paolo.carlini@oracle.com>
2533 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2534 use it in the diagnostic.
2535 (decay_conversion): Adjust call.
2536 * semantics.c (finish_decltype_type): Likewise.
2537 * call.c (resolve_args, build_new_op_1,
2538 perform_implicit_conversion_flags): Adjust calls.
2539 * cvt.c (ocp_convert, convert_to_void): Likewise.
2540 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2542 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2544 * decl.c (check_tag_decl): Use declspecs->locations as locations in
2545 error_at and warning_at calls.
2547 2015-06-03 Marek Polacek <polacek@redhat.com>
2550 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2551 (cp_genericize_r): Don't instrument static initializers.
2552 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2554 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2556 * decl.c (start_function): Call plugin before parsing.
2557 (finish_function): Call plugin after parsing.
2559 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
2561 * cp-tree.h (init_error): Remove declaration.
2562 * error.c (scratch_pretty_printer): Rename to ...
2563 (actual_pretty_printer): ... this.
2564 (cxx_pp): Constify and update accordingly.
2565 (init_error): Remove definition.
2566 * lex.c (cxx_init): Do not call init_error.
2568 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2571 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2573 2015-06-01 Jason Merrill <jason@redhat.com>
2576 * decl2.c (mark_used): Don't always instantiate constexpr fns.
2577 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2580 * mangle.c (attr_strcmp): New.
2581 (write_CV_qualifiers_for_type): Also write out attributes that
2582 affect type identity.
2583 (write_type): Strip all attributes after writing qualifiers.
2585 2015-05-31 Jason Merrill <jason@redhat.com>
2587 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2590 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2591 with the wrong type as non-constant.
2593 2015-05-27 Jason Merrill <jason@redhat.com>
2595 * decl.c (check_redeclaration_exception_specification): Depend on
2596 -Wsystem-headers rather than -pedantic.
2598 * decl.c (warn_extern_redeclared_static): Use the location of
2599 newdecl in diagnostics, not input_location.
2600 (validate_constexpr_redeclaration): Likewise.
2601 (check_redeclaration_no_default_args): Likewise.
2602 (duplicate_decls): Likewise.
2603 (check_redeclaration_exception_specification): Likewise.
2604 Change second diagnostic to inform.
2606 2015-05-24 Nathan Sidwell <nathan@acm.org>
2609 * decl.c (build_enumerator): Don't silently convert scoped enums.
2611 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
2614 * mangle.c (mangle_decl): Mangle anonymous namespace types as
2617 2015-05-23 Nathan Sidwell <nathan@acm.org>
2620 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2622 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2624 * Make-lang.in (check_g++_parallelize): Update comment.
2626 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2629 * decl.c (grokdeclarator): Use the correct location in error
2630 messages about 'explicit'.
2632 2015-05-22 Marek Polacek <polacek@redhat.com>
2633 Edward Smith-Rowland <3dw4rd@verizon.net>
2636 * cp-tree.h (build_enumerator): Update declaration.
2637 * decl.c (build_enumerator): Add attributes parameter. Call
2638 cplus_decl_attributes.
2639 * init.c (constant_value_1): Pass tf_none to mark_used.
2640 * parser.c (cp_parser_enumerator_definition): Parse attributes and
2641 pass them down to build_enumerator.
2642 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2643 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2645 2015-05-21 Nathan Sidwell <nathan@acm.org>
2648 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2650 2015-05-21 Marek Polacek <polacek@redhat.com>
2652 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2654 2015-05-20 Jason Merrill <jason@redhat.com>
2656 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2657 before register_specialization.
2659 * decl.c (grok_op_properties): Don't complain about size_t
2660 placement delete here.
2661 * call.c (second_parm_is_size_t): Split out from...
2662 (non_placement_deallocation_fn_p): ...here.
2663 (build_op_delete_call): Warn about size_t placement delete with
2666 2015-05-19 Nathan Sidwell <nathan@acm.org>
2669 * typeck.c (finish_class_member_access_expr): Diagnose failed
2670 lookup of enum class member.
2672 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2675 * parser.c (cp_parser_omp_for_loop): Don't add
2676 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2677 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2678 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2681 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2683 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2686 2015-05-18 Jason Merrill <jason@redhat.com>
2688 * pt.c (retrieve_specialization): Make sure our arguments have
2689 gone through strip_typedefs.
2691 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2692 (determine_specialization): Call coerce_template_parms.
2695 * pt.c (type_unification_real): Check convertibility here.
2696 (unify_one_argument): Not here.
2698 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2699 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2700 [TREE_LIST]: Fix no-change case.
2702 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2704 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2707 * error.c (cp_diagnostic_starter): Use diagnostic_location
2709 (cp_print_error_function): Likewise.
2710 (cp_printer): Replace locus pointer with accessor function.
2712 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2714 * parser.c (cp_parser_selection_statement): Add location and
2715 guard_kind arguments to calls to
2716 cp_parser_implicitly_scoped_statement.
2717 (cp_parser_iteration_statement): Likewise for calls to
2718 cp_parser_already_scoped_statement.
2719 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2720 "guard_kind" params; use them to warn for misleading
2722 (cp_parser_already_scoped_statement): Likewise.
2724 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
2726 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2727 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2728 * semantics.c (finish_member_declaration): Likewise.
2729 * method.c (lazily_declare_fn): Allways add method to main variant list.
2731 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
2734 * decl2.c (note_mangling_alias): Declare arguments as unused.
2736 2015-05-08 Jason Merrill <jason@redhat.com>
2738 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2741 2015-05-08 Jason Merrill <jason@redhat.com>
2743 * decl2.c (mangling_aliases): New variable.
2744 (note_mangling_alias, generate_mangling_aliases): New.
2745 (cp_write_global_declarations): Call generate_mangling_aliases.
2746 (generate_mangling_alias): Split out from...
2747 * mangle.c (mangle_decl): ...here.
2748 * cp-tree.h: Declare note_mangling_alias.
2750 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
2752 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2753 (build_java_method_aliases): Adapt to use create_same_body_alias
2754 instead of assemble_alias. Move variable declarations to
2755 definition and tidy up.
2756 (cp_write_global_declarations): Call build_java_method_aliases
2757 instead of collecting candidates first.
2759 2015-05-07 Jason Merrill <jason@redhat.com>
2762 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2763 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2764 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2765 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2766 (apply_late_template_attributes): Handle attribute pack expansion.
2768 2015-05-07 Marek Polacek <polacek@redhat.com>
2771 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2774 2015-05-07 Jason Merrill <jason@redhat.com>
2778 * typeck2.c (digest_init_r): Fix single element list.
2780 2015-05-05 Jason Merrill <jason@redhat.com>
2782 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2783 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2784 MUST_NOT_THROW_EXPR.
2785 (cp_genericize_data): Add try_block field.
2786 (cp_genericize_tree): Initialize it.
2787 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2790 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2793 * semantics.c (finish_call_expr): Check complain.
2795 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2796 maybe-in-charge constructor.
2798 * decl.c (start_decl): Don't push the plain VAR_DECL for a
2805 * call.c (convert_like_real): Check value-initialization before
2807 * typeck2.c (process_init_constructor_record): Don't set
2808 CONSTRUCTOR_IS_DIRECT_INIT.
2809 (process_init_constructor_array): Likewise.
2810 * init.c (build_vec_init): Likewise.
2812 2015-05-05 David Malcolm <dmalcolm@redhat.com>
2814 * parser.c (cp_parser_asm_definition): Only test for
2815 error_mark_node if "outputs" was just set. Likewise for "inputs".
2817 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2818 Jakub Jelinek <jakub@redhat.com>
2821 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2822 result in an actual error.
2824 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2825 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
2828 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2831 2015-04-30 David Malcolm <dmalcolm@redhat.com>
2833 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2836 2015-04-29 Jason Merrill <jason@redhat.com>
2839 * tree.c (apply_identity_attributes): Fix handling of classes.
2841 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2843 * parser.c (cp_parser_oacc_enter_exit_data): Use
2844 OMP_STANDALONE_CLAUSES.
2846 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
2849 * init.c (perform_member_init): Handle references for -Winit-self.
2851 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2853 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2854 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2856 2015-04-28 Jason Merrill <jason@redhat.com>
2859 * constexpr.c (cxx_eval_store_expression): Don't try to actually
2860 store an empty class.
2863 * constexpr.c (cxx_eval_builtin_function_call): Fix
2864 __builtin_constant_p.
2867 * tree.c (strip_typedefs): Add remove_attributes parm.
2868 (strip_typedefs_expr): Likewise.
2869 (apply_identity_attributes): New subroutine of strip_typedefs.
2870 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2871 (convert_nontype_argument, unify): Likewise.
2872 * cp-tree.h: Adjust.
2875 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2877 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2879 * class.c (layout_class_type): Remove check if
2880 PCC_BITFIELD_TYPE_MATTERS is defined.
2882 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2884 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2886 2015-04-24 Jason Merrill <jason@redhat.com>
2889 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2891 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2892 Remove obsolete code.
2893 [NE_EXPR]: Likewise.
2895 2015-04-23 Jason Merrill <jason@redhat.com>
2898 * pt.c (check_explicit_specialization): Don't
2899 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
2901 * decl.c (grokvardecl): Revert earlier fix.
2903 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
2906 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
2907 suppresses the diagnostic.
2909 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
2911 Reject trailing return type for an operator auto().
2912 * decl.c (grokdeclarator): Reject trailing return types for
2913 all conversion operators, don't handle conversion operators
2914 in the previous checks that deal with auto.
2916 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2918 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
2920 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2922 * class.c (resolve_address_of_overloaded_function, instantiate_type):
2923 Rename tsubst_flags_t parameter flags -> complain.
2925 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2927 * call.c (build_op_delete_call, build_over_call): Check mark_used
2929 * class.c (resolve_address_of_overloaded_function): Likewise.
2930 * decl.c (cxx_maybe_build_cleanup): Likewise.
2931 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
2932 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
2933 * rtti.c (build_dynamic_cast_1): Likewise.
2934 * semantics.c (process_outer_var_ref): Likewise.
2935 * typeck.c (build_class_member_access_expr,
2936 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
2938 2015-04-15 Jason Merrill <jason@redhat.com>
2940 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
2941 (build_constexpr_constructor_member_initializers): Loop to find
2943 * decl.c (start_preparsed_function): Clobber the object at the
2944 beginning of a constructor.
2946 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
2947 * method.c (implicitly_declare_fn): Likewise.
2948 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
2950 * decl2.c (determine_visibility): Use get_template_info.
2952 2015-04-15 Jason Merrill <jason@redhat.com>
2953 Marek Polacek <polacek@redhat.com>
2956 * lambda.c (lambda_expr_this_capture): In unevaluated context go
2957 through the normal loop, just don't capture.
2958 (maybe_resolve_dummy): Handle null return.
2960 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2962 * call.c (enforce_access): Emit error + inform.
2964 2015-04-15 Marek Polacek <polacek@redhat.com>
2966 * constexpr.c (use_new_call): Remove #define.
2967 (lookup_parameter_binding): Remove function.
2968 (cxx_bind_parameters_in_call): Remove unused code.
2969 (cxx_eval_call_expression): Likewise.
2970 (cxx_eval_constant_expression): Likewise.
2972 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
2974 * tree.c (replace_placeholders_t): Remove unused type.
2975 (replace_placeholders): Remove unused pset.
2977 2015-04-14 Jason Merrill <jason@redhat.com>
2979 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2982 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2985 * name-lookup.c (do_class_using_decl): Complain about specifying
2986 the current class even if there are dependent bases.
2988 2015-04-14 David Krauss <david_work@me.com>
2991 * decl.c (grokdeclarator): Do not flag friends with deduced return.
2993 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
2994 Jason Merrill <jason@redhat.com>
2997 * parser.c (cp_parser_class_name): Add enum_ok parameter.
2998 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2999 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
3002 2015-04-12 Jakub Jelinek <jakub@redhat.com>
3005 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
3006 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
3007 the expression to the original type at the end.
3009 2015-04-09 Jakub Jelinek <jakub@redhat.com>
3012 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
3016 * tree.c (build_cplus_array_type): Layout type before variants are
3017 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
3020 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3023 * lambda.c (add_capture): Use dependent_type_p for capture by
3026 2015-04-02 Marek Polacek <polacek@redhat.com>
3029 * constexpr.c (cxx_eval_pointer_plus_expression): Call
3030 cxx_eval_constant_expression on the first operand.
3032 2015-04-01 Jason Merrill <jason@redhat.com>
3035 * decl.c (make_typename_type): Handle seeing a variable template.
3037 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
3040 * pt.c (instantiating_current_function_p): New.
3041 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
3042 * cp-tree.h (instantiating_current_function_p): Declare.
3044 2015-04-01 Jason Merrill <jason@redhat.com>
3047 * decl.c (grokvardecl): Don't call check_explicit_specialization
3048 for non-template members of a class template.
3050 2015-04-01 Marek Polacek <polacek@redhat.com>
3053 * class.c (finish_struct): Require that the second field of a
3054 user-defined initializer_list be of size type.
3056 2015-03-31 Marek Polacek <polacek@redhat.com>
3059 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
3060 checking for constness.
3062 2015-03-30 Marek Polacek <polacek@redhat.com>
3065 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
3066 *(&A[i] p+ j) => A[i + j] transformation here.
3067 (cxx_eval_pointer_plus_expression): New function.
3068 (cxx_eval_constant_expression): Use it here.
3070 2015-03-27 Tobias Burnus <burnus@net-b.de>
3073 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
3074 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
3075 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
3078 2015-03-27 Marek Polacek <polacek@redhat.com>
3081 * semantics.c (finish_switch_cond): If the unlowered type is not an
3082 enum, use the type of the condition.
3084 2015-03-27 Jason Merrill <jason@redhat.com>
3087 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
3090 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
3093 * init.c (build_vec_init): Fix initializing aggregates
3094 with empty init list.
3096 2015-03-26 Jason Merrill <jason@redhat.com>
3099 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
3101 2015-03-25 Marek Polacek <polacek@redhat.com>
3104 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
3105 on an anonymous namespace.
3107 2015-03-25 Marek Polacek <polacek@redhat.com>
3110 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
3112 2015-03-24 Jason Merrill <jason@redhat.com>
3115 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
3116 * parser.c (cp_parser_namespace_definition): Don't set it.
3117 * name-lookup.c (handle_namespace_attrs): Check
3118 DECL_NAMESPACE_ASSOCIATIONS instead.
3121 * pt.c (get_mostly_instantiated_function_type): Just return the
3122 type of the partially instantiated template in DECL_TI_TEMPLATE.
3124 2015-03-20 Marek Polacek <polacek@redhat.com>
3127 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
3130 2015-03-20 Marek Polacek <polacek@redhat.com>
3133 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
3136 2015-03-19 Jason Merrill <jason@redhat.com>
3139 Automatically propagate ABI tags to variables and functions
3140 from their (return) type.
3141 * class.c (check_tag): Handle variables and functions.
3142 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
3143 (mark_or_check_tags): Likewise.
3144 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
3145 (check_abi_tags): Add single argument overload for decls.
3146 Handle inheriting tags for decls.
3147 * mangle.c (write_mangled_name): Call it.
3148 (mangle_return_type_p): Split out from write_encoding.
3149 (unmangled_name_p): Split out from write_mangled_name.
3150 (write_mangled_name): Ignore abi_tag on namespace.
3151 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
3152 * parser.c (cp_parser_namespace_definition): Set it.
3153 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
3154 about abi_tag attribute on non-inline namespace.
3155 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
3156 (handle_abi_tag_attribute): Allow tags on variables.
3158 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3160 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
3161 attribute for DECL_EXTERNAL VAR_DECLs.
3163 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3166 * call.c (build_over_call): Pass the tsubst_flags_t argument to
3168 * decl2.c (mark_used): Inline the require_deduced_type call and
3169 guard the error call.
3171 2015-03-16 Jason Merrill <jason@redhat.com>
3174 * parser.c (cp_parser_template_name): Call strip_using_decl.
3176 2015-03-16 Marek Polacek <polacek@redhat.com>
3180 * decl.c (grokdeclarator): Allow volatile and constexpr together.
3182 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
3185 * decl.c (check_default_argument): Don't call
3186 maybe_warn_zero_as_null_pointer_constant.
3188 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
3190 * cp-gimplify.c (simple_empty_class_p): New.
3191 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
3192 the code for empty class copies into simple_empty_class_p, and
3193 adapt it to handle COMPOUND_EXPRs.
3195 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
3198 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
3199 only if the location of newdecl doesn't match the location of olddecl.
3201 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3204 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
3207 2015-03-10 Jason Merrill <jason@redhat.com>
3211 * pt.c (dependent_type_p_r): Check both class and alias template args.
3213 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3216 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
3217 before preparing arguments to warn_logical_not_parentheses.
3218 Use maybe_constant_value on rhs.
3220 2015-03-09 Jason Merrill <jason@redhat.com>
3223 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
3225 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3228 * parser.c (cp_parser_binary_expression): Don't warn for
3229 !!x == y or !b == y where b is bool.
3231 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
3233 * ptree.c (cxx_print_lambda_node): New.
3234 (cxx_print_xnode): Handle LAMBDA_EXPR.
3236 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
3239 * constexpr.c (cxx_eval_constant_expression): Remove assert in
3240 RESULT_DECL handling.
3242 2015-02-26 Marek Polacek <polacek@redhat.com>
3245 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
3246 a RETURN_EXPR if its operand is null.
3248 2015-02-25 Jason Merrill <jason@redhat.com>
3251 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
3253 (constrain_visibility_for_template): Handle reference arguments.
3256 * decl.c (start_preparsed_function): Use create_artificial_label
3259 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
3260 Jakub Jelinek <jakub@redhat.com>
3263 * constexpr.c (check_constexpr_bind_expr_vars): Allow
3264 implicit typedefs for lambda types.
3266 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3269 * decl.c (lookup_and_check_tag): Use strip_using_decl.
3271 2015-02-13 Jason Merrill <jason@redhat.com>
3274 * pt.c (template_args_equal): Look through conversions here.
3275 * tree.c (cp_tree_equal): Not here.
3277 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3280 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
3281 pragma_external context.
3283 2015-02-13 Jason Merrill <jason@redhat.com>
3286 * call.c (reference_binding): Don't look for bad conversion
3287 if TO is incomplete.
3289 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3292 * decl.c (make_typename_type): Pass tsubst_flags_t argument
3293 to lookup_template_class.
3295 2015-02-13 Jakub Jelinek <jakub@redhat.com>
3298 * decl.c (start_preparsed_function): Use void_type_node instead
3299 of NULL_TREE as LABEL_DECL type.
3301 2015-02-12 Jason Merrill <jason@redhat.com>
3304 * mangle.c (write_mangled_name): Fix test for variable template
3307 * decl.c (begin_destructor_body): Condition clobber on
3310 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
3313 * parser.c (lookup_literal_operator): Return all candidates.
3314 (cp_parser_userdef_char_literal): Simplify error handling.
3315 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
3316 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
3317 Also give higher priority to standard string UDL operator.
3319 2015-02-12 Jakub Jelinek <jakub@redhat.com>
3322 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
3323 * decl.c (poplevel): If functionbody, try not to create an extra
3324 BLOCK for function body and use subblocks as that, if it is non-NULL
3325 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
3326 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
3329 * except.c (check_noexcept_r): Return NULL for internal
3332 2015-02-10 Jason Merrill <jason@redhat.com>
3335 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
3337 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
3340 * method.c (use_thunk): Do not check for stdarg thunks.
3342 2015-02-06 Jason Merrill <jason@redhat.com>
3345 * init.c (build_vec_init): Handle default-initialized array with
3346 constexpr default constructor.
3348 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3352 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
3354 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3357 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
3358 for generated expressions.
3360 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3363 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
3366 2015-02-02 Jason Merrill <jason@redhat.com>
3368 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
3370 2015-01-30 Joseph Myers <joseph@codesourcery.com>
3372 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
3373 changed to pass input_location as first argument.
3375 2015-01-29 Jakub Jelinek <jakub@redhat.com>
3378 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
3381 2015-01-29 Jason Merrill <jason@redhat.com>
3384 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
3385 erroneous return statement.
3388 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
3391 2015-01-27 Caroline Tice <cmtice@google.com>
3393 Committing VTV Cywin/Ming patch for Patrick Wollgast
3394 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
3395 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
3397 2015-01-27 Jason Merrill <jason@redhat.com>
3400 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
3401 current_function_decl.
3404 * pt.c (finish_template_variable): Move from semantics.c.
3405 Handle multiple template arg levels. Handle coercion here.
3406 (lookup_template_variable): Not here.
3408 2015-01-23 Jason Merrill <jason@redhat.com>
3412 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
3413 that has been completely split out.
3416 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
3420 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
3423 2015-01-21 Jason Merrill <jason@redhat.com>
3426 * constexpr.c (cxx_eval_constant_expression): Only shortcut
3427 constant CONSTRUCTORs.
3430 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
3431 give a hard error in a template instantiation.
3433 2015-01-21 Richard Biener <rguenther@suse.de>
3436 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
3437 for builtins the user declared correctly.
3439 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3442 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
3443 TREE_TYPE (elt) == error_mark_node.
3445 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
3447 PR tree-optimization/62053
3448 * tree.c (build_cplus_array_type): Layout type after variants are set.
3450 2015-01-15 Jakub Jelinek <jakub@redhat.com>
3452 * cp-gimplify.c (cp_genericize_r): Call
3453 cp_ubsan_maybe_instrument_member_call for member calls.
3454 (cp_ubsan_check_member_access_r): New function.
3455 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
3456 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
3457 cp_ubsan_instrument_member_accesses,
3458 cp_ubsan_maybe_instrument_downcast,
3459 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
3460 * cp-ubsan.c: New file.
3461 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
3462 * constexpr.c (cxx_eval_call_expression): Return void_node
3464 (potential_constant_expression_1): Return true for
3465 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
3466 * typeck.c (build_class_member_access_expr): Provide locus
3468 (build_static_cast_1): Instrument downcasts.
3469 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
3470 add ubsan instrumentation for virtual_access.
3471 * call.c: Include internal-fn.h.
3472 (set_flags_from_callee): Handle internal calls.
3474 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
3477 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
3478 and function templates, declared only in the class.
3479 * decl.c (duplicate_decls): Reveal hidden friend functions or
3480 function templates, if they are redeclared outside the class.
3482 2015-01-15 Jason Merrill <jason@redhat.com>
3485 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
3488 * constexpr.c (potential_constant_expression_1): Handle reference
3491 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3492 James Norris <jnorris@codesourcery.com>
3493 Cesar Philippidis <cesar@codesourcery.com>
3494 Ilmir Usmanov <i.usmanov@samsung.com>
3495 Jakub Jelinek <jakub@redhat.com>
3497 * parser.c: Include "gomp-constants.h".
3498 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3499 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3500 Use OMP_CLAUSE_SET_MAP_KIND.
3501 (cp_parser_omp_construct, cp_parser_pragma): Handle
3502 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3503 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3504 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3505 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3506 "create", "delete", "deviceptr", "host", "num_gangs",
3507 "num_workers", "present", "present_or_copy", "pcopy",
3508 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3509 "present_or_create", "pcreate", "vector_length", "wait".
3510 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3511 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3512 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3513 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3514 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3515 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3516 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3517 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3518 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3519 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3520 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3521 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3522 (cp_parser_oacc_parallel, cp_parser_oacc_update)
3523 (cp_parser_oacc_wait): New functions.
3524 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3525 (finish_oacc_parallel): New prototypes.
3526 * semantics.c: Include "gomp-constants.h".
3527 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3528 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3529 OMP_CLAUSE_SET_MAP_KIND.
3530 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3531 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3532 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3533 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3536 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
3539 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3540 self-initialization.
3542 2015-01-13 Jason Merrill <jason@redhat.com>
3546 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3547 pointer expressions.
3548 (cxx_eval_increment_expression): Likewise.
3551 * pt.c (coerce_template_parameter_pack): Return NULL for a
3552 zero-length fixed parameter pack with a pack expansion arg.
3555 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3557 2015-01-12 Jason Merrill <jason@redhat.com>
3560 * constexpr.c (cxx_eval_call_expression): A call to a void
3561 function doesn't need to return a value.
3563 2015-01-09 Michael Collison <michael.collison@linaro.org>
3565 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3566 input.h, alias.h, symtab.h, options.h, fold-const.h,
3567 wide-int.h, and inchash.h due to flattening of tree.h.
3569 * constexpr.c: Ditto.
3570 * cp-array-notation.c: Ditto.
3571 * cp-gimplify.c: Ditto.
3573 * cp-objcp-common.c: Ditto.
3586 * name-lookup.c: Ditto.
3587 * optimize.c: Ditto.
3594 * semantics.c: Ditto.
3599 2015-01-08 Jason Merrill <jason@redhat.com>
3601 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3602 * decl.c (compute_array_index_type): Likewise.
3603 * init.c (build_vec_init): Likewise.
3604 * typeck.c (cp_build_binary_op): Likewise.
3606 2015-01-08 Jason Merrill <jason@redhat.com>
3608 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3609 whether an initializer-list is too big for a VLA.
3610 (throw_bad_array_length): Remove.
3611 * cp-tree.h: Remove prototype.
3613 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
3616 * decl.c (grokfndecl): Add bool parameter.
3617 (grokdeclarator): Adjust calls.
3618 (start_decl): Don't set DECL_DELETED_FN here.
3620 2015-01-06 Jason Merrill <jason@redhat.com>
3622 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3626 * pt.c (type_dependent_expression_p): Handle variable templates.
3627 * constexpr.c (potential_constant_expression_1): Use it.
3630 * semantics.c (finish_offsetof): Handle templates here.
3631 * parser.c (cp_parser_builtin_offsetof): Not here.
3634 * semantics.c (process_outer_var_ref): Diagnose lambda in local
3637 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3640 * class.c (check_field_decls): Make copy assignment operators
3641 complex only in c++98 mode.
3643 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3646 * class.c (check_for_override): Warn when a virtual function is an
3647 override not marked override.
3649 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3651 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3653 (get_basefndecls): Adjust.
3655 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3657 Update copyright years.
3659 2015-01-05 Marek Polacek <polacek@redhat.com>
3662 * typeck.c (cp_build_array_ref): Pass loc down to
3663 warn_array_subscript_with_type_char.
3666 Copyright (C) 2015 Free Software Foundation, Inc.
3668 Copying and distribution of this file, with or without modification,
3669 are permitted in any medium without royalty provided the copyright
3670 notice and this notice are preserved.