1 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3 * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
5 2015-11-14 Jason Merrill <jason@redhat.com>
8 * call.c (build_new_op_1): Don't fold arguments to
11 2015-11-14 Jakub Jelinek <jakub@redhat.com>
13 * semantics.c (finish_omp_clauses): Don't mark
14 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
16 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
17 Marek Polacek <polacek@redhat.com>
18 Jason Merrill <jason@redhat.com>
20 * call.c (build_conditional_expr_1, convert_like_real)
21 (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
22 (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
23 * class.c (build_base_path, determine_primary_bases)
24 (update_vtable_entry_for_fn, check_bitfield_decl)
25 (layout_nonempty_base_or_field, layout_empty_base)
26 (propagate_binfo_offsets, include_empty_classes)
27 (layout_class_type, build_vbase_offset_vtbl_entries): Use
29 * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
30 (cxx_eval_call_expression): Handle MEM_REF.
31 (cxx_eval_pointer_plus_expression): Fold the second operand.
32 (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
33 (fold_simple_1, fold_simple): New.
34 (maybe_constant_value_1): Factor out from maybe_constant_value.
35 (cv_cache, maybe_constant_value): Cache results.
36 (maybe_constant_init): Handle null input.
37 (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
38 * cp-array-notation.c (build_array_notation_ref): Fold operands.
39 * cp-gimplify.c (cp_fold_r, cp_fold): New.
40 (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
41 (cp_genericize): Fold everything.
42 (contains_label_1, contains_label_p): New.
43 (cp_fold, cp_fully_fold): New.
44 * cp-tree.h (class cache_map): New.
45 * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
46 (cp_convert_and_check): Use cp_fully_fold.
47 (convert, convert_force): Don't fold.
48 * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
49 (compute_array_index_type): Use cp_fully_fold.
50 (build_enumerator): Use fold_convert.
51 * decl2.c (get_guard_cond, set_guard): Use fold_convert.
52 * init.c (build_zero_init_1): Fold zero-initializers.
53 (build_new_1): Fold nelts calculations.
54 (build_vec_delete_1): Fold conversions.
55 (build_vec_init): Fold maxindex.
56 * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
57 (cp_parser_question_colon_clause): Fold LHS.
58 * pt.c (convert_nontype_argument): Fold nullptr conversion.
59 * semantics.c (finish_unary_op_expr): Fold for warnings.
60 (handle_omp_array_sections_1): Fold length and low bound.
61 (handle_omp_for_class_iterator): Fold various things.
62 * tree.c (builtin_valid_in_constant_expr_p): Add
63 BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
64 (convert_bitfield_to_declared_type): Don't fold.
65 (handle_init_priority_attribute): Fold.
66 (fold_if_not_in_template): Remove.
67 * typeck.c (decay_conversion, build_class_member_access_expr)
68 (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
69 (cp_pointer_int_sum, pointer_diff): Don't fold.
70 (cp_build_binary_op): Fold for warnings and PMF ops.
71 (cp_build_unary_op): Fold negation of a constant, nothing else.
72 (expand_ptrmemfunc_cst): Fold operations.
73 * typeck2.c (split_nonconstant_init): Fold initializer.
74 (store_init_value): Likewise.
75 (check_narrowing): Try folding.
76 * config-lang.in (gtfiles): Add cp-gimplify.c.
78 2015-11-13 David Malcolm <dmalcolm@redhat.com>
80 * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
82 2015-11-12 James Norris <jnorris@codesourcery.com>
84 * parser.c (cp_parser_oacc_declare): Remove unused.
86 2015-11-12 James Norris <jnorris@codesourcery.com>
87 Joseph Myers <joseph@codesourcery.com>
89 * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
91 (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
92 and PRAGMA_OMP_CLAUSE_LINK.
93 (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
94 and PRAGMA_OMP_CLAUSE_LINK.
95 (OACC_DECLARE_CLAUSE_MASK): New definition.
96 (cp_parser_oacc_declare): New function.
97 (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
98 * pt.c (tsubst_expr): Handle OACC_DECLARE.
100 2015-11-12 Jason Merrill <jason@redhat.com>
102 * pt.c (check_explicit_specialization): Check the namespace after
103 we choose a template.
105 2015-11-11 Jason Merrill <jason@redhat.com>
107 * decl.c (duplicate_decls): When combining typedefs, remove the
108 new type from the variants list.
110 2015-11-11 Jason Merrill <jason@redhat.com>
112 * pt.c (instantiate_class_template_1): Set function_depth around
113 instantiation of lambda op().
115 2015-11-11 Marek Polacek <polacek@redhat.com>
119 * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
120 checking the size of an array.
122 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
125 * parser.h (cp_token): Update pragma_kind to 8.
127 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
129 * call.c: Remove unused header files.
131 * constexpr.c: Likewise.
132 * cp-array-notation.c: Likewise.
133 * cp-cilkplus.c: Likewise.
134 * cp-gimplify.c: Likewise.
135 * cp-lang.c: Likewise.
136 * cp-objcp-common.c: Likewise.
137 * cp-ubsan.c: Likewise.
139 * cxx-pretty-print.c: Likewise.
144 * except.c: Likewise.
146 * friend.c: Likewise.
147 * g++spec.c: Likewise.
149 * lambda.c: Likewise.
151 * mangle.c: Likewise.
152 * method.c: Likewise.
153 * name-lookup.c: Likewise.
154 * optimize.c: Likewise.
155 * parser.c: Likewise.
160 * search.c: Likewise.
161 * semantics.c: Likewise.
163 * typeck.c: Likewise.
164 * typeck2.c: Likewise.
165 * vtable-class-hierarchy.c: Likewise.
167 2015-11-09 Cesar Philippidis <cesar@codesourcery.com>
169 * parser.c (cp_finalize_oacc_routine): New boolean first argument.
170 (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
171 (cp_parser_simple_declaration): Maintain a boolean first to keep track
172 of each new declarator. Propagate it to cp_parser_init_declarator.
173 (cp_parser_init_declarator): New boolean first argument. Propagate it
174 to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
175 (cp_parser_member_declaration): Likewise.
176 (cp_parser_single_declaration): Update call to
177 cp_parser_init_declarator.
178 (cp_parser_save_member_function_body): New boolean first_decl argument.
179 Propagate it to cp_finalize_oacc_routine.
180 (cp_parser_finish_oacc_routine): New boolean first argument. Use it to
181 determine if multiple declarators follow a routine construct.
182 (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
184 2015-10-19 Martin Sebor <msebor@redhat.com>
188 * call.c (build_operator_new_call): Do not assume size_check
189 is non-null, analogously to the top half of the function.
190 * init.c (build_new_1): Detect and diagnose array sizes in
191 excess of the maximum of roughly SIZE_MAX / 2.
192 Insert a runtime check only for arrays with a non-constant size.
193 (build_new): Detect and diagnose negative array sizes.
195 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
196 Cesar Philippidis <cesar@codesourcery.com>
197 James Norris <jnorris@codesourcery.com>
198 Julian Brown <julian@codesourcery.com>
199 Nathan Sidwell <nathan@codesourcery.com>
201 * parser.h (struct cp_parser): Add oacc_routine field.
202 * parser.c (cp_ensure_no_oacc_routine): New.
203 (cp_parser_new): Initialize oacc_routine field.
204 (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
205 (cp_parser_namespace_definition,
206 cp_parser_class_specifier_1): Likewise.
207 (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
208 (cp_parser_function_definition,
209 cp_parser_save_member_function_body): Likewise.
210 (OACC_ROUTINE_CLAUSE_MASK): New.
211 (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
212 cp_finalize_oacc_routine): New.
213 (cp_parser_pragma): Adjust omp_declare_simd checking. Call
214 cp_ensure_no_oacc_routine.
215 (cp_parser_pragma): Add OpenACC routine handling.
217 2015-11-08 Martin Sebor <msebor@redhat.com>
220 * cp/init.c (warn_placement_new_too_small): Convert integer
221 operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
224 2015-11-06 David Malcolm <dmalcolm@redhat.com>
226 * error.c (cp_printer): Update for new "caret_p" param for
227 textinfo::set_location.
228 (pedwarn_cxx98): Update for change in signature of
231 2015-11-06 Jason Merrill <jason@redhat.com>
233 Support non-type constrained-type-specifiers.
234 * parser.c (check_type_concept): Remove.
235 (cp_parser_maybe_constrained_type_specifier): Don't call it.
236 (synthesize_implicit_template_parm): Handle non-type and template
237 template parameters. Also compare extra args. Return the decl.
238 (cp_parser_template_argument): Handle constrained-type-specifiers for
239 non-type template parameters.
240 (finish_constrained_template_template_parm): Split out from
241 cp_parser_constrained_template_template_parm.
242 (cp_parser_nonclass_name): Move some logic into
243 cp_parser_maybe_concept_name.
244 (cp_parser_init_declarator): Fix error recovery.
245 (get_concept_from_constraint): Remove.
246 (cp_parser_simple_type_specifier): Adjust for
247 synthesize_implicit_template_parm returning the decl.
248 * constraint.cc (placeholder_extract_concept_and_args)
249 (equivalent_placeholder_constraints): Also handle TYPE_DECL
252 * pt.c (push_inline_template_parms_recursive): Don't recreate the
255 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
257 * init.c (warn_placement_new_too_small): Use %wu format
258 rather than %lu when printing bytes_avail.
260 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
261 Thomas Schwinge <thomas@codesourcery.com>
262 James Norris <jnorris@codesourcery.com>
264 * parser.c (cp_parser_omp_clause_name): Add support for
265 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
266 (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
268 (cp_parser_oacc_clause_tile): New function.
269 (cp_parser_omp_clause_default): Add is_oacc argument. Handle
270 default(none) in OpenACC.
271 (cp_parser_oacc_all_clauses): Add support for
272 (cp_parser_omp_all_clauses): Update call to
273 cp_parser_omp_clause_default.
274 PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
275 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
277 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
278 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
280 (cp_parser_oacc_update): Update the error message for missing clauses.
281 * semantics.c (finish_omp_clauses): Add support for
282 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
284 2015-11-05 Martin Sebor <msebor@redhat.com>
287 * cp/init.c (warn_placement_new_too_small): Avoid assuming
288 the size of the first operand of placement new or its type
291 2015-11-05 Martin Sebor <msebor@redhat.com>
294 * cp/init.c (warn_placement_new_too_small): New function.
295 (build_new_1): Call it.
297 2015-11-05 Paolo Carlini <paolo.carlini@oracle.com>
300 * parser.c (cp_parser_lambda_body): Check lambda_return_type
302 * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
303 member function used invalidly.
305 2015-11-05 Jakub Jelinek <jakub@redhat.com>
306 Ilya Verbin <ilya.verbin@intel.com>
308 * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
309 (omp_privatize_field): Add SHARED argument.
310 * parser.c: Include context.h.
311 (cp_parser_omp_clause_schedule): Parse schedule
312 modifiers, diagnose monotonic together with nonmonotonic.
313 (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse
314 parameter name as linear step as id-expression rather than expression.
315 (cp_parser_omp_all_clauses): Adjust caller.
316 (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
317 initialize it. Adjust omp_privatize_field caller.
318 (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
320 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
321 (cp_parser_omp_target_data,
322 cp_parser_omp_target_enter_data,
323 cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
324 and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
325 (cp_parser_omp_target): Likewise. Evaluate num_teams and
326 thread_limit expressions on combined target teams before the target.
327 (cp_parser_omp_declare_target): If decl has "omp declare target" or
328 "omp declare target link" attribute, and cgraph or varpool node already
329 exists, then set corresponding flags. Call finish_omp_clauses
330 in the parenthesized extended-list syntax case. Call
331 cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
332 (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
333 instead of cp_parser_skip_to_pragma_eol.
334 * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
335 inside declare target.
336 * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
337 use tsubst_omp_clause_decl instead of tsubst_expr on
338 OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared
340 (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
341 (tsubst_find_omp_teams): New function.
342 (tsubst_expr): Evaluate num_teams and thread_limit expressions on
343 combined target teams before the target. Use OMP_FOR_ORIG_DECLS for
344 all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for
346 * semantics.c (omp_privatize_field): Add SHARED argument, if true,
347 always create artificial var and never put it into the hash table
349 (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
350 Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
351 (handle_omp_array_sections): For structure element
352 based array sections use GOMP_MAP_ALWAYS_POINTER instead of
353 GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF,
354 either into the constant offset, or for variable low-bound using
356 (finish_omp_clauses): Adjust omp_privatize_field caller. Drop
357 generic_field_head, structure elements are now always mapped even
358 as array section bases, diagnose same var in data sharing and
359 mapping clauses. For references map what they refer to using
360 GOMP_MAP_ALWAYS_POINTER for structure elements and
361 GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step
362 on declare simd is neither a constant nor a uniform parameter.
363 Allow non-static data members on shared clauses. Look through
364 POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic
365 modifier on kinds other than dynamic or guided or nonmonotonic
366 modifier together with ordered clause. Diagnose the same var or
367 function appearing multiple times on the same directive. Fix up
368 wording for the to clause if t is neither a FUNCTION_DECL nor a
369 VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
370 (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call
371 c_omp_check_loop_iv_exprs on cond.
372 (finish_omp_for): Add ORIG_INITS argument. Call
373 c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust
374 handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv.
376 (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
378 2015-11-04 Cesar Philippidis <cesar@codesourcery.com>
380 * (cp_parser_oacc_single_int_clause): New function.
381 (cp_parser_oacc_clause_vector_length): Delete.
382 (cp_parser_omp_clause_num_gangs): Delete.
383 (cp_parser_omp_clause_num_workers): Delete.
384 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
385 for num_gangs, num_workers and vector_length.
387 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
389 * call.c (validate_conversion_obstack): Define unconditionally.
390 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
392 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
393 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
394 * mangle.c (add_substitution): Likewise.
395 * method.c (maybe_explain_implicit_delete): Likewise.
396 * parser.c (cp_parser_template_argument_list): Remove conditional
398 * pt.c (check_unstripped_args): Rename to...
399 (verify_unstripped_args): ... this and remove conditional compilation.
400 (retrieve_specialization): Guard call of verify_unstripped_args with
402 (template_parm_to_arg): Remove conditional compilation.
403 (template_parms_to_args, coerce_template_parameter_pack,
404 coerce_template_parms): Likewise.
405 (tsubst_copy): Use flag_checking.
406 (type_unification_real): Remove conditional compilation.
407 (build_non_dependent_expr): Use flag_checking.
408 * tree.c (build_target_expr): Remove conditional compilation, use
410 * typeck.c (comptypes): Likewise.
411 * typeck2.c (digest_init_r): Likewise.
413 2015-11-03 Jason Merrill <jason@redhat.com>
415 * pt.c (struct find_parameter_pack_data): Add
416 type_pack_expansion_p field.
417 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
418 (uses_parameter_packs, make_pack_expansion)
419 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
421 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
422 Chung-Lin Tang <cltang@codesourcery.com>
424 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
427 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
429 Remove the implementation of N3994, terse range-for loops.
430 * parser.c (cp_parser_for_init_statement): Remove the parsing
431 of a terse range-for.
433 2015-10-31 Jason Merrill <jason@redhat.com>
435 Implement multiple 'auto' feature from Concepts TS.
436 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
437 (cp_parser_template_type_arg): Likewise.
438 (get_concept_from_constraint): Split out most logic to...
439 * constraint.cc (placeholder_extract_concept_and_args): ...here.
440 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
441 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
442 * cxx-pretty-print.h: Declare it.
443 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
444 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
445 (type_uses_auto): Use is_auto_r.
446 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
447 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
450 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
451 Return a meaningful value rather than error_mark_node.
452 (for_each_template_parm): Return a tree.
453 (uses_template_parms_level): Return bool.
456 * pt.c (unify): Don't diagnose no common base if we already have
458 (do_auto_deduction): Explain deduction failure.
460 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
463 * parser.c (synthesize_implicit_template_parm)
464 (finish_fully_implicit_template): Make static.
466 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
468 * call.c: Reorder #include's and remove duplicates.
470 * constexpr.c: Likewise.
471 * cp-array-notation.c: Likewise.
472 * cp-cilkplus.c: Likewise.
473 * cp-gimplify.c: Likewise.
474 * cp-lang.c: Likewise.
475 * cp-objcp-common.c: Likewise.
476 * cp-ubsan.c: Likewise.
478 * cxx-pretty-print.c: Likewise.
483 * except.c: Likewise.
485 * friend.c: Likewise.
487 * lambda.c: Likewise.
489 * mangle.c: Likewise.
490 * method.c: Likewise.
491 * name-lookup.c: Likewise.
492 * optimize.c: Likewise.
493 * parser.c: Likewise.
498 * search.c: Likewise.
499 * semantics.c: Likewise.
501 * typeck.c: Likewise.
502 * typeck2.c: Likewise.
503 * vtable-class-hierarchy.c: Likewise.
505 2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
508 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
509 functions consistently reset TREE_TYPE (decl) too.
511 2015-10-28 Jason Merrill <jason@redhat.com>
514 * class.c (type_has_user_provided_or_explicit_constructor): New.
515 (check_bases_and_members): Use it.
516 * cp-tree.h: Declare it.
518 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
519 Thomas Schwinge <thomas@codesourcery.com>
520 James Norris <jnorris@codesourcery.com>
521 Joseph Myers <joseph@codesourcery.com>
522 Julian Brown <julian@codesourcery.com>
523 Nathan Sidwell <nathan@codesourcery.com>
524 Bernd Schmidt <bschmidt@redhat.com>
526 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
528 (cp_parser_oacc_simple_clause): New.
529 (cp_parser_oacc_shape_clause): New.
530 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
531 (OACC_LOOP_CLAUSE_MASK): Likewise.
532 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
533 worker. Unify the handling of teams, tasks and vector_length with
534 the other loop shape clauses.
536 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
537 James Norris <jnorris@codesourcery.com>
538 Cesar Philippidis <cesar@codesourcery.com>
542 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
544 (finish_omp_construct): Declare function.
545 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
546 formal parameters, and handle these. Adjust all users.
547 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
549 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
551 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
552 (finish_omp_construct): ... this new function.
554 2015-10-25 Jason Merrill <jason@redhat.com>
557 * pt.c (process_partial_specialization): Handle error_mark_node
558 from most_specialized_partial_spec.
560 2015-10-23 Jason Merrill <jason@redhat.com>
566 * call.c (convert_like_real): Value-initialization can't use
567 explicit constructors in C++11 and up.
570 * constexpr.c (cxx_eval_store_expression): Always use *valp if
573 2015-10-22 Jason Merrill <jason@redhat.com>
575 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
576 (add_template_candidate_real): Handle it.
577 * pt.c (fn_type_unification): Handle it.
579 * call.c (add_conv_candidate): Remove first_arg parm.
580 (add_template_conv_candidate): Likewise.
581 (add_template_candidate_real): Don't pass it.
582 (build_op_call_1): Likewise.
584 2015-10-22 Richard Biener <rguenther@suse.de>
586 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
587 before folding a MINUS_EXPR.
588 (finish_omp_clauses): Likewise.
590 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
593 * parser.c (cp_parser_enum_specifier): Upon error_at set
594 nested_name_specifier to error_mark_node; improve error message.
596 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
599 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
600 which doesn't name a class or namespace.
602 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
604 * call.c (build_conditional_expr_1): Use boolean vector
605 type for vector comparison.
606 * typeck.c (build_vec_cmp): New.
607 (cp_build_binary_op): Use build_vec_cmp for comparison.
609 2015-10-20 Jason Merrill <jason@redhat.com>
612 * init.c (innermost_aggr_scope): New.
613 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
614 (sort_mem_initializers): Handle initializers for entire anonymous
617 2015-10-20 Marek Polacek <polacek@redhat.com>
619 * parser.c (is_cilkplus_vector_p): Don't define here.
621 2015-10-19 Jason Merrill <jason@redhat.com>
624 * semantics.c (force_paren_expr): Don't mess with hard register vars.
626 Implement N4268, Do constant evaluation of all non-type template args.
627 * parser.c (cp_parser_template_argument): For C++1z just parse a
629 * pt.c (convert_nontype_argument): For C++1z always call
630 maybe_constant_value.
632 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
634 (cxx_eval_component_reference): Like here.
635 * decl2.c (lower_var_init): And here.
636 (c_parse_final_cleanups): Call it.
637 * typeck2.c (digest_init_r): Not here.
638 * decl.c (complete_vars): Or here.
639 (cp_finish_decl): Add local statics to symbol table.
641 2015-10-17 Jason Merrill <jason@redhat.com>
644 * decl.c (implicit_default_ctor_p): New.
645 (start_preparsed_function): Don't clobber on entry to one.
647 2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
650 * constexpr.c (potential_constant_expression_1): Handle
651 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
652 BINARY_RIGHT_FOLD_EXPR.
654 2015-10-13 Jakub Jelinek <jakub@redhat.com>
655 Aldy Hernandez <aldyh@redhat.com>
657 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
658 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
659 (cp_genericize_r): Likewise.
660 (cxx_omp_finish_clause): Don't diagnose references.
661 (cxx_omp_disregard_value_expr): New function.
662 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
663 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
664 (DECL_OMP_PRIVATIZED_MEMBER): Define.
665 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
666 pop_omp_privatization_clauses, save_omp_privatization_clauses,
667 restore_omp_privatization_clauses, omp_privatize_field,
668 cxx_omp_disregard_value_expr): New prototypes.
669 (finish_omp_clauses): Add two new arguments.
670 (finish_omp_for): Add ORIG_DECLV argument.
671 * parser.c (cp_parser_lambda_body): Call
672 save_omp_privatization_clauses and restore_omp_privatization_clauses.
673 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
674 (cp_parser_omp_var_list_no_open): Handle structure elements for
675 map, to and from clauses. Handle array sections in reduction
676 clause. Parse this keyword. Formatting fixes.
677 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
679 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
680 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
681 cp_parser_omp_clause_defaultmap): New functions.
682 (cp_parser_omp_clause_ordered): Parse optional parameter.
683 (cp_parser_omp_clause_reduction): Handle array reductions.
684 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
685 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
687 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
688 (cp_parser_omp_clause_depend_sink): New function.
689 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
690 (cp_parser_omp_clause_map): Parse release/delete map kinds and
691 optional always modifier.
692 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
693 and finish_omp_clauses callers.
694 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
695 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
696 (OMP_CRITICAL_CLAUSE_MASK): Define.
697 (cp_parser_omp_critical): Parse critical clauses.
698 (cp_parser_omp_for_incr): Use cp_tree_equal if
699 processing_template_decl.
700 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
701 non-static data member iterators.
702 (cp_parser_omp_for_loop): Handle doacross loops, adjust
703 finish_omp_for and finish_omp_clauses callers.
704 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
705 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
706 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
707 (OMP_FOR_CLAUSE_MASK): Add linear clause.
708 (cp_parser_omp_for): Disallow ordered clause when combined with
709 distribute. Disallow linear clause when combined with distribute
710 and not combined with simd.
711 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
712 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
713 of tree, parse clauses and if depend clause is found, don't parse
715 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
716 Allow target parallel without for after it.
717 (OMP_TASK_CLAUSE_MASK): Add priority clause.
718 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
719 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
721 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
722 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
723 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
724 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
726 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
727 defaultmap and is_device_ptr clauses.
728 (cp_parser_omp_target): Parse target parallel and target simd. Set
729 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
730 and target exit data. Diagnose invalid map kinds.
731 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
732 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
733 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
735 (OMP_TASKLOOP_CLAUSE_MASK): Define.
736 (cp_parser_omp_taskloop): New function.
737 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
738 handle PRAGMA_OMP_TASKLOOP.
739 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
740 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
741 and pop_omp_privatization_clauses around parsing calls.
742 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
743 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
744 and finish_omp_clauses callers.
745 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
746 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
747 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
749 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
750 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
751 If ALLOW_FIELDS, handle non-static data members in the clauses.
752 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
753 (omp_parallel_combined_clauses): New variable.
754 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
755 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
756 Improve handling of clauses on combined constructs.
757 (tsubst_expr): Call push_omp_privatization_clauses and
758 pop_omp_privatization_clauses around instantiation of certain
759 OpenMP constructs, improve handling of clauses on combined
760 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
761 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
762 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
763 (instantiate_decl): Call save_omp_privatization_clauses and
764 restore_omp_privatization_clauses around instantiation.
765 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
766 * semantics.c (omp_private_member_map, omp_private_member_vec,
767 omp_private_member_ignore_next): New variables.
768 (finish_non_static_data_member): Return dummy decl for privatized
769 non-static data members.
770 (omp_clause_decl_field, omp_clause_printable_decl,
771 omp_note_field_privatization, omp_privatize_field): New functions.
772 (handle_omp_array_sections_1): Fix comment typo.
773 Add IS_OMP argument, handle structure element bases, diagnose
774 bitfields, pass IS_OMP recursively, diagnose known zero length
775 array sections in depend clauses, handle array sections in reduction
776 clause, diagnose negative length even for pointers.
777 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
778 types, pass IS_OMP down to handle_omp_array_sections_1, handle
779 array sections in reduction clause, set
780 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
781 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
782 (finish_omp_reduction_clause): Handle array sections and arrays.
783 Use omp_clause_printable_decl.
784 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
786 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
787 Handle new OpenMP 4.5 clauses and new restrictions for the old
788 ones, handle non-static data members, reject this keyword when not
790 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
791 save_omp_privatization_clauses, restore_omp_privatization_clauses):
793 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
794 Add collapse and ordered arguments. Fix handling of lastprivate
795 iterators in doacross loops.
796 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
797 adjust c_finish_omp_for, handle_omp_for_class_iterator and
798 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
799 loops with non-static data member iterators.
801 2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
804 * lambda.c (lambda_return_type): Return error_mark_node
805 instead of void_type_node for the error cases.
807 2015-10-08 Jason Merrill <jason@redhat.com>
809 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
810 * init.c (get_nsdmi): Use it.
811 * typeck2.c (massage_init_elt): Use it.
813 2015-10-07 Jason Merrill <jason@redhat.com>
816 * call.c (is_base_field_ref): New.
817 (unsafe_copy_elision_p): New.
818 (build_over_call): Use it.
820 2015-10-07 Marek Polacek <polacek@redhat.com>
823 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
825 2015-10-07 Marek Polacek <polacek@redhat.com>
827 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
828 (genericize_cp_loop): Likewise.
829 * decl.c (cxx_maybe_build_cleanup): Likewise.
830 * parser.c (cp_parser_binary_expression): Likewise.
831 (cp_parser_omp_for_loop): Likewise.
832 (cp_parser_omp_construct): Likewise.
833 * semantics.c (finish_transaction_stmt): Likewise.
834 (build_transaction_expr): Likewise.
836 2015-10-06 Jason Merrill <jason@redhat.com>
839 * parser.c (cp_parser_fold_expr_p): Remove.
841 (cp_parser_fold_expression): Take LHS as parameter.
842 (cp_parser_primary_expression): Call it after parsing an expression.
843 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
844 (cp_parser_expression): Ignore an operator followed by '...'.
846 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
847 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
849 2015-10-06 Marek Polacek <polacek@redhat.com>
852 * call.c (build_conditional_expr_1): Build the COND_EXPR with
855 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
858 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
859 reject default template arguments in out of class definitions
860 of members of non-template classes.
862 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
864 * tree.c (cp_tree_equal): Use real_equal instead of
867 2015-10-04 Jason Merrill <jason@redhat.com>
869 Implement N4514, C++ Extensions for Transactional Memory.
870 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
871 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
872 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
873 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
874 (make_call_declarator): Take tx_qualifier.
875 (cp_parser_tx_qualifier_opt): New.
876 (cp_parser_lambda_declarator_opt): Use it.
877 (cp_parser_direct_declarator): Likewise.
878 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
879 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
880 (cp_parser_std_attribute): Map optimize_for_synchronized to
881 transaction_callable.
882 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
883 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
884 * call.c (enum conversion_kind): Add ck_tsafe.
885 (standard_conversion): Handle transaction-safety conversion.
886 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
887 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
889 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
890 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
891 (can_convert_tx_safety): New.
892 * typeck.c (composite_pointer_type): Handle transaction-safety.
893 * name-lookup.h (enum scope_kind): Add sk_transaction.
894 * name-lookup.c (begin_scope): Handle it.
895 * semantics.c (begin_compound_stmt): Pass it.
896 * decl.c (check_previous_goto_1): Check it.
897 (struct named_label_entry): Add in_transaction_scope.
898 (poplevel_named_label_1): Set it.
899 (check_goto): Check it.
900 (duplicate_decls): A specialization can be transaction_safe
901 independently of its template.
902 (grokdeclarator): Handle tx-qualifier.
903 * rtti.c (ptr_initializer): Handle transaction-safe.
904 * search.c (check_final_overrider): Check transaction_safe_dynamic.
905 Don't check transaction_safe.
906 * mangle.c (write_function_type): Mangle transaction_safe here.
907 (write_CV_qualifiers_for_type): Not here.
908 (write_type): Preserve transaction_safe when stripping attributes.
909 * error.c (dump_type_suffix): Print transaction_safe.
911 2015-10-02 Marek Polacek <polacek@redhat.com>
914 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
915 down to cp_parser_selection_statement.
916 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
917 warn about duplicated if-else-if conditions.
918 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
919 it down to cp_parser_statement.
921 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
924 * name-lookup.c (push_binding): Make non-static.
925 * name-lookup.h (push_binding): Declare it.
926 * parser.c (cp_parser_range_for): Use it, get the range
927 declaration away from the scope until the range expression
928 has been parsed, then restore the declaration.
930 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
932 Fix small typos in the coding rule enforcement warnings.
933 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
936 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
938 * decl.c (xref_basetypes): Check virtual and/or multiple
940 * parser.c (cp_parser_namespace_definition): Check namespaces
942 * pt.c (push_template_decl_real): Check templates warning.
944 2015-09-22 Jason Merrill <jason@redhat.com>
946 * mangle.c (abi_warn_or_compat_version_crosses): New.
947 Use it instead of abi_version_crosses.
948 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
950 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
952 Complete the implementation of N4230, Nested namespace definition.
953 * parser.c (cp_parser_namespace_definition): Support namespace
954 attributes both before and after the namespace identifier.
956 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
958 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
960 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
962 Implement nested namespace definitions.
963 * parser.c (cp_parser_namespace_definition): Grok nested namespace
966 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
968 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
969 make it more similar to the C version.
971 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
972 Jason Merrill <jason@redhat.com>
974 Implement N4295 fold-expressions.
975 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
976 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
977 * cp-objcp-common.c (cp_common_init_ts): Handle them.
978 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
979 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
980 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
981 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
982 or_comma parameter to or_ttype.
983 (cp_parser_fold_operator, cp_parser_fold_expr_p)
984 (cp_parser_fold_expression): New.
985 (cp_parser_primary_expression): Use them.
986 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
987 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
988 (tsubst_binary_left_fold, expand_right_fold)
989 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
990 (tsubst_copy): Use them.
991 (type_dependent_expression_p): Handle fold-expressions.
992 * semantics.c (finish_unary_fold_expr)
993 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
994 (finish_binary_fold_expr): New.
996 2015-09-17 Richard Biener <rguenther@suse.de>
998 * cp-tree.h (note_decl_for_pch): Remove.
999 * class.c (build_clone): Do not call note_decl_for_pch.
1000 * semantics.c (finish_member_declaration): Likewise.
1001 (note_decl_for_pch): Remove.
1002 * decl2.c (c_parse_final_cleanups): Mangle all globals before
1005 2015-09-14 Jason Merrill <jason@redhat.com>
1008 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
1009 mangling with lower -fabi-version.
1011 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
1014 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
1015 per the spirit of DR 1467).
1017 2015-09-11 Mark Wielaard <mjw@redhat.com>
1020 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
1021 VAR_P TREE_READONLY override.
1023 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
1026 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
1027 and set template_parameter_pack_p also when the type is null.
1029 2015-09-09 Mark Wielaard <mjw@redhat.com>
1031 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
1034 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1037 * semantics.c (handle_omp_array_sections_1): Only run
1038 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
1039 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
1040 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
1041 is not a VAR_DECL/PARM_DECL.
1044 * semantics.c (handle_omp_for_class_iterator): Don't wrap
1045 error_mark_node into a NOP_EXPR to void_type_node.
1047 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1050 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
1052 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1055 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
1056 before INTEGRAL_TYPE_P test.
1058 2015-09-08 Jason Merrill <jason@redhat.com>
1061 * pt.c (tsubst_copy_and_build): Handle variables like functions.
1063 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
1066 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
1067 if the first argument isn't a template.
1069 2015-09-03 Martin Sebor <msebor@redhat.com>
1072 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
1074 * expr.c (mark_rvalue_use): Use new argument.
1075 * call.c (build_addr_func): Call decay_conversion with new
1077 * pt.c (convert_template_argument): Call reject_gcc_builtin.
1078 * typeck.c (decay_conversion): Use new argument.
1079 (c_decl_implicit): Define.
1081 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
1084 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
1086 (cp_gimplify_expr): Added a call to the function
1087 cilk_cp_gimplify_call_params_in_spawned_fn.
1089 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
1092 * decl.c (smallest_type_quals_location): New.
1093 (check_special_function_return_type): Use the latter; add int and
1094 const location_t* parameters.
1095 (grokdeclarator): Adjust check_special_function_return_type call.
1097 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
1100 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
1101 case. Move label to COND_EXPR case. Remove checking of
1104 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1107 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
1108 only on class types.
1110 2015-08-21 Jason Merrill <jason@redhat.com>
1113 * constraint.cc (satisfy_implicit_conversion_constraint): Also
1114 check for NULL_TREE.
1116 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1118 * decl.c (grokvardecl): Simplify the latter.
1120 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1122 * decl.c (grokvardecl): Complete check added for c++/67065.
1124 2015-08-20 Jason Merrill <jason@redhat.com>
1126 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
1128 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
1131 * decl.c (grokvardecl): Reject 'main' as global variable.
1133 2015-08-19 Jason Merrill <jason@redhat.com>
1136 * search.c (protected_accessible_p): Remove redundant access_in_type.
1137 Add otype parm instead of walking binfo.
1138 (friend_accessible_p): Check SCOPE itself. Handle class
1139 templates. Pass through otype.
1140 (dfs_accessible_post): Handle all accessibility cases.
1141 (dfs_accessible_pre): New.
1142 (accessible_p): Use it. Don't check protected access here. Pass
1143 decl and otype to dfs_walk.
1144 (member_declared_in_type, dfs_access_in_type_pre): New.
1145 (access_in_type): Use dfs_access_in_type_pre.
1146 * friend.c (add_friend): Fix multiple friends with the same name.
1148 * lambda.c (current_nonlambda_scope): New.
1150 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1152 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
1153 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
1154 semantics.c, typeck2.c: Remove useless typedefs.
1156 2015-08-18 Jason Merrill <jason@redhat.com>
1159 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
1162 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
1165 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
1167 2015-08-17 Jason Merrill <jason@redhat.com>
1170 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
1173 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
1174 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
1176 * constexpr.c (cxx_eval_store_expression): Don't set
1177 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
1179 (cxx_eval_array_reference): Check it.
1181 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
1183 2015-08-14 Jason Merrill <jason@redhat.com>
1186 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
1188 2015-08-12 Jason Merrill <jason@redhat.com>
1191 * constexpr.c (cxx_eval_array_reference): Fix typo.
1194 * constexpr.c (cxx_eval_array_reference): Handle sparse
1198 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
1199 * error.c (dump_template_bindings): Don't tsubst in that case.
1202 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
1203 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
1205 2015-08-08 Jason Merrill <jason@redhat.com>
1208 * pt.c (process_partial_specialization): Call
1209 associate_classtype_constraints.
1212 * constraint.cc (finish_template_introduction):
1213 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1216 * pt.c (equal): Make sure tmpl is actually a template.
1219 * call.c (joust): Only call more_constrained on decls.
1221 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
1222 Braden Obrzut <admin@maniacsvault.net>
1223 Jason Merrill <jason@redhat.com>
1224 Ville Voutilainen <ville.voutilainen@gmail.com>
1226 Add C++ Concepts TS support.
1227 * constraint.cc, logic.cc: New files.
1228 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
1229 (c++.tags): Also process .cc files.
1230 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
1231 (print_z_candidate): Handle it.
1232 (constraint_failure): New.
1233 (add_function_candidate): Check constraints.
1234 (build_new_function_call): Handle evaluating concepts.
1235 (joust): Check more_constrained.
1236 * class.c (add_method): Check equivalently_constrained.
1237 (build_clone): Copy constraints.
1238 (currently_open_class): Return tree.
1239 (resolve_address_of_overloaded_function): Check constraints.
1240 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
1241 (potential_constant_expression_1): Likewise.
1242 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
1243 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
1244 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
1245 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
1246 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
1247 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
1248 * cp-tree.h (struct tree_constraint_info, check_nonnull)
1249 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
1250 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
1251 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
1252 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
1253 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
1254 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
1255 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
1256 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
1257 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
1258 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
1259 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
1260 (struct local_specialization_stack, enum auto_deduction_context)
1261 (variable_concept_p, concept_template_p)
1262 (struct deferring_access_check_sentinel): New.
1263 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
1264 (union lang_tree_node): Add constraint_info field.
1265 (struct lang_decl_base): Add concept_p flag.
1266 (enum cp_decl_spec): Add ds_concept.
1267 (struct cp_declarator): Add requires_clause.
1268 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1269 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
1270 TRAIT_EXPR, *_CONSTR.
1271 (pp_cxx_parameter_declaration_clause): Accept a chain of
1273 (cxx_pretty_printer::declarator): Print requires-clause.
1274 (pp_cxx_template_declaration): Likewise.
1275 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
1276 (pp_cxx_requires_clause, pp_cxx_requirement)
1277 (pp_cxx_requirement_list, pp_cxx_requirement_body)
1278 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
1279 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
1280 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
1281 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
1282 (pp_cxx_implicit_conversion_constraint)
1283 (pp_cxx_argument_deduction_constraint)
1284 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
1285 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
1286 * cxx-pretty-print.h: Declare them.
1287 * decl.c (decls_match): Compare constraints.
1288 (duplicate_decls): Likewise. Remove constraints before freeing.
1289 (cxx_init_decl_processing): Call init_constraint_processing.
1290 (cp_finish_decl): Diagnose concept without initializer.
1291 (grokfndecl, grokvardecl): Handle concepts and constraints.
1292 (grokdeclarator): Handle concept, requires-clause.
1293 (grokparms): No longer static.
1294 (xref_tag_1): Check constraints.
1295 (finish_function): Call check_function_concept.
1296 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
1297 (check_concept_refinement, is_concept_var, check_concept_fn): New.
1298 * decl2.c (check_classfn): Compare constraints.
1299 (mark_used): Don't instantiate concepts.
1300 * error.c (dump_template_decl): Print constraints.
1301 (dump_function_decl): Likewise.
1302 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
1303 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
1304 * method.c (implicitly_declare_fn): Copy constraints from
1306 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
1307 prevent_constrained_type_specifiers fields.
1308 * parser.c (make_call_declarator): Add requires_clause parm.
1309 (cp_parser_new): Clear prevent_constrained_type_specifiers.
1310 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
1311 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
1312 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
1313 (cp_parser_declaration): Handle concept introduction.
1314 (cp_parser_member_declaration): Likewise.
1315 (cp_parser_template_parameter): Handle constrained parameter.
1316 (cp_parser_type_parameter): Handle constraints.
1317 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
1318 (cp_parser_template_id): Handle partial concept id.
1319 (cp_parser_type_name): Add overload that takes typename_keyword_p.
1320 Handle constrained parameter.
1321 (cp_parser_nonclass_name): Handle concept names.
1322 (cp_parser_alias_declaration): Handle constraints.
1323 (cp_parser_late_return_type_opt): Also handle requires-clause.
1324 (cp_parser_type_id_1): Handle deduction constraint.
1325 (cp_parser_parameter_declaration): Handle constrained parameters.
1326 (cp_parser_class_specifier_1): Handle constraints.
1327 (cp_parser_template_declaration_after_parameters): Split out from
1328 cp_parser_template_declaration_after_export.
1329 (cp_parser_single_declaration): Handle constraints.
1330 (synthesize_implicit_template_parm): Handle constraints.
1331 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1332 (cp_parser_introduction_list, get_id_declarator)
1333 (get_unqualified_id, is_constrained_parameter)
1334 (cp_parser_check_constrained_type_parm)
1335 (cp_parser_constrained_type_template_parm)
1336 (cp_parser_constrained_template_template_parm)
1337 (constrained_non_type_template_parm, finish_constrained_parameter)
1338 (declares_constrained_type_template_parameter)
1339 (declares_constrained_template_template_parameter)
1340 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
1341 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1342 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
1343 (cp_parser_requires_expression)
1344 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
1345 (cp_parser_requirement_list, cp_parser_requirement)
1346 (cp_parser_simple_requirement, cp_parser_type_requirement)
1347 (cp_parser_compound_requirement, cp_parser_nested_requirement)
1348 (cp_parser_template_introduction)
1349 (cp_parser_explicit_template_declaration)
1350 (get_concept_from_constraint): New.
1351 * pt.c (local_specialization_stack): Implement.
1352 (maybe_new_partial_specialization): New.
1353 (maybe_process_partial_specialization): Use it.
1354 (retrieve_local_specialization, register_local_specialization)
1355 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
1356 (tsubst_expr): No longer static.
1357 (spec_hasher::equal): Compare constraints.
1358 (determine_specialization): Handle constraints.
1359 (check_explicit_specialization): Handle concepts.
1360 (process_template_parm): Handle constraints.
1361 (end_template_parm_list): Add overload taking no arguments.
1362 (process_partial_specialization): Handle concepts and constraints.
1363 Register partial specializations of variable templates.
1364 (redeclare_class_template): Handle constraints.
1365 (convert_template_argument): Handle WILDCARD_DECL. Check
1366 is_compatible_template_arg.
1367 (coerce_template_parameter_pack): Handle wildcard packs.
1368 (coerce_template_parms): DR 1430 also applies to concepts. Add
1369 overloads taking fewer parameters.
1370 (lookup_template_class_1): Handle constraints.
1371 (lookup_template_variable): Concepts are always bool.
1372 (finish_template_variable): Handle concepts and constraints.
1373 (tsubst_friend_class): Handle constraints.
1374 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
1375 (tsubst_pack_expansion): Handle local parameters.
1376 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1377 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1378 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1379 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1380 (more_specialized_inst): Split out from most_specialized_instantiation.
1381 (most_specialized_partial_spec): Check constraints.
1382 (instantiate_decl): Never instantiate a concept.
1383 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1385 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1386 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1387 (do_auto_deduction): Add overload taking tsubst flags and context enum.
1389 (get_template_for_ordering, most_constrained_function)
1390 (is_compatible_template_arg, convert_wildcard_argument)
1391 (struct constr_entry, struct constr_hasher, decl_constraints)
1392 (valid_constraints_p, get_constraints, set_constraints)
1393 (remove_constraints, init_constraint_processing): New.
1394 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1395 * search.c (lookup_member): Do lookup in the open partial
1397 * semantics.c (finish_template_template_parm): Handle constraints.
1398 (fixup_template_type): New.
1399 (finish_template_type): Call it.
1400 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1401 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1402 (cp_walk_subtrees): Handle REQUIRES_EXPR.
1403 * typeck.c (cp_build_function_call_vec): Check constraints.
1405 2015-08-06 Jason Merrill <jason@redhat.com>
1408 * parser.c (cp_parser_primary_expression): Don't skip to the end
1409 of the statement if we're parsing tentatively.
1414 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1416 * pt.c (tsubst_copy_and_build): Check for argument substitution
1419 2015-08-05 Jason Merrill <jason@redhat.com>
1421 * pt.c (determine_specialization): Print candidates after 'no
1424 * decl.c (cp_finish_decl): Tidy.
1425 * typeck.c (finish_class_member_access_expr): Use
1426 type_dependent_expression_p.
1427 * semantics.c (finish_id_expression): Use
1428 type_dependent_expression_p. Don't build_qualified_name for a
1429 decl in non-dependent scope.
1430 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1431 identifier is dependent. Remove variable_template_p check.
1437 * pt.c (lookup_template_variable): Use NULL_TREE for type.
1438 (instantiate_template_1): Also set DECL_TI_ARGS based on
1439 the immediate parent.
1440 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1441 (finish_template_variable): Add complain parm.
1442 * cp-tree.h: Adjust.
1446 * semantics.c (finish_id_expression): Call convert_from_reference
1447 for variable template.
1449 2015-08-04 Jason Merrill <jason@redhat.com>
1451 * pt.c (lookup_template_class_1): Clear elt.spec.
1453 * tree.c (build_target_expr): Copy the location from value.
1455 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1457 * parser.c (cp_parser_selection_statement): Move handling of
1458 semicolon body to ...
1459 (cp_parser_implicitly_scoped_statement): .. here. Call
1460 warn_for_misleading_indentation even when the body is a
1461 semicolon. Extract token_indent_infos corresponding to the
1462 guard, body and next tokens. Adjust call to
1463 warn_for_misleading_indentation accordingly. Take
1464 token_indent_info argument.
1465 (cp_parser_already_scoped_statement): Likewise.
1466 (cp_parser_selection_statement, cp_parser_iteration_statement):
1467 Extract a token_indent_info corresponding to the guard token.
1469 2015-08-01 Caroline Tice <cmtice@google.com>
1472 * mangle.c : Add vtable-verify.h to include files.
1473 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
1474 is "<anon>" get the real mangled name for the class instead, and
1475 also store the real mangled name in a vector for use later.
1477 2015-07-31 Marek Polacek <polacek@redhat.com>
1480 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1483 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1485 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1486 in warning_at instead of "%q+D" in warning.
1487 (warn_hidden): Likewise but use location_of.
1488 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1489 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1490 (check_field_decls): Likewise for permerror.
1491 (explain_non_literal_class): Likewise for inform.
1492 (check_bases_and_members, layout_class_type): Likewise for warning_at.
1493 (note_name_declared_in_class): Use location_of in permerror.
1494 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1495 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1496 inform, and warning_at.
1497 (check_for_out_of_scope_variable): Likewise for warning_at and
1500 2015-07-30 Jason Merrill <jason@redhat.com>
1504 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1506 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
1508 * call.c (build_op_delete_call, convert_like_real, build_over_call):
1509 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1511 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1512 * decl.c (duplicate_decls): Likewise for warning/warning_at.
1513 * except.c (maybe_noexcept_warning): Likewise.
1514 * friend.c (make_friend_class): Likewise for inform.
1515 * mangle.c (mangle_decl): Likewise for warning/warning_at.
1516 * method.c (process_subob_fn, walk_field_subobs,
1517 maybe_explain_implicit_delete): Likewise for inform.
1518 * parser.c (cp_parser_lambda_introducer): Likewise.
1519 * pt.c (check_specialization_namespace,
1520 maybe_process_partial_specialization): Likewise for permerror.
1521 (redeclare_class_template): Likewise for inform_n.
1522 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1523 * search.c (check_final_overrider): Likewise.
1524 * semantics.c (process_outer_var_ref): Likewise.
1526 2015-07-27 Jason Merrill <jason@redhat.com>
1528 * constexpr.c (cxx_eval_call_expression): Don't add this call to
1529 the hash table if !depth_ok.
1531 2015-07-27 Marek Polacek <polacek@redhat.com>
1535 * call.c (build_new_op_1): Call warn_tautological_cmp.
1536 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1539 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
1542 * typeck.c (check_return_expr): Also do the basic return-value
1543 validity checking if processing_template_decl and yet types are
1544 not dependent. Remove obsolete code.
1546 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
1548 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1549 in warning_at instead of "%q+D" in warning.
1550 (warn_extern_redeclared_static): Likewise for inform.
1551 (check_redeclaration_no_default_args): Likewise for permerror.
1552 (duplicate_decls): Likewise.
1553 (check_previous_goto_1): Likewise for inform.
1554 (check_goto, start_decl, check_for_uninitialized_const_var,
1555 start_preparsed_function, finish_function§): Likewise.
1556 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1557 * init.c (sort_mem_initializers): Likewise.
1558 * typeck.c (convert_for_initialization): Likewise for inform.
1559 (maybe_warn_about_returning_address_of_local): Likewise.
1560 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1561 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1563 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
1566 * cvt.c (ocp_convert): Don't call scalar_constant_value when
1567 converting to a class type.
1569 2015-07-24 Jason Merrill <jason@redhat.com>
1572 * pt.c (splice_late_return_type): Correct deduced return type for
1573 abbreviated function template.
1575 2015-07-24 Richard Biener <rguenther@suse.de>
1577 * init.c (build_vec_init): Build iterator bound in the same
1578 type as the iterator.
1580 2015-07-23 Marek Polacek <polacek@redhat.com>
1583 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1585 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
1588 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1589 redundant error messages.
1591 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1593 * decl.c (grokdeclarator): For an erroneous template parameter
1594 propagate error_mark_node as type.
1596 2015-07-20 Marek Polacek <polacek@redhat.com>
1599 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1601 2015-07-15 Jason Merrill <jason@redhat.com>
1604 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1605 template if there is no type x in scope.
1607 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
1610 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1611 template template parm in the redeclaration.
1612 (lookup_template_class_1): Peel off irrelevant template levels
1613 from current_template_parms before augmenting the argument
1616 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
1619 * parser.c (cp_parser_sizeof_pack): Also consider template template
1622 2015-07-14 Jason Merrill <jason@redhat.com>
1624 * call.c (build_new_method_call_1): Call reshape_init.
1626 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
1628 * pt.c (check_template_shadow): Emit error + inform instead of
1631 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
1634 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1635 template parm type under C++11 and later.
1637 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1639 * call.c: Fix double word typos.
1640 * cp-array-notation.c: Same.
1643 * name-lookup.c: Same.
1646 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
1649 * pt.c (begin_template_parm_list): Add a dummy parameter level
1650 to current_template_parms.
1651 (end_template_parm_list): Remove the dummy parameter level
1652 before adding the real one.
1653 (tsubst): Don't attempt to substitute for template parameters
1654 corresponding to a dummy argument level.
1655 (template_parms_to_args): Remove obsolete hack for
1656 giving template template arguments the proper level.
1657 (splite_late_return_type): Remove obsolete hack for giving
1658 template template arguments the proper level.
1659 * error.c (dump_template_decl): Don't print dummy template
1662 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1665 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1666 the second step of copy-initialization.
1668 2015-07-10 Jason Merrill <jason@redhat.com>
1670 * pt.c (find_parameter_packs_r): Handle variable templates.
1671 (variable_template_specialization_p): New.
1672 * cp-tree.h: Declare it.
1674 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1676 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1678 * decl2.c (cpp_check): Revert latest change.
1680 2015-07-09 Jason Merrill <jason@redhat.com>
1682 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1683 value_dependent_expression_p.
1685 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1686 template_parameter_pack_p.
1687 * parser.c (declarator_can_be_parameter_pack): False if
1688 parameter_pack_p is set.
1689 (make_parameter_declarator): Add template_parameter_pack_p parm.
1690 (cp_parser_template_parameter): Remove parameter pack parsing.
1691 (cp_parser_parameter_declaration): Handle all parameter packs.
1692 Tweak default argument permerror.
1694 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1696 * parser.c (cp_parser_default_type_template_argument)
1697 (cp_parser_default_template_template_argument): Factor out from
1698 cp_parser_type_parameter.
1700 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1702 * typeck.c (warn_args_num): Rename to error_args_num.
1703 (convert_arguments): Adjust calls.
1705 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1707 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1709 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1711 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1713 2015-07-08 Jakub Jelinek <jakub@redhat.com>
1715 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1716 * pt.c (apply_late_template_attributes): Likewise.
1718 2015-07-08 Marek Polacek <polacek@redhat.com>
1721 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1722 accessing TYPE_LANG_SPECIFIC node.
1724 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1726 * call.c: Adjust includes.
1727 * class.c: Likewise.
1728 * constexpr.c: Likewise.
1729 * cp-array-notation.c: Likewise.
1730 * cp-gimplify.c: Likewise.
1731 * cp-lang.c: Likewise.
1732 * cp-objcp-common.c: Likewise.
1733 * cp-ubsan.c: Likewise.
1736 * decl2.c: Likewise.
1738 * error.c: Likewise.
1739 * except.c: Likewise.
1741 * friend.c: Likewise.
1743 * lambda.c: Likewise.
1745 * mangle.c: Likewise.
1746 * method.c: Likewise.
1747 * name-lookup.c: Likewise.
1748 * optimize.c: Likewise.
1749 * parser.c: Likewise.
1751 * ptree.c: Likewise.
1754 * search.c: Likewise.
1755 * semantics.c: Likewise.
1757 * typeck.c: Likewise.
1758 * typeck2.c: Likewise.
1760 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1762 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1764 2015-07-06 Jason Merrill <jason@redhat.com>
1766 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1767 for a template template parameter.
1768 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1769 by reduce_template_parm_level.
1771 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
1774 2015-07-02 Jason Merrill <jason@redhat.com>
1777 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
1778 TYPE_VALUES_RAW rather than TYPE_FIELDS.
1780 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
1782 * pt.c (type_dependent_expression_p): Handle expressions
1783 that refer to variable templates.
1785 2015-07-01 Jason Merrill <jason@redhat.com>
1787 * lex.c (init_reswords): s/CXX0X/CXX11/.
1788 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1790 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
1791 Attribute mangling is now -fabi-version=10.
1794 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
1795 * class.c (layout_nonempty_base_or_field): Warn if that affects
1796 the offset of a field.
1798 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
1801 * parser.c (cp_parser_check_std_attribute): New.
1802 (cp_parser_std_attribute_list): Call it.
1804 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
1807 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
1808 return 0 if tsubst returns a dependent type.
1810 2015-06-30 Jason Merrill <jason@redhat.com>
1813 * decl2.c (is_late_template_attribute): True for tls_model.
1816 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
1817 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
1818 (SET_DECL_GNU_TLS_P): New.
1819 * call.c (make_temporary_var_for_ref_to_temp): Use
1820 CP_DECL_THREAD_LOCAL_P.
1821 (set_up_extended_ref_temp): Likewise.
1822 * decl.c (duplicate_decls, expand_static_init): Likewise.
1823 (redeclaration_error_message, grokvardecl): Likewise.
1824 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
1825 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
1826 (handle_tls_init): Likewise.
1827 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1828 * semantics.c (finish_id_expression): Likewise.
1829 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
1830 (finish_omp_threadprivate): Likewise.
1831 * tree.c (decl_storage_duration): Likewise.
1832 * cp-gimplify.c (omp_var_to_track): Likewise.
1833 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
1834 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
1837 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1839 Implement N4197 - Adding u8 character literals
1840 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
1841 and CPP_UTF8CHAR_USERDEF tokens;
1842 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
1844 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1847 * decl.c (grokfndecl): Allow constexpr declarations of friend
1848 template specializations.
1850 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1853 * decl.c (finish_function): Call do_warn_unused_parameter.
1855 2015-06-29 Marek Polacek <polacek@redhat.com>
1858 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1859 (push_switch): Set OUTSIDE_RANGE_P.
1860 (pop_switch): Update c_do_switch_warnings call.
1861 (finish_case_label): Update c_add_case_label call.
1862 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1865 2015-06-27 Marek Polacek <polacek@redhat.com>
1867 * call.c: Use VECTOR_TYPE_P.
1868 * constexpr.c: Likewise.
1871 * decl2.c: Likewise.
1873 * semantics.c: Likewise.
1875 * typeck.c: Likewise.
1876 * typeck2.c: Likewise.
1878 2015-06-27 Marek Polacek <polacek@redhat.com>
1880 * call.c (set_up_extended_ref_temp): Use VAR_P.
1881 * class.c: Use VAR_P throughout.
1882 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1883 * cp-array-notation.c (make_triplet_val_inv): Likewise.
1884 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1886 * decl2.c: Likewise.
1887 * error.c (dump_decl): Use VAR_P.
1888 * mangle.c (decl_implicit_alias_p): Likewise.
1889 * parser.c: Use VAR_P throughout.
1891 * semantics.c: Likewise.
1892 * vtable-class-hierarchy.c: Likewise.
1893 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1895 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
1897 * pt.c (check_unstripped_args): Mark parameter as unused.
1899 2015-06-26 Jason Merrill <jason@redhat.com>
1902 * class.c (finish_struct): Call fixup_attribute_variants.
1905 * typeck2.c (merge_exception_specifiers): Allow different
1906 noexcept-specifiers if we've had errors.
1909 * pt.c (check_unstripped_args): Split out from...
1910 (retrieve_specialization): ...here. Allow typedefs in the type of
1911 a non-type argument.
1914 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
1916 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
1919 * typeck2.c (digest_init_r): Only expect reshaping if the class is
1922 2015-06-26 Marek Polacek <polacek@redhat.com>
1924 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
1925 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
1927 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1929 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
1930 * class.c: Likewise.
1931 * cp-ubsan.c: Likewise.
1933 * decl2.c: Likewise.
1934 * lambda.c: Likewise.
1935 * mangle.c: Likewise.
1936 * method.c: Likewise.
1937 * optimize.c: Likewise.
1938 * parser.c: Likewise.
1939 * semantics.c: Likewise.
1941 * vtable-class-hierarchy.c: Likewise.
1943 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1945 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
1946 rather than ggc_hasher.
1947 (constexpr_call_hasher): Likewise.
1948 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
1949 * decl.c (typename_hasher): Likewise.
1950 * mangle.c (conv_type_hasher): Likewise.
1951 * pt.c (spec_hasher): Likewise.
1952 * tree.c (cplus_array_hasher, list_hasher): Likewise.
1953 * typeck2.c (abstract_type_hasher): Likewise.
1955 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1957 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1958 rather than pointer_hash.
1959 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1960 * semantics.c (nrv_data): Likewise.
1961 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1963 2015-06-24 Jason Merrill <jason@redhat.com>
1966 * pt.c (dependent_type_p_r): Check for dependent alias template
1967 specialization sooner.
1970 * class.c (type_has_nontrivial_assignment): Remove.
1971 * cp-tree.h: Remove declaration.
1972 * init.c (vec_copy_assign_is_trivial): New.
1973 (build_vec_init): Use it.
1975 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
1977 Implement N3928 - Extending static_assert
1978 * parser.c (cp_parser_static_assert): Support static_assert with
1979 no message string. Supply an empty string in this case.
1980 * semantics.c (finish_static_assert): Don't try to print a message if
1981 the message strnig is empty.
1983 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
1986 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1987 implicit template parm if 'auto' is a placeholder for trailing
1990 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
1993 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1996 * parser.c (cp_parser_template_parameter_list): Update
1997 current_template_parms right after processing a paramater.
1998 * pt.c (template_parms_to_args): Remove obsolete hack for
1999 giving template template arguments the proper level.
2000 (check_default_tmpl_args): Account for tested template
2002 (splite_late_return_type): Remove obsolete hack for giving
2003 template template arguments the proper level.
2005 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2008 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2010 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2013 * parser.c (cp_parser_template_parameter_list): Update
2014 current_template_parms right after processing a paramater.
2015 * pt.c (template_parms_to_args): Remove obsolete hack for
2016 giving template template arguments the proper level.
2017 (check_default_tmpl_args): Account for tested template
2019 (splite_late_return_type): Remove obsolete hack for giving
2020 template template arguments the proper level.
2022 2015-06-23 Jason Merrill <jason@redhat.com>
2025 * decl.c (grokfndecl): Check the linkage of ctype, not just
2027 * tree.c (no_linkage_check): Skip the 'this' pointer.
2030 * class.c (type_has_nontrivial_assignment): New.
2031 * init.c (build_vec_init): Use it.
2032 * cp-tree.h: Declare it.
2033 * method.c (trivial_fn_p): Templates aren't trivial.
2036 * decl.c (expand_static_init): Make sure the destructor is callable
2037 here even if we have an initializer.
2039 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2041 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
2042 -fdump-ada-spec is passed.
2044 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
2046 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
2048 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2050 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
2052 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2054 * decl.c (grokdeclarator): Remove pointless code.
2056 2015-06-22 Jason Merrill <jason@redhat.com>
2059 * call.c (implicit_conversion): Only reshape for classes.
2061 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
2063 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
2065 * semantics.c (finish_omp_atomic): Likewise.
2066 * typeck.c (cp_build_array_ref): Likewise.
2068 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
2071 * call.c (build_new_op_1): Check tf_warning flag in all cases.
2073 2015-06-19 Jason Merrill <jason@redhat.com>
2076 * pt.c (instantiate_class_template_1): Clear
2077 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
2080 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
2082 * typeck.c (merge_types): build_ptrmemfunc_type before applying
2083 quals and attributes.
2086 * constexpr.c (build_constexpr_constructor_member_initializers):
2087 Handle an empty STATEMENT_LIST.
2090 * pt.c (tsubst_copy_and_build): Register a capture proxy in
2091 local_specializations.
2093 2015-06-17 Jason Merrill <jason@redhat.com>
2096 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
2098 (potential_constant_expression_1): Likewise.
2100 2015-06-17 Jason Merrill <jason@redhat.com>
2103 * call.c (implicit_conversion): Call reshape_init here, early.
2104 (build_aggr_conv): Not here.
2106 2015-06-17 Jakub Jelinek <jakub@redhat.com>
2109 * pt.c (tsubst_omp_clause_decl): New function.
2110 (tsubst_omp_clauses): Use it or tsubst_copy instead of
2111 tsubst_expr on OMP_CLAUSE_DECL.
2113 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2115 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
2116 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
2117 * decl.c (grokdeclarator, xref_tag_1): Likewise.
2118 * error.c (dump_aggr_type): likewise.
2119 * pt.c (push_template_decl_real): Likewise.
2120 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
2122 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2124 * call.c: Do not include input.h, line-map.h or is-a.h.
2125 * class.c: Likewise.
2126 * constexpr.c: Likewise.
2127 * cp-array-notation.c: Likewise.
2128 * cp-gimplify.c: Likewise.
2129 * cp-lang.c: Likewise.
2130 * cp-objcp-common.c: Likewise.
2131 * cp-tree.h: Likewise.
2132 * cp-ubsan.c: Likewise.
2135 * decl2.c: Likewise.
2137 * error.c: Likewise.
2138 * except.c: Likewise.
2140 * friend.c: Likewise.
2142 * lambda.c: Likewise.
2144 * mangle.c: Likewise.
2145 * method.c: Likewise.
2146 * name-lookup.c: Likewise.
2147 * optimize.c: Likewise.
2148 * parser.c: Likewise.
2150 * ptree.c: Likewise.
2153 * search.c: Likewise.
2154 * semantics.c: Likewise.
2156 * typeck.c: Likewise.
2157 * typeck2.c: Likewise.
2158 * vtable-class-hierarchy.c: Likewise.
2160 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
2163 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
2165 2015-06-16 Jason Merrill <jason@redhat.com>
2168 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
2172 * tree.c (bot_manip): Remap SAVE_EXPR.
2175 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
2177 2015-06-15 Nathan Sidwell <nathan@acm.org>
2180 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
2181 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
2182 protect it from recursive instantiation.
2184 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
2187 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
2188 using a local type is pure virtual.
2190 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2192 * call.c: Remove comment documenting the long-deleted
2193 function build_method_call.
2195 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2198 * typeck.c (cp_build_binary_op): Warn when comparing an address
2199 of a reference against NULL.
2201 2015-06-12 Jason Merrill <jason@redhat.com>
2204 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
2205 variables as DECL_NOT_REALLY_EXTERN.
2207 2015-06-11 Jason Merrill <jason@redhat.com>
2210 * constexpr.c (potential_constant_expression_1): Handle a
2211 DECL_EXPR of TYPE_DECL.
2214 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
2217 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2219 * decl.c (cxx_init_decl_processing): Register the main
2220 translation unit through the new debug hook.
2222 2015-06-10 Jason Merrill <jason@redhat.com>
2225 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
2226 * pt.c (push_template_decl_real): Set it.
2227 (dependent_alias_template_spec_p): Use it.
2228 (dependent_type_p_r): Use dependent_alias_template_spec_p.
2229 (uses_all_template_parms_data, uses_all_template_parms_r)
2230 (complex_alias_template_p): New.
2231 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
2233 2015-06-09 Jason Merrill <jason@redhat.com>
2237 * typeck2.c (digest_init_r): Replace previous change with
2241 * semantics.c (process_outer_var_ref): Make sure the value is
2242 actually constant before returning it.
2243 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
2246 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2249 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
2250 * init.c (expand_default_init): Likewise.
2252 2015-06-09 Jason Merrill <jason@redhat.com>
2255 * tree.c (replace_placeholders_r): Handle placeholders for an
2257 * typeck2.c (store_init_value): Only replace_placeholders for
2258 objects of class type.
2260 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2262 * call.c : Adjust include files.
2263 * class.c : Likewise.
2264 * constexpr.c : Likewise.
2265 * cp-array-notation.c : Likewise.
2266 * cp-cilkplus.c : Likewise.
2267 * cp-gimplify.c : Likewise.
2268 * cp-lang.c : Likewise.
2269 * cp-objcp-common.c : Likewise.
2270 * cp-tree.h : Likewise.
2271 * cp-ubsan.c : Likewise.
2273 * decl.c : Likewise.
2274 * decl2.c : Likewise.
2275 * dump.c : Likewise.
2276 * error.c : Likewise.
2277 * except.c : Likewise.
2278 * expr.c : Likewise.
2279 * friend.c : Likewise.
2280 * init.c : Likewise.
2281 * lambda.c : Likewise.
2283 * mangle.c : Likewise.
2284 * method.c : Likewise.
2285 * name-lookup.c : Likewise.
2286 * optimize.c : Likewise.
2287 * parser.c : Likewise.
2289 * ptree.c : Likewise.
2290 * repo.c : Likewise.
2291 * rtti.c : Likewise.
2292 * search.c : Likewise.
2293 * semantics.c : Likewise.
2294 * tree.c : Likewise.
2295 * typeck.c : Likewise.
2296 * typeck2.c : Likewise.
2297 * vtable-class-hierarchy.c : Likewise.
2299 2015-06-05 Jason Merrill <jason@redhat.com>
2302 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
2303 the expansion has extra args.
2304 (use_pack_expansion_extra_args_p): Return true in that case.
2307 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
2308 dependent even if it has a type.
2310 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2312 * cp-objcp-common.c: Adjust comment for
2313 cxx_warn_unused_global_decl.
2314 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
2315 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
2316 * cp-tree.h (note_mangling_alias): Protoize.
2317 (cp_write_global_declarations): Remove.
2318 (cxx_post_compilation_parsing_cleanups): Protoize.
2319 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
2321 * decl2.c (mangling_aliases): New global.
2322 (build_java_method_aliases): New. Adapted from
2323 collect_candidates_for_java_method_aliases.
2324 (collect_candidates_for_java_method_aliases): Remove.
2325 (build_java_method_aliases): Remove.
2326 (generate_mangling_aliases): New.
2327 (note_mangling_alias): New. Moved from mangle_decl.
2328 (locus_at_end_of_parsing): New global.
2329 (c_parse_final_cleanups): Rename from
2330 cp_write_global_declarations.
2331 Use locus_at_end_of_parsing.
2332 Call generate_mangling_aliases.
2333 Rename call to collect_candidates_for_java_method_aliases into
2334 build_java_method_aliases.
2335 Remove call to finalize_compilation_unit.
2336 Move vtable handling into cxx_post_compilation_parsing_cleanups.
2337 Do not call check_global_declarations or
2338 emit_debug_global_declarations.
2339 (cxx_post_compilation_parsing_cleanups): New.
2340 * mangle.c (mangle_decl): Move code to note_mangling_alias.
2341 * name-lookup.c (do_namespace_alias): Call early_global_decl.
2343 2015-06-05 Nathan Sidwell <nathan@acm.org>
2346 * parser.c (cp_parser_cache_defarg): Continue looking for
2347 declarators when scanning a potential template argument list of an
2350 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2352 * call.c: Adjust includes for restructured coretypes.h.
2353 * class.c: Likewise.
2354 * constexpr.c: Likewise.
2355 * cp-array-notation.c: Likewise.
2356 * cp-gimplify.c: Likewise.
2357 * cp-lang.c: Likewise.
2358 * cp-objcp-common.c: Likewise.
2359 * cp-tree.h: Likewise.
2360 * cp-ubsan.c: Likewise.
2363 * decl2.c: Likewise.
2365 * error.c: Likewise.
2366 * except.c: Likewise.
2368 * friend.c: Likewise.
2370 * lambda.c: Likewise.
2372 * mangle.c: Likewise.
2373 * method.c: Likewise.
2374 * name-lookup.c: Likewise.
2375 * optimize.c: Likewise.
2376 * parser.c: Likewise.
2378 * ptree.c: Likewise.
2381 * search.c: Likewise.
2382 * semantics.c: Likewise.
2384 * typeck.c: Likewise.
2385 * typeck2.c: Likewise.
2386 * vtable-class-hierarchy.c: Likewise.
2388 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2392 * cp-tree.h (get_guard_cond): Adjust declaration
2393 * decl.c (expand_static_init): Use atomic load acquire
2394 and adjust call to get_guard_cond.
2395 * decl2.c (build_atomic_load_byte): New function.
2396 (get_guard_cond): Handle thread_safety.
2397 (one_static_initialization_or_destruction): Adjust call to
2400 2015-06-03 Jason Merrill <jason@redhat.com>
2403 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2404 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2405 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2406 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2408 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2409 Paolo Carlini <paolo.carlini@oracle.com>
2412 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2413 use it in the diagnostic.
2414 (decay_conversion): Adjust call.
2415 * semantics.c (finish_decltype_type): Likewise.
2416 * call.c (resolve_args, build_new_op_1,
2417 perform_implicit_conversion_flags): Adjust calls.
2418 * cvt.c (ocp_convert, convert_to_void): Likewise.
2419 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2421 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2423 * decl.c (check_tag_decl): Use declspecs->locations as locations in
2424 error_at and warning_at calls.
2426 2015-06-03 Marek Polacek <polacek@redhat.com>
2429 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2430 (cp_genericize_r): Don't instrument static initializers.
2431 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2433 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2435 * decl.c (start_function): Call plugin before parsing.
2436 (finish_function): Call plugin after parsing.
2438 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
2440 * cp-tree.h (init_error): Remove declaration.
2441 * error.c (scratch_pretty_printer): Rename to ...
2442 (actual_pretty_printer): ... this.
2443 (cxx_pp): Constify and update accordingly.
2444 (init_error): Remove definition.
2445 * lex.c (cxx_init): Do not call init_error.
2447 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2450 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2452 2015-06-01 Jason Merrill <jason@redhat.com>
2455 * decl2.c (mark_used): Don't always instantiate constexpr fns.
2456 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2459 * mangle.c (attr_strcmp): New.
2460 (write_CV_qualifiers_for_type): Also write out attributes that
2461 affect type identity.
2462 (write_type): Strip all attributes after writing qualifiers.
2464 2015-05-31 Jason Merrill <jason@redhat.com>
2466 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2469 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2470 with the wrong type as non-constant.
2472 2015-05-27 Jason Merrill <jason@redhat.com>
2474 * decl.c (check_redeclaration_exception_specification): Depend on
2475 -Wsystem-headers rather than -pedantic.
2477 * decl.c (warn_extern_redeclared_static): Use the location of
2478 newdecl in diagnostics, not input_location.
2479 (validate_constexpr_redeclaration): Likewise.
2480 (check_redeclaration_no_default_args): Likewise.
2481 (duplicate_decls): Likewise.
2482 (check_redeclaration_exception_specification): Likewise.
2483 Change second diagnostic to inform.
2485 2015-05-24 Nathan Sidwell <nathan@acm.org>
2488 * decl.c (build_enumerator): Don't silently convert scoped enums.
2490 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
2493 * mangle.c (mangle_decl): Mangle anonymous namespace types as
2496 2015-05-23 Nathan Sidwell <nathan@acm.org>
2499 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2501 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2503 * Make-lang.in (check_g++_parallelize): Update comment.
2505 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2508 * decl.c (grokdeclarator): Use the correct location in error
2509 messages about 'explicit'.
2511 2015-05-22 Marek Polacek <polacek@redhat.com>
2512 Edward Smith-Rowland <3dw4rd@verizon.net>
2515 * cp-tree.h (build_enumerator): Update declaration.
2516 * decl.c (build_enumerator): Add attributes parameter. Call
2517 cplus_decl_attributes.
2518 * init.c (constant_value_1): Pass tf_none to mark_used.
2519 * parser.c (cp_parser_enumerator_definition): Parse attributes and
2520 pass them down to build_enumerator.
2521 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2522 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2524 2015-05-21 Nathan Sidwell <nathan@acm.org>
2527 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2529 2015-05-21 Marek Polacek <polacek@redhat.com>
2531 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2533 2015-05-20 Jason Merrill <jason@redhat.com>
2535 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2536 before register_specialization.
2538 * decl.c (grok_op_properties): Don't complain about size_t
2539 placement delete here.
2540 * call.c (second_parm_is_size_t): Split out from...
2541 (non_placement_deallocation_fn_p): ...here.
2542 (build_op_delete_call): Warn about size_t placement delete with
2545 2015-05-19 Nathan Sidwell <nathan@acm.org>
2548 * typeck.c (finish_class_member_access_expr): Diagnose failed
2549 lookup of enum class member.
2551 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2554 * parser.c (cp_parser_omp_for_loop): Don't add
2555 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2556 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2557 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2560 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2562 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2565 2015-05-18 Jason Merrill <jason@redhat.com>
2567 * pt.c (retrieve_specialization): Make sure our arguments have
2568 gone through strip_typedefs.
2570 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2571 (determine_specialization): Call coerce_template_parms.
2574 * pt.c (type_unification_real): Check convertibility here.
2575 (unify_one_argument): Not here.
2577 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2578 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2579 [TREE_LIST]: Fix no-change case.
2581 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2583 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2586 * error.c (cp_diagnostic_starter): Use diagnostic_location
2588 (cp_print_error_function): Likewise.
2589 (cp_printer): Replace locus pointer with accessor function.
2591 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2593 * parser.c (cp_parser_selection_statement): Add location and
2594 guard_kind arguments to calls to
2595 cp_parser_implicitly_scoped_statement.
2596 (cp_parser_iteration_statement): Likewise for calls to
2597 cp_parser_already_scoped_statement.
2598 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2599 "guard_kind" params; use them to warn for misleading
2601 (cp_parser_already_scoped_statement): Likewise.
2603 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
2605 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2606 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2607 * semantics.c (finish_member_declaration): Likewise.
2608 * method.c (lazily_declare_fn): Allways add method to main variant list.
2610 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
2613 * decl2.c (note_mangling_alias): Declare arguments as unused.
2615 2015-05-08 Jason Merrill <jason@redhat.com>
2617 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2620 2015-05-08 Jason Merrill <jason@redhat.com>
2622 * decl2.c (mangling_aliases): New variable.
2623 (note_mangling_alias, generate_mangling_aliases): New.
2624 (cp_write_global_declarations): Call generate_mangling_aliases.
2625 (generate_mangling_alias): Split out from...
2626 * mangle.c (mangle_decl): ...here.
2627 * cp-tree.h: Declare note_mangling_alias.
2629 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
2631 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2632 (build_java_method_aliases): Adapt to use create_same_body_alias
2633 instead of assemble_alias. Move variable declarations to
2634 definition and tidy up.
2635 (cp_write_global_declarations): Call build_java_method_aliases
2636 instead of collecting candidates first.
2638 2015-05-07 Jason Merrill <jason@redhat.com>
2641 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2642 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2643 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2644 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2645 (apply_late_template_attributes): Handle attribute pack expansion.
2647 2015-05-07 Marek Polacek <polacek@redhat.com>
2650 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2653 2015-05-07 Jason Merrill <jason@redhat.com>
2657 * typeck2.c (digest_init_r): Fix single element list.
2659 2015-05-05 Jason Merrill <jason@redhat.com>
2661 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2662 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2663 MUST_NOT_THROW_EXPR.
2664 (cp_genericize_data): Add try_block field.
2665 (cp_genericize_tree): Initialize it.
2666 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2669 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2672 * semantics.c (finish_call_expr): Check complain.
2674 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2675 maybe-in-charge constructor.
2677 * decl.c (start_decl): Don't push the plain VAR_DECL for a
2684 * call.c (convert_like_real): Check value-initialization before
2686 * typeck2.c (process_init_constructor_record): Don't set
2687 CONSTRUCTOR_IS_DIRECT_INIT.
2688 (process_init_constructor_array): Likewise.
2689 * init.c (build_vec_init): Likewise.
2691 2015-05-05 David Malcolm <dmalcolm@redhat.com>
2693 * parser.c (cp_parser_asm_definition): Only test for
2694 error_mark_node if "outputs" was just set. Likewise for "inputs".
2696 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2697 Jakub Jelinek <jakub@redhat.com>
2700 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2701 result in an actual error.
2703 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2704 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
2707 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2710 2015-04-30 David Malcolm <dmalcolm@redhat.com>
2712 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2715 2015-04-29 Jason Merrill <jason@redhat.com>
2718 * tree.c (apply_identity_attributes): Fix handling of classes.
2720 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2722 * parser.c (cp_parser_oacc_enter_exit_data): Use
2723 OMP_STANDALONE_CLAUSES.
2725 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
2728 * init.c (perform_member_init): Handle references for -Winit-self.
2730 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2732 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2733 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2735 2015-04-28 Jason Merrill <jason@redhat.com>
2738 * constexpr.c (cxx_eval_store_expression): Don't try to actually
2739 store an empty class.
2742 * constexpr.c (cxx_eval_builtin_function_call): Fix
2743 __builtin_constant_p.
2746 * tree.c (strip_typedefs): Add remove_attributes parm.
2747 (strip_typedefs_expr): Likewise.
2748 (apply_identity_attributes): New subroutine of strip_typedefs.
2749 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2750 (convert_nontype_argument, unify): Likewise.
2751 * cp-tree.h: Adjust.
2754 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2756 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2758 * class.c (layout_class_type): Remove check if
2759 PCC_BITFIELD_TYPE_MATTERS is defined.
2761 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2763 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2765 2015-04-24 Jason Merrill <jason@redhat.com>
2768 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2770 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2771 Remove obsolete code.
2772 [NE_EXPR]: Likewise.
2774 2015-04-23 Jason Merrill <jason@redhat.com>
2777 * pt.c (check_explicit_specialization): Don't
2778 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
2780 * decl.c (grokvardecl): Revert earlier fix.
2782 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
2785 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
2786 suppresses the diagnostic.
2788 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
2790 Reject trailing return type for an operator auto().
2791 * decl.c (grokdeclarator): Reject trailing return types for
2792 all conversion operators, don't handle conversion operators
2793 in the previous checks that deal with auto.
2795 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2797 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
2799 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2801 * class.c (resolve_address_of_overloaded_function, instantiate_type):
2802 Rename tsubst_flags_t parameter flags -> complain.
2804 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2806 * call.c (build_op_delete_call, build_over_call): Check mark_used
2808 * class.c (resolve_address_of_overloaded_function): Likewise.
2809 * decl.c (cxx_maybe_build_cleanup): Likewise.
2810 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
2811 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
2812 * rtti.c (build_dynamic_cast_1): Likewise.
2813 * semantics.c (process_outer_var_ref): Likewise.
2814 * typeck.c (build_class_member_access_expr,
2815 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
2817 2015-04-15 Jason Merrill <jason@redhat.com>
2819 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
2820 (build_constexpr_constructor_member_initializers): Loop to find
2822 * decl.c (start_preparsed_function): Clobber the object at the
2823 beginning of a constructor.
2825 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
2826 * method.c (implicitly_declare_fn): Likewise.
2827 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
2829 * decl2.c (determine_visibility): Use get_template_info.
2831 2015-04-15 Jason Merrill <jason@redhat.com>
2832 Marek Polacek <polacek@redhat.com>
2835 * lambda.c (lambda_expr_this_capture): In unevaluated context go
2836 through the normal loop, just don't capture.
2837 (maybe_resolve_dummy): Handle null return.
2839 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2841 * call.c (enforce_access): Emit error + inform.
2843 2015-04-15 Marek Polacek <polacek@redhat.com>
2845 * constexpr.c (use_new_call): Remove #define.
2846 (lookup_parameter_binding): Remove function.
2847 (cxx_bind_parameters_in_call): Remove unused code.
2848 (cxx_eval_call_expression): Likewise.
2849 (cxx_eval_constant_expression): Likewise.
2851 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
2853 * tree.c (replace_placeholders_t): Remove unused type.
2854 (replace_placeholders): Remove unused pset.
2856 2015-04-14 Jason Merrill <jason@redhat.com>
2858 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2861 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2864 * name-lookup.c (do_class_using_decl): Complain about specifying
2865 the current class even if there are dependent bases.
2867 2015-04-14 David Krauss <david_work@me.com>
2870 * decl.c (grokdeclarator): Do not flag friends with deduced return.
2872 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
2873 Jason Merrill <jason@redhat.com>
2876 * parser.c (cp_parser_class_name): Add enum_ok parameter.
2877 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2878 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2881 2015-04-12 Jakub Jelinek <jakub@redhat.com>
2884 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2885 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
2886 the expression to the original type at the end.
2888 2015-04-09 Jakub Jelinek <jakub@redhat.com>
2891 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2895 * tree.c (build_cplus_array_type): Layout type before variants are
2896 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2899 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2902 * lambda.c (add_capture): Use dependent_type_p for capture by
2905 2015-04-02 Marek Polacek <polacek@redhat.com>
2908 * constexpr.c (cxx_eval_pointer_plus_expression): Call
2909 cxx_eval_constant_expression on the first operand.
2911 2015-04-01 Jason Merrill <jason@redhat.com>
2914 * decl.c (make_typename_type): Handle seeing a variable template.
2916 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2919 * pt.c (instantiating_current_function_p): New.
2920 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
2921 * cp-tree.h (instantiating_current_function_p): Declare.
2923 2015-04-01 Jason Merrill <jason@redhat.com>
2926 * decl.c (grokvardecl): Don't call check_explicit_specialization
2927 for non-template members of a class template.
2929 2015-04-01 Marek Polacek <polacek@redhat.com>
2932 * class.c (finish_struct): Require that the second field of a
2933 user-defined initializer_list be of size type.
2935 2015-03-31 Marek Polacek <polacek@redhat.com>
2938 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
2939 checking for constness.
2941 2015-03-30 Marek Polacek <polacek@redhat.com>
2944 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
2945 *(&A[i] p+ j) => A[i + j] transformation here.
2946 (cxx_eval_pointer_plus_expression): New function.
2947 (cxx_eval_constant_expression): Use it here.
2949 2015-03-27 Tobias Burnus <burnus@net-b.de>
2952 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
2953 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
2954 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2957 2015-03-27 Marek Polacek <polacek@redhat.com>
2960 * semantics.c (finish_switch_cond): If the unlowered type is not an
2961 enum, use the type of the condition.
2963 2015-03-27 Jason Merrill <jason@redhat.com>
2966 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2969 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
2972 * init.c (build_vec_init): Fix initializing aggregates
2973 with empty init list.
2975 2015-03-26 Jason Merrill <jason@redhat.com>
2978 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2980 2015-03-25 Marek Polacek <polacek@redhat.com>
2983 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2984 on an anonymous namespace.
2986 2015-03-25 Marek Polacek <polacek@redhat.com>
2989 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2991 2015-03-24 Jason Merrill <jason@redhat.com>
2994 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2995 * parser.c (cp_parser_namespace_definition): Don't set it.
2996 * name-lookup.c (handle_namespace_attrs): Check
2997 DECL_NAMESPACE_ASSOCIATIONS instead.
3000 * pt.c (get_mostly_instantiated_function_type): Just return the
3001 type of the partially instantiated template in DECL_TI_TEMPLATE.
3003 2015-03-20 Marek Polacek <polacek@redhat.com>
3006 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
3009 2015-03-20 Marek Polacek <polacek@redhat.com>
3012 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
3015 2015-03-19 Jason Merrill <jason@redhat.com>
3018 Automatically propagate ABI tags to variables and functions
3019 from their (return) type.
3020 * class.c (check_tag): Handle variables and functions.
3021 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
3022 (mark_or_check_tags): Likewise.
3023 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
3024 (check_abi_tags): Add single argument overload for decls.
3025 Handle inheriting tags for decls.
3026 * mangle.c (write_mangled_name): Call it.
3027 (mangle_return_type_p): Split out from write_encoding.
3028 (unmangled_name_p): Split out from write_mangled_name.
3029 (write_mangled_name): Ignore abi_tag on namespace.
3030 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
3031 * parser.c (cp_parser_namespace_definition): Set it.
3032 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
3033 about abi_tag attribute on non-inline namespace.
3034 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
3035 (handle_abi_tag_attribute): Allow tags on variables.
3037 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3039 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
3040 attribute for DECL_EXTERNAL VAR_DECLs.
3042 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3045 * call.c (build_over_call): Pass the tsubst_flags_t argument to
3047 * decl2.c (mark_used): Inline the require_deduced_type call and
3048 guard the error call.
3050 2015-03-16 Jason Merrill <jason@redhat.com>
3053 * parser.c (cp_parser_template_name): Call strip_using_decl.
3055 2015-03-16 Marek Polacek <polacek@redhat.com>
3059 * decl.c (grokdeclarator): Allow volatile and constexpr together.
3061 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
3064 * decl.c (check_default_argument): Don't call
3065 maybe_warn_zero_as_null_pointer_constant.
3067 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
3069 * cp-gimplify.c (simple_empty_class_p): New.
3070 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
3071 the code for empty class copies into simple_empty_class_p, and
3072 adapt it to handle COMPOUND_EXPRs.
3074 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
3077 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
3078 only if the location of newdecl doesn't match the location of olddecl.
3080 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3083 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
3086 2015-03-10 Jason Merrill <jason@redhat.com>
3090 * pt.c (dependent_type_p_r): Check both class and alias template args.
3092 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3095 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
3096 before preparing arguments to warn_logical_not_parentheses.
3097 Use maybe_constant_value on rhs.
3099 2015-03-09 Jason Merrill <jason@redhat.com>
3102 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
3104 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3107 * parser.c (cp_parser_binary_expression): Don't warn for
3108 !!x == y or !b == y where b is bool.
3110 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
3112 * ptree.c (cxx_print_lambda_node): New.
3113 (cxx_print_xnode): Handle LAMBDA_EXPR.
3115 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
3118 * constexpr.c (cxx_eval_constant_expression): Remove assert in
3119 RESULT_DECL handling.
3121 2015-02-26 Marek Polacek <polacek@redhat.com>
3124 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
3125 a RETURN_EXPR if its operand is null.
3127 2015-02-25 Jason Merrill <jason@redhat.com>
3130 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
3132 (constrain_visibility_for_template): Handle reference arguments.
3135 * decl.c (start_preparsed_function): Use create_artificial_label
3138 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
3139 Jakub Jelinek <jakub@redhat.com>
3142 * constexpr.c (check_constexpr_bind_expr_vars): Allow
3143 implicit typedefs for lambda types.
3145 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3148 * decl.c (lookup_and_check_tag): Use strip_using_decl.
3150 2015-02-13 Jason Merrill <jason@redhat.com>
3153 * pt.c (template_args_equal): Look through conversions here.
3154 * tree.c (cp_tree_equal): Not here.
3156 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3159 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
3160 pragma_external context.
3162 2015-02-13 Jason Merrill <jason@redhat.com>
3165 * call.c (reference_binding): Don't look for bad conversion
3166 if TO is incomplete.
3168 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3171 * decl.c (make_typename_type): Pass tsubst_flags_t argument
3172 to lookup_template_class.
3174 2015-02-13 Jakub Jelinek <jakub@redhat.com>
3177 * decl.c (start_preparsed_function): Use void_type_node instead
3178 of NULL_TREE as LABEL_DECL type.
3180 2015-02-12 Jason Merrill <jason@redhat.com>
3183 * mangle.c (write_mangled_name): Fix test for variable template
3186 * decl.c (begin_destructor_body): Condition clobber on
3189 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
3192 * parser.c (lookup_literal_operator): Return all candidates.
3193 (cp_parser_userdef_char_literal): Simplify error handling.
3194 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
3195 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
3196 Also give higher priority to standard string UDL operator.
3198 2015-02-12 Jakub Jelinek <jakub@redhat.com>
3201 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
3202 * decl.c (poplevel): If functionbody, try not to create an extra
3203 BLOCK for function body and use subblocks as that, if it is non-NULL
3204 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
3205 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
3208 * except.c (check_noexcept_r): Return NULL for internal
3211 2015-02-10 Jason Merrill <jason@redhat.com>
3214 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
3216 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
3219 * method.c (use_thunk): Do not check for stdarg thunks.
3221 2015-02-06 Jason Merrill <jason@redhat.com>
3224 * init.c (build_vec_init): Handle default-initialized array with
3225 constexpr default constructor.
3227 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3231 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
3233 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3236 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
3237 for generated expressions.
3239 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3242 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
3245 2015-02-02 Jason Merrill <jason@redhat.com>
3247 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
3249 2015-01-30 Joseph Myers <joseph@codesourcery.com>
3251 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
3252 changed to pass input_location as first argument.
3254 2015-01-29 Jakub Jelinek <jakub@redhat.com>
3257 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
3260 2015-01-29 Jason Merrill <jason@redhat.com>
3263 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
3264 erroneous return statement.
3267 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
3270 2015-01-27 Caroline Tice <cmtice@google.com>
3272 Committing VTV Cywin/Ming patch for Patrick Wollgast
3273 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
3274 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
3276 2015-01-27 Jason Merrill <jason@redhat.com>
3279 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
3280 current_function_decl.
3283 * pt.c (finish_template_variable): Move from semantics.c.
3284 Handle multiple template arg levels. Handle coercion here.
3285 (lookup_template_variable): Not here.
3287 2015-01-23 Jason Merrill <jason@redhat.com>
3291 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
3292 that has been completely split out.
3295 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
3299 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
3302 2015-01-21 Jason Merrill <jason@redhat.com>
3305 * constexpr.c (cxx_eval_constant_expression): Only shortcut
3306 constant CONSTRUCTORs.
3309 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
3310 give a hard error in a template instantiation.
3312 2015-01-21 Richard Biener <rguenther@suse.de>
3315 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
3316 for builtins the user declared correctly.
3318 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3321 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
3322 TREE_TYPE (elt) == error_mark_node.
3324 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
3326 PR tree-optimization/62053
3327 * tree.c (build_cplus_array_type): Layout type after variants are set.
3329 2015-01-15 Jakub Jelinek <jakub@redhat.com>
3331 * cp-gimplify.c (cp_genericize_r): Call
3332 cp_ubsan_maybe_instrument_member_call for member calls.
3333 (cp_ubsan_check_member_access_r): New function.
3334 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
3335 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
3336 cp_ubsan_instrument_member_accesses,
3337 cp_ubsan_maybe_instrument_downcast,
3338 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
3339 * cp-ubsan.c: New file.
3340 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
3341 * constexpr.c (cxx_eval_call_expression): Return void_node
3343 (potential_constant_expression_1): Return true for
3344 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
3345 * typeck.c (build_class_member_access_expr): Provide locus
3347 (build_static_cast_1): Instrument downcasts.
3348 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
3349 add ubsan instrumentation for virtual_access.
3350 * call.c: Include internal-fn.h.
3351 (set_flags_from_callee): Handle internal calls.
3353 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
3356 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
3357 and function templates, declared only in the class.
3358 * decl.c (duplicate_decls): Reveal hidden friend functions or
3359 function templates, if they are redeclared outside the class.
3361 2015-01-15 Jason Merrill <jason@redhat.com>
3364 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
3367 * constexpr.c (potential_constant_expression_1): Handle reference
3370 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3371 James Norris <jnorris@codesourcery.com>
3372 Cesar Philippidis <cesar@codesourcery.com>
3373 Ilmir Usmanov <i.usmanov@samsung.com>
3374 Jakub Jelinek <jakub@redhat.com>
3376 * parser.c: Include "gomp-constants.h".
3377 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3378 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3379 Use OMP_CLAUSE_SET_MAP_KIND.
3380 (cp_parser_omp_construct, cp_parser_pragma): Handle
3381 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3382 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3383 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3384 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3385 "create", "delete", "deviceptr", "host", "num_gangs",
3386 "num_workers", "present", "present_or_copy", "pcopy",
3387 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3388 "present_or_create", "pcreate", "vector_length", "wait".
3389 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3390 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3391 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3392 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3393 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3394 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3395 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3396 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3397 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3398 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3399 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3400 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3401 (cp_parser_oacc_parallel, cp_parser_oacc_update)
3402 (cp_parser_oacc_wait): New functions.
3403 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3404 (finish_oacc_parallel): New prototypes.
3405 * semantics.c: Include "gomp-constants.h".
3406 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3407 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3408 OMP_CLAUSE_SET_MAP_KIND.
3409 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3410 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3411 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3412 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3415 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
3418 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3419 self-initialization.
3421 2015-01-13 Jason Merrill <jason@redhat.com>
3425 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3426 pointer expressions.
3427 (cxx_eval_increment_expression): Likewise.
3430 * pt.c (coerce_template_parameter_pack): Return NULL for a
3431 zero-length fixed parameter pack with a pack expansion arg.
3434 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3436 2015-01-12 Jason Merrill <jason@redhat.com>
3439 * constexpr.c (cxx_eval_call_expression): A call to a void
3440 function doesn't need to return a value.
3442 2015-01-09 Michael Collison <michael.collison@linaro.org>
3444 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3445 input.h, alias.h, symtab.h, options.h, fold-const.h,
3446 wide-int.h, and inchash.h due to flattening of tree.h.
3448 * constexpr.c: Ditto.
3449 * cp-array-notation.c: Ditto.
3450 * cp-gimplify.c: Ditto.
3452 * cp-objcp-common.c: Ditto.
3465 * name-lookup.c: Ditto.
3466 * optimize.c: Ditto.
3473 * semantics.c: Ditto.
3478 2015-01-08 Jason Merrill <jason@redhat.com>
3480 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3481 * decl.c (compute_array_index_type): Likewise.
3482 * init.c (build_vec_init): Likewise.
3483 * typeck.c (cp_build_binary_op): Likewise.
3485 2015-01-08 Jason Merrill <jason@redhat.com>
3487 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3488 whether an initializer-list is too big for a VLA.
3489 (throw_bad_array_length): Remove.
3490 * cp-tree.h: Remove prototype.
3492 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
3495 * decl.c (grokfndecl): Add bool parameter.
3496 (grokdeclarator): Adjust calls.
3497 (start_decl): Don't set DECL_DELETED_FN here.
3499 2015-01-06 Jason Merrill <jason@redhat.com>
3501 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3505 * pt.c (type_dependent_expression_p): Handle variable templates.
3506 * constexpr.c (potential_constant_expression_1): Use it.
3509 * semantics.c (finish_offsetof): Handle templates here.
3510 * parser.c (cp_parser_builtin_offsetof): Not here.
3513 * semantics.c (process_outer_var_ref): Diagnose lambda in local
3516 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3519 * class.c (check_field_decls): Make copy assignment operators
3520 complex only in c++98 mode.
3522 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3525 * class.c (check_for_override): Warn when a virtual function is an
3526 override not marked override.
3528 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3530 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3532 (get_basefndecls): Adjust.
3534 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3536 Update copyright years.
3538 2015-01-05 Marek Polacek <polacek@redhat.com>
3541 * typeck.c (cp_build_array_ref): Pass loc down to
3542 warn_array_subscript_with_type_char.
3545 Copyright (C) 2015 Free Software Foundation, Inc.
3547 Copying and distribution of this file, with or without modification,
3548 are permitted in any medium without royalty provided the copyright
3549 notice and this notice are preserved.