1 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3 * cp-tree.h (lookup_member_fuzzy): New decl.
4 * search.c: Include spellcheck.h.
5 (class lookup_field_fuzzy_info): New class.
6 (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): New.
7 (lookup_field_fuzzy_info::fuzzy_lookup_field): New.
8 (lookup_field_fuzzy_r): New.
9 (lookup_member_fuzzy): New.
10 * typeck.c (finish_class_member_access_expr): When issuing
11 a "has no member named" error, call lookup_member_fuzzy, and
12 offer any result as a suggestion.
14 2015-11-19 Torvald Riegel <triegel@redhat.com>
16 * except.c (do_free_exception): Use transactional wrapper.
18 2015-11-19 Jason Merrill <jason@redhat.com>
21 * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
22 * parser.c (cp_parser_sizeof_pack): Set it.
23 * pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
24 (tsubst_pack_expansion): Improve T... shortcut for expression packs.
26 2015-11-19 Ryan Burn <contact@rnburn.com>
29 * pt.c (find_parameter_packs_r) [DECLTYPE_TYPE]: When traversing
30 the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false.
32 2015-11-19 Cesar Philippidis <cesar@codesourcery.com>
34 * parser.h (struct cp_omp_declare_simd_data): Add clauses member.
35 (struct cp_parser): Change type the of oacc_routine to
36 cp_omp_declare_simd_data.
37 * parser.c (cp_ensure_no_oacc_routine): Rework to use
38 cp_omp_declare_simd_data.
39 (cp_parser_simple_declaration): Remove boolean first. Update call to
40 cp_parser_init_declarator. Don't NULL out oacc_routine.
41 (cp_parser_init_declarator): Remove boolean first parameter. Update
42 calls to cp_finalize_oacc_routine.
43 (cp_parser_late_return_type_opt): Handle acc routines.
44 (cp_parser_member_declaration): Remove first variable. Handle
45 acc routines like omp declare simd.
46 (cp_parser_function_definition_from_specifiers_and_declarator): Update
47 call to cp_finalize_oacc_routine.
48 (cp_parser_single_declaration): Update call to
49 cp_parser_init_declarator.
50 (cp_parser_save_member_function_body): Remove first_decl parameter.
51 Update call to cp_finalize_oacc_routine.
52 (cp_parser_finish_oacc_routine): Delete.
53 (cp_parser_oacc_routine): Rework to use cp_omp_declare_simd_data.
54 (cp_parser_late_parsing_oacc_routine): New function.
55 (cp_finalize_oacc_routine): Remove first argument. Add more error
56 handling and set the acc routine and 'omp declare target' attributes.
57 (cp_parser_pragma): Remove unnecessary call to
58 cp_ensure_no_oacc_routine.
60 2015-11-17 Cesar Philippidis <cesar@codesourcery.com>
62 * cp-gimplify.c (cp_fold_r): Add support for OACC_LOOP.
64 2015-11-17 Jason Merrill <jason@redhat.com>
67 * typeck.c (build_static_cast_1): Force a NOP when converting to
70 * cp-tree.h (LITERAL_ZERO_P): Remove.
71 * parser.c (cp_parser_postfix_expression, literal_zeros)
72 (cp_parser_parenthesized_expression_list): Don't mess with it.
74 * parser.c (cp_parser_unary_expression): Fold -constant here.
75 * typeck.c (cp_build_unary_op): Not here.
78 * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
81 2015-11-16 Jason Merrill <jason@redhat.com>
83 * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
84 to fold arguments to __builtin_constant_p.
86 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
88 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
89 "simd" attribute as well. Update error message.
91 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
93 * parser.c (cp_parser_omp_declare_target): Adjust.
95 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
97 * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
99 2015-11-14 Jason Merrill <jason@redhat.com>
102 * call.c (build_new_op_1): Don't fold arguments to
103 warn_tautological_cmp.
105 2015-11-14 Jakub Jelinek <jakub@redhat.com>
107 * semantics.c (finish_omp_clauses): Don't mark
108 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
110 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
111 Marek Polacek <polacek@redhat.com>
112 Jason Merrill <jason@redhat.com>
114 * call.c (build_conditional_expr_1, convert_like_real)
115 (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
116 (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
117 * class.c (build_base_path, determine_primary_bases)
118 (update_vtable_entry_for_fn, check_bitfield_decl)
119 (layout_nonempty_base_or_field, layout_empty_base)
120 (propagate_binfo_offsets, include_empty_classes)
121 (layout_class_type, build_vbase_offset_vtbl_entries): Use
123 * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
124 (cxx_eval_call_expression): Handle MEM_REF.
125 (cxx_eval_pointer_plus_expression): Fold the second operand.
126 (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
127 (fold_simple_1, fold_simple): New.
128 (maybe_constant_value_1): Factor out from maybe_constant_value.
129 (cv_cache, maybe_constant_value): Cache results.
130 (maybe_constant_init): Handle null input.
131 (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
132 * cp-array-notation.c (build_array_notation_ref): Fold operands.
133 * cp-gimplify.c (cp_fold_r, cp_fold): New.
134 (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
135 (cp_genericize): Fold everything.
136 (contains_label_1, contains_label_p): New.
137 (cp_fold, cp_fully_fold): New.
138 * cp-tree.h (class cache_map): New.
139 * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
140 (cp_convert_and_check): Use cp_fully_fold.
141 (convert, convert_force): Don't fold.
142 * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
143 (compute_array_index_type): Use cp_fully_fold.
144 (build_enumerator): Use fold_convert.
145 * decl2.c (get_guard_cond, set_guard): Use fold_convert.
146 * init.c (build_zero_init_1): Fold zero-initializers.
147 (build_new_1): Fold nelts calculations.
148 (build_vec_delete_1): Fold conversions.
149 (build_vec_init): Fold maxindex.
150 * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
151 (cp_parser_question_colon_clause): Fold LHS.
152 * pt.c (convert_nontype_argument): Fold nullptr conversion.
153 * semantics.c (finish_unary_op_expr): Fold for warnings.
154 (handle_omp_array_sections_1): Fold length and low bound.
155 (handle_omp_for_class_iterator): Fold various things.
156 * tree.c (builtin_valid_in_constant_expr_p): Add
157 BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
158 (convert_bitfield_to_declared_type): Don't fold.
159 (handle_init_priority_attribute): Fold.
160 (fold_if_not_in_template): Remove.
161 * typeck.c (decay_conversion, build_class_member_access_expr)
162 (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
163 (cp_pointer_int_sum, pointer_diff): Don't fold.
164 (cp_build_binary_op): Fold for warnings and PMF ops.
165 (cp_build_unary_op): Fold negation of a constant, nothing else.
166 (expand_ptrmemfunc_cst): Fold operations.
167 * typeck2.c (split_nonconstant_init): Fold initializer.
168 (store_init_value): Likewise.
169 (check_narrowing): Try folding.
170 * config-lang.in (gtfiles): Add cp-gimplify.c.
172 2015-11-13 David Malcolm <dmalcolm@redhat.com>
174 * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
176 2015-11-12 James Norris <jnorris@codesourcery.com>
178 * parser.c (cp_parser_oacc_declare): Remove unused.
180 2015-11-12 James Norris <jnorris@codesourcery.com>
181 Joseph Myers <joseph@codesourcery.com>
183 * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
185 (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
186 and PRAGMA_OMP_CLAUSE_LINK.
187 (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
188 and PRAGMA_OMP_CLAUSE_LINK.
189 (OACC_DECLARE_CLAUSE_MASK): New definition.
190 (cp_parser_oacc_declare): New function.
191 (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
192 * pt.c (tsubst_expr): Handle OACC_DECLARE.
194 2015-11-12 Jason Merrill <jason@redhat.com>
196 * pt.c (check_explicit_specialization): Check the namespace after
197 we choose a template.
199 2015-11-11 Jason Merrill <jason@redhat.com>
201 * decl.c (duplicate_decls): When combining typedefs, remove the
202 new type from the variants list.
204 2015-11-11 Jason Merrill <jason@redhat.com>
206 * pt.c (instantiate_class_template_1): Set function_depth around
207 instantiation of lambda op().
209 2015-11-11 Marek Polacek <polacek@redhat.com>
213 * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
214 checking the size of an array.
216 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
219 * parser.h (cp_token): Update pragma_kind to 8.
221 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
223 * call.c: Remove unused header files.
225 * constexpr.c: Likewise.
226 * cp-array-notation.c: Likewise.
227 * cp-cilkplus.c: Likewise.
228 * cp-gimplify.c: Likewise.
229 * cp-lang.c: Likewise.
230 * cp-objcp-common.c: Likewise.
231 * cp-ubsan.c: Likewise.
233 * cxx-pretty-print.c: Likewise.
238 * except.c: Likewise.
240 * friend.c: Likewise.
241 * g++spec.c: Likewise.
243 * lambda.c: Likewise.
245 * mangle.c: Likewise.
246 * method.c: Likewise.
247 * name-lookup.c: Likewise.
248 * optimize.c: Likewise.
249 * parser.c: Likewise.
254 * search.c: Likewise.
255 * semantics.c: Likewise.
257 * typeck.c: Likewise.
258 * typeck2.c: Likewise.
259 * vtable-class-hierarchy.c: Likewise.
261 2015-11-09 Cesar Philippidis <cesar@codesourcery.com>
263 * parser.c (cp_finalize_oacc_routine): New boolean first argument.
264 (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
265 (cp_parser_simple_declaration): Maintain a boolean first to keep track
266 of each new declarator. Propagate it to cp_parser_init_declarator.
267 (cp_parser_init_declarator): New boolean first argument. Propagate it
268 to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
269 (cp_parser_member_declaration): Likewise.
270 (cp_parser_single_declaration): Update call to
271 cp_parser_init_declarator.
272 (cp_parser_save_member_function_body): New boolean first_decl argument.
273 Propagate it to cp_finalize_oacc_routine.
274 (cp_parser_finish_oacc_routine): New boolean first argument. Use it to
275 determine if multiple declarators follow a routine construct.
276 (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
278 2015-10-19 Martin Sebor <msebor@redhat.com>
282 * call.c (build_operator_new_call): Do not assume size_check
283 is non-null, analogously to the top half of the function.
284 * init.c (build_new_1): Detect and diagnose array sizes in
285 excess of the maximum of roughly SIZE_MAX / 2.
286 Insert a runtime check only for arrays with a non-constant size.
287 (build_new): Detect and diagnose negative array sizes.
289 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
290 Cesar Philippidis <cesar@codesourcery.com>
291 James Norris <jnorris@codesourcery.com>
292 Julian Brown <julian@codesourcery.com>
293 Nathan Sidwell <nathan@codesourcery.com>
295 * parser.h (struct cp_parser): Add oacc_routine field.
296 * parser.c (cp_ensure_no_oacc_routine): New.
297 (cp_parser_new): Initialize oacc_routine field.
298 (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
299 (cp_parser_namespace_definition,
300 cp_parser_class_specifier_1): Likewise.
301 (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
302 (cp_parser_function_definition,
303 cp_parser_save_member_function_body): Likewise.
304 (OACC_ROUTINE_CLAUSE_MASK): New.
305 (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
306 cp_finalize_oacc_routine): New.
307 (cp_parser_pragma): Adjust omp_declare_simd checking. Call
308 cp_ensure_no_oacc_routine.
309 (cp_parser_pragma): Add OpenACC routine handling.
311 2015-11-08 Martin Sebor <msebor@redhat.com>
314 * cp/init.c (warn_placement_new_too_small): Convert integer
315 operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
318 2015-11-06 David Malcolm <dmalcolm@redhat.com>
320 * error.c (cp_printer): Update for new "caret_p" param for
321 textinfo::set_location.
322 (pedwarn_cxx98): Update for change in signature of
325 2015-11-06 Jason Merrill <jason@redhat.com>
327 Support non-type constrained-type-specifiers.
328 * parser.c (check_type_concept): Remove.
329 (cp_parser_maybe_constrained_type_specifier): Don't call it.
330 (synthesize_implicit_template_parm): Handle non-type and template
331 template parameters. Also compare extra args. Return the decl.
332 (cp_parser_template_argument): Handle constrained-type-specifiers for
333 non-type template parameters.
334 (finish_constrained_template_template_parm): Split out from
335 cp_parser_constrained_template_template_parm.
336 (cp_parser_nonclass_name): Move some logic into
337 cp_parser_maybe_concept_name.
338 (cp_parser_init_declarator): Fix error recovery.
339 (get_concept_from_constraint): Remove.
340 (cp_parser_simple_type_specifier): Adjust for
341 synthesize_implicit_template_parm returning the decl.
342 * constraint.cc (placeholder_extract_concept_and_args)
343 (equivalent_placeholder_constraints): Also handle TYPE_DECL
346 * pt.c (push_inline_template_parms_recursive): Don't recreate the
349 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
351 * init.c (warn_placement_new_too_small): Use %wu format
352 rather than %lu when printing bytes_avail.
354 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
355 Thomas Schwinge <thomas@codesourcery.com>
356 James Norris <jnorris@codesourcery.com>
358 * parser.c (cp_parser_omp_clause_name): Add support for
359 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
360 (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
362 (cp_parser_oacc_clause_tile): New function.
363 (cp_parser_omp_clause_default): Add is_oacc argument. Handle
364 default(none) in OpenACC.
365 (cp_parser_oacc_all_clauses): Add support for
366 (cp_parser_omp_all_clauses): Update call to
367 cp_parser_omp_clause_default.
368 PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
369 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
371 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
372 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
374 (cp_parser_oacc_update): Update the error message for missing clauses.
375 * semantics.c (finish_omp_clauses): Add support for
376 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
378 2015-11-05 Martin Sebor <msebor@redhat.com>
381 * cp/init.c (warn_placement_new_too_small): Avoid assuming
382 the size of the first operand of placement new or its type
385 2015-11-05 Martin Sebor <msebor@redhat.com>
388 * cp/init.c (warn_placement_new_too_small): New function.
389 (build_new_1): Call it.
391 2015-11-05 Paolo Carlini <paolo.carlini@oracle.com>
394 * parser.c (cp_parser_lambda_body): Check lambda_return_type
396 * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
397 member function used invalidly.
399 2015-11-05 Jakub Jelinek <jakub@redhat.com>
400 Ilya Verbin <ilya.verbin@intel.com>
402 * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
403 (omp_privatize_field): Add SHARED argument.
404 * parser.c: Include context.h.
405 (cp_parser_omp_clause_schedule): Parse schedule
406 modifiers, diagnose monotonic together with nonmonotonic.
407 (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse
408 parameter name as linear step as id-expression rather than expression.
409 (cp_parser_omp_all_clauses): Adjust caller.
410 (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
411 initialize it. Adjust omp_privatize_field caller.
412 (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
414 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
415 (cp_parser_omp_target_data,
416 cp_parser_omp_target_enter_data,
417 cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
418 and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
419 (cp_parser_omp_target): Likewise. Evaluate num_teams and
420 thread_limit expressions on combined target teams before the target.
421 (cp_parser_omp_declare_target): If decl has "omp declare target" or
422 "omp declare target link" attribute, and cgraph or varpool node already
423 exists, then set corresponding flags. Call finish_omp_clauses
424 in the parenthesized extended-list syntax case. Call
425 cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
426 (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
427 instead of cp_parser_skip_to_pragma_eol.
428 * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
429 inside declare target.
430 * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
431 use tsubst_omp_clause_decl instead of tsubst_expr on
432 OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared
434 (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
435 (tsubst_find_omp_teams): New function.
436 (tsubst_expr): Evaluate num_teams and thread_limit expressions on
437 combined target teams before the target. Use OMP_FOR_ORIG_DECLS for
438 all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for
440 * semantics.c (omp_privatize_field): Add SHARED argument, if true,
441 always create artificial var and never put it into the hash table
443 (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
444 Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
445 (handle_omp_array_sections): For structure element
446 based array sections use GOMP_MAP_ALWAYS_POINTER instead of
447 GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF,
448 either into the constant offset, or for variable low-bound using
450 (finish_omp_clauses): Adjust omp_privatize_field caller. Drop
451 generic_field_head, structure elements are now always mapped even
452 as array section bases, diagnose same var in data sharing and
453 mapping clauses. For references map what they refer to using
454 GOMP_MAP_ALWAYS_POINTER for structure elements and
455 GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step
456 on declare simd is neither a constant nor a uniform parameter.
457 Allow non-static data members on shared clauses. Look through
458 POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic
459 modifier on kinds other than dynamic or guided or nonmonotonic
460 modifier together with ordered clause. Diagnose the same var or
461 function appearing multiple times on the same directive. Fix up
462 wording for the to clause if t is neither a FUNCTION_DECL nor a
463 VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
464 (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call
465 c_omp_check_loop_iv_exprs on cond.
466 (finish_omp_for): Add ORIG_INITS argument. Call
467 c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust
468 handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv.
470 (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
472 2015-11-04 Cesar Philippidis <cesar@codesourcery.com>
474 * (cp_parser_oacc_single_int_clause): New function.
475 (cp_parser_oacc_clause_vector_length): Delete.
476 (cp_parser_omp_clause_num_gangs): Delete.
477 (cp_parser_omp_clause_num_workers): Delete.
478 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
479 for num_gangs, num_workers and vector_length.
481 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
483 * call.c (validate_conversion_obstack): Define unconditionally.
484 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
486 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
487 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
488 * mangle.c (add_substitution): Likewise.
489 * method.c (maybe_explain_implicit_delete): Likewise.
490 * parser.c (cp_parser_template_argument_list): Remove conditional
492 * pt.c (check_unstripped_args): Rename to...
493 (verify_unstripped_args): ... this and remove conditional compilation.
494 (retrieve_specialization): Guard call of verify_unstripped_args with
496 (template_parm_to_arg): Remove conditional compilation.
497 (template_parms_to_args, coerce_template_parameter_pack,
498 coerce_template_parms): Likewise.
499 (tsubst_copy): Use flag_checking.
500 (type_unification_real): Remove conditional compilation.
501 (build_non_dependent_expr): Use flag_checking.
502 * tree.c (build_target_expr): Remove conditional compilation, use
504 * typeck.c (comptypes): Likewise.
505 * typeck2.c (digest_init_r): Likewise.
507 2015-11-03 Jason Merrill <jason@redhat.com>
509 * pt.c (struct find_parameter_pack_data): Add
510 type_pack_expansion_p field.
511 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
512 (uses_parameter_packs, make_pack_expansion)
513 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
515 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
516 Chung-Lin Tang <cltang@codesourcery.com>
518 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
521 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
523 Remove the implementation of N3994, terse range-for loops.
524 * parser.c (cp_parser_for_init_statement): Remove the parsing
525 of a terse range-for.
527 2015-10-31 Jason Merrill <jason@redhat.com>
529 Implement multiple 'auto' feature from Concepts TS.
530 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
531 (cp_parser_template_type_arg): Likewise.
532 (get_concept_from_constraint): Split out most logic to...
533 * constraint.cc (placeholder_extract_concept_and_args): ...here.
534 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
535 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
536 * cxx-pretty-print.h: Declare it.
537 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
538 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
539 (type_uses_auto): Use is_auto_r.
540 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
541 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
544 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
545 Return a meaningful value rather than error_mark_node.
546 (for_each_template_parm): Return a tree.
547 (uses_template_parms_level): Return bool.
550 * pt.c (unify): Don't diagnose no common base if we already have
552 (do_auto_deduction): Explain deduction failure.
554 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
557 * parser.c (synthesize_implicit_template_parm)
558 (finish_fully_implicit_template): Make static.
560 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
562 * call.c: Reorder #include's and remove duplicates.
564 * constexpr.c: Likewise.
565 * cp-array-notation.c: Likewise.
566 * cp-cilkplus.c: Likewise.
567 * cp-gimplify.c: Likewise.
568 * cp-lang.c: Likewise.
569 * cp-objcp-common.c: Likewise.
570 * cp-ubsan.c: Likewise.
572 * cxx-pretty-print.c: Likewise.
577 * except.c: Likewise.
579 * friend.c: Likewise.
581 * lambda.c: Likewise.
583 * mangle.c: Likewise.
584 * method.c: Likewise.
585 * name-lookup.c: Likewise.
586 * optimize.c: Likewise.
587 * parser.c: Likewise.
592 * search.c: Likewise.
593 * semantics.c: Likewise.
595 * typeck.c: Likewise.
596 * typeck2.c: Likewise.
597 * vtable-class-hierarchy.c: Likewise.
599 2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
602 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
603 functions consistently reset TREE_TYPE (decl) too.
605 2015-10-28 Jason Merrill <jason@redhat.com>
608 * class.c (type_has_user_provided_or_explicit_constructor): New.
609 (check_bases_and_members): Use it.
610 * cp-tree.h: Declare it.
612 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
613 Thomas Schwinge <thomas@codesourcery.com>
614 James Norris <jnorris@codesourcery.com>
615 Joseph Myers <joseph@codesourcery.com>
616 Julian Brown <julian@codesourcery.com>
617 Nathan Sidwell <nathan@codesourcery.com>
618 Bernd Schmidt <bschmidt@redhat.com>
620 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
622 (cp_parser_oacc_simple_clause): New.
623 (cp_parser_oacc_shape_clause): New.
624 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
625 (OACC_LOOP_CLAUSE_MASK): Likewise.
626 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
627 worker. Unify the handling of teams, tasks and vector_length with
628 the other loop shape clauses.
630 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
631 James Norris <jnorris@codesourcery.com>
632 Cesar Philippidis <cesar@codesourcery.com>
636 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
638 (finish_omp_construct): Declare function.
639 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
640 formal parameters, and handle these. Adjust all users.
641 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
643 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
645 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
646 (finish_omp_construct): ... this new function.
648 2015-10-25 Jason Merrill <jason@redhat.com>
651 * pt.c (process_partial_specialization): Handle error_mark_node
652 from most_specialized_partial_spec.
654 2015-10-23 Jason Merrill <jason@redhat.com>
660 * call.c (convert_like_real): Value-initialization can't use
661 explicit constructors in C++11 and up.
664 * constexpr.c (cxx_eval_store_expression): Always use *valp if
667 2015-10-22 Jason Merrill <jason@redhat.com>
669 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
670 (add_template_candidate_real): Handle it.
671 * pt.c (fn_type_unification): Handle it.
673 * call.c (add_conv_candidate): Remove first_arg parm.
674 (add_template_conv_candidate): Likewise.
675 (add_template_candidate_real): Don't pass it.
676 (build_op_call_1): Likewise.
678 2015-10-22 Richard Biener <rguenther@suse.de>
680 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
681 before folding a MINUS_EXPR.
682 (finish_omp_clauses): Likewise.
684 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
687 * parser.c (cp_parser_enum_specifier): Upon error_at set
688 nested_name_specifier to error_mark_node; improve error message.
690 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
693 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
694 which doesn't name a class or namespace.
696 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
698 * call.c (build_conditional_expr_1): Use boolean vector
699 type for vector comparison.
700 * typeck.c (build_vec_cmp): New.
701 (cp_build_binary_op): Use build_vec_cmp for comparison.
703 2015-10-20 Jason Merrill <jason@redhat.com>
706 * init.c (innermost_aggr_scope): New.
707 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
708 (sort_mem_initializers): Handle initializers for entire anonymous
711 2015-10-20 Marek Polacek <polacek@redhat.com>
713 * parser.c (is_cilkplus_vector_p): Don't define here.
715 2015-10-19 Jason Merrill <jason@redhat.com>
718 * semantics.c (force_paren_expr): Don't mess with hard register vars.
720 Implement N4268, Do constant evaluation of all non-type template args.
721 * parser.c (cp_parser_template_argument): For C++1z just parse a
723 * pt.c (convert_nontype_argument): For C++1z always call
724 maybe_constant_value.
726 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
728 (cxx_eval_component_reference): Like here.
729 * decl2.c (lower_var_init): And here.
730 (c_parse_final_cleanups): Call it.
731 * typeck2.c (digest_init_r): Not here.
732 * decl.c (complete_vars): Or here.
733 (cp_finish_decl): Add local statics to symbol table.
735 2015-10-17 Jason Merrill <jason@redhat.com>
738 * decl.c (implicit_default_ctor_p): New.
739 (start_preparsed_function): Don't clobber on entry to one.
741 2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
744 * constexpr.c (potential_constant_expression_1): Handle
745 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
746 BINARY_RIGHT_FOLD_EXPR.
748 2015-10-13 Jakub Jelinek <jakub@redhat.com>
749 Aldy Hernandez <aldyh@redhat.com>
751 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
752 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
753 (cp_genericize_r): Likewise.
754 (cxx_omp_finish_clause): Don't diagnose references.
755 (cxx_omp_disregard_value_expr): New function.
756 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
757 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
758 (DECL_OMP_PRIVATIZED_MEMBER): Define.
759 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
760 pop_omp_privatization_clauses, save_omp_privatization_clauses,
761 restore_omp_privatization_clauses, omp_privatize_field,
762 cxx_omp_disregard_value_expr): New prototypes.
763 (finish_omp_clauses): Add two new arguments.
764 (finish_omp_for): Add ORIG_DECLV argument.
765 * parser.c (cp_parser_lambda_body): Call
766 save_omp_privatization_clauses and restore_omp_privatization_clauses.
767 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
768 (cp_parser_omp_var_list_no_open): Handle structure elements for
769 map, to and from clauses. Handle array sections in reduction
770 clause. Parse this keyword. Formatting fixes.
771 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
773 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
774 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
775 cp_parser_omp_clause_defaultmap): New functions.
776 (cp_parser_omp_clause_ordered): Parse optional parameter.
777 (cp_parser_omp_clause_reduction): Handle array reductions.
778 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
779 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
781 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
782 (cp_parser_omp_clause_depend_sink): New function.
783 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
784 (cp_parser_omp_clause_map): Parse release/delete map kinds and
785 optional always modifier.
786 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
787 and finish_omp_clauses callers.
788 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
789 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
790 (OMP_CRITICAL_CLAUSE_MASK): Define.
791 (cp_parser_omp_critical): Parse critical clauses.
792 (cp_parser_omp_for_incr): Use cp_tree_equal if
793 processing_template_decl.
794 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
795 non-static data member iterators.
796 (cp_parser_omp_for_loop): Handle doacross loops, adjust
797 finish_omp_for and finish_omp_clauses callers.
798 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
799 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
800 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
801 (OMP_FOR_CLAUSE_MASK): Add linear clause.
802 (cp_parser_omp_for): Disallow ordered clause when combined with
803 distribute. Disallow linear clause when combined with distribute
804 and not combined with simd.
805 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
806 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
807 of tree, parse clauses and if depend clause is found, don't parse
809 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
810 Allow target parallel without for after it.
811 (OMP_TASK_CLAUSE_MASK): Add priority clause.
812 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
813 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
815 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
816 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
817 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
818 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
820 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
821 defaultmap and is_device_ptr clauses.
822 (cp_parser_omp_target): Parse target parallel and target simd. Set
823 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
824 and target exit data. Diagnose invalid map kinds.
825 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
826 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
827 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
829 (OMP_TASKLOOP_CLAUSE_MASK): Define.
830 (cp_parser_omp_taskloop): New function.
831 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
832 handle PRAGMA_OMP_TASKLOOP.
833 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
834 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
835 and pop_omp_privatization_clauses around parsing calls.
836 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
837 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
838 and finish_omp_clauses callers.
839 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
840 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
841 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
843 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
844 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
845 If ALLOW_FIELDS, handle non-static data members in the clauses.
846 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
847 (omp_parallel_combined_clauses): New variable.
848 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
849 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
850 Improve handling of clauses on combined constructs.
851 (tsubst_expr): Call push_omp_privatization_clauses and
852 pop_omp_privatization_clauses around instantiation of certain
853 OpenMP constructs, improve handling of clauses on combined
854 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
855 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
856 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
857 (instantiate_decl): Call save_omp_privatization_clauses and
858 restore_omp_privatization_clauses around instantiation.
859 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
860 * semantics.c (omp_private_member_map, omp_private_member_vec,
861 omp_private_member_ignore_next): New variables.
862 (finish_non_static_data_member): Return dummy decl for privatized
863 non-static data members.
864 (omp_clause_decl_field, omp_clause_printable_decl,
865 omp_note_field_privatization, omp_privatize_field): New functions.
866 (handle_omp_array_sections_1): Fix comment typo.
867 Add IS_OMP argument, handle structure element bases, diagnose
868 bitfields, pass IS_OMP recursively, diagnose known zero length
869 array sections in depend clauses, handle array sections in reduction
870 clause, diagnose negative length even for pointers.
871 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
872 types, pass IS_OMP down to handle_omp_array_sections_1, handle
873 array sections in reduction clause, set
874 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
875 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
876 (finish_omp_reduction_clause): Handle array sections and arrays.
877 Use omp_clause_printable_decl.
878 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
880 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
881 Handle new OpenMP 4.5 clauses and new restrictions for the old
882 ones, handle non-static data members, reject this keyword when not
884 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
885 save_omp_privatization_clauses, restore_omp_privatization_clauses):
887 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
888 Add collapse and ordered arguments. Fix handling of lastprivate
889 iterators in doacross loops.
890 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
891 adjust c_finish_omp_for, handle_omp_for_class_iterator and
892 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
893 loops with non-static data member iterators.
895 2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
898 * lambda.c (lambda_return_type): Return error_mark_node
899 instead of void_type_node for the error cases.
901 2015-10-08 Jason Merrill <jason@redhat.com>
903 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
904 * init.c (get_nsdmi): Use it.
905 * typeck2.c (massage_init_elt): Use it.
907 2015-10-07 Jason Merrill <jason@redhat.com>
910 * call.c (is_base_field_ref): New.
911 (unsafe_copy_elision_p): New.
912 (build_over_call): Use it.
914 2015-10-07 Marek Polacek <polacek@redhat.com>
917 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
919 2015-10-07 Marek Polacek <polacek@redhat.com>
921 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
922 (genericize_cp_loop): Likewise.
923 * decl.c (cxx_maybe_build_cleanup): Likewise.
924 * parser.c (cp_parser_binary_expression): Likewise.
925 (cp_parser_omp_for_loop): Likewise.
926 (cp_parser_omp_construct): Likewise.
927 * semantics.c (finish_transaction_stmt): Likewise.
928 (build_transaction_expr): Likewise.
930 2015-10-06 Jason Merrill <jason@redhat.com>
933 * parser.c (cp_parser_fold_expr_p): Remove.
935 (cp_parser_fold_expression): Take LHS as parameter.
936 (cp_parser_primary_expression): Call it after parsing an expression.
937 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
938 (cp_parser_expression): Ignore an operator followed by '...'.
940 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
941 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
943 2015-10-06 Marek Polacek <polacek@redhat.com>
946 * call.c (build_conditional_expr_1): Build the COND_EXPR with
949 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
952 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
953 reject default template arguments in out of class definitions
954 of members of non-template classes.
956 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
958 * tree.c (cp_tree_equal): Use real_equal instead of
961 2015-10-04 Jason Merrill <jason@redhat.com>
963 Implement N4514, C++ Extensions for Transactional Memory.
964 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
965 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
966 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
967 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
968 (make_call_declarator): Take tx_qualifier.
969 (cp_parser_tx_qualifier_opt): New.
970 (cp_parser_lambda_declarator_opt): Use it.
971 (cp_parser_direct_declarator): Likewise.
972 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
973 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
974 (cp_parser_std_attribute): Map optimize_for_synchronized to
975 transaction_callable.
976 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
977 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
978 * call.c (enum conversion_kind): Add ck_tsafe.
979 (standard_conversion): Handle transaction-safety conversion.
980 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
981 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
983 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
984 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
985 (can_convert_tx_safety): New.
986 * typeck.c (composite_pointer_type): Handle transaction-safety.
987 * name-lookup.h (enum scope_kind): Add sk_transaction.
988 * name-lookup.c (begin_scope): Handle it.
989 * semantics.c (begin_compound_stmt): Pass it.
990 * decl.c (check_previous_goto_1): Check it.
991 (struct named_label_entry): Add in_transaction_scope.
992 (poplevel_named_label_1): Set it.
993 (check_goto): Check it.
994 (duplicate_decls): A specialization can be transaction_safe
995 independently of its template.
996 (grokdeclarator): Handle tx-qualifier.
997 * rtti.c (ptr_initializer): Handle transaction-safe.
998 * search.c (check_final_overrider): Check transaction_safe_dynamic.
999 Don't check transaction_safe.
1000 * mangle.c (write_function_type): Mangle transaction_safe here.
1001 (write_CV_qualifiers_for_type): Not here.
1002 (write_type): Preserve transaction_safe when stripping attributes.
1003 * error.c (dump_type_suffix): Print transaction_safe.
1005 2015-10-02 Marek Polacek <polacek@redhat.com>
1008 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
1009 down to cp_parser_selection_statement.
1010 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
1011 warn about duplicated if-else-if conditions.
1012 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
1013 it down to cp_parser_statement.
1015 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1018 * name-lookup.c (push_binding): Make non-static.
1019 * name-lookup.h (push_binding): Declare it.
1020 * parser.c (cp_parser_range_for): Use it, get the range
1021 declaration away from the scope until the range expression
1022 has been parsed, then restore the declaration.
1024 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
1026 Fix small typos in the coding rule enforcement warnings.
1027 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
1030 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
1032 * decl.c (xref_basetypes): Check virtual and/or multiple
1033 inheritance warning.
1034 * parser.c (cp_parser_namespace_definition): Check namespaces
1036 * pt.c (push_template_decl_real): Check templates warning.
1038 2015-09-22 Jason Merrill <jason@redhat.com>
1040 * mangle.c (abi_warn_or_compat_version_crosses): New.
1041 Use it instead of abi_version_crosses.
1042 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
1044 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1046 Complete the implementation of N4230, Nested namespace definition.
1047 * parser.c (cp_parser_namespace_definition): Support namespace
1048 attributes both before and after the namespace identifier.
1050 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
1052 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
1054 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
1056 Implement nested namespace definitions.
1057 * parser.c (cp_parser_namespace_definition): Grok nested namespace
1060 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1062 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
1063 make it more similar to the C version.
1065 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
1066 Jason Merrill <jason@redhat.com>
1068 Implement N4295 fold-expressions.
1069 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
1070 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
1071 * cp-objcp-common.c (cp_common_init_ts): Handle them.
1072 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
1073 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
1074 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
1075 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
1076 or_comma parameter to or_ttype.
1077 (cp_parser_fold_operator, cp_parser_fold_expr_p)
1078 (cp_parser_fold_expression): New.
1079 (cp_parser_primary_expression): Use them.
1080 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
1081 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
1082 (tsubst_binary_left_fold, expand_right_fold)
1083 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
1084 (tsubst_copy): Use them.
1085 (type_dependent_expression_p): Handle fold-expressions.
1086 * semantics.c (finish_unary_fold_expr)
1087 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
1088 (finish_binary_fold_expr): New.
1090 2015-09-17 Richard Biener <rguenther@suse.de>
1092 * cp-tree.h (note_decl_for_pch): Remove.
1093 * class.c (build_clone): Do not call note_decl_for_pch.
1094 * semantics.c (finish_member_declaration): Likewise.
1095 (note_decl_for_pch): Remove.
1096 * decl2.c (c_parse_final_cleanups): Mangle all globals before
1099 2015-09-14 Jason Merrill <jason@redhat.com>
1102 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
1103 mangling with lower -fabi-version.
1105 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
1108 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
1109 per the spirit of DR 1467).
1111 2015-09-11 Mark Wielaard <mjw@redhat.com>
1114 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
1115 VAR_P TREE_READONLY override.
1117 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
1120 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
1121 and set template_parameter_pack_p also when the type is null.
1123 2015-09-09 Mark Wielaard <mjw@redhat.com>
1125 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
1128 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1131 * semantics.c (handle_omp_array_sections_1): Only run
1132 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
1133 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
1134 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
1135 is not a VAR_DECL/PARM_DECL.
1138 * semantics.c (handle_omp_for_class_iterator): Don't wrap
1139 error_mark_node into a NOP_EXPR to void_type_node.
1141 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1144 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
1146 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1149 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
1150 before INTEGRAL_TYPE_P test.
1152 2015-09-08 Jason Merrill <jason@redhat.com>
1155 * pt.c (tsubst_copy_and_build): Handle variables like functions.
1157 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
1160 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
1161 if the first argument isn't a template.
1163 2015-09-03 Martin Sebor <msebor@redhat.com>
1166 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
1168 * expr.c (mark_rvalue_use): Use new argument.
1169 * call.c (build_addr_func): Call decay_conversion with new
1171 * pt.c (convert_template_argument): Call reject_gcc_builtin.
1172 * typeck.c (decay_conversion): Use new argument.
1173 (c_decl_implicit): Define.
1175 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
1178 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
1180 (cp_gimplify_expr): Added a call to the function
1181 cilk_cp_gimplify_call_params_in_spawned_fn.
1183 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
1186 * decl.c (smallest_type_quals_location): New.
1187 (check_special_function_return_type): Use the latter; add int and
1188 const location_t* parameters.
1189 (grokdeclarator): Adjust check_special_function_return_type call.
1191 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
1194 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
1195 case. Move label to COND_EXPR case. Remove checking of
1198 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1201 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
1202 only on class types.
1204 2015-08-21 Jason Merrill <jason@redhat.com>
1207 * constraint.cc (satisfy_implicit_conversion_constraint): Also
1208 check for NULL_TREE.
1210 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1212 * decl.c (grokvardecl): Simplify the latter.
1214 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1216 * decl.c (grokvardecl): Complete check added for c++/67065.
1218 2015-08-20 Jason Merrill <jason@redhat.com>
1220 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
1222 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
1225 * decl.c (grokvardecl): Reject 'main' as global variable.
1227 2015-08-19 Jason Merrill <jason@redhat.com>
1230 * search.c (protected_accessible_p): Remove redundant access_in_type.
1231 Add otype parm instead of walking binfo.
1232 (friend_accessible_p): Check SCOPE itself. Handle class
1233 templates. Pass through otype.
1234 (dfs_accessible_post): Handle all accessibility cases.
1235 (dfs_accessible_pre): New.
1236 (accessible_p): Use it. Don't check protected access here. Pass
1237 decl and otype to dfs_walk.
1238 (member_declared_in_type, dfs_access_in_type_pre): New.
1239 (access_in_type): Use dfs_access_in_type_pre.
1240 * friend.c (add_friend): Fix multiple friends with the same name.
1242 * lambda.c (current_nonlambda_scope): New.
1244 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1246 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
1247 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
1248 semantics.c, typeck2.c: Remove useless typedefs.
1250 2015-08-18 Jason Merrill <jason@redhat.com>
1253 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
1256 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
1259 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
1261 2015-08-17 Jason Merrill <jason@redhat.com>
1264 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
1267 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
1268 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
1270 * constexpr.c (cxx_eval_store_expression): Don't set
1271 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
1273 (cxx_eval_array_reference): Check it.
1275 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
1277 2015-08-14 Jason Merrill <jason@redhat.com>
1280 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
1282 2015-08-12 Jason Merrill <jason@redhat.com>
1285 * constexpr.c (cxx_eval_array_reference): Fix typo.
1288 * constexpr.c (cxx_eval_array_reference): Handle sparse
1292 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
1293 * error.c (dump_template_bindings): Don't tsubst in that case.
1296 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
1297 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
1299 2015-08-08 Jason Merrill <jason@redhat.com>
1302 * pt.c (process_partial_specialization): Call
1303 associate_classtype_constraints.
1306 * constraint.cc (finish_template_introduction):
1307 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1310 * pt.c (equal): Make sure tmpl is actually a template.
1313 * call.c (joust): Only call more_constrained on decls.
1315 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
1316 Braden Obrzut <admin@maniacsvault.net>
1317 Jason Merrill <jason@redhat.com>
1318 Ville Voutilainen <ville.voutilainen@gmail.com>
1320 Add C++ Concepts TS support.
1321 * constraint.cc, logic.cc: New files.
1322 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
1323 (c++.tags): Also process .cc files.
1324 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
1325 (print_z_candidate): Handle it.
1326 (constraint_failure): New.
1327 (add_function_candidate): Check constraints.
1328 (build_new_function_call): Handle evaluating concepts.
1329 (joust): Check more_constrained.
1330 * class.c (add_method): Check equivalently_constrained.
1331 (build_clone): Copy constraints.
1332 (currently_open_class): Return tree.
1333 (resolve_address_of_overloaded_function): Check constraints.
1334 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
1335 (potential_constant_expression_1): Likewise.
1336 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
1337 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
1338 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
1339 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
1340 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
1341 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
1342 * cp-tree.h (struct tree_constraint_info, check_nonnull)
1343 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
1344 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
1345 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
1346 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
1347 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
1348 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
1349 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
1350 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
1351 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
1352 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
1353 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
1354 (struct local_specialization_stack, enum auto_deduction_context)
1355 (variable_concept_p, concept_template_p)
1356 (struct deferring_access_check_sentinel): New.
1357 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
1358 (union lang_tree_node): Add constraint_info field.
1359 (struct lang_decl_base): Add concept_p flag.
1360 (enum cp_decl_spec): Add ds_concept.
1361 (struct cp_declarator): Add requires_clause.
1362 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1363 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
1364 TRAIT_EXPR, *_CONSTR.
1365 (pp_cxx_parameter_declaration_clause): Accept a chain of
1367 (cxx_pretty_printer::declarator): Print requires-clause.
1368 (pp_cxx_template_declaration): Likewise.
1369 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
1370 (pp_cxx_requires_clause, pp_cxx_requirement)
1371 (pp_cxx_requirement_list, pp_cxx_requirement_body)
1372 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
1373 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
1374 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
1375 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
1376 (pp_cxx_implicit_conversion_constraint)
1377 (pp_cxx_argument_deduction_constraint)
1378 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
1379 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
1380 * cxx-pretty-print.h: Declare them.
1381 * decl.c (decls_match): Compare constraints.
1382 (duplicate_decls): Likewise. Remove constraints before freeing.
1383 (cxx_init_decl_processing): Call init_constraint_processing.
1384 (cp_finish_decl): Diagnose concept without initializer.
1385 (grokfndecl, grokvardecl): Handle concepts and constraints.
1386 (grokdeclarator): Handle concept, requires-clause.
1387 (grokparms): No longer static.
1388 (xref_tag_1): Check constraints.
1389 (finish_function): Call check_function_concept.
1390 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
1391 (check_concept_refinement, is_concept_var, check_concept_fn): New.
1392 * decl2.c (check_classfn): Compare constraints.
1393 (mark_used): Don't instantiate concepts.
1394 * error.c (dump_template_decl): Print constraints.
1395 (dump_function_decl): Likewise.
1396 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
1397 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
1398 * method.c (implicitly_declare_fn): Copy constraints from
1400 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
1401 prevent_constrained_type_specifiers fields.
1402 * parser.c (make_call_declarator): Add requires_clause parm.
1403 (cp_parser_new): Clear prevent_constrained_type_specifiers.
1404 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
1405 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
1406 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
1407 (cp_parser_declaration): Handle concept introduction.
1408 (cp_parser_member_declaration): Likewise.
1409 (cp_parser_template_parameter): Handle constrained parameter.
1410 (cp_parser_type_parameter): Handle constraints.
1411 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
1412 (cp_parser_template_id): Handle partial concept id.
1413 (cp_parser_type_name): Add overload that takes typename_keyword_p.
1414 Handle constrained parameter.
1415 (cp_parser_nonclass_name): Handle concept names.
1416 (cp_parser_alias_declaration): Handle constraints.
1417 (cp_parser_late_return_type_opt): Also handle requires-clause.
1418 (cp_parser_type_id_1): Handle deduction constraint.
1419 (cp_parser_parameter_declaration): Handle constrained parameters.
1420 (cp_parser_class_specifier_1): Handle constraints.
1421 (cp_parser_template_declaration_after_parameters): Split out from
1422 cp_parser_template_declaration_after_export.
1423 (cp_parser_single_declaration): Handle constraints.
1424 (synthesize_implicit_template_parm): Handle constraints.
1425 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1426 (cp_parser_introduction_list, get_id_declarator)
1427 (get_unqualified_id, is_constrained_parameter)
1428 (cp_parser_check_constrained_type_parm)
1429 (cp_parser_constrained_type_template_parm)
1430 (cp_parser_constrained_template_template_parm)
1431 (constrained_non_type_template_parm, finish_constrained_parameter)
1432 (declares_constrained_type_template_parameter)
1433 (declares_constrained_template_template_parameter)
1434 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
1435 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1436 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
1437 (cp_parser_requires_expression)
1438 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
1439 (cp_parser_requirement_list, cp_parser_requirement)
1440 (cp_parser_simple_requirement, cp_parser_type_requirement)
1441 (cp_parser_compound_requirement, cp_parser_nested_requirement)
1442 (cp_parser_template_introduction)
1443 (cp_parser_explicit_template_declaration)
1444 (get_concept_from_constraint): New.
1445 * pt.c (local_specialization_stack): Implement.
1446 (maybe_new_partial_specialization): New.
1447 (maybe_process_partial_specialization): Use it.
1448 (retrieve_local_specialization, register_local_specialization)
1449 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
1450 (tsubst_expr): No longer static.
1451 (spec_hasher::equal): Compare constraints.
1452 (determine_specialization): Handle constraints.
1453 (check_explicit_specialization): Handle concepts.
1454 (process_template_parm): Handle constraints.
1455 (end_template_parm_list): Add overload taking no arguments.
1456 (process_partial_specialization): Handle concepts and constraints.
1457 Register partial specializations of variable templates.
1458 (redeclare_class_template): Handle constraints.
1459 (convert_template_argument): Handle WILDCARD_DECL. Check
1460 is_compatible_template_arg.
1461 (coerce_template_parameter_pack): Handle wildcard packs.
1462 (coerce_template_parms): DR 1430 also applies to concepts. Add
1463 overloads taking fewer parameters.
1464 (lookup_template_class_1): Handle constraints.
1465 (lookup_template_variable): Concepts are always bool.
1466 (finish_template_variable): Handle concepts and constraints.
1467 (tsubst_friend_class): Handle constraints.
1468 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
1469 (tsubst_pack_expansion): Handle local parameters.
1470 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1471 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1472 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1473 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1474 (more_specialized_inst): Split out from most_specialized_instantiation.
1475 (most_specialized_partial_spec): Check constraints.
1476 (instantiate_decl): Never instantiate a concept.
1477 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1479 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1480 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1481 (do_auto_deduction): Add overload taking tsubst flags and context enum.
1483 (get_template_for_ordering, most_constrained_function)
1484 (is_compatible_template_arg, convert_wildcard_argument)
1485 (struct constr_entry, struct constr_hasher, decl_constraints)
1486 (valid_constraints_p, get_constraints, set_constraints)
1487 (remove_constraints, init_constraint_processing): New.
1488 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1489 * search.c (lookup_member): Do lookup in the open partial
1491 * semantics.c (finish_template_template_parm): Handle constraints.
1492 (fixup_template_type): New.
1493 (finish_template_type): Call it.
1494 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1495 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1496 (cp_walk_subtrees): Handle REQUIRES_EXPR.
1497 * typeck.c (cp_build_function_call_vec): Check constraints.
1499 2015-08-06 Jason Merrill <jason@redhat.com>
1502 * parser.c (cp_parser_primary_expression): Don't skip to the end
1503 of the statement if we're parsing tentatively.
1508 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1510 * pt.c (tsubst_copy_and_build): Check for argument substitution
1513 2015-08-05 Jason Merrill <jason@redhat.com>
1515 * pt.c (determine_specialization): Print candidates after 'no
1518 * decl.c (cp_finish_decl): Tidy.
1519 * typeck.c (finish_class_member_access_expr): Use
1520 type_dependent_expression_p.
1521 * semantics.c (finish_id_expression): Use
1522 type_dependent_expression_p. Don't build_qualified_name for a
1523 decl in non-dependent scope.
1524 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1525 identifier is dependent. Remove variable_template_p check.
1531 * pt.c (lookup_template_variable): Use NULL_TREE for type.
1532 (instantiate_template_1): Also set DECL_TI_ARGS based on
1533 the immediate parent.
1534 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1535 (finish_template_variable): Add complain parm.
1536 * cp-tree.h: Adjust.
1540 * semantics.c (finish_id_expression): Call convert_from_reference
1541 for variable template.
1543 2015-08-04 Jason Merrill <jason@redhat.com>
1545 * pt.c (lookup_template_class_1): Clear elt.spec.
1547 * tree.c (build_target_expr): Copy the location from value.
1549 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1551 * parser.c (cp_parser_selection_statement): Move handling of
1552 semicolon body to ...
1553 (cp_parser_implicitly_scoped_statement): .. here. Call
1554 warn_for_misleading_indentation even when the body is a
1555 semicolon. Extract token_indent_infos corresponding to the
1556 guard, body and next tokens. Adjust call to
1557 warn_for_misleading_indentation accordingly. Take
1558 token_indent_info argument.
1559 (cp_parser_already_scoped_statement): Likewise.
1560 (cp_parser_selection_statement, cp_parser_iteration_statement):
1561 Extract a token_indent_info corresponding to the guard token.
1563 2015-08-01 Caroline Tice <cmtice@google.com>
1566 * mangle.c : Add vtable-verify.h to include files.
1567 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
1568 is "<anon>" get the real mangled name for the class instead, and
1569 also store the real mangled name in a vector for use later.
1571 2015-07-31 Marek Polacek <polacek@redhat.com>
1574 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1577 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1579 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1580 in warning_at instead of "%q+D" in warning.
1581 (warn_hidden): Likewise but use location_of.
1582 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1583 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1584 (check_field_decls): Likewise for permerror.
1585 (explain_non_literal_class): Likewise for inform.
1586 (check_bases_and_members, layout_class_type): Likewise for warning_at.
1587 (note_name_declared_in_class): Use location_of in permerror.
1588 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1589 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1590 inform, and warning_at.
1591 (check_for_out_of_scope_variable): Likewise for warning_at and
1594 2015-07-30 Jason Merrill <jason@redhat.com>
1598 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1600 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
1602 * call.c (build_op_delete_call, convert_like_real, build_over_call):
1603 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1605 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1606 * decl.c (duplicate_decls): Likewise for warning/warning_at.
1607 * except.c (maybe_noexcept_warning): Likewise.
1608 * friend.c (make_friend_class): Likewise for inform.
1609 * mangle.c (mangle_decl): Likewise for warning/warning_at.
1610 * method.c (process_subob_fn, walk_field_subobs,
1611 maybe_explain_implicit_delete): Likewise for inform.
1612 * parser.c (cp_parser_lambda_introducer): Likewise.
1613 * pt.c (check_specialization_namespace,
1614 maybe_process_partial_specialization): Likewise for permerror.
1615 (redeclare_class_template): Likewise for inform_n.
1616 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1617 * search.c (check_final_overrider): Likewise.
1618 * semantics.c (process_outer_var_ref): Likewise.
1620 2015-07-27 Jason Merrill <jason@redhat.com>
1622 * constexpr.c (cxx_eval_call_expression): Don't add this call to
1623 the hash table if !depth_ok.
1625 2015-07-27 Marek Polacek <polacek@redhat.com>
1629 * call.c (build_new_op_1): Call warn_tautological_cmp.
1630 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1633 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
1636 * typeck.c (check_return_expr): Also do the basic return-value
1637 validity checking if processing_template_decl and yet types are
1638 not dependent. Remove obsolete code.
1640 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
1642 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1643 in warning_at instead of "%q+D" in warning.
1644 (warn_extern_redeclared_static): Likewise for inform.
1645 (check_redeclaration_no_default_args): Likewise for permerror.
1646 (duplicate_decls): Likewise.
1647 (check_previous_goto_1): Likewise for inform.
1648 (check_goto, start_decl, check_for_uninitialized_const_var,
1649 start_preparsed_function, finish_function§): Likewise.
1650 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1651 * init.c (sort_mem_initializers): Likewise.
1652 * typeck.c (convert_for_initialization): Likewise for inform.
1653 (maybe_warn_about_returning_address_of_local): Likewise.
1654 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1655 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1657 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
1660 * cvt.c (ocp_convert): Don't call scalar_constant_value when
1661 converting to a class type.
1663 2015-07-24 Jason Merrill <jason@redhat.com>
1666 * pt.c (splice_late_return_type): Correct deduced return type for
1667 abbreviated function template.
1669 2015-07-24 Richard Biener <rguenther@suse.de>
1671 * init.c (build_vec_init): Build iterator bound in the same
1672 type as the iterator.
1674 2015-07-23 Marek Polacek <polacek@redhat.com>
1677 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1679 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
1682 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1683 redundant error messages.
1685 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1687 * decl.c (grokdeclarator): For an erroneous template parameter
1688 propagate error_mark_node as type.
1690 2015-07-20 Marek Polacek <polacek@redhat.com>
1693 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1695 2015-07-15 Jason Merrill <jason@redhat.com>
1698 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1699 template if there is no type x in scope.
1701 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
1704 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1705 template template parm in the redeclaration.
1706 (lookup_template_class_1): Peel off irrelevant template levels
1707 from current_template_parms before augmenting the argument
1710 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
1713 * parser.c (cp_parser_sizeof_pack): Also consider template template
1716 2015-07-14 Jason Merrill <jason@redhat.com>
1718 * call.c (build_new_method_call_1): Call reshape_init.
1720 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
1722 * pt.c (check_template_shadow): Emit error + inform instead of
1725 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
1728 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1729 template parm type under C++11 and later.
1731 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1733 * call.c: Fix double word typos.
1734 * cp-array-notation.c: Same.
1737 * name-lookup.c: Same.
1740 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
1743 * pt.c (begin_template_parm_list): Add a dummy parameter level
1744 to current_template_parms.
1745 (end_template_parm_list): Remove the dummy parameter level
1746 before adding the real one.
1747 (tsubst): Don't attempt to substitute for template parameters
1748 corresponding to a dummy argument level.
1749 (template_parms_to_args): Remove obsolete hack for
1750 giving template template arguments the proper level.
1751 (splite_late_return_type): Remove obsolete hack for giving
1752 template template arguments the proper level.
1753 * error.c (dump_template_decl): Don't print dummy template
1756 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1759 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1760 the second step of copy-initialization.
1762 2015-07-10 Jason Merrill <jason@redhat.com>
1764 * pt.c (find_parameter_packs_r): Handle variable templates.
1765 (variable_template_specialization_p): New.
1766 * cp-tree.h: Declare it.
1768 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1770 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1772 * decl2.c (cpp_check): Revert latest change.
1774 2015-07-09 Jason Merrill <jason@redhat.com>
1776 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1777 value_dependent_expression_p.
1779 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1780 template_parameter_pack_p.
1781 * parser.c (declarator_can_be_parameter_pack): False if
1782 parameter_pack_p is set.
1783 (make_parameter_declarator): Add template_parameter_pack_p parm.
1784 (cp_parser_template_parameter): Remove parameter pack parsing.
1785 (cp_parser_parameter_declaration): Handle all parameter packs.
1786 Tweak default argument permerror.
1788 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1790 * parser.c (cp_parser_default_type_template_argument)
1791 (cp_parser_default_template_template_argument): Factor out from
1792 cp_parser_type_parameter.
1794 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1796 * typeck.c (warn_args_num): Rename to error_args_num.
1797 (convert_arguments): Adjust calls.
1799 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1801 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1803 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1805 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1807 2015-07-08 Jakub Jelinek <jakub@redhat.com>
1809 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1810 * pt.c (apply_late_template_attributes): Likewise.
1812 2015-07-08 Marek Polacek <polacek@redhat.com>
1815 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1816 accessing TYPE_LANG_SPECIFIC node.
1818 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1820 * call.c: Adjust includes.
1821 * class.c: Likewise.
1822 * constexpr.c: Likewise.
1823 * cp-array-notation.c: Likewise.
1824 * cp-gimplify.c: Likewise.
1825 * cp-lang.c: Likewise.
1826 * cp-objcp-common.c: Likewise.
1827 * cp-ubsan.c: Likewise.
1830 * decl2.c: Likewise.
1832 * error.c: Likewise.
1833 * except.c: Likewise.
1835 * friend.c: Likewise.
1837 * lambda.c: Likewise.
1839 * mangle.c: Likewise.
1840 * method.c: Likewise.
1841 * name-lookup.c: Likewise.
1842 * optimize.c: Likewise.
1843 * parser.c: Likewise.
1845 * ptree.c: Likewise.
1848 * search.c: Likewise.
1849 * semantics.c: Likewise.
1851 * typeck.c: Likewise.
1852 * typeck2.c: Likewise.
1854 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1856 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1858 2015-07-06 Jason Merrill <jason@redhat.com>
1860 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1861 for a template template parameter.
1862 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1863 by reduce_template_parm_level.
1865 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
1868 2015-07-02 Jason Merrill <jason@redhat.com>
1871 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
1872 TYPE_VALUES_RAW rather than TYPE_FIELDS.
1874 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
1876 * pt.c (type_dependent_expression_p): Handle expressions
1877 that refer to variable templates.
1879 2015-07-01 Jason Merrill <jason@redhat.com>
1881 * lex.c (init_reswords): s/CXX0X/CXX11/.
1882 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1884 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
1885 Attribute mangling is now -fabi-version=10.
1888 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
1889 * class.c (layout_nonempty_base_or_field): Warn if that affects
1890 the offset of a field.
1892 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
1895 * parser.c (cp_parser_check_std_attribute): New.
1896 (cp_parser_std_attribute_list): Call it.
1898 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
1901 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
1902 return 0 if tsubst returns a dependent type.
1904 2015-06-30 Jason Merrill <jason@redhat.com>
1907 * decl2.c (is_late_template_attribute): True for tls_model.
1910 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
1911 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
1912 (SET_DECL_GNU_TLS_P): New.
1913 * call.c (make_temporary_var_for_ref_to_temp): Use
1914 CP_DECL_THREAD_LOCAL_P.
1915 (set_up_extended_ref_temp): Likewise.
1916 * decl.c (duplicate_decls, expand_static_init): Likewise.
1917 (redeclaration_error_message, grokvardecl): Likewise.
1918 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
1919 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
1920 (handle_tls_init): Likewise.
1921 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1922 * semantics.c (finish_id_expression): Likewise.
1923 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
1924 (finish_omp_threadprivate): Likewise.
1925 * tree.c (decl_storage_duration): Likewise.
1926 * cp-gimplify.c (omp_var_to_track): Likewise.
1927 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
1928 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
1931 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1933 Implement N4197 - Adding u8 character literals
1934 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
1935 and CPP_UTF8CHAR_USERDEF tokens;
1936 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
1938 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1941 * decl.c (grokfndecl): Allow constexpr declarations of friend
1942 template specializations.
1944 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1947 * decl.c (finish_function): Call do_warn_unused_parameter.
1949 2015-06-29 Marek Polacek <polacek@redhat.com>
1952 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1953 (push_switch): Set OUTSIDE_RANGE_P.
1954 (pop_switch): Update c_do_switch_warnings call.
1955 (finish_case_label): Update c_add_case_label call.
1956 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1959 2015-06-27 Marek Polacek <polacek@redhat.com>
1961 * call.c: Use VECTOR_TYPE_P.
1962 * constexpr.c: Likewise.
1965 * decl2.c: Likewise.
1967 * semantics.c: Likewise.
1969 * typeck.c: Likewise.
1970 * typeck2.c: Likewise.
1972 2015-06-27 Marek Polacek <polacek@redhat.com>
1974 * call.c (set_up_extended_ref_temp): Use VAR_P.
1975 * class.c: Use VAR_P throughout.
1976 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1977 * cp-array-notation.c (make_triplet_val_inv): Likewise.
1978 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1980 * decl2.c: Likewise.
1981 * error.c (dump_decl): Use VAR_P.
1982 * mangle.c (decl_implicit_alias_p): Likewise.
1983 * parser.c: Use VAR_P throughout.
1985 * semantics.c: Likewise.
1986 * vtable-class-hierarchy.c: Likewise.
1987 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1989 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
1991 * pt.c (check_unstripped_args): Mark parameter as unused.
1993 2015-06-26 Jason Merrill <jason@redhat.com>
1996 * class.c (finish_struct): Call fixup_attribute_variants.
1999 * typeck2.c (merge_exception_specifiers): Allow different
2000 noexcept-specifiers if we've had errors.
2003 * pt.c (check_unstripped_args): Split out from...
2004 (retrieve_specialization): ...here. Allow typedefs in the type of
2005 a non-type argument.
2008 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
2010 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
2013 * typeck2.c (digest_init_r): Only expect reshaping if the class is
2016 2015-06-26 Marek Polacek <polacek@redhat.com>
2018 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
2019 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
2021 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2023 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
2024 * class.c: Likewise.
2025 * cp-ubsan.c: Likewise.
2027 * decl2.c: Likewise.
2028 * lambda.c: Likewise.
2029 * mangle.c: Likewise.
2030 * method.c: Likewise.
2031 * optimize.c: Likewise.
2032 * parser.c: Likewise.
2033 * semantics.c: Likewise.
2035 * vtable-class-hierarchy.c: Likewise.
2037 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2039 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
2040 rather than ggc_hasher.
2041 (constexpr_call_hasher): Likewise.
2042 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
2043 * decl.c (typename_hasher): Likewise.
2044 * mangle.c (conv_type_hasher): Likewise.
2045 * pt.c (spec_hasher): Likewise.
2046 * tree.c (cplus_array_hasher, list_hasher): Likewise.
2047 * typeck2.c (abstract_type_hasher): Likewise.
2049 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2051 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
2052 rather than pointer_hash.
2053 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
2054 * semantics.c (nrv_data): Likewise.
2055 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
2057 2015-06-24 Jason Merrill <jason@redhat.com>
2060 * pt.c (dependent_type_p_r): Check for dependent alias template
2061 specialization sooner.
2064 * class.c (type_has_nontrivial_assignment): Remove.
2065 * cp-tree.h: Remove declaration.
2066 * init.c (vec_copy_assign_is_trivial): New.
2067 (build_vec_init): Use it.
2069 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
2071 Implement N3928 - Extending static_assert
2072 * parser.c (cp_parser_static_assert): Support static_assert with
2073 no message string. Supply an empty string in this case.
2074 * semantics.c (finish_static_assert): Don't try to print a message if
2075 the message strnig is empty.
2077 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
2080 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
2081 implicit template parm if 'auto' is a placeholder for trailing
2084 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
2087 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2090 * parser.c (cp_parser_template_parameter_list): Update
2091 current_template_parms right after processing a paramater.
2092 * pt.c (template_parms_to_args): Remove obsolete hack for
2093 giving template template arguments the proper level.
2094 (check_default_tmpl_args): Account for tested template
2096 (splite_late_return_type): Remove obsolete hack for giving
2097 template template arguments the proper level.
2099 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2102 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2104 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2107 * parser.c (cp_parser_template_parameter_list): Update
2108 current_template_parms right after processing a paramater.
2109 * pt.c (template_parms_to_args): Remove obsolete hack for
2110 giving template template arguments the proper level.
2111 (check_default_tmpl_args): Account for tested template
2113 (splite_late_return_type): Remove obsolete hack for giving
2114 template template arguments the proper level.
2116 2015-06-23 Jason Merrill <jason@redhat.com>
2119 * decl.c (grokfndecl): Check the linkage of ctype, not just
2121 * tree.c (no_linkage_check): Skip the 'this' pointer.
2124 * class.c (type_has_nontrivial_assignment): New.
2125 * init.c (build_vec_init): Use it.
2126 * cp-tree.h: Declare it.
2127 * method.c (trivial_fn_p): Templates aren't trivial.
2130 * decl.c (expand_static_init): Make sure the destructor is callable
2131 here even if we have an initializer.
2133 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2135 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
2136 -fdump-ada-spec is passed.
2138 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
2140 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
2142 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2144 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
2146 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2148 * decl.c (grokdeclarator): Remove pointless code.
2150 2015-06-22 Jason Merrill <jason@redhat.com>
2153 * call.c (implicit_conversion): Only reshape for classes.
2155 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
2157 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
2159 * semantics.c (finish_omp_atomic): Likewise.
2160 * typeck.c (cp_build_array_ref): Likewise.
2162 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
2165 * call.c (build_new_op_1): Check tf_warning flag in all cases.
2167 2015-06-19 Jason Merrill <jason@redhat.com>
2170 * pt.c (instantiate_class_template_1): Clear
2171 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
2174 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
2176 * typeck.c (merge_types): build_ptrmemfunc_type before applying
2177 quals and attributes.
2180 * constexpr.c (build_constexpr_constructor_member_initializers):
2181 Handle an empty STATEMENT_LIST.
2184 * pt.c (tsubst_copy_and_build): Register a capture proxy in
2185 local_specializations.
2187 2015-06-17 Jason Merrill <jason@redhat.com>
2190 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
2192 (potential_constant_expression_1): Likewise.
2194 2015-06-17 Jason Merrill <jason@redhat.com>
2197 * call.c (implicit_conversion): Call reshape_init here, early.
2198 (build_aggr_conv): Not here.
2200 2015-06-17 Jakub Jelinek <jakub@redhat.com>
2203 * pt.c (tsubst_omp_clause_decl): New function.
2204 (tsubst_omp_clauses): Use it or tsubst_copy instead of
2205 tsubst_expr on OMP_CLAUSE_DECL.
2207 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2209 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
2210 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
2211 * decl.c (grokdeclarator, xref_tag_1): Likewise.
2212 * error.c (dump_aggr_type): likewise.
2213 * pt.c (push_template_decl_real): Likewise.
2214 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
2216 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2218 * call.c: Do not include input.h, line-map.h or is-a.h.
2219 * class.c: Likewise.
2220 * constexpr.c: Likewise.
2221 * cp-array-notation.c: Likewise.
2222 * cp-gimplify.c: Likewise.
2223 * cp-lang.c: Likewise.
2224 * cp-objcp-common.c: Likewise.
2225 * cp-tree.h: Likewise.
2226 * cp-ubsan.c: Likewise.
2229 * decl2.c: Likewise.
2231 * error.c: Likewise.
2232 * except.c: Likewise.
2234 * friend.c: Likewise.
2236 * lambda.c: Likewise.
2238 * mangle.c: Likewise.
2239 * method.c: Likewise.
2240 * name-lookup.c: Likewise.
2241 * optimize.c: Likewise.
2242 * parser.c: Likewise.
2244 * ptree.c: Likewise.
2247 * search.c: Likewise.
2248 * semantics.c: Likewise.
2250 * typeck.c: Likewise.
2251 * typeck2.c: Likewise.
2252 * vtable-class-hierarchy.c: Likewise.
2254 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
2257 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
2259 2015-06-16 Jason Merrill <jason@redhat.com>
2262 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
2266 * tree.c (bot_manip): Remap SAVE_EXPR.
2269 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
2271 2015-06-15 Nathan Sidwell <nathan@acm.org>
2274 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
2275 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
2276 protect it from recursive instantiation.
2278 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
2281 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
2282 using a local type is pure virtual.
2284 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2286 * call.c: Remove comment documenting the long-deleted
2287 function build_method_call.
2289 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2292 * typeck.c (cp_build_binary_op): Warn when comparing an address
2293 of a reference against NULL.
2295 2015-06-12 Jason Merrill <jason@redhat.com>
2298 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
2299 variables as DECL_NOT_REALLY_EXTERN.
2301 2015-06-11 Jason Merrill <jason@redhat.com>
2304 * constexpr.c (potential_constant_expression_1): Handle a
2305 DECL_EXPR of TYPE_DECL.
2308 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
2311 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2313 * decl.c (cxx_init_decl_processing): Register the main
2314 translation unit through the new debug hook.
2316 2015-06-10 Jason Merrill <jason@redhat.com>
2319 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
2320 * pt.c (push_template_decl_real): Set it.
2321 (dependent_alias_template_spec_p): Use it.
2322 (dependent_type_p_r): Use dependent_alias_template_spec_p.
2323 (uses_all_template_parms_data, uses_all_template_parms_r)
2324 (complex_alias_template_p): New.
2325 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
2327 2015-06-09 Jason Merrill <jason@redhat.com>
2331 * typeck2.c (digest_init_r): Replace previous change with
2335 * semantics.c (process_outer_var_ref): Make sure the value is
2336 actually constant before returning it.
2337 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
2340 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2343 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
2344 * init.c (expand_default_init): Likewise.
2346 2015-06-09 Jason Merrill <jason@redhat.com>
2349 * tree.c (replace_placeholders_r): Handle placeholders for an
2351 * typeck2.c (store_init_value): Only replace_placeholders for
2352 objects of class type.
2354 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2356 * call.c : Adjust include files.
2357 * class.c : Likewise.
2358 * constexpr.c : Likewise.
2359 * cp-array-notation.c : Likewise.
2360 * cp-cilkplus.c : Likewise.
2361 * cp-gimplify.c : Likewise.
2362 * cp-lang.c : Likewise.
2363 * cp-objcp-common.c : Likewise.
2364 * cp-tree.h : Likewise.
2365 * cp-ubsan.c : Likewise.
2367 * decl.c : Likewise.
2368 * decl2.c : Likewise.
2369 * dump.c : Likewise.
2370 * error.c : Likewise.
2371 * except.c : Likewise.
2372 * expr.c : Likewise.
2373 * friend.c : Likewise.
2374 * init.c : Likewise.
2375 * lambda.c : Likewise.
2377 * mangle.c : Likewise.
2378 * method.c : Likewise.
2379 * name-lookup.c : Likewise.
2380 * optimize.c : Likewise.
2381 * parser.c : Likewise.
2383 * ptree.c : Likewise.
2384 * repo.c : Likewise.
2385 * rtti.c : Likewise.
2386 * search.c : Likewise.
2387 * semantics.c : Likewise.
2388 * tree.c : Likewise.
2389 * typeck.c : Likewise.
2390 * typeck2.c : Likewise.
2391 * vtable-class-hierarchy.c : Likewise.
2393 2015-06-05 Jason Merrill <jason@redhat.com>
2396 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
2397 the expansion has extra args.
2398 (use_pack_expansion_extra_args_p): Return true in that case.
2401 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
2402 dependent even if it has a type.
2404 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2406 * cp-objcp-common.c: Adjust comment for
2407 cxx_warn_unused_global_decl.
2408 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
2409 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
2410 * cp-tree.h (note_mangling_alias): Protoize.
2411 (cp_write_global_declarations): Remove.
2412 (cxx_post_compilation_parsing_cleanups): Protoize.
2413 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
2415 * decl2.c (mangling_aliases): New global.
2416 (build_java_method_aliases): New. Adapted from
2417 collect_candidates_for_java_method_aliases.
2418 (collect_candidates_for_java_method_aliases): Remove.
2419 (build_java_method_aliases): Remove.
2420 (generate_mangling_aliases): New.
2421 (note_mangling_alias): New. Moved from mangle_decl.
2422 (locus_at_end_of_parsing): New global.
2423 (c_parse_final_cleanups): Rename from
2424 cp_write_global_declarations.
2425 Use locus_at_end_of_parsing.
2426 Call generate_mangling_aliases.
2427 Rename call to collect_candidates_for_java_method_aliases into
2428 build_java_method_aliases.
2429 Remove call to finalize_compilation_unit.
2430 Move vtable handling into cxx_post_compilation_parsing_cleanups.
2431 Do not call check_global_declarations or
2432 emit_debug_global_declarations.
2433 (cxx_post_compilation_parsing_cleanups): New.
2434 * mangle.c (mangle_decl): Move code to note_mangling_alias.
2435 * name-lookup.c (do_namespace_alias): Call early_global_decl.
2437 2015-06-05 Nathan Sidwell <nathan@acm.org>
2440 * parser.c (cp_parser_cache_defarg): Continue looking for
2441 declarators when scanning a potential template argument list of an
2444 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2446 * call.c: Adjust includes for restructured coretypes.h.
2447 * class.c: Likewise.
2448 * constexpr.c: Likewise.
2449 * cp-array-notation.c: Likewise.
2450 * cp-gimplify.c: Likewise.
2451 * cp-lang.c: Likewise.
2452 * cp-objcp-common.c: Likewise.
2453 * cp-tree.h: Likewise.
2454 * cp-ubsan.c: Likewise.
2457 * decl2.c: Likewise.
2459 * error.c: Likewise.
2460 * except.c: Likewise.
2462 * friend.c: Likewise.
2464 * lambda.c: Likewise.
2466 * mangle.c: Likewise.
2467 * method.c: Likewise.
2468 * name-lookup.c: Likewise.
2469 * optimize.c: Likewise.
2470 * parser.c: Likewise.
2472 * ptree.c: Likewise.
2475 * search.c: Likewise.
2476 * semantics.c: Likewise.
2478 * typeck.c: Likewise.
2479 * typeck2.c: Likewise.
2480 * vtable-class-hierarchy.c: Likewise.
2482 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2486 * cp-tree.h (get_guard_cond): Adjust declaration
2487 * decl.c (expand_static_init): Use atomic load acquire
2488 and adjust call to get_guard_cond.
2489 * decl2.c (build_atomic_load_byte): New function.
2490 (get_guard_cond): Handle thread_safety.
2491 (one_static_initialization_or_destruction): Adjust call to
2494 2015-06-03 Jason Merrill <jason@redhat.com>
2497 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2498 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2499 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2500 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2502 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2503 Paolo Carlini <paolo.carlini@oracle.com>
2506 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2507 use it in the diagnostic.
2508 (decay_conversion): Adjust call.
2509 * semantics.c (finish_decltype_type): Likewise.
2510 * call.c (resolve_args, build_new_op_1,
2511 perform_implicit_conversion_flags): Adjust calls.
2512 * cvt.c (ocp_convert, convert_to_void): Likewise.
2513 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2515 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2517 * decl.c (check_tag_decl): Use declspecs->locations as locations in
2518 error_at and warning_at calls.
2520 2015-06-03 Marek Polacek <polacek@redhat.com>
2523 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2524 (cp_genericize_r): Don't instrument static initializers.
2525 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2527 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2529 * decl.c (start_function): Call plugin before parsing.
2530 (finish_function): Call plugin after parsing.
2532 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
2534 * cp-tree.h (init_error): Remove declaration.
2535 * error.c (scratch_pretty_printer): Rename to ...
2536 (actual_pretty_printer): ... this.
2537 (cxx_pp): Constify and update accordingly.
2538 (init_error): Remove definition.
2539 * lex.c (cxx_init): Do not call init_error.
2541 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2544 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2546 2015-06-01 Jason Merrill <jason@redhat.com>
2549 * decl2.c (mark_used): Don't always instantiate constexpr fns.
2550 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2553 * mangle.c (attr_strcmp): New.
2554 (write_CV_qualifiers_for_type): Also write out attributes that
2555 affect type identity.
2556 (write_type): Strip all attributes after writing qualifiers.
2558 2015-05-31 Jason Merrill <jason@redhat.com>
2560 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2563 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2564 with the wrong type as non-constant.
2566 2015-05-27 Jason Merrill <jason@redhat.com>
2568 * decl.c (check_redeclaration_exception_specification): Depend on
2569 -Wsystem-headers rather than -pedantic.
2571 * decl.c (warn_extern_redeclared_static): Use the location of
2572 newdecl in diagnostics, not input_location.
2573 (validate_constexpr_redeclaration): Likewise.
2574 (check_redeclaration_no_default_args): Likewise.
2575 (duplicate_decls): Likewise.
2576 (check_redeclaration_exception_specification): Likewise.
2577 Change second diagnostic to inform.
2579 2015-05-24 Nathan Sidwell <nathan@acm.org>
2582 * decl.c (build_enumerator): Don't silently convert scoped enums.
2584 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
2587 * mangle.c (mangle_decl): Mangle anonymous namespace types as
2590 2015-05-23 Nathan Sidwell <nathan@acm.org>
2593 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2595 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2597 * Make-lang.in (check_g++_parallelize): Update comment.
2599 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2602 * decl.c (grokdeclarator): Use the correct location in error
2603 messages about 'explicit'.
2605 2015-05-22 Marek Polacek <polacek@redhat.com>
2606 Edward Smith-Rowland <3dw4rd@verizon.net>
2609 * cp-tree.h (build_enumerator): Update declaration.
2610 * decl.c (build_enumerator): Add attributes parameter. Call
2611 cplus_decl_attributes.
2612 * init.c (constant_value_1): Pass tf_none to mark_used.
2613 * parser.c (cp_parser_enumerator_definition): Parse attributes and
2614 pass them down to build_enumerator.
2615 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2616 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2618 2015-05-21 Nathan Sidwell <nathan@acm.org>
2621 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2623 2015-05-21 Marek Polacek <polacek@redhat.com>
2625 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2627 2015-05-20 Jason Merrill <jason@redhat.com>
2629 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2630 before register_specialization.
2632 * decl.c (grok_op_properties): Don't complain about size_t
2633 placement delete here.
2634 * call.c (second_parm_is_size_t): Split out from...
2635 (non_placement_deallocation_fn_p): ...here.
2636 (build_op_delete_call): Warn about size_t placement delete with
2639 2015-05-19 Nathan Sidwell <nathan@acm.org>
2642 * typeck.c (finish_class_member_access_expr): Diagnose failed
2643 lookup of enum class member.
2645 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2648 * parser.c (cp_parser_omp_for_loop): Don't add
2649 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2650 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2651 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2654 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2656 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2659 2015-05-18 Jason Merrill <jason@redhat.com>
2661 * pt.c (retrieve_specialization): Make sure our arguments have
2662 gone through strip_typedefs.
2664 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2665 (determine_specialization): Call coerce_template_parms.
2668 * pt.c (type_unification_real): Check convertibility here.
2669 (unify_one_argument): Not here.
2671 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2672 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2673 [TREE_LIST]: Fix no-change case.
2675 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2677 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2680 * error.c (cp_diagnostic_starter): Use diagnostic_location
2682 (cp_print_error_function): Likewise.
2683 (cp_printer): Replace locus pointer with accessor function.
2685 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2687 * parser.c (cp_parser_selection_statement): Add location and
2688 guard_kind arguments to calls to
2689 cp_parser_implicitly_scoped_statement.
2690 (cp_parser_iteration_statement): Likewise for calls to
2691 cp_parser_already_scoped_statement.
2692 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2693 "guard_kind" params; use them to warn for misleading
2695 (cp_parser_already_scoped_statement): Likewise.
2697 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
2699 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2700 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2701 * semantics.c (finish_member_declaration): Likewise.
2702 * method.c (lazily_declare_fn): Allways add method to main variant list.
2704 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
2707 * decl2.c (note_mangling_alias): Declare arguments as unused.
2709 2015-05-08 Jason Merrill <jason@redhat.com>
2711 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2714 2015-05-08 Jason Merrill <jason@redhat.com>
2716 * decl2.c (mangling_aliases): New variable.
2717 (note_mangling_alias, generate_mangling_aliases): New.
2718 (cp_write_global_declarations): Call generate_mangling_aliases.
2719 (generate_mangling_alias): Split out from...
2720 * mangle.c (mangle_decl): ...here.
2721 * cp-tree.h: Declare note_mangling_alias.
2723 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
2725 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2726 (build_java_method_aliases): Adapt to use create_same_body_alias
2727 instead of assemble_alias. Move variable declarations to
2728 definition and tidy up.
2729 (cp_write_global_declarations): Call build_java_method_aliases
2730 instead of collecting candidates first.
2732 2015-05-07 Jason Merrill <jason@redhat.com>
2735 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2736 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2737 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2738 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2739 (apply_late_template_attributes): Handle attribute pack expansion.
2741 2015-05-07 Marek Polacek <polacek@redhat.com>
2744 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2747 2015-05-07 Jason Merrill <jason@redhat.com>
2751 * typeck2.c (digest_init_r): Fix single element list.
2753 2015-05-05 Jason Merrill <jason@redhat.com>
2755 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2756 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2757 MUST_NOT_THROW_EXPR.
2758 (cp_genericize_data): Add try_block field.
2759 (cp_genericize_tree): Initialize it.
2760 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2763 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2766 * semantics.c (finish_call_expr): Check complain.
2768 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2769 maybe-in-charge constructor.
2771 * decl.c (start_decl): Don't push the plain VAR_DECL for a
2778 * call.c (convert_like_real): Check value-initialization before
2780 * typeck2.c (process_init_constructor_record): Don't set
2781 CONSTRUCTOR_IS_DIRECT_INIT.
2782 (process_init_constructor_array): Likewise.
2783 * init.c (build_vec_init): Likewise.
2785 2015-05-05 David Malcolm <dmalcolm@redhat.com>
2787 * parser.c (cp_parser_asm_definition): Only test for
2788 error_mark_node if "outputs" was just set. Likewise for "inputs".
2790 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2791 Jakub Jelinek <jakub@redhat.com>
2794 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2795 result in an actual error.
2797 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2798 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
2801 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2804 2015-04-30 David Malcolm <dmalcolm@redhat.com>
2806 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2809 2015-04-29 Jason Merrill <jason@redhat.com>
2812 * tree.c (apply_identity_attributes): Fix handling of classes.
2814 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2816 * parser.c (cp_parser_oacc_enter_exit_data): Use
2817 OMP_STANDALONE_CLAUSES.
2819 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
2822 * init.c (perform_member_init): Handle references for -Winit-self.
2824 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2826 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2827 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2829 2015-04-28 Jason Merrill <jason@redhat.com>
2832 * constexpr.c (cxx_eval_store_expression): Don't try to actually
2833 store an empty class.
2836 * constexpr.c (cxx_eval_builtin_function_call): Fix
2837 __builtin_constant_p.
2840 * tree.c (strip_typedefs): Add remove_attributes parm.
2841 (strip_typedefs_expr): Likewise.
2842 (apply_identity_attributes): New subroutine of strip_typedefs.
2843 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2844 (convert_nontype_argument, unify): Likewise.
2845 * cp-tree.h: Adjust.
2848 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2850 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2852 * class.c (layout_class_type): Remove check if
2853 PCC_BITFIELD_TYPE_MATTERS is defined.
2855 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2857 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2859 2015-04-24 Jason Merrill <jason@redhat.com>
2862 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2864 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2865 Remove obsolete code.
2866 [NE_EXPR]: Likewise.
2868 2015-04-23 Jason Merrill <jason@redhat.com>
2871 * pt.c (check_explicit_specialization): Don't
2872 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
2874 * decl.c (grokvardecl): Revert earlier fix.
2876 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
2879 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
2880 suppresses the diagnostic.
2882 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
2884 Reject trailing return type for an operator auto().
2885 * decl.c (grokdeclarator): Reject trailing return types for
2886 all conversion operators, don't handle conversion operators
2887 in the previous checks that deal with auto.
2889 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2891 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
2893 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2895 * class.c (resolve_address_of_overloaded_function, instantiate_type):
2896 Rename tsubst_flags_t parameter flags -> complain.
2898 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2900 * call.c (build_op_delete_call, build_over_call): Check mark_used
2902 * class.c (resolve_address_of_overloaded_function): Likewise.
2903 * decl.c (cxx_maybe_build_cleanup): Likewise.
2904 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
2905 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
2906 * rtti.c (build_dynamic_cast_1): Likewise.
2907 * semantics.c (process_outer_var_ref): Likewise.
2908 * typeck.c (build_class_member_access_expr,
2909 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
2911 2015-04-15 Jason Merrill <jason@redhat.com>
2913 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
2914 (build_constexpr_constructor_member_initializers): Loop to find
2916 * decl.c (start_preparsed_function): Clobber the object at the
2917 beginning of a constructor.
2919 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
2920 * method.c (implicitly_declare_fn): Likewise.
2921 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
2923 * decl2.c (determine_visibility): Use get_template_info.
2925 2015-04-15 Jason Merrill <jason@redhat.com>
2926 Marek Polacek <polacek@redhat.com>
2929 * lambda.c (lambda_expr_this_capture): In unevaluated context go
2930 through the normal loop, just don't capture.
2931 (maybe_resolve_dummy): Handle null return.
2933 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2935 * call.c (enforce_access): Emit error + inform.
2937 2015-04-15 Marek Polacek <polacek@redhat.com>
2939 * constexpr.c (use_new_call): Remove #define.
2940 (lookup_parameter_binding): Remove function.
2941 (cxx_bind_parameters_in_call): Remove unused code.
2942 (cxx_eval_call_expression): Likewise.
2943 (cxx_eval_constant_expression): Likewise.
2945 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
2947 * tree.c (replace_placeholders_t): Remove unused type.
2948 (replace_placeholders): Remove unused pset.
2950 2015-04-14 Jason Merrill <jason@redhat.com>
2952 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2955 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2958 * name-lookup.c (do_class_using_decl): Complain about specifying
2959 the current class even if there are dependent bases.
2961 2015-04-14 David Krauss <david_work@me.com>
2964 * decl.c (grokdeclarator): Do not flag friends with deduced return.
2966 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
2967 Jason Merrill <jason@redhat.com>
2970 * parser.c (cp_parser_class_name): Add enum_ok parameter.
2971 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2972 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2975 2015-04-12 Jakub Jelinek <jakub@redhat.com>
2978 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2979 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
2980 the expression to the original type at the end.
2982 2015-04-09 Jakub Jelinek <jakub@redhat.com>
2985 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2989 * tree.c (build_cplus_array_type): Layout type before variants are
2990 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2993 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2996 * lambda.c (add_capture): Use dependent_type_p for capture by
2999 2015-04-02 Marek Polacek <polacek@redhat.com>
3002 * constexpr.c (cxx_eval_pointer_plus_expression): Call
3003 cxx_eval_constant_expression on the first operand.
3005 2015-04-01 Jason Merrill <jason@redhat.com>
3008 * decl.c (make_typename_type): Handle seeing a variable template.
3010 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
3013 * pt.c (instantiating_current_function_p): New.
3014 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
3015 * cp-tree.h (instantiating_current_function_p): Declare.
3017 2015-04-01 Jason Merrill <jason@redhat.com>
3020 * decl.c (grokvardecl): Don't call check_explicit_specialization
3021 for non-template members of a class template.
3023 2015-04-01 Marek Polacek <polacek@redhat.com>
3026 * class.c (finish_struct): Require that the second field of a
3027 user-defined initializer_list be of size type.
3029 2015-03-31 Marek Polacek <polacek@redhat.com>
3032 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
3033 checking for constness.
3035 2015-03-30 Marek Polacek <polacek@redhat.com>
3038 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
3039 *(&A[i] p+ j) => A[i + j] transformation here.
3040 (cxx_eval_pointer_plus_expression): New function.
3041 (cxx_eval_constant_expression): Use it here.
3043 2015-03-27 Tobias Burnus <burnus@net-b.de>
3046 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
3047 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
3048 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
3051 2015-03-27 Marek Polacek <polacek@redhat.com>
3054 * semantics.c (finish_switch_cond): If the unlowered type is not an
3055 enum, use the type of the condition.
3057 2015-03-27 Jason Merrill <jason@redhat.com>
3060 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
3063 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
3066 * init.c (build_vec_init): Fix initializing aggregates
3067 with empty init list.
3069 2015-03-26 Jason Merrill <jason@redhat.com>
3072 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
3074 2015-03-25 Marek Polacek <polacek@redhat.com>
3077 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
3078 on an anonymous namespace.
3080 2015-03-25 Marek Polacek <polacek@redhat.com>
3083 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
3085 2015-03-24 Jason Merrill <jason@redhat.com>
3088 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
3089 * parser.c (cp_parser_namespace_definition): Don't set it.
3090 * name-lookup.c (handle_namespace_attrs): Check
3091 DECL_NAMESPACE_ASSOCIATIONS instead.
3094 * pt.c (get_mostly_instantiated_function_type): Just return the
3095 type of the partially instantiated template in DECL_TI_TEMPLATE.
3097 2015-03-20 Marek Polacek <polacek@redhat.com>
3100 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
3103 2015-03-20 Marek Polacek <polacek@redhat.com>
3106 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
3109 2015-03-19 Jason Merrill <jason@redhat.com>
3112 Automatically propagate ABI tags to variables and functions
3113 from their (return) type.
3114 * class.c (check_tag): Handle variables and functions.
3115 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
3116 (mark_or_check_tags): Likewise.
3117 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
3118 (check_abi_tags): Add single argument overload for decls.
3119 Handle inheriting tags for decls.
3120 * mangle.c (write_mangled_name): Call it.
3121 (mangle_return_type_p): Split out from write_encoding.
3122 (unmangled_name_p): Split out from write_mangled_name.
3123 (write_mangled_name): Ignore abi_tag on namespace.
3124 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
3125 * parser.c (cp_parser_namespace_definition): Set it.
3126 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
3127 about abi_tag attribute on non-inline namespace.
3128 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
3129 (handle_abi_tag_attribute): Allow tags on variables.
3131 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3133 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
3134 attribute for DECL_EXTERNAL VAR_DECLs.
3136 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3139 * call.c (build_over_call): Pass the tsubst_flags_t argument to
3141 * decl2.c (mark_used): Inline the require_deduced_type call and
3142 guard the error call.
3144 2015-03-16 Jason Merrill <jason@redhat.com>
3147 * parser.c (cp_parser_template_name): Call strip_using_decl.
3149 2015-03-16 Marek Polacek <polacek@redhat.com>
3153 * decl.c (grokdeclarator): Allow volatile and constexpr together.
3155 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
3158 * decl.c (check_default_argument): Don't call
3159 maybe_warn_zero_as_null_pointer_constant.
3161 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
3163 * cp-gimplify.c (simple_empty_class_p): New.
3164 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
3165 the code for empty class copies into simple_empty_class_p, and
3166 adapt it to handle COMPOUND_EXPRs.
3168 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
3171 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
3172 only if the location of newdecl doesn't match the location of olddecl.
3174 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3177 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
3180 2015-03-10 Jason Merrill <jason@redhat.com>
3184 * pt.c (dependent_type_p_r): Check both class and alias template args.
3186 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3189 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
3190 before preparing arguments to warn_logical_not_parentheses.
3191 Use maybe_constant_value on rhs.
3193 2015-03-09 Jason Merrill <jason@redhat.com>
3196 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
3198 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3201 * parser.c (cp_parser_binary_expression): Don't warn for
3202 !!x == y or !b == y where b is bool.
3204 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
3206 * ptree.c (cxx_print_lambda_node): New.
3207 (cxx_print_xnode): Handle LAMBDA_EXPR.
3209 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
3212 * constexpr.c (cxx_eval_constant_expression): Remove assert in
3213 RESULT_DECL handling.
3215 2015-02-26 Marek Polacek <polacek@redhat.com>
3218 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
3219 a RETURN_EXPR if its operand is null.
3221 2015-02-25 Jason Merrill <jason@redhat.com>
3224 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
3226 (constrain_visibility_for_template): Handle reference arguments.
3229 * decl.c (start_preparsed_function): Use create_artificial_label
3232 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
3233 Jakub Jelinek <jakub@redhat.com>
3236 * constexpr.c (check_constexpr_bind_expr_vars): Allow
3237 implicit typedefs for lambda types.
3239 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3242 * decl.c (lookup_and_check_tag): Use strip_using_decl.
3244 2015-02-13 Jason Merrill <jason@redhat.com>
3247 * pt.c (template_args_equal): Look through conversions here.
3248 * tree.c (cp_tree_equal): Not here.
3250 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3253 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
3254 pragma_external context.
3256 2015-02-13 Jason Merrill <jason@redhat.com>
3259 * call.c (reference_binding): Don't look for bad conversion
3260 if TO is incomplete.
3262 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3265 * decl.c (make_typename_type): Pass tsubst_flags_t argument
3266 to lookup_template_class.
3268 2015-02-13 Jakub Jelinek <jakub@redhat.com>
3271 * decl.c (start_preparsed_function): Use void_type_node instead
3272 of NULL_TREE as LABEL_DECL type.
3274 2015-02-12 Jason Merrill <jason@redhat.com>
3277 * mangle.c (write_mangled_name): Fix test for variable template
3280 * decl.c (begin_destructor_body): Condition clobber on
3283 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
3286 * parser.c (lookup_literal_operator): Return all candidates.
3287 (cp_parser_userdef_char_literal): Simplify error handling.
3288 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
3289 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
3290 Also give higher priority to standard string UDL operator.
3292 2015-02-12 Jakub Jelinek <jakub@redhat.com>
3295 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
3296 * decl.c (poplevel): If functionbody, try not to create an extra
3297 BLOCK for function body and use subblocks as that, if it is non-NULL
3298 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
3299 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
3302 * except.c (check_noexcept_r): Return NULL for internal
3305 2015-02-10 Jason Merrill <jason@redhat.com>
3308 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
3310 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
3313 * method.c (use_thunk): Do not check for stdarg thunks.
3315 2015-02-06 Jason Merrill <jason@redhat.com>
3318 * init.c (build_vec_init): Handle default-initialized array with
3319 constexpr default constructor.
3321 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3325 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
3327 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3330 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
3331 for generated expressions.
3333 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3336 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
3339 2015-02-02 Jason Merrill <jason@redhat.com>
3341 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
3343 2015-01-30 Joseph Myers <joseph@codesourcery.com>
3345 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
3346 changed to pass input_location as first argument.
3348 2015-01-29 Jakub Jelinek <jakub@redhat.com>
3351 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
3354 2015-01-29 Jason Merrill <jason@redhat.com>
3357 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
3358 erroneous return statement.
3361 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
3364 2015-01-27 Caroline Tice <cmtice@google.com>
3366 Committing VTV Cywin/Ming patch for Patrick Wollgast
3367 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
3368 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
3370 2015-01-27 Jason Merrill <jason@redhat.com>
3373 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
3374 current_function_decl.
3377 * pt.c (finish_template_variable): Move from semantics.c.
3378 Handle multiple template arg levels. Handle coercion here.
3379 (lookup_template_variable): Not here.
3381 2015-01-23 Jason Merrill <jason@redhat.com>
3385 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
3386 that has been completely split out.
3389 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
3393 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
3396 2015-01-21 Jason Merrill <jason@redhat.com>
3399 * constexpr.c (cxx_eval_constant_expression): Only shortcut
3400 constant CONSTRUCTORs.
3403 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
3404 give a hard error in a template instantiation.
3406 2015-01-21 Richard Biener <rguenther@suse.de>
3409 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
3410 for builtins the user declared correctly.
3412 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3415 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
3416 TREE_TYPE (elt) == error_mark_node.
3418 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
3420 PR tree-optimization/62053
3421 * tree.c (build_cplus_array_type): Layout type after variants are set.
3423 2015-01-15 Jakub Jelinek <jakub@redhat.com>
3425 * cp-gimplify.c (cp_genericize_r): Call
3426 cp_ubsan_maybe_instrument_member_call for member calls.
3427 (cp_ubsan_check_member_access_r): New function.
3428 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
3429 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
3430 cp_ubsan_instrument_member_accesses,
3431 cp_ubsan_maybe_instrument_downcast,
3432 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
3433 * cp-ubsan.c: New file.
3434 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
3435 * constexpr.c (cxx_eval_call_expression): Return void_node
3437 (potential_constant_expression_1): Return true for
3438 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
3439 * typeck.c (build_class_member_access_expr): Provide locus
3441 (build_static_cast_1): Instrument downcasts.
3442 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
3443 add ubsan instrumentation for virtual_access.
3444 * call.c: Include internal-fn.h.
3445 (set_flags_from_callee): Handle internal calls.
3447 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
3450 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
3451 and function templates, declared only in the class.
3452 * decl.c (duplicate_decls): Reveal hidden friend functions or
3453 function templates, if they are redeclared outside the class.
3455 2015-01-15 Jason Merrill <jason@redhat.com>
3458 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
3461 * constexpr.c (potential_constant_expression_1): Handle reference
3464 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3465 James Norris <jnorris@codesourcery.com>
3466 Cesar Philippidis <cesar@codesourcery.com>
3467 Ilmir Usmanov <i.usmanov@samsung.com>
3468 Jakub Jelinek <jakub@redhat.com>
3470 * parser.c: Include "gomp-constants.h".
3471 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3472 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3473 Use OMP_CLAUSE_SET_MAP_KIND.
3474 (cp_parser_omp_construct, cp_parser_pragma): Handle
3475 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3476 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3477 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3478 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3479 "create", "delete", "deviceptr", "host", "num_gangs",
3480 "num_workers", "present", "present_or_copy", "pcopy",
3481 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3482 "present_or_create", "pcreate", "vector_length", "wait".
3483 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3484 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3485 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3486 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3487 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3488 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3489 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3490 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3491 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3492 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3493 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3494 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3495 (cp_parser_oacc_parallel, cp_parser_oacc_update)
3496 (cp_parser_oacc_wait): New functions.
3497 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3498 (finish_oacc_parallel): New prototypes.
3499 * semantics.c: Include "gomp-constants.h".
3500 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3501 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3502 OMP_CLAUSE_SET_MAP_KIND.
3503 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3504 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3505 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3506 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3509 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
3512 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3513 self-initialization.
3515 2015-01-13 Jason Merrill <jason@redhat.com>
3519 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3520 pointer expressions.
3521 (cxx_eval_increment_expression): Likewise.
3524 * pt.c (coerce_template_parameter_pack): Return NULL for a
3525 zero-length fixed parameter pack with a pack expansion arg.
3528 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3530 2015-01-12 Jason Merrill <jason@redhat.com>
3533 * constexpr.c (cxx_eval_call_expression): A call to a void
3534 function doesn't need to return a value.
3536 2015-01-09 Michael Collison <michael.collison@linaro.org>
3538 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3539 input.h, alias.h, symtab.h, options.h, fold-const.h,
3540 wide-int.h, and inchash.h due to flattening of tree.h.
3542 * constexpr.c: Ditto.
3543 * cp-array-notation.c: Ditto.
3544 * cp-gimplify.c: Ditto.
3546 * cp-objcp-common.c: Ditto.
3559 * name-lookup.c: Ditto.
3560 * optimize.c: Ditto.
3567 * semantics.c: Ditto.
3572 2015-01-08 Jason Merrill <jason@redhat.com>
3574 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3575 * decl.c (compute_array_index_type): Likewise.
3576 * init.c (build_vec_init): Likewise.
3577 * typeck.c (cp_build_binary_op): Likewise.
3579 2015-01-08 Jason Merrill <jason@redhat.com>
3581 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3582 whether an initializer-list is too big for a VLA.
3583 (throw_bad_array_length): Remove.
3584 * cp-tree.h: Remove prototype.
3586 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
3589 * decl.c (grokfndecl): Add bool parameter.
3590 (grokdeclarator): Adjust calls.
3591 (start_decl): Don't set DECL_DELETED_FN here.
3593 2015-01-06 Jason Merrill <jason@redhat.com>
3595 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3599 * pt.c (type_dependent_expression_p): Handle variable templates.
3600 * constexpr.c (potential_constant_expression_1): Use it.
3603 * semantics.c (finish_offsetof): Handle templates here.
3604 * parser.c (cp_parser_builtin_offsetof): Not here.
3607 * semantics.c (process_outer_var_ref): Diagnose lambda in local
3610 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3613 * class.c (check_field_decls): Make copy assignment operators
3614 complex only in c++98 mode.
3616 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3619 * class.c (check_for_override): Warn when a virtual function is an
3620 override not marked override.
3622 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3624 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3626 (get_basefndecls): Adjust.
3628 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3630 Update copyright years.
3632 2015-01-05 Marek Polacek <polacek@redhat.com>
3635 * typeck.c (cp_build_array_ref): Pass loc down to
3636 warn_array_subscript_with_type_char.
3639 Copyright (C) 2015 Free Software Foundation, Inc.
3641 Copying and distribution of this file, with or without modification,
3642 are permitted in any medium without royalty provided the copyright
3643 notice and this notice are preserved.