]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Some OpenACC host_data cleanup
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
ff7a55bf
TS
12015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2
3 * parser.c (cp_parser_omp_clause_name)
4 (cp_parser_oacc_all_clauses): Alphabetical sorting.
5 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE.
6
fe78aa04
AA
72015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8
9 PR gcov-profile/68603
10 * cp-gimplify.c (genericize_cp_loop): For the back-jump's location
11 use the start of the loop body only if the loop is unconditional.
12
132015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14
15 * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
16 to start of loop body instead of start of loop.
17
37d5ad46
JB
182015-12-01 Julian Brown <julian@codesourcery.com>
19 Cesar Philippidis <cesar@codesourcery.com>
20 James Norris <James_Norris@mentor.com>
21
22 * cp-tree.h (finish_oacc_host_data): Add prototype.
23 * parser.c (cp_parser_omp_clause_name): Add use_device support.
24 (cp_parser_oacc_all_clauses): Add use_device support.
25 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
26 (cp_parser_oacc_host_data): New function.
27 (cp_parser_omp_construct): Add host_data support.
28 (cp_parser_pragma): Add host_data support.
29 * semantics.c (finish_omp_clauses): Add use_device support.
30 (finish_oacc_host_data): New function.
31
b58d3df2
ML
322015-11-27 Martin Liska <mliska@suse.cz>
33
34 PR c++/68312
35 * cp-array-notation.c (expand_sec_reduce_builtin):
36 Likewise.
37 (create_array_refs): Replace argument with const reference.
38 (expand_an_in_modify_expr): Likewise.
39 (cp_expand_cond_array_notations): Likewise.
40 (expand_unary_array_notation_exprs): Likewise.
41
aec17bfe
JJ
422015-11-27 Jakub Jelinek <jakub@redhat.com>
43
44 PR c/63326
45 * parser.c (cp_parser_statement): Clear in_compound after labels.
46
12a18ca5
ML
472015-11-27 Martin Liska <mliska@suse.cz>
48
49 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info):
50 Release tokens.
51
9daf14d4
AA
522015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
53
54 * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
55 to start of loop body instead of start of loop.
56
62775f0d
JJ
572015-11-26 Jakub Jelinek <jakub@redhat.com>
58
59 PR c++/68508
60 * cp-tree.h (cp_ubsan_maybe_instrument_downcast): Add INTYPE argument.
61 * cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise. Use
62 it instead of or in addition to TREE_TYPE (op). Use
63 is_properly_derived_from, return NULL_TREE if TREE_TYPE (intype) and
64 TREE_TYPE (type) are the same type minus qualifiers.
65 * typeck.c (build_static_cast_1): Adjust callers.
66
e82f9ef7
MS
672015-11-25 Martin Sebor <msebor@redhat.com>
68
69 PR c++/67876
70 * pt.c (convert_template_argument): Make sure number of tree
71 operands is greater than zero before attempting to extract one.
72
a0c0e716
RB
732015-11-25 Ryan Burn <contact@rnburn.com>
74
75 PR c++/68434
76 * pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before
77 calling canonical_type_parameter.
78
917124c3
JM
792015-11-25 Jason Merrill <jason@redhat.com>
80
75729cff
JM
81 * lambda.c (maybe_add_lambda_conv_op): Only set
82 no_sanitize_undefined if SANITIZE_NULL.
83
5546e160
JM
84 PR c++/67941
85 * lambda.c (maybe_add_lambda_conv_op): Mark _FUN as
86 no_sanitize_undefined.
87
917124c3
JM
88 * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use
89 do_ubsan_in_current_function.
90
c2127564
MT
912015-11-25 Markus Trippelsdorf <markus@trippelsdorf.de>
92 Paolo Carlini <paolo.carlini@oracle.com>
93
94 PR c++/68087
95 * constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
96 tree_to_shwi to avoid ICEs.
97
688c4de0
IV
982015-11-24 Ilya Verbin <ilya.verbin@intel.com>
99
100 * parser.c (cp_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
101 with "if (ENABLE_OFFLOADING)".
102
cc5c5226
IZ
1032015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
104
105 PR c++/68001
106 * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
107
ec5a0fe0
JJ
1082015-11-20 Jakub Jelinek <jakub@redhat.com>
109
110 PR c++/67354
111 * cp-tree.h (defer_mangling_aliases): Declare.
112 (generate_mangling_aliases): New prototype.
113 * decl2.c (defer_mangling_aliases): New variable.
114 (note_mangling_alias): Use !defer_mangling_aliases
115 instead of at_eof.
116 (generate_mangling_aliases): No longer static. Clear
117 defer_mangling_aliases.
118 * optimize.c (maybe_thunk_body): Defer emitting mangling aliases
119 if !defer_mangling_aliases until the fns are put into the same
120 comdat group.
121
8ece8dfb
DM
1222015-11-19 David Malcolm <dmalcolm@redhat.com>
123
124 * cp-tree.h (lookup_member_fuzzy): New decl.
125 * search.c: Include spellcheck.h.
126 (class lookup_field_fuzzy_info): New class.
127 (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): New.
128 (lookup_field_fuzzy_info::fuzzy_lookup_field): New.
129 (lookup_field_fuzzy_r): New.
130 (lookup_member_fuzzy): New.
131 * typeck.c (finish_class_member_access_expr): When issuing
132 a "has no member named" error, call lookup_member_fuzzy, and
133 offer any result as a suggestion.
134
258c1d07
TR
1352015-11-19 Torvald Riegel <triegel@redhat.com>
136
137 * except.c (do_free_exception): Use transactional wrapper.
138
e3f8abd6
JM
1392015-11-19 Jason Merrill <jason@redhat.com>
140
141 PR c++/68422
142 * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
143 * parser.c (cp_parser_sizeof_pack): Set it.
144 * pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
145 (tsubst_pack_expansion): Improve T... shortcut for expression packs.
146
0398c183
RB
1472015-11-19 Ryan Burn <contact@rnburn.com>
148
149 PR c++/68396
150 * pt.c (find_parameter_packs_r) [DECLTYPE_TYPE]: When traversing
151 the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false.
152
5e18a5b5
JJ
1532015-11-19 Jakub Jelinek <jakub@redhat.com>
154 Manuel López-Ibáñez <manu@gcc.gnu.org>
155
156 PR c++/67409
157 * decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
158 emit_diagnostic instead of permerror.
159 (check_previous_goto_1): Adjust identify_goto callers, treat all
160 cases but crossing initialization and entering scope of decl with
161 non-trivial dtor as unconditional hard errors.
162 (check_goto): Use identify_goto. Treat all cases but crossing
163 initialization and entering scope of decl with non-trivial dtor
164 as unconditional hard errors.
165
8504d5dd
CP
1662015-11-19 Cesar Philippidis <cesar@codesourcery.com>
167
168 * parser.h (struct cp_omp_declare_simd_data): Add clauses member.
169 (struct cp_parser): Change type the of oacc_routine to
170 cp_omp_declare_simd_data.
171 * parser.c (cp_ensure_no_oacc_routine): Rework to use
172 cp_omp_declare_simd_data.
173 (cp_parser_simple_declaration): Remove boolean first. Update call to
174 cp_parser_init_declarator. Don't NULL out oacc_routine.
175 (cp_parser_init_declarator): Remove boolean first parameter. Update
176 calls to cp_finalize_oacc_routine.
177 (cp_parser_late_return_type_opt): Handle acc routines.
178 (cp_parser_member_declaration): Remove first variable. Handle
179 acc routines like omp declare simd.
180 (cp_parser_function_definition_from_specifiers_and_declarator): Update
181 call to cp_finalize_oacc_routine.
182 (cp_parser_single_declaration): Update call to
183 cp_parser_init_declarator.
184 (cp_parser_save_member_function_body): Remove first_decl parameter.
185 Update call to cp_finalize_oacc_routine.
186 (cp_parser_finish_oacc_routine): Delete.
187 (cp_parser_oacc_routine): Rework to use cp_omp_declare_simd_data.
188 (cp_parser_late_parsing_oacc_routine): New function.
189 (cp_finalize_oacc_routine): Remove first argument. Add more error
190 handling and set the acc routine and 'omp declare target' attributes.
191 (cp_parser_pragma): Remove unnecessary call to
192 cp_ensure_no_oacc_routine.
193
f25c3cc0
CP
1942015-11-17 Cesar Philippidis <cesar@codesourcery.com>
195
196 * cp-gimplify.c (cp_fold_r): Add support for OACC_LOOP.
197
3212c3c8
JM
1982015-11-17 Jason Merrill <jason@redhat.com>
199
0465369f
JM
200 PR bootstrap/68346
201 * typeck.c (build_static_cast_1): Force a NOP when converting to
202 the same type.
203
f26a415e
JM
204 * cp-tree.h (LITERAL_ZERO_P): Remove.
205 * parser.c (cp_parser_postfix_expression, literal_zeros)
206 (cp_parser_parenthesized_expression_list): Don't mess with it.
207
8c2bebdd
JM
208 * parser.c (cp_parser_unary_expression): Fold -constant here.
209 * typeck.c (cp_build_unary_op): Not here.
210
3212c3c8
JM
211 PR bootstrap/68361
212 * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
213 -Wparentheses.
214
b925d25d
JM
2152015-11-16 Jason Merrill <jason@redhat.com>
216
217 * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
218 to fold arguments to __builtin_constant_p.
219
fff77217
KY
2202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
221
222 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
223 "simd" attribute as well. Update error message.
224
1d899da2
TS
2252015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
226
227 * parser.c (cp_parser_omp_declare_target): Adjust.
228
ab7b5673
TS
2292015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
230
231 * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
232
38e5f045
JM
2332015-11-14 Jason Merrill <jason@redhat.com>
234
235 PR bootstrap/68346
236 * call.c (build_new_op_1): Don't fold arguments to
237 warn_tautological_cmp.
238
e4606348
JJ
2392015-11-14 Jakub Jelinek <jakub@redhat.com>
240
241 * semantics.c (finish_omp_clauses): Don't mark
242 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
243
cda0a029
JM
2442015-11-13 Kai Tietz <ktietz70@googlemail.com>
245 Marek Polacek <polacek@redhat.com>
246 Jason Merrill <jason@redhat.com>
247
248 * call.c (build_conditional_expr_1, convert_like_real)
249 (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
250 (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
251 * class.c (build_base_path, determine_primary_bases)
252 (update_vtable_entry_for_fn, check_bitfield_decl)
253 (layout_nonempty_base_or_field, layout_empty_base)
254 (propagate_binfo_offsets, include_empty_classes)
255 (layout_class_type, build_vbase_offset_vtbl_entries): Use
256 fold_convert.
257 * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
258 (cxx_eval_call_expression): Handle MEM_REF.
259 (cxx_eval_pointer_plus_expression): Fold the second operand.
260 (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
261 (fold_simple_1, fold_simple): New.
262 (maybe_constant_value_1): Factor out from maybe_constant_value.
263 (cv_cache, maybe_constant_value): Cache results.
264 (maybe_constant_init): Handle null input.
265 (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
266 * cp-array-notation.c (build_array_notation_ref): Fold operands.
267 * cp-gimplify.c (cp_fold_r, cp_fold): New.
268 (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
269 (cp_genericize): Fold everything.
270 (contains_label_1, contains_label_p): New.
271 (cp_fold, cp_fully_fold): New.
272 * cp-tree.h (class cache_map): New.
273 * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
274 (cp_convert_and_check): Use cp_fully_fold.
275 (convert, convert_force): Don't fold.
276 * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
277 (compute_array_index_type): Use cp_fully_fold.
278 (build_enumerator): Use fold_convert.
279 * decl2.c (get_guard_cond, set_guard): Use fold_convert.
280 * init.c (build_zero_init_1): Fold zero-initializers.
281 (build_new_1): Fold nelts calculations.
282 (build_vec_delete_1): Fold conversions.
283 (build_vec_init): Fold maxindex.
284 * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
285 (cp_parser_question_colon_clause): Fold LHS.
286 * pt.c (convert_nontype_argument): Fold nullptr conversion.
287 * semantics.c (finish_unary_op_expr): Fold for warnings.
288 (handle_omp_array_sections_1): Fold length and low bound.
289 (handle_omp_for_class_iterator): Fold various things.
290 * tree.c (builtin_valid_in_constant_expr_p): Add
291 BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
292 (convert_bitfield_to_declared_type): Don't fold.
293 (handle_init_priority_attribute): Fold.
294 (fold_if_not_in_template): Remove.
295 * typeck.c (decay_conversion, build_class_member_access_expr)
296 (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
297 (cp_pointer_int_sum, pointer_diff): Don't fold.
298 (cp_build_binary_op): Fold for warnings and PMF ops.
299 (cp_build_unary_op): Fold negation of a constant, nothing else.
300 (expand_ptrmemfunc_cst): Fold operations.
301 * typeck2.c (split_nonconstant_init): Fold initializer.
302 (store_init_value): Likewise.
303 (check_narrowing): Try folding.
304 * config-lang.in (gtfiles): Add cp-gimplify.c.
305
ebedc9a3
DM
3062015-11-13 David Malcolm <dmalcolm@redhat.com>
307
308 * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
309
be561c63
JN
3102015-11-12 James Norris <jnorris@codesourcery.com>
311
312 * parser.c (cp_parser_oacc_declare): Remove unused.
313
6e232ba4
JN
3142015-11-12 James Norris <jnorris@codesourcery.com>
315 Joseph Myers <joseph@codesourcery.com>
316
317 * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
318 clause.
319 (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
320 and PRAGMA_OMP_CLAUSE_LINK.
321 (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
322 and PRAGMA_OMP_CLAUSE_LINK.
323 (OACC_DECLARE_CLAUSE_MASK): New definition.
324 (cp_parser_oacc_declare): New function.
325 (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
326 * pt.c (tsubst_expr): Handle OACC_DECLARE.
327
84edfc8a
JM
3282015-11-12 Jason Merrill <jason@redhat.com>
329
330 * pt.c (check_explicit_specialization): Check the namespace after
331 we choose a template.
332
9e4c469a
JM
3332015-11-11 Jason Merrill <jason@redhat.com>
334
335 * decl.c (duplicate_decls): When combining typedefs, remove the
336 new type from the variants list.
337
c7360ed2
JM
3382015-11-11 Jason Merrill <jason@redhat.com>
339
340 * pt.c (instantiate_class_template_1): Set function_depth around
341 instantiation of lambda op().
342
e78bede6
MP
3432015-11-11 Marek Polacek <polacek@redhat.com>
344
345 PR c/68107
346 PR c++/68266
347 * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
348 checking the size of an array.
349
4ac93c7c
DH
3502015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
351
352 PR bootstrap/68271
353 * parser.h (cp_token): Update pragma_kind to 8.
354
69f293c9
AM
3552015-11-11 Andrew MacLeod <amacleod@redhat.com>
356
357 * call.c: Remove unused header files.
358 * class.c: Likewise.
359 * constexpr.c: Likewise.
360 * cp-array-notation.c: Likewise.
361 * cp-cilkplus.c: Likewise.
362 * cp-gimplify.c: Likewise.
363 * cp-lang.c: Likewise.
364 * cp-objcp-common.c: Likewise.
365 * cp-ubsan.c: Likewise.
366 * cvt.c: Likewise.
367 * cxx-pretty-print.c: Likewise.
368 * decl.c: Likewise.
369 * decl2.c: Likewise.
370 * dump.c: Likewise.
371 * error.c: Likewise.
372 * except.c: Likewise.
373 * expr.c: Likewise.
374 * friend.c: Likewise.
375 * g++spec.c: Likewise.
376 * init.c: Likewise.
377 * lambda.c: Likewise.
378 * lex.c: Likewise.
379 * mangle.c: Likewise.
380 * method.c: Likewise.
381 * name-lookup.c: Likewise.
382 * optimize.c: Likewise.
383 * parser.c: Likewise.
384 * pt.c: Likewise.
385 * ptree.c: Likewise.
386 * repo.c: Likewise.
387 * rtti.c: Likewise.
388 * search.c: Likewise.
389 * semantics.c: Likewise.
390 * tree.c: Likewise.
391 * typeck.c: Likewise.
392 * typeck2.c: Likewise.
393 * vtable-class-hierarchy.c: Likewise.
394
03310c37
CP
3952015-11-09 Cesar Philippidis <cesar@codesourcery.com>
396
397 * parser.c (cp_finalize_oacc_routine): New boolean first argument.
398 (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
399 (cp_parser_simple_declaration): Maintain a boolean first to keep track
400 of each new declarator. Propagate it to cp_parser_init_declarator.
401 (cp_parser_init_declarator): New boolean first argument. Propagate it
402 to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
403 (cp_parser_member_declaration): Likewise.
404 (cp_parser_single_declaration): Update call to
405 cp_parser_init_declarator.
406 (cp_parser_save_member_function_body): New boolean first_decl argument.
407 Propagate it to cp_finalize_oacc_routine.
408 (cp_parser_finish_oacc_routine): New boolean first argument. Use it to
409 determine if multiple declarators follow a routine construct.
410 (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
411
685c8340
MS
4122015-10-19 Martin Sebor <msebor@redhat.com>
413
414 PR c++/67913
415 PR c++/67927
416 * call.c (build_operator_new_call): Do not assume size_check
417 is non-null, analogously to the top half of the function.
418 * init.c (build_new_1): Detect and diagnose array sizes in
419 excess of the maximum of roughly SIZE_MAX / 2.
420 Insert a runtime check only for arrays with a non-constant size.
421 (build_new): Detect and diagnose negative array sizes.
422
3a40d81d
NS
4232015-11-09 Thomas Schwinge <thomas@codesourcery.com>
424 Cesar Philippidis <cesar@codesourcery.com>
425 James Norris <jnorris@codesourcery.com>
426 Julian Brown <julian@codesourcery.com>
427 Nathan Sidwell <nathan@codesourcery.com>
428
429 * parser.h (struct cp_parser): Add oacc_routine field.
430 * parser.c (cp_ensure_no_oacc_routine): New.
431 (cp_parser_new): Initialize oacc_routine field.
432 (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
433 (cp_parser_namespace_definition,
434 cp_parser_class_specifier_1): Likewise.
435 (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
436 (cp_parser_function_definition,
437 cp_parser_save_member_function_body): Likewise.
438 (OACC_ROUTINE_CLAUSE_MASK): New.
439 (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
440 cp_finalize_oacc_routine): New.
441 (cp_parser_pragma): Adjust omp_declare_simd checking. Call
442 cp_ensure_no_oacc_routine.
443 (cp_parser_pragma): Add OpenACC routine handling.
e82f9ef7 444
eb11eb15
MS
4452015-11-08 Martin Sebor <msebor@redhat.com>
446
e82f9ef7 447 PR c++/67942
eb11eb15
MS
448 * cp/init.c (warn_placement_new_too_small): Convert integer
449 operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
450 value.
451
8a645150
DM
4522015-11-06 David Malcolm <dmalcolm@redhat.com>
453
454 * error.c (cp_printer): Update for new "caret_p" param for
455 textinfo::set_location.
456 (pedwarn_cxx98): Update for change in signature of
457 diagnostic_set_info.
458
9f46fa10
JM
4592015-11-06 Jason Merrill <jason@redhat.com>
460
636b25c1
JM
461 Support non-type constrained-type-specifiers.
462 * parser.c (check_type_concept): Remove.
463 (cp_parser_maybe_constrained_type_specifier): Don't call it.
464 (synthesize_implicit_template_parm): Handle non-type and template
465 template parameters. Also compare extra args. Return the decl.
466 (cp_parser_template_argument): Handle constrained-type-specifiers for
467 non-type template parameters.
468 (finish_constrained_template_template_parm): Split out from
469 cp_parser_constrained_template_template_parm.
470 (cp_parser_nonclass_name): Move some logic into
471 cp_parser_maybe_concept_name.
472 (cp_parser_init_declarator): Fix error recovery.
473 (get_concept_from_constraint): Remove.
474 (cp_parser_simple_type_specifier): Adjust for
475 synthesize_implicit_template_parm returning the decl.
476 * constraint.cc (placeholder_extract_concept_and_args)
477 (equivalent_placeholder_constraints): Also handle TYPE_DECL
478 constrained parms.
479
9f46fa10
JM
480 * pt.c (push_inline_template_parms_recursive): Don't recreate the
481 CONST_DECL.
482
c047b694
KT
4832015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
484
485 * init.c (warn_placement_new_too_small): Use %wu format
486 rather than %lu when printing bytes_avail.
487
7a5e4956
CP
4882015-11-05 Cesar Philippidis <cesar@codesourcery.com>
489 Thomas Schwinge <thomas@codesourcery.com>
490 James Norris <jnorris@codesourcery.com>
491
492 * parser.c (cp_parser_omp_clause_name): Add support for
493 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
494 (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
495 arguments.
496 (cp_parser_oacc_clause_tile): New function.
497 (cp_parser_omp_clause_default): Add is_oacc argument. Handle
498 default(none) in OpenACC.
499 (cp_parser_oacc_all_clauses): Add support for
500 (cp_parser_omp_all_clauses): Update call to
501 cp_parser_omp_clause_default.
502 PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
503 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
504 TILE}.
505 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
506 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
507 FIRSTPRIVATE}.
508 (cp_parser_oacc_update): Update the error message for missing clauses.
509 * semantics.c (finish_omp_clauses): Add support for
510 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
511
906f9ad9
MS
5122015-11-05 Martin Sebor <msebor@redhat.com>
513
514 PR c++/67942
515 * cp/init.c (warn_placement_new_too_small): Avoid assuming
516 the size of the first operand of placement new or its type
517 is known.
518
e2f5cc96
MS
5192015-11-05 Martin Sebor <msebor@redhat.com>
520
521 PR c++/67942
522 * cp/init.c (warn_placement_new_too_small): New function.
523 (build_new_1): Call it.
524
7e4756e8
PC
5252015-11-05 Paolo Carlini <paolo.carlini@oracle.com>
526
527 PR c++/67846
528 * parser.c (cp_parser_lambda_body): Check lambda_return_type
529 return value.
530 * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
531 member function used invalidly.
532
e01d41e5
JJ
5332015-11-05 Jakub Jelinek <jakub@redhat.com>
534 Ilya Verbin <ilya.verbin@intel.com>
535
536 * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
537 (omp_privatize_field): Add SHARED argument.
538 * parser.c: Include context.h.
539 (cp_parser_omp_clause_schedule): Parse schedule
540 modifiers, diagnose monotonic together with nonmonotonic.
541 (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse
542 parameter name as linear step as id-expression rather than expression.
543 (cp_parser_omp_all_clauses): Adjust caller.
544 (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
545 initialize it. Adjust omp_privatize_field caller.
546 (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
547 to finish_omp_for.
548 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
549 (cp_parser_omp_target_data,
550 cp_parser_omp_target_enter_data,
551 cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
552 and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
553 (cp_parser_omp_target): Likewise. Evaluate num_teams and
554 thread_limit expressions on combined target teams before the target.
555 (cp_parser_omp_declare_target): If decl has "omp declare target" or
556 "omp declare target link" attribute, and cgraph or varpool node already
557 exists, then set corresponding flags. Call finish_omp_clauses
558 in the parenthesized extended-list syntax case. Call
559 cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
560 (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
561 instead of cp_parser_skip_to_pragma_eol.
7e4756e8
PC
562 * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
563 inside declare target.
e01d41e5
JJ
564 * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
565 use tsubst_omp_clause_decl instead of tsubst_expr on
566 OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared
567 clauses.
568 (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
569 (tsubst_find_omp_teams): New function.
570 (tsubst_expr): Evaluate num_teams and thread_limit expressions on
571 combined target teams before the target. Use OMP_FOR_ORIG_DECLS for
572 all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for
573 caller.
574 * semantics.c (omp_privatize_field): Add SHARED argument, if true,
575 always create artificial var and never put it into the hash table
576 or vector.
577 (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
578 Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
579 (handle_omp_array_sections): For structure element
580 based array sections use GOMP_MAP_ALWAYS_POINTER instead of
581 GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF,
582 either into the constant offset, or for variable low-bound using
583 POINTER_PLUS_EXPR.
584 (finish_omp_clauses): Adjust omp_privatize_field caller. Drop
585 generic_field_head, structure elements are now always mapped even
586 as array section bases, diagnose same var in data sharing and
587 mapping clauses. For references map what they refer to using
588 GOMP_MAP_ALWAYS_POINTER for structure elements and
589 GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step
590 on declare simd is neither a constant nor a uniform parameter.
591 Allow non-static data members on shared clauses. Look through
592 POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic
593 modifier on kinds other than dynamic or guided or nonmonotonic
594 modifier together with ordered clause. Diagnose the same var or
595 function appearing multiple times on the same directive. Fix up
596 wording for the to clause if t is neither a FUNCTION_DECL nor a
597 VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
598 (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call
599 c_omp_check_loop_iv_exprs on cond.
600 (finish_omp_for): Add ORIG_INITS argument. Call
601 c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust
602 handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv.
603 Call add_stmt.
604 (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
605
3ceed675
CP
6062015-11-04 Cesar Philippidis <cesar@codesourcery.com>
607
608 * (cp_parser_oacc_single_int_clause): New function.
609 (cp_parser_oacc_clause_vector_length): Delete.
610 (cp_parser_omp_clause_num_gangs): Delete.
611 (cp_parser_omp_clause_num_workers): Delete.
612 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
613 for num_gangs, num_workers and vector_length.
614
595278be
MM
6152015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
616
617 * call.c (validate_conversion_obstack): Define unconditionally.
618 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
619 gcc_checking_assert.
620 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
621 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
622 * mangle.c (add_substitution): Likewise.
623 * method.c (maybe_explain_implicit_delete): Likewise.
624 * parser.c (cp_parser_template_argument_list): Remove conditional
625 compilation.
626 * pt.c (check_unstripped_args): Rename to...
627 (verify_unstripped_args): ... this and remove conditional compilation.
628 (retrieve_specialization): Guard call of verify_unstripped_args with
629 flag_checking.
630 (template_parm_to_arg): Remove conditional compilation.
631 (template_parms_to_args, coerce_template_parameter_pack,
632 coerce_template_parms): Likewise.
633 (tsubst_copy): Use flag_checking.
634 (type_unification_real): Remove conditional compilation.
635 (build_non_dependent_expr): Use flag_checking.
636 * tree.c (build_target_expr): Remove conditional compilation, use
637 gcc_checking_assert.
638 * typeck.c (comptypes): Likewise.
639 * typeck2.c (digest_init_r): Likewise.
640
bfb014c3
JM
6412015-11-03 Jason Merrill <jason@redhat.com>
642
643 * pt.c (struct find_parameter_pack_data): Add
644 type_pack_expansion_p field.
645 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
646 (uses_parameter_packs, make_pack_expansion)
647 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
648
4bf9e5a8
TS
6492015-11-03 Thomas Schwinge <thomas@codesourcery.com>
650 Chung-Lin Tang <cltang@codesourcery.com>
651
652 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
653 PRAGMA_OACC_ATOMIC.
654
ffea5536
VV
6552015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
656
657 Remove the implementation of N3994, terse range-for loops.
658 * parser.c (cp_parser_for_init_statement): Remove the parsing
659 of a terse range-for.
660
dfded2f6
JM
6612015-10-31 Jason Merrill <jason@redhat.com>
662
4fea442d
JM
663 Implement multiple 'auto' feature from Concepts TS.
664 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
665 (cp_parser_template_type_arg): Likewise.
666 (get_concept_from_constraint): Split out most logic to...
667 * constraint.cc (placeholder_extract_concept_and_args): ...here.
668 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
669 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
670 * cxx-pretty-print.h: Declare it.
671 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
672 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
673 (type_uses_auto): Use is_auto_r.
674 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
675 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
676 constraints.
677
a459b07f
JM
678 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
679 Return a meaningful value rather than error_mark_node.
680 (for_each_template_parm): Return a tree.
681 (uses_template_parms_level): Return bool.
682 * cp-tree.h: Adjust.
683
09833a1d
JM
684 * pt.c (unify): Don't diagnose no common base if we already have
685 the same template.
686 (do_auto_deduction): Explain deduction failure.
687
79d9b2de
JM
688 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
689 uid.
690
dfded2f6
JM
691 * parser.c (synthesize_implicit_template_parm)
692 (finish_fully_implicit_template): Make static.
693
2adfab87
AM
6942015-10-29 Andrew MacLeod <amacleod@redhat.com>
695
696 * call.c: Reorder #include's and remove duplicates.
697 * class.c: Likewise.
698 * constexpr.c: Likewise.
699 * cp-array-notation.c: Likewise.
700 * cp-cilkplus.c: Likewise.
701 * cp-gimplify.c: Likewise.
702 * cp-lang.c: Likewise.
703 * cp-objcp-common.c: Likewise.
704 * cp-ubsan.c: Likewise.
705 * cvt.c: Likewise.
706 * cxx-pretty-print.c: Likewise.
707 * decl.c: Likewise.
708 * decl2.c: Likewise.
709 * dump.c: Likewise.
710 * error.c: Likewise.
711 * except.c: Likewise.
712 * expr.c: Likewise.
713 * friend.c: Likewise.
714 * init.c: Likewise.
715 * lambda.c: Likewise.
716 * lex.c: Likewise.
717 * mangle.c: Likewise.
718 * method.c: Likewise.
719 * name-lookup.c: Likewise.
720 * optimize.c: Likewise.
721 * parser.c: Likewise.
722 * pt.c: Likewise.
723 * ptree.c: Likewise.
724 * repo.c: Likewise.
725 * rtti.c: Likewise.
726 * search.c: Likewise.
727 * semantics.c: Likewise.
728 * tree.c: Likewise.
729 * typeck.c: Likewise.
730 * typeck2.c: Likewise.
731 * vtable-class-hierarchy.c: Likewise.
732
f58b8cd7
PC
7332015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
734
735 PR c++/67845
736 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
737 functions consistently reset TREE_TYPE (decl) too.
738
a3320d62
JM
7392015-10-28 Jason Merrill <jason@redhat.com>
740
741 DR 1518
742 * class.c (type_has_user_provided_or_explicit_constructor): New.
743 (check_bases_and_members): Use it.
744 * cp-tree.h: Declare it.
745
0d077441
NS
7462015-10-27 Cesar Philippidis <cesar@codesourcery.com>
747 Thomas Schwinge <thomas@codesourcery.com>
748 James Norris <jnorris@codesourcery.com>
749 Joseph Myers <joseph@codesourcery.com>
750 Julian Brown <julian@codesourcery.com>
751 Nathan Sidwell <nathan@codesourcery.com>
752 Bernd Schmidt <bschmidt@redhat.com>
753
754 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
755 vector, worker.
756 (cp_parser_oacc_simple_clause): New.
757 (cp_parser_oacc_shape_clause): New.
758 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
759 (OACC_LOOP_CLAUSE_MASK): Likewise.
760 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
761 worker. Unify the handling of teams, tasks and vector_length with
762 the other loop shape clauses.
763
88bae6f4
TS
7642015-10-27 Thomas Schwinge <thomas@codesourcery.com>
765 James Norris <jnorris@codesourcery.com>
766 Cesar Philippidis <cesar@codesourcery.com>
767
768 PR c/64765
769 PR c/64880
770 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
771 declare functions.
772 (finish_omp_construct): Declare function.
773 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
774 formal parameters, and handle these. Adjust all users.
775 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
776 into...
777 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
778 all users.
779 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
780 (finish_omp_construct): ... this new function.
781
6337bd75
JM
7822015-10-25 Jason Merrill <jason@redhat.com>
783
784 DR 2179
785 * pt.c (process_partial_specialization): Handle error_mark_node
786 from most_specialized_partial_spec.
787
73a84269
JM
7882015-10-23 Jason Merrill <jason@redhat.com>
789
e7838ec9
JM
790 DR 1518
791 DR 1630
792 PR c++/54835
793 PR c++/60417
794 * call.c (convert_like_real): Value-initialization can't use
795 explicit constructors in C++11 and up.
796
73a84269
JM
797 PR c++/67813
798 * constexpr.c (cxx_eval_store_expression): Always use *valp if
799 set.
800
d4db5060
JM
8012015-10-22 Jason Merrill <jason@redhat.com>
802
ba2b189e
JM
803 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
804 (add_template_candidate_real): Handle it.
8ae06525 805 * pt.c (fn_type_unification): Handle it.
ba2b189e 806
d4db5060
JM
807 * call.c (add_conv_candidate): Remove first_arg parm.
808 (add_template_conv_candidate): Likewise.
809 (add_template_candidate_real): Don't pass it.
810 (build_op_call_1): Likewise.
811
a8fc2579
RB
8122015-10-22 Richard Biener <rguenther@suse.de>
813
814 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
815 before folding a MINUS_EXPR.
816 (finish_omp_clauses): Likewise.
817
f523e68a
PC
8182015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
819
820 PR c++/66781
821 * parser.c (cp_parser_enum_specifier): Upon error_at set
822 nested_name_specifier to error_mark_node; improve error message.
823
8242015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
825
826 PR c++/67847
827 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
828 which doesn't name a class or namespace.
829
9f47c7e5
IE
8302015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
831
832 * call.c (build_conditional_expr_1): Use boolean vector
833 type for vector comparison.
834 * typeck.c (build_vec_cmp): New.
835 (cp_build_binary_op): Use build_vec_cmp for comparison.
836
a81072c7
JM
8372015-10-20 Jason Merrill <jason@redhat.com>
838
839 PR c++/66583
840 * init.c (innermost_aggr_scope): New.
841 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
842 (sort_mem_initializers): Handle initializers for entire anonymous
843 aggregates.
844
fa60eeb9
MP
8452015-10-20 Marek Polacek <polacek@redhat.com>
846
847 * parser.c (is_cilkplus_vector_p): Don't define here.
848
dcdbc004
JM
8492015-10-19 Jason Merrill <jason@redhat.com>
850
0d8ab59c
JM
851 PR c++/67064
852 * semantics.c (force_paren_expr): Don't mess with hard register vars.
853
2a9fb712
JM
854 Implement N4268, Do constant evaluation of all non-type template args.
855 * parser.c (cp_parser_template_argument): For C++1z just parse a
856 constant-expression.
857 * pt.c (convert_nontype_argument): For C++1z always call
858 maybe_constant_value.
859
dcdbc004
JM
860 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
861 only when necessary.
862 (cxx_eval_component_reference): Like here.
863 * decl2.c (lower_var_init): And here.
864 (c_parse_final_cleanups): Call it.
865 * typeck2.c (digest_init_r): Not here.
866 * decl.c (complete_vars): Or here.
867 (cp_finish_decl): Add local statics to symbol table.
868
49489608
JM
8692015-10-17 Jason Merrill <jason@redhat.com>
870
871 PR c++/68006
872 * decl.c (implicit_default_ctor_p): New.
873 (start_preparsed_function): Don't clobber on entry to one.
874
4856a1f0
PC
8752015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
876
877 PR c++/67926
878 * constexpr.c (potential_constant_expression_1): Handle
879 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
880 BINARY_RIGHT_FOLD_EXPR.
881
d9a6bd32
JJ
8822015-10-13 Jakub Jelinek <jakub@redhat.com>
883 Aldy Hernandez <aldyh@redhat.com>
884
885 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
886 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
887 (cp_genericize_r): Likewise.
888 (cxx_omp_finish_clause): Don't diagnose references.
889 (cxx_omp_disregard_value_expr): New function.
890 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
891 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
892 (DECL_OMP_PRIVATIZED_MEMBER): Define.
893 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
894 pop_omp_privatization_clauses, save_omp_privatization_clauses,
895 restore_omp_privatization_clauses, omp_privatize_field,
896 cxx_omp_disregard_value_expr): New prototypes.
897 (finish_omp_clauses): Add two new arguments.
898 (finish_omp_for): Add ORIG_DECLV argument.
899 * parser.c (cp_parser_lambda_body): Call
900 save_omp_privatization_clauses and restore_omp_privatization_clauses.
901 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
902 (cp_parser_omp_var_list_no_open): Handle structure elements for
903 map, to and from clauses. Handle array sections in reduction
904 clause. Parse this keyword. Formatting fixes.
905 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
906 if clause modifiers.
907 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
908 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
909 cp_parser_omp_clause_defaultmap): New functions.
910 (cp_parser_omp_clause_ordered): Parse optional parameter.
911 (cp_parser_omp_clause_reduction): Handle array reductions.
912 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
913 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
914 New functions.
915 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
916 (cp_parser_omp_clause_depend_sink): New function.
917 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
918 (cp_parser_omp_clause_map): Parse release/delete map kinds and
919 optional always modifier.
920 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
921 and finish_omp_clauses callers.
922 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
923 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
924 (OMP_CRITICAL_CLAUSE_MASK): Define.
925 (cp_parser_omp_critical): Parse critical clauses.
926 (cp_parser_omp_for_incr): Use cp_tree_equal if
927 processing_template_decl.
928 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
929 non-static data member iterators.
930 (cp_parser_omp_for_loop): Handle doacross loops, adjust
931 finish_omp_for and finish_omp_clauses callers.
932 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
933 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
934 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
935 (OMP_FOR_CLAUSE_MASK): Add linear clause.
936 (cp_parser_omp_for): Disallow ordered clause when combined with
937 distribute. Disallow linear clause when combined with distribute
938 and not combined with simd.
939 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
940 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
941 of tree, parse clauses and if depend clause is found, don't parse
942 a body.
943 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
944 Allow target parallel without for after it.
945 (OMP_TASK_CLAUSE_MASK): Add priority clause.
946 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
947 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
948 invalid kinds.
949 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
950 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
951 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
952 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
953 functions.
954 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
955 defaultmap and is_device_ptr clauses.
956 (cp_parser_omp_target): Parse target parallel and target simd. Set
957 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
958 and target exit data. Diagnose invalid map kinds.
959 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
960 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
961 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
962 construct.
963 (OMP_TASKLOOP_CLAUSE_MASK): Define.
964 (cp_parser_omp_taskloop): New function.
965 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
966 handle PRAGMA_OMP_TASKLOOP.
967 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
968 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
969 and pop_omp_privatization_clauses around parsing calls.
970 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
971 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
972 and finish_omp_clauses callers.
973 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
974 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
975 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
976 effects.
977 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
978 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
979 If ALLOW_FIELDS, handle non-static data members in the clauses.
980 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
981 (omp_parallel_combined_clauses): New variable.
982 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
983 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
984 Improve handling of clauses on combined constructs.
985 (tsubst_expr): Call push_omp_privatization_clauses and
986 pop_omp_privatization_clauses around instantiation of certain
987 OpenMP constructs, improve handling of clauses on combined
988 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
989 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
990 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
991 (instantiate_decl): Call save_omp_privatization_clauses and
992 restore_omp_privatization_clauses around instantiation.
993 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
994 * semantics.c (omp_private_member_map, omp_private_member_vec,
995 omp_private_member_ignore_next): New variables.
996 (finish_non_static_data_member): Return dummy decl for privatized
997 non-static data members.
998 (omp_clause_decl_field, omp_clause_printable_decl,
999 omp_note_field_privatization, omp_privatize_field): New functions.
1000 (handle_omp_array_sections_1): Fix comment typo.
1001 Add IS_OMP argument, handle structure element bases, diagnose
1002 bitfields, pass IS_OMP recursively, diagnose known zero length
1003 array sections in depend clauses, handle array sections in reduction
1004 clause, diagnose negative length even for pointers.
1005 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1006 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1007 array sections in reduction clause, set
1008 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1009 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1010 (finish_omp_reduction_clause): Handle array sections and arrays.
1011 Use omp_clause_printable_decl.
1012 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
1013 New functions.
1014 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
1015 Handle new OpenMP 4.5 clauses and new restrictions for the old
1016 ones, handle non-static data members, reject this keyword when not
1017 allowed.
1018 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
1019 save_omp_privatization_clauses, restore_omp_privatization_clauses):
1020 New functions.
1021 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
1022 Add collapse and ordered arguments. Fix handling of lastprivate
1023 iterators in doacross loops.
1024 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
1025 adjust c_finish_omp_for, handle_omp_for_class_iterator and
1026 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
1027 loops with non-static data member iterators.
1028
7624ca36
VV
10292015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1030
1031 PR c++/58566
1032 * lambda.c (lambda_return_type): Return error_mark_node
1033 instead of void_type_node for the error cases.
1034
338976c2
JM
10352015-10-08 Jason Merrill <jason@redhat.com>
1036
1037 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
1038 * init.c (get_nsdmi): Use it.
1039 * typeck2.c (massage_init_elt): Use it.
1040
3c769e5a
JM
10412015-10-07 Jason Merrill <jason@redhat.com>
1042
1043 PR c++/67557
1044 * call.c (is_base_field_ref): New.
1045 (unsafe_copy_elision_p): New.
1046 (build_over_call): Use it.
1047
b850dd2f
MP
10482015-10-07 Marek Polacek <polacek@redhat.com>
1049
1050 PR sanitizer/67867
1051 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
1052
5b5dce39
MP
10532015-10-07 Marek Polacek <polacek@redhat.com>
1054
1055 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
1056 (genericize_cp_loop): Likewise.
1057 * decl.c (cxx_maybe_build_cleanup): Likewise.
1058 * parser.c (cp_parser_binary_expression): Likewise.
1059 (cp_parser_omp_for_loop): Likewise.
1060 (cp_parser_omp_construct): Likewise.
1061 * semantics.c (finish_transaction_stmt): Likewise.
1062 (build_transaction_expr): Likewise.
1063
8237beb1
JM
10642015-10-06 Jason Merrill <jason@redhat.com>
1065
1066 PR c++/67810
1067 * parser.c (cp_parser_fold_expr_p): Remove.
1068 (is_binary_op): New.
1069 (cp_parser_fold_expression): Take LHS as parameter.
1070 (cp_parser_primary_expression): Call it after parsing an expression.
1071 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
1072 (cp_parser_expression): Ignore an operator followed by '...'.
1073 (is_binary_op): New.
1074 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
1075 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
1076
46836b0e
MP
10772015-10-06 Marek Polacek <polacek@redhat.com>
1078
1079 PR c++/67863
1080 * call.c (build_conditional_expr_1): Build the COND_EXPR with
1081 a location.
1082
fcbc0f7c
PC
10832015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
1084
1085 PR c++/53856
1086 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
1087 reject default template arguments in out of class definitions
1088 of members of non-template classes.
1089
624d31fe
RS
10902015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1091
1092 * tree.c (cp_tree_equal): Use real_equal instead of
1093 REAL_VALUES_EQUAL.
1094
b8fd7909
JM
10952015-10-04 Jason Merrill <jason@redhat.com>
1096
1097 Implement N4514, C++ Extensions for Transactional Memory.
1098 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
1099 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
1100 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
1101 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
1102 (make_call_declarator): Take tx_qualifier.
1103 (cp_parser_tx_qualifier_opt): New.
1104 (cp_parser_lambda_declarator_opt): Use it.
1105 (cp_parser_direct_declarator): Likewise.
1106 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
1107 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
1108 (cp_parser_std_attribute): Map optimize_for_synchronized to
1109 transaction_callable.
1110 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
1111 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
1112 * call.c (enum conversion_kind): Add ck_tsafe.
1113 (standard_conversion): Handle transaction-safety conversion.
1114 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
1115 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
1116 function.
1117 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
1118 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
1119 (can_convert_tx_safety): New.
1120 * typeck.c (composite_pointer_type): Handle transaction-safety.
1121 * name-lookup.h (enum scope_kind): Add sk_transaction.
1122 * name-lookup.c (begin_scope): Handle it.
1123 * semantics.c (begin_compound_stmt): Pass it.
1124 * decl.c (check_previous_goto_1): Check it.
1125 (struct named_label_entry): Add in_transaction_scope.
1126 (poplevel_named_label_1): Set it.
1127 (check_goto): Check it.
1128 (duplicate_decls): A specialization can be transaction_safe
1129 independently of its template.
1130 (grokdeclarator): Handle tx-qualifier.
1131 * rtti.c (ptr_initializer): Handle transaction-safe.
1132 * search.c (check_final_overrider): Check transaction_safe_dynamic.
1133 Don't check transaction_safe.
1134 * mangle.c (write_function_type): Mangle transaction_safe here.
1135 (write_CV_qualifiers_for_type): Not here.
1136 (write_type): Preserve transaction_safe when stripping attributes.
1137 * error.c (dump_type_suffix): Print transaction_safe.
1138
3e3b8d63
MP
11392015-10-02 Marek Polacek <polacek@redhat.com>
1140
1141 PR c/64249
1142 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
1143 down to cp_parser_selection_statement.
1144 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
1145 warn about duplicated if-else-if conditions.
1146 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
1147 it down to cp_parser_statement.
1148
55fec44d
VV
11492015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1150
1151 PR c++/54430
1152 * name-lookup.c (push_binding): Make non-static.
1153 * name-lookup.h (push_binding): Declare it.
1154 * parser.c (cp_parser_range_for): Use it, get the range
1155 declaration away from the scope until the range expression
1156 has been parsed, then restore the declaration.
1157
99474f81
VV
11582015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
1159
1160 Fix small typos in the coding rule enforcement warnings.
1161 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
1162 with 'namespace'.
1163
6b333269
NS
11642015-09-22 Nathan Sidwell <nathan@codesourcery.com>
1165
1166 * decl.c (xref_basetypes): Check virtual and/or multiple
1167 inheritance warning.
1168 * parser.c (cp_parser_namespace_definition): Check namespaces
1169 warning.
1170 * pt.c (push_template_decl_real): Check templates warning.
1171
a75f1574
JM
11722015-09-22 Jason Merrill <jason@redhat.com>
1173
1174 * mangle.c (abi_warn_or_compat_version_crosses): New.
1175 Use it instead of abi_version_crosses.
1176 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
1177
bdaaa8b7
VV
11782015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1179
1180 Complete the implementation of N4230, Nested namespace definition.
1181 * parser.c (cp_parser_namespace_definition): Support namespace
1182 attributes both before and after the namespace identifier.
1183
355fe088
TS
11842015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
1185
1186 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
1187
15eefe57
VV
11882015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
1189
1190 Implement nested namespace definitions.
1191 * parser.c (cp_parser_namespace_definition): Grok nested namespace
1192 definitions.
1193
c4914de6
MLI
11942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1195
1196 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
1197 make it more similar to the C version.
1198
378b307d
AS
11992015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
1200 Jason Merrill <jason@redhat.com>
1201
1202 Implement N4295 fold-expressions.
1203 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
1204 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
1205 * cp-objcp-common.c (cp_common_init_ts): Handle them.
1206 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
1207 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
1208 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
1209 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
1210 or_comma parameter to or_ttype.
1211 (cp_parser_fold_operator, cp_parser_fold_expr_p)
1212 (cp_parser_fold_expression): New.
1213 (cp_parser_primary_expression): Use them.
1214 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
1215 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
1216 (tsubst_binary_left_fold, expand_right_fold)
1217 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
1218 (tsubst_copy): Use them.
1219 (type_dependent_expression_p): Handle fold-expressions.
1220 * semantics.c (finish_unary_fold_expr)
1221 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
1222 (finish_binary_fold_expr): New.
1223
b5415a9e
RB
12242015-09-17 Richard Biener <rguenther@suse.de>
1225
1226 * cp-tree.h (note_decl_for_pch): Remove.
1227 * class.c (build_clone): Do not call note_decl_for_pch.
1228 * semantics.c (finish_member_declaration): Likewise.
1229 (note_decl_for_pch): Remove.
1230 * decl2.c (c_parse_final_cleanups): Mangle all globals before
1231 writing the PCH.
1232
65440c48
JM
12332015-09-14 Jason Merrill <jason@redhat.com>
1234
1235 PR c++/44282
1236 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
1237 mangling with lower -fabi-version.
1238
5a0f3af4
PC
12392015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
1240
1241 PR c++/51911
1242 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
1243 per the spirit of DR 1467).
1244
0f876f22
MW
12452015-09-11 Mark Wielaard <mjw@redhat.com>
1246
1247 PR c/28901
1248 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
1249 VAR_P TREE_READONLY override.
1250
08f8b665
PC
12512015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
1252
1253 PR c++/67318
1254 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
1255 and set template_parameter_pack_p also when the type is null.
1256
dbb68221
MW
12572015-09-09 Mark Wielaard <mjw@redhat.com>
1258
1259 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
1260 parm against NULL.
1261
4e4d2c41
JJ
12622015-09-10 Jakub Jelinek <jakub@redhat.com>
1263
7da8534d
JJ
1264 PR c++/67522
1265 * semantics.c (handle_omp_array_sections_1): Only run
1266 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
1267 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
1268 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
1269 is not a VAR_DECL/PARM_DECL.
1270
4e4d2c41
JJ
1271 PR c++/67511
1272 * semantics.c (handle_omp_for_class_iterator): Don't wrap
1273 error_mark_node into a NOP_EXPR to void_type_node.
1274
273aa49e
PC
12752015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1276
1277 PR c++/53184
1278 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
1279
6cbf37c3
JJ
12802015-09-09 Jakub Jelinek <jakub@redhat.com>
1281
1282 PR c++/67504
1283 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
1284 before INTEGRAL_TYPE_P test.
1285
97973457
JM
12862015-09-08 Jason Merrill <jason@redhat.com>
1287
1288 PR c++/67041
1289 * pt.c (tsubst_copy_and_build): Handle variables like functions.
1290
761f8e2f
PC
12912015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
1292
1293 PR c++/67369
1294 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
1295 if the first argument isn't a template.
1296
1807ffc1
MS
12972015-09-03 Martin Sebor <msebor@redhat.com>
1298
1299 PR c/66516
8b652e65 1300 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
1807ffc1 1301 argument(s).
8b652e65
JJ
1302 * expr.c (mark_rvalue_use): Use new argument.
1303 * call.c (build_addr_func): Call decay_conversion with new
1807ffc1 1304 argument.
8b652e65
JJ
1305 * pt.c (convert_template_argument): Call reject_gcc_builtin.
1306 * typeck.c (decay_conversion): Use new argument.
1807ffc1
MS
1307 (c_decl_implicit): Define.
1308
38942840
BI
13092015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
1310
1311 PR middle-end/60586
1312 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
1313 function.
1314 (cp_gimplify_expr): Added a call to the function
1315 cilk_cp_gimplify_call_params_in_spawned_fn.
1316
6853b04c
PC
13172015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
1318
1319 PR c++/61753
1320 * decl.c (smallest_type_quals_location): New.
1321 (check_special_function_return_type): Use the latter; add int and
1322 const location_t* parameters.
1323 (grokdeclarator): Adjust check_special_function_return_type call.
1324
ce965730
MT
13252015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
1326
1327 PR c++/67371
1328 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
1329 case. Move label to COND_EXPR case. Remove checking of
1330 SWITCH_STMT_BODY.
1331
82e78c3f
PC
13322015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1333
1334 PR c++/63693
1335 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
1336 only on class types.
1337
7717e0f1
JM
13382015-08-21 Jason Merrill <jason@redhat.com>
1339
1340 PR c++/67240
1341 * constraint.cc (satisfy_implicit_conversion_constraint): Also
1342 check for NULL_TREE.
1343
d8f29cc0
PC
13442015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1345
1346 * decl.c (grokvardecl): Simplify the latter.
1347
cf6a9610
PC
13482015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1349
1350 * decl.c (grokvardecl): Complete check added for c++/67065.
1351
062ed875
JM
13522015-08-20 Jason Merrill <jason@redhat.com>
1353
1354 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
1355
dfd71aba
PC
13562015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
1357
1358 PR c++/67065
1359 * decl.c (grokvardecl): Reject 'main' as global variable.
1360
18c4fa8e
JM
13612015-08-19 Jason Merrill <jason@redhat.com>
1362
7ac2c0bd
JM
1363 PR c++/66957
1364 * search.c (protected_accessible_p): Remove redundant access_in_type.
1365 Add otype parm instead of walking binfo.
1366 (friend_accessible_p): Check SCOPE itself. Handle class
1367 templates. Pass through otype.
1368 (dfs_accessible_post): Handle all accessibility cases.
1369 (dfs_accessible_pre): New.
1370 (accessible_p): Use it. Don't check protected access here. Pass
1371 decl and otype to dfs_walk.
1372 (member_declared_in_type, dfs_access_in_type_pre): New.
1373 (access_in_type): Use dfs_access_in_type_pre.
1374 * friend.c (add_friend): Fix multiple friends with the same name.
1375
18c4fa8e
JM
1376 * lambda.c (current_nonlambda_scope): New.
1377
a79683d5
TS
13782015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1379
1380 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
1381 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
1382 semantics.c, typeck2.c: Remove useless typedefs.
1383
8e43da81
JM
13842015-08-18 Jason Merrill <jason@redhat.com>
1385
1386 DR 1155
1387 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
1388 and up.
1389
5916cfd0
PC
13902015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
1391
1392 PR c++/67216
1393 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
1394
5c563482
JM
13952015-08-17 Jason Merrill <jason@redhat.com>
1396
b361a15f
JM
1397 PR c++/67244
1398 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
1399
ceaaf873
JM
1400 PR c++/67104
1401 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
1402 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
1403
c75ce530
JM
1404 * constexpr.c (cxx_eval_store_expression): Don't set
1405 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
1406 without it.
1407 (cxx_eval_array_reference): Check it.
1408
5c563482
JM
1409 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
1410
60349f15
JM
14112015-08-14 Jason Merrill <jason@redhat.com>
1412
1413 PR c++/65974
1414 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
1415
4757fa7f
JM
14162015-08-12 Jason Merrill <jason@redhat.com>
1417
bd07e167
JM
1418 PR c++/67104
1419 * constexpr.c (cxx_eval_array_reference): Fix typo.
1420
3b9997bb
JM
1421 PR c++/67104
1422 * constexpr.c (cxx_eval_array_reference): Handle sparse
1423 CONSTRUCTORs.
1424
e5e58dbe
JM
1425 PR c++/67108
1426 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
1427 * error.c (dump_template_bindings): Don't tsubst in that case.
1428
4757fa7f
JM
1429 PR c++/67161
1430 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
1431 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
1432
a2dfb563
JM
14332015-08-08 Jason Merrill <jason@redhat.com>
1434
7beb0c35
JM
1435 PR c++/67152
1436 * pt.c (process_partial_specialization): Call
1437 associate_classtype_constraints.
1438
4e7739b2
JM
1439 PR c++/67159
1440 * constraint.cc (finish_template_introduction):
1441 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1442
d6729a42
JM
1443 PR c++/67142
1444 * pt.c (equal): Make sure tmpl is actually a template.
1445
d0920fa2 1446 PR c++/67144
a2dfb563
JM
1447 * call.c (joust): Only call more_constrained on decls.
1448
971e17ff
AS
14492015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
1450 Braden Obrzut <admin@maniacsvault.net>
1451 Jason Merrill <jason@redhat.com>
82b11019 1452 Ville Voutilainen <ville.voutilainen@gmail.com>
971e17ff
AS
1453
1454 Add C++ Concepts TS support.
1455 * constraint.cc, logic.cc: New files.
1456 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
1457 (c++.tags): Also process .cc files.
1458 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
1459 (print_z_candidate): Handle it.
1460 (constraint_failure): New.
1461 (add_function_candidate): Check constraints.
1462 (build_new_function_call): Handle evaluating concepts.
1463 (joust): Check more_constrained.
1464 * class.c (add_method): Check equivalently_constrained.
1465 (build_clone): Copy constraints.
1466 (currently_open_class): Return tree.
1467 (resolve_address_of_overloaded_function): Check constraints.
1468 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
1469 (potential_constant_expression_1): Likewise.
1470 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
1471 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
1472 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
1473 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
1474 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
1475 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
1476 * cp-tree.h (struct tree_constraint_info, check_nonnull)
1477 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
1478 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
1479 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
1480 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
1481 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
1482 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
1483 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
1484 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
1485 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
1486 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
1487 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
1488 (struct local_specialization_stack, enum auto_deduction_context)
1489 (variable_concept_p, concept_template_p)
1490 (struct deferring_access_check_sentinel): New.
1491 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
1492 (union lang_tree_node): Add constraint_info field.
1493 (struct lang_decl_base): Add concept_p flag.
1494 (enum cp_decl_spec): Add ds_concept.
1495 (struct cp_declarator): Add requires_clause.
1496 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1497 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
1498 TRAIT_EXPR, *_CONSTR.
1499 (pp_cxx_parameter_declaration_clause): Accept a chain of
1500 PARM_DECLs.
1501 (cxx_pretty_printer::declarator): Print requires-clause.
1502 (pp_cxx_template_declaration): Likewise.
1503 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
1504 (pp_cxx_requires_clause, pp_cxx_requirement)
1505 (pp_cxx_requirement_list, pp_cxx_requirement_body)
1506 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
1507 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
1508 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
1509 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
1510 (pp_cxx_implicit_conversion_constraint)
1511 (pp_cxx_argument_deduction_constraint)
1512 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
1513 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
1514 * cxx-pretty-print.h: Declare them.
1515 * decl.c (decls_match): Compare constraints.
1516 (duplicate_decls): Likewise. Remove constraints before freeing.
1517 (cxx_init_decl_processing): Call init_constraint_processing.
1518 (cp_finish_decl): Diagnose concept without initializer.
1519 (grokfndecl, grokvardecl): Handle concepts and constraints.
1520 (grokdeclarator): Handle concept, requires-clause.
1521 (grokparms): No longer static.
1522 (xref_tag_1): Check constraints.
1523 (finish_function): Call check_function_concept.
1524 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
1525 (check_concept_refinement, is_concept_var, check_concept_fn): New.
1526 * decl2.c (check_classfn): Compare constraints.
1527 (mark_used): Don't instantiate concepts.
1528 * error.c (dump_template_decl): Print constraints.
1529 (dump_function_decl): Likewise.
1530 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
1531 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
1532 * method.c (implicitly_declare_fn): Copy constraints from
1533 inherited ctor.
1534 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
1535 prevent_constrained_type_specifiers fields.
1536 * parser.c (make_call_declarator): Add requires_clause parm.
1537 (cp_parser_new): Clear prevent_constrained_type_specifiers.
1538 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
1539 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
1540 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
1541 (cp_parser_declaration): Handle concept introduction.
1542 (cp_parser_member_declaration): Likewise.
1543 (cp_parser_template_parameter): Handle constrained parameter.
1544 (cp_parser_type_parameter): Handle constraints.
1545 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
1546 (cp_parser_template_id): Handle partial concept id.
1547 (cp_parser_type_name): Add overload that takes typename_keyword_p.
1548 Handle constrained parameter.
1549 (cp_parser_nonclass_name): Handle concept names.
1550 (cp_parser_alias_declaration): Handle constraints.
1551 (cp_parser_late_return_type_opt): Also handle requires-clause.
1552 (cp_parser_type_id_1): Handle deduction constraint.
1553 (cp_parser_parameter_declaration): Handle constrained parameters.
1554 (cp_parser_class_specifier_1): Handle constraints.
1555 (cp_parser_template_declaration_after_parameters): Split out from
1556 cp_parser_template_declaration_after_export.
1557 (cp_parser_single_declaration): Handle constraints.
1558 (synthesize_implicit_template_parm): Handle constraints.
1559 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1560 (cp_parser_introduction_list, get_id_declarator)
1561 (get_unqualified_id, is_constrained_parameter)
1562 (cp_parser_check_constrained_type_parm)
1563 (cp_parser_constrained_type_template_parm)
1564 (cp_parser_constrained_template_template_parm)
1565 (constrained_non_type_template_parm, finish_constrained_parameter)
1566 (declares_constrained_type_template_parameter)
1567 (declares_constrained_template_template_parameter)
1568 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
1569 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1570 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
1571 (cp_parser_requires_expression)
1572 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
1573 (cp_parser_requirement_list, cp_parser_requirement)
1574 (cp_parser_simple_requirement, cp_parser_type_requirement)
1575 (cp_parser_compound_requirement, cp_parser_nested_requirement)
1576 (cp_parser_template_introduction)
1577 (cp_parser_explicit_template_declaration)
1578 (get_concept_from_constraint): New.
1579 * pt.c (local_specialization_stack): Implement.
1580 (maybe_new_partial_specialization): New.
1581 (maybe_process_partial_specialization): Use it.
1582 (retrieve_local_specialization, register_local_specialization)
1583 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
1584 (tsubst_expr): No longer static.
1585 (spec_hasher::equal): Compare constraints.
1586 (determine_specialization): Handle constraints.
1587 (check_explicit_specialization): Handle concepts.
1588 (process_template_parm): Handle constraints.
1589 (end_template_parm_list): Add overload taking no arguments.
1590 (process_partial_specialization): Handle concepts and constraints.
1591 Register partial specializations of variable templates.
1592 (redeclare_class_template): Handle constraints.
1593 (convert_template_argument): Handle WILDCARD_DECL. Check
1594 is_compatible_template_arg.
1595 (coerce_template_parameter_pack): Handle wildcard packs.
1596 (coerce_template_parms): DR 1430 also applies to concepts. Add
1597 overloads taking fewer parameters.
1598 (lookup_template_class_1): Handle constraints.
1599 (lookup_template_variable): Concepts are always bool.
1600 (finish_template_variable): Handle concepts and constraints.
1601 (tsubst_friend_class): Handle constraints.
1602 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
1603 (tsubst_pack_expansion): Handle local parameters.
1604 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1605 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1606 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1607 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1608 (more_specialized_inst): Split out from most_specialized_instantiation.
1609 (most_specialized_partial_spec): Check constraints.
1610 (instantiate_decl): Never instantiate a concept.
1611 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1612 variable concepts.
1613 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1614 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1615 (do_auto_deduction): Add overload taking tsubst flags and context enum.
1616 Handle constraints.
1617 (get_template_for_ordering, most_constrained_function)
1618 (is_compatible_template_arg, convert_wildcard_argument)
1619 (struct constr_entry, struct constr_hasher, decl_constraints)
1620 (valid_constraints_p, get_constraints, set_constraints)
1621 (remove_constraints, init_constraint_processing): New.
1622 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1623 * search.c (lookup_member): Do lookup in the open partial
1624 instantiation.
1625 * semantics.c (finish_template_template_parm): Handle constraints.
1626 (fixup_template_type): New.
1627 (finish_template_type): Call it.
1628 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1629 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1630 (cp_walk_subtrees): Handle REQUIRES_EXPR.
1631 * typeck.c (cp_build_function_call_vec): Check constraints.
1632
c1153c19
JM
16332015-08-06 Jason Merrill <jason@redhat.com>
1634
1bcc5f29
JM
1635 PR c++/66533
1636 * parser.c (cp_parser_primary_expression): Don't skip to the end
1637 of the statement if we're parsing tentatively.
1638
c1153c19
JM
1639 PR c++/67130
1640 PR c++/67131
1641 PR c++/66260
1642 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1643 templates.
1644 * pt.c (tsubst_copy_and_build): Check for argument substitution
1645 failure.
1646
85171e78
JM
16472015-08-05 Jason Merrill <jason@redhat.com>
1648
f31d0b12
JM
1649 * pt.c (determine_specialization): Print candidates after 'no
1650 match' error.
1651
a2b4cfaa
JM
1652 * decl.c (cp_finish_decl): Tidy.
1653 * typeck.c (finish_class_member_access_expr): Use
1654 type_dependent_expression_p.
1655 * semantics.c (finish_id_expression): Use
1656 type_dependent_expression_p. Don't build_qualified_name for a
1657 decl in non-dependent scope.
1658 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1659 identifier is dependent. Remove variable_template_p check.
1660
dc062b49
JM
1661 PR c++/66260
1662 PR c++/66596
1663 PR c++/66649
1664 PR c++/66923
1665 * pt.c (lookup_template_variable): Use NULL_TREE for type.
1666 (instantiate_template_1): Also set DECL_TI_ARGS based on
1667 the immediate parent.
1668 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1669 (finish_template_variable): Add complain parm.
1670 * cp-tree.h: Adjust.
1671
85171e78
JM
1672 PR c++/65195
1673 PR c++/66619
1674 * semantics.c (finish_id_expression): Call convert_from_reference
1675 for variable template.
1676
f107ee33
JM
16772015-08-04 Jason Merrill <jason@redhat.com>
1678
3da33383
JM
1679 * pt.c (lookup_template_class_1): Clear elt.spec.
1680
f107ee33
JM
1681 * tree.c (build_target_expr): Copy the location from value.
1682
992118a1
PP
16832015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1684
1685 * parser.c (cp_parser_selection_statement): Move handling of
1686 semicolon body to ...
1687 (cp_parser_implicitly_scoped_statement): .. here. Call
1688 warn_for_misleading_indentation even when the body is a
1689 semicolon. Extract token_indent_infos corresponding to the
1690 guard, body and next tokens. Adjust call to
1691 warn_for_misleading_indentation accordingly. Take
1692 token_indent_info argument.
1693 (cp_parser_already_scoped_statement): Likewise.
1694 (cp_parser_selection_statement, cp_parser_iteration_statement):
1695 Extract a token_indent_info corresponding to the guard token.
1696
b0cca5ec
CT
16972015-08-01 Caroline Tice <cmtice@google.com>
1698
1699 PR 66521
1700 * mangle.c : Add vtable-verify.h to include files.
1701 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
1702 is "<anon>" get the real mangled name for the class instead, and
1703 also store the real mangled name in a vector for use later.
1704
ec043522
MP
17052015-07-31 Marek Polacek <polacek@redhat.com>
1706
1707 PR sanitizer/66977
1708 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1709 RSHIFT_EXPR.
1710
15827d12
PC
17112015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1712
1713 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1714 in warning_at instead of "%q+D" in warning.
1715 (warn_hidden): Likewise but use location_of.
1716 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1717 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1718 (check_field_decls): Likewise for permerror.
1719 (explain_non_literal_class): Likewise for inform.
1720 (check_bases_and_members, layout_class_type): Likewise for warning_at.
1721 (note_name_declared_in_class): Use location_of in permerror.
1722 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1723 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1724 inform, and warning_at.
1725 (check_for_out_of_scope_variable): Likewise for warning_at and
1726 permerror.
1727
4fdfdd4f
JM
17282015-07-30 Jason Merrill <jason@redhat.com>
1729
1730 DR 1558
1731 PR c++/67021
1732 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1733
4b1cbcee
PC
17342015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
1735
1736 * call.c (build_op_delete_call, convert_like_real, build_over_call):
1737 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1738 of "%q+D".
1739 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1740 * decl.c (duplicate_decls): Likewise for warning/warning_at.
1741 * except.c (maybe_noexcept_warning): Likewise.
1742 * friend.c (make_friend_class): Likewise for inform.
1743 * mangle.c (mangle_decl): Likewise for warning/warning_at.
1744 * method.c (process_subob_fn, walk_field_subobs,
1745 maybe_explain_implicit_delete): Likewise for inform.
1746 * parser.c (cp_parser_lambda_introducer): Likewise.
1747 * pt.c (check_specialization_namespace,
1748 maybe_process_partial_specialization): Likewise for permerror.
1749 (redeclare_class_template): Likewise for inform_n.
1750 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1751 * search.c (check_final_overrider): Likewise.
1752 * semantics.c (process_outer_var_ref): Likewise.
1753
cca444fb
JM
17542015-07-27 Jason Merrill <jason@redhat.com>
1755
1756 * constexpr.c (cxx_eval_call_expression): Don't add this call to
1757 the hash table if !depth_ok.
1758
05b28fd6
MP
17592015-07-27 Marek Polacek <polacek@redhat.com>
1760
1761 PR c++/66555
1762 PR c/54979
1763 * call.c (build_new_op_1): Call warn_tautological_cmp.
1764 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1765 compare warnings.
1766
11f2c78a
PP
17672015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
1768
1769 PR c++/18969
1770 * typeck.c (check_return_expr): Also do the basic return-value
1771 validity checking if processing_template_decl and yet types are
1772 not dependent. Remove obsolete code.
1773
af718670
PC
17742015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
1775
1776 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1777 in warning_at instead of "%q+D" in warning.
1778 (warn_extern_redeclared_static): Likewise for inform.
1779 (check_redeclaration_no_default_args): Likewise for permerror.
1780 (duplicate_decls): Likewise.
1781 (check_previous_goto_1): Likewise for inform.
1782 (check_goto, start_decl, check_for_uninitialized_const_var,
1783 start_preparsed_function, finish_function§): Likewise.
1784 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1785 * init.c (sort_mem_initializers): Likewise.
1786 * typeck.c (convert_for_initialization): Likewise for inform.
1787 (maybe_warn_about_returning_address_of_local): Likewise.
1788 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1789 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1790
9783ae5a
PP
17912015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
1792
1793 PR c++/66857
1794 * cvt.c (ocp_convert): Don't call scalar_constant_value when
1795 converting to a class type.
1796
0c0d447a
JM
17972015-07-24 Jason Merrill <jason@redhat.com>
1798
00367044 1799 PR c++/64969
0c0d447a
JM
1800 * pt.c (splice_late_return_type): Correct deduced return type for
1801 abbreviated function template.
1802
24f1db9c
RB
18032015-07-24 Richard Biener <rguenther@suse.de>
1804
1805 * init.c (build_vec_init): Build iterator bound in the same
1806 type as the iterator.
1807
04e4dbd0
MP
18082015-07-23 Marek Polacek <polacek@redhat.com>
1809
1810 PR c++/66572
1811 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1812
25f05e7b
PC
18132015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
1814
1815 PR c++/52987
1816 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1817 redundant error messages.
1818
faa16e44
PC
18192015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1820
1821 * decl.c (grokdeclarator): For an erroneous template parameter
1822 propagate error_mark_node as type.
1823
451b5e48
MP
18242015-07-20 Marek Polacek <polacek@redhat.com>
1825
1826 PR c++/55095
1827 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1828
0467e3eb
JM
18292015-07-15 Jason Merrill <jason@redhat.com>
1830
1831 PR c++/65091
1832 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1833 template if there is no type x in scope.
1834
09f725f4
PP
18352015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
1836
1837 PR c++/66850
1838 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1839 template template parm in the redeclaration.
1840 (lookup_template_class_1): Peel off irrelevant template levels
1841 from current_template_parms before augmenting the argument
1842 list.
1843
973590f3
AA
18442015-07-14 Andrea Azzarone <azzaronea@gmail.com>
1845
1846 PR c++/65071
1847 * parser.c (cp_parser_sizeof_pack): Also consider template template
1848 parameters.
1849
e056dfd0
JM
18502015-07-14 Jason Merrill <jason@redhat.com>
1851
1852 * call.c (build_new_method_call_1): Call reshape_init.
1853
87679b76
PC
18542015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
1855
1856 * pt.c (check_template_shadow): Emit error + inform instead of
1857 two errors.
1858
15d6614a
PP
18592015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
1860
1861 PR c++/65186
1862 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1863 template parm type under C++11 and later.
1864
026c3cfd
AH
18652015-07-12 Aldy Hernandez <aldyh@redhat.com>
1866
1867 * call.c: Fix double word typos.
1868 * cp-array-notation.c: Same.
1869 * cp-tree.h: Same.
1870 * init.c: Same.
1871 * name-lookup.c: Same.
1872 * parser.c: Same.
1873
c5540945
PP
18742015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
1875
1876 PR c++/30044
1877 * pt.c (begin_template_parm_list): Add a dummy parameter level
1878 to current_template_parms.
1879 (end_template_parm_list): Remove the dummy parameter level
1880 before adding the real one.
1881 (tsubst): Don't attempt to substitute for template parameters
1882 corresponding to a dummy argument level.
1883 (template_parms_to_args): Remove obsolete hack for
1884 giving template template arguments the proper level.
1885 (splite_late_return_type): Remove obsolete hack for giving
1886 template template arguments the proper level.
1887 * error.c (dump_template_decl): Don't print dummy template
1888 levels.
1889
0a73242e
PC
18902015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1891
1892 PR c++/54521
1893 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1894 the second step of copy-initialization.
1895
55b467a0
JM
18962015-07-10 Jason Merrill <jason@redhat.com>
1897
8de8fdb4
JM
1898 * pt.c (find_parameter_packs_r): Handle variable templates.
1899 (variable_template_specialization_p): New.
1900 * cp-tree.h: Declare it.
1901
55b467a0
JM
1902 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1903
bb49ee66
EB
19042015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1905
1906 * decl2.c (cpp_check): Revert latest change.
1907
5c4e8e5c
JM
19082015-07-09 Jason Merrill <jason@redhat.com>
1909
1bf3fe3c
JM
1910 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1911 value_dependent_expression_p.
1912
5c4e8e5c
JM
1913 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1914 template_parameter_pack_p.
1915 * parser.c (declarator_can_be_parameter_pack): False if
1916 parameter_pack_p is set.
1917 (make_parameter_declarator): Add template_parameter_pack_p parm.
1918 (cp_parser_template_parameter): Remove parameter pack parsing.
1919 (cp_parser_parameter_declaration): Handle all parameter packs.
1920 Tweak default argument permerror.
1921
2cc6d90e
AS
19222015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1923
1924 * parser.c (cp_parser_default_type_template_argument)
1925 (cp_parser_default_template_template_argument): Factor out from
1926 cp_parser_type_parameter.
1927
09bae928
PC
19282015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1929
1930 * typeck.c (warn_args_num): Rename to error_args_num.
1931 (convert_arguments): Adjust calls.
1932
f51ade33
AM
19332015-07-09 Andrew MacLeod <amacleod@redhat.com>
1934
1935 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1936
a9dcd529
EB
19372015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1940
b03b462f
JJ
19412015-07-08 Jakub Jelinek <jakub@redhat.com>
1942
1943 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1944 * pt.c (apply_late_template_attributes): Likewise.
1945
7b3bc1f3
MP
19462015-07-08 Marek Polacek <polacek@redhat.com>
1947
1948 PR c++/66748
1949 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1950 accessing TYPE_LANG_SPECIFIC node.
1951
c7131fb2
AM
19522015-07-07 Andrew MacLeod <amacleod@redhat.com>
1953
1954 * call.c: Adjust includes.
1955 * class.c: Likewise.
1956 * constexpr.c: Likewise.
1957 * cp-array-notation.c: Likewise.
1958 * cp-gimplify.c: Likewise.
1959 * cp-lang.c: Likewise.
1960 * cp-objcp-common.c: Likewise.
1961 * cp-ubsan.c: Likewise.
1962 * cvt.c: Likewise.
1963 * decl.c: Likewise.
1964 * decl2.c: Likewise.
1965 * dump.c: Likewise.
1966 * error.c: Likewise.
1967 * except.c: Likewise.
1968 * expr.c: Likewise.
1969 * friend.c: Likewise.
1970 * init.c: Likewise.
1971 * lambda.c: Likewise.
1972 * lex.c: Likewise.
1973 * mangle.c: Likewise.
1974 * method.c: Likewise.
1975 * name-lookup.c: Likewise.
1976 * optimize.c: Likewise.
1977 * parser.c: Likewise.
1978 * pt.c: Likewise.
1979 * ptree.c: Likewise.
1980 * repo.c: Likewise.
1981 * rtti.c: Likewise.
1982 * search.c: Likewise.
1983 * semantics.c: Likewise.
1984 * tree.c: Likewise.
1985 * typeck.c: Likewise.
1986 * typeck2.c: Likewise.
1987
2a7fb83f
EB
19882015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1989
1990 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1991
d762287d
JM
19922015-07-06 Jason Merrill <jason@redhat.com>
1993
4366e1c0
JM
1994 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1995 for a template template parameter.
1996 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1997 by reduce_template_parm_level.
1998
d762287d
JM
1999 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
2000 expansion.
2001
a426f31a
JM
20022015-07-02 Jason Merrill <jason@redhat.com>
2003
2004 PR c++/66743
2005 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
2006 TYPE_VALUES_RAW rather than TYPE_FIELDS.
2007
ee00eaea
AS
20082015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
2009
2010 * pt.c (type_dependent_expression_p): Handle expressions
2011 that refer to variable templates.
2012
d68f848b
JM
20132015-07-01 Jason Merrill <jason@redhat.com>
2014
36a85135
JM
2015 * lex.c (init_reswords): s/CXX0X/CXX11/.
2016 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
2017
a03c9bf1
JM
2018 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
2019 Attribute mangling is now -fabi-version=10.
2020
d68f848b
JM
2021 PR c++/65945
2022 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
2023 * class.c (layout_nonempty_base_or_field): Warn if that affects
2024 the offset of a field.
2025
a31dc4e5
PC
20262015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
2027
2028 PR c++/60365
2029 * parser.c (cp_parser_check_std_attribute): New.
2030 (cp_parser_std_attribute_list): Call it.
2031
f58d5e06
PP
20322015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
2033
2034 PR c++/66686
2035 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
2036 return 0 if tsubst returns a dependent type.
2037
3048c0c7
JM
20382015-06-30 Jason Merrill <jason@redhat.com>
2039
47297e51
JM
2040 PR debug/66653
2041 * decl2.c (is_late_template_attribute): True for tls_model.
2042
3048c0c7
JM
2043 PR debug/66653
2044 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
2045 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
2046 (SET_DECL_GNU_TLS_P): New.
2047 * call.c (make_temporary_var_for_ref_to_temp): Use
2048 CP_DECL_THREAD_LOCAL_P.
2049 (set_up_extended_ref_temp): Likewise.
2050 * decl.c (duplicate_decls, expand_static_init): Likewise.
2051 (redeclaration_error_message, grokvardecl): Likewise.
2052 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
2053 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
2054 (handle_tls_init): Likewise.
2055 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2056 * semantics.c (finish_id_expression): Likewise.
2057 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
2058 (finish_omp_threadprivate): Likewise.
2059 * tree.c (decl_storage_duration): Likewise.
2060 * cp-gimplify.c (omp_var_to_track): Likewise.
2061 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
2062 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
2063 already set.
2064
fe95b036
ESR
20652015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
2066
2067 Implement N4197 - Adding u8 character literals
2068 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
2069 and CPP_UTF8CHAR_USERDEF tokens;
2070 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
2071
71506d41
PC
20722015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
2073
2074 PR c++/65977
2075 * decl.c (grokfndecl): Allow constexpr declarations of friend
2076 template specializations.
2077
da2e71c9
MLI
20782015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2079
2080 PR fortran/66605
2081 * decl.c (finish_function): Call do_warn_unused_parameter.
2082
b155cfd9
MP
20832015-06-29 Marek Polacek <polacek@redhat.com>
2084
2085 PR c/66322
2086 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
2087 (push_switch): Set OUTSIDE_RANGE_P.
2088 (pop_switch): Update c_do_switch_warnings call.
2089 (finish_case_label): Update c_add_case_label call.
2090 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
2091 here.
2092
b55b02ea
MP
20932015-06-27 Marek Polacek <polacek@redhat.com>
2094
2095 * call.c: Use VECTOR_TYPE_P.
2096 * constexpr.c: Likewise.
2097 * cvt.c: Likewise.
2098 * decl.c: Likewise.
2099 * decl2.c: Likewise.
2100 * init.c: Likewise.
2101 * semantics.c: Likewise.
2102 * tree.c: Likewise.
2103 * typeck.c: Likewise.
2104 * typeck2.c: Likewise.
2105
56a6f1d3
MP
21062015-06-27 Marek Polacek <polacek@redhat.com>
2107
2108 * call.c (set_up_extended_ref_temp): Use VAR_P.
2109 * class.c: Use VAR_P throughout.
2110 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
2111 * cp-array-notation.c (make_triplet_val_inv): Likewise.
2112 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
2113 throughout.
2114 * decl2.c: Likewise.
2115 * error.c (dump_decl): Use VAR_P.
2116 * mangle.c (decl_implicit_alias_p): Likewise.
2117 * parser.c: Use VAR_P throughout.
2118 * pt.c: Likewise.
2119 * semantics.c: Likewise.
2120 * vtable-class-hierarchy.c: Likewise.
2121 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
2122
e1cc2355
AS
21232015-06-27 Andreas Schwab <schwab@linux-m68k.org>
2124
2125 * pt.c (check_unstripped_args): Mark parameter as unused.
2126
7457279b
JM
21272015-06-26 Jason Merrill <jason@redhat.com>
2128
e0ff153d
JM
2129 PR c++/66216
2130 * class.c (finish_struct): Call fixup_attribute_variants.
2131
9579e906
JM
2132 PR c++/66684
2133 * typeck2.c (merge_exception_specifiers): Allow different
2134 noexcept-specifiers if we've had errors.
2135
7498239e
JM
2136 PR c++/66255
2137 * pt.c (check_unstripped_args): Split out from...
2138 (retrieve_specialization): ...here. Allow typedefs in the type of
2139 a non-type argument.
2140
d15364ce
JM
2141 PR c++/66067
2142 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
2143 TYPE_DECLs.
2144 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
2145
7457279b
JM
2146 PR c++/66654
2147 * typeck2.c (digest_init_r): Only expect reshaping if the class is
2148 aggregate.
2149
311bd4d8
MP
21502015-06-26 Marek Polacek <polacek@redhat.com>
2151
2152 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
2153 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
2154
f0889939
AM
21552015-06-25 Andrew MacLeod <amacleod@redhat.com>
2156
2157 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
2158 * class.c: Likewise.
2159 * cp-ubsan.c: Likewise.
2160 * decl.c: Likewise.
2161 * decl2.c: Likewise.
2162 * lambda.c: Likewise.
2163 * mangle.c: Likewise.
2164 * method.c: Likewise.
2165 * optimize.c: Likewise.
2166 * parser.c: Likewise.
2167 * semantics.c: Likewise.
2168 * tree.c: Likewise.
2169 * vtable-class-hierarchy.c: Likewise.
2170
ca752f39
RS
21712015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2172
2173 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
2174 rather than ggc_hasher.
2175 (constexpr_call_hasher): Likewise.
2176 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
2177 * decl.c (typename_hasher): Likewise.
2178 * mangle.c (conv_type_hasher): Likewise.
2179 * pt.c (spec_hasher): Likewise.
2180 * tree.c (cplus_array_hasher, list_hasher): Likewise.
2181 * typeck2.c (abstract_type_hasher): Likewise.
2182
8d67ee55
RS
21832015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2184
2185 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
2186 rather than pointer_hash.
2187 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
2188 * semantics.c (nrv_data): Likewise.
2189 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
2190
024f2d89
JM
21912015-06-24 Jason Merrill <jason@redhat.com>
2192
e6d61513
JM
2193 PR c++/66647
2194 * pt.c (dependent_type_p_r): Check for dependent alias template
2195 specialization sooner.
2196
024f2d89
JM
2197 PR c++/66501
2198 * class.c (type_has_nontrivial_assignment): Remove.
2199 * cp-tree.h: Remove declaration.
2200 * init.c (vec_copy_assign_is_trivial): New.
2201 (build_vec_init): Use it.
2202
e79fc3d4
ESR
22032015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
2204
2205 Implement N3928 - Extending static_assert
2206 * parser.c (cp_parser_static_assert): Support static_assert with
2207 no message string. Supply an empty string in this case.
2208 * semantics.c (finish_static_assert): Don't try to print a message if
2209 the message strnig is empty.
2210
aa97bb6f
AB
22112015-06-24 Adam Butcher <adam@jessamine.co.uk>
2212
2213 PR c++/65750
2214 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
2215 implicit template parm if 'auto' is a placeholder for trailing
2216 return type.
2217
7af8ef58
PP
22182015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
2219
2220 Revert:
2221 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2222
2223 PR c++/30044
2224 * parser.c (cp_parser_template_parameter_list): Update
2225 current_template_parms right after processing a paramater.
2226 * pt.c (template_parms_to_args): Remove obsolete hack for
2227 giving template template arguments the proper level.
2228 (check_default_tmpl_args): Account for tested template
2229 parameter_lists.
2230 (splite_late_return_type): Remove obsolete hack for giving
2231 template template arguments the proper level.
2232
72e839ca
PC
22332015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2234
2235 PR c++/65811
2236 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2237
1a8f8908
PP
22382015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
2239
6c4ed521 2240 PR c++/30044
1a8f8908
PP
2241 * parser.c (cp_parser_template_parameter_list): Update
2242 current_template_parms right after processing a paramater.
2243 * pt.c (template_parms_to_args): Remove obsolete hack for
2244 giving template template arguments the proper level.
2245 (check_default_tmpl_args): Account for tested template
2246 parameter_lists.
2247 (splite_late_return_type): Remove obsolete hack for giving
2248 template template arguments the proper level.
2249
d4c9e7f9
JM
22502015-06-23 Jason Merrill <jason@redhat.com>
2251
d88511ae
JM
2252 PR c++/65879
2253 * decl.c (grokfndecl): Check the linkage of ctype, not just
2254 TYPE_ANONYMOUS_P.
2255 * tree.c (no_linkage_check): Skip the 'this' pointer.
2256
115ef7c5
JM
2257 PR c++/66501
2258 * class.c (type_has_nontrivial_assignment): New.
2259 * init.c (build_vec_init): Use it.
2260 * cp-tree.h: Declare it.
2261 * method.c (trivial_fn_p): Templates aren't trivial.
2262
d4c9e7f9
JM
2263 PR c++/66542
2264 * decl.c (expand_static_init): Make sure the destructor is callable
2265 here even if we have an initializer.
2266
6935a923
PMR
22672015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2268
2269 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
2270 -fdump-ada-spec is passed.
2271
c6a2f2d9
PMR
22722015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
2273
2274 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
2275
ea663be9
PC
22762015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2277
2278 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
2279
22802015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
2281
2282 * decl.c (grokdeclarator): Remove pointless code.
2283
e8a3c597
JM
22842015-06-22 Jason Merrill <jason@redhat.com>
2285
2286 PR c++/66515
2287 * call.c (implicit_conversion): Only reshape for classes.
2288
6b4db501
MM
22892015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
2290
2291 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
2292 manually swapping.
2293 * semantics.c (finish_omp_atomic): Likewise.
2294 * typeck.c (cp_build_array_ref): Likewise.
2295
cd95a0d5
MM
22962015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
2297
2298 PR c++/65882
2299 * call.c (build_new_op_1): Check tf_warning flag in all cases.
2300
1539357d 23012015-06-19 Jason Merrill <jason@redhat.com>
2ddf4350
JM
2302
2303 PR c++/66585
2304 * pt.c (instantiate_class_template_1): Clear
2305 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
2306
62245e6f
JM
2307 PR c++/65880
2308 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
2309 cv-qualifiers.
2310 * typeck.c (merge_types): build_ptrmemfunc_type before applying
2311 quals and attributes.
2312
30ac6e80
JM
2313 PR c++/65973
2314 * constexpr.c (build_constexpr_constructor_member_initializers):
2315 Handle an empty STATEMENT_LIST.
2316
892562cf
JM
2317 PR c++/65843
2318 * pt.c (tsubst_copy_and_build): Register a capture proxy in
2319 local_specializations.
2320
769430b2
JM
23212015-06-17 Jason Merrill <jason@redhat.com>
2322
2323 PR c++/66001
2324 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
2325 TRY_FINALLY_EXPR.
2326 (potential_constant_expression_1): Likewise.
2327
9fa6ffe1
JM
23282015-06-17 Jason Merrill <jason@redhat.com>
2329
2330 PR c++/66515
2331 * call.c (implicit_conversion): Call reshape_init here, early.
2332 (build_aggr_conv): Not here.
2333
64b5fcfa
JJ
23342015-06-17 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR c++/66571
cc63a7fa
JJ
2337 * pt.c (tsubst_omp_clause_decl): New function.
2338 (tsubst_omp_clauses): Use it or tsubst_copy instead of
2339 tsubst_expr on OMP_CLAUSE_DECL.
64b5fcfa 2340
ee47f74e
AM
23412015-06-17 Andrew MacLeod <amacleod@redhat.com>
2342
2343 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
2344 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
2345 * decl.c (grokdeclarator, xref_tag_1): Likewise.
2346 * error.c (dump_aggr_type): likewise.
2347 * pt.c (push_template_decl_real): Likewise.
2348 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
2349
abb226c9
AM
23502015-06-17 Andrew MacLeod <amacleod@redhat.com>
2351
2352 * call.c: Do not include input.h, line-map.h or is-a.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.
2361 * cvt.c: Likewise.
2362 * decl.c: Likewise.
2363 * decl2.c: Likewise.
2364 * dump.c: Likewise.
2365 * error.c: Likewise.
2366 * except.c: Likewise.
2367 * expr.c: Likewise.
2368 * friend.c: Likewise.
2369 * init.c: Likewise.
2370 * lambda.c: Likewise.
2371 * lex.c: Likewise.
2372 * mangle.c: Likewise.
2373 * method.c: Likewise.
2374 * name-lookup.c: Likewise.
2375 * optimize.c: Likewise.
2376 * parser.c: Likewise.
2377 * pt.c: Likewise.
2378 * ptree.c: Likewise.
2379 * repo.c: Likewise.
2380 * rtti.c: Likewise.
2381 * search.c: Likewise.
2382 * semantics.c: Likewise.
2383 * tree.c: Likewise.
2384 * typeck.c: Likewise.
2385 * typeck2.c: Likewise.
2386 * vtable-class-hierarchy.c: Likewise.
2387
ba394ca6
PC
23882015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
2389
2390 PR c++/59682
2391 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
2392
63d02f05
JM
23932015-06-16 Jason Merrill <jason@redhat.com>
2394
7599760d
JM
2395 PR c++/66536
2396 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
2397 mismatch.
2398
2ed4c029
JM
2399 PR c++/58063
2400 * tree.c (bot_manip): Remap SAVE_EXPR.
2401
63d02f05
JM
2402 PR c++/66387
2403 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
2404
04eca83e
NS
24052015-06-15 Nathan Sidwell <nathan@acm.org>
2406
2407 PR c++/58583
2408 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
2409 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
2410 protect it from recursive instantiation.
2411
f92c7426
PC
24122015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
2413
2414 PR c++/51048
2415 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
2416 using a local type is pure virtual.
2417
6feffb3a
PP
24182015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2419
2420 * call.c: Remove comment documenting the long-deleted
2421 function build_method_call.
2422
076fecad
PP
24232015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2424
2425 PR c++/65168
2426 * typeck.c (cp_build_binary_op): Warn when comparing an address
2427 of a reference against NULL.
2428
350562a7
JM
24292015-06-12 Jason Merrill <jason@redhat.com>
2430
2431 PR c++/65719
2432 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
2433 variables as DECL_NOT_REALLY_EXTERN.
2434
acb2970c
JM
24352015-06-11 Jason Merrill <jason@redhat.com>
2436
133bc698
JM
2437 PR c++/66445
2438 * constexpr.c (potential_constant_expression_1): Handle a
2439 DECL_EXPR of TYPE_DECL.
2440
acb2970c
JM
2441 PR c++/66450
2442 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
2443 ctx->ctor.
2444
a0349665
PMR
24452015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2446
2447 * decl.c (cxx_init_decl_processing): Register the main
2448 translation unit through the new debug hook.
2449
1a4cd2cd
JM
24502015-06-10 Jason Merrill <jason@redhat.com>
2451
2452 PR c++/66289
2453 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
2454 * pt.c (push_template_decl_real): Set it.
2455 (dependent_alias_template_spec_p): Use it.
2456 (dependent_type_p_r): Use dependent_alias_template_spec_p.
2457 (uses_all_template_parms_data, uses_all_template_parms_r)
2458 (complex_alias_template_p): New.
2459 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
2460
5af874fb
JM
24612015-06-09 Jason Merrill <jason@redhat.com>
2462
34f42d7b
JM
2463 DR 1467
2464 PR c++/51747
2465 * typeck2.c (digest_init_r): Replace previous change with
2466 gcc_unreachable.
2467
5af874fb
JM
2468 PR c++/66387
2469 * semantics.c (process_outer_var_ref): Make sure the value is
2470 actually constant before returning it.
2471 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
2472 array.
2473
ebcf592c
PC
24742015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2475
2476 PR c++/65815
2477 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
2478 * init.c (expand_default_init): Likewise.
2479
6a9263f7
JM
24802015-06-09 Jason Merrill <jason@redhat.com>
2481
2482 PR c++/66383
2483 * tree.c (replace_placeholders_r): Handle placeholders for an
2484 outer object.
2485 * typeck2.c (store_init_value): Only replace_placeholders for
2486 objects of class type.
2487
13fdf2e2
AM
24882015-06-08 Andrew MacLeod <amacleod@redhat.com>
2489
2490 * call.c : Adjust include files.
2491 * class.c : Likewise.
2492 * constexpr.c : Likewise.
2493 * cp-array-notation.c : Likewise.
2494 * cp-cilkplus.c : Likewise.
2495 * cp-gimplify.c : Likewise.
2496 * cp-lang.c : Likewise.
2497 * cp-objcp-common.c : Likewise.
2498 * cp-tree.h : Likewise.
2499 * cp-ubsan.c : Likewise.
2500 * cvt.c : Likewise.
2501 * decl.c : Likewise.
2502 * decl2.c : Likewise.
2503 * dump.c : Likewise.
2504 * error.c : Likewise.
2505 * except.c : Likewise.
2506 * expr.c : Likewise.
2507 * friend.c : Likewise.
2508 * init.c : Likewise.
2509 * lambda.c : Likewise.
2510 * lex.c : Likewise.
2511 * mangle.c : Likewise.
2512 * method.c : Likewise.
2513 * name-lookup.c : Likewise.
2514 * optimize.c : Likewise.
2515 * parser.c : Likewise.
2516 * pt.c : Likewise.
2517 * ptree.c : Likewise.
2518 * repo.c : Likewise.
2519 * rtti.c : Likewise.
2520 * search.c : Likewise.
2521 * semantics.c : Likewise.
2522 * tree.c : Likewise.
2523 * typeck.c : Likewise.
2524 * typeck2.c : Likewise.
2525 * vtable-class-hierarchy.c : Likewise.
2526
85d9a299
JM
25272015-06-05 Jason Merrill <jason@redhat.com>
2528
39f383b7
JM
2529 PR c++/66405
2530 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
2531 the expansion has extra args.
2532 (use_pack_expansion_extra_args_p): Return true in that case.
2533
85d9a299
JM
2534 PR c++/66405
2535 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
2536 dependent even if it has a type.
2537
d7438551
AH
25382015-06-05 Aldy Hernandez <aldyh@redhat.com>
2539
2540 * cp-objcp-common.c: Adjust comment for
2541 cxx_warn_unused_global_decl.
2542 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
2543 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
2544 * cp-tree.h (note_mangling_alias): Protoize.
2545 (cp_write_global_declarations): Remove.
2546 (cxx_post_compilation_parsing_cleanups): Protoize.
2547 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
2548 argument.
2549 * decl2.c (mangling_aliases): New global.
2550 (build_java_method_aliases): New. Adapted from
2551 collect_candidates_for_java_method_aliases.
2552 (collect_candidates_for_java_method_aliases): Remove.
2553 (build_java_method_aliases): Remove.
2554 (generate_mangling_aliases): New.
2555 (note_mangling_alias): New. Moved from mangle_decl.
2556 (locus_at_end_of_parsing): New global.
2557 (c_parse_final_cleanups): Rename from
2558 cp_write_global_declarations.
2559 Use locus_at_end_of_parsing.
2560 Call generate_mangling_aliases.
2561 Rename call to collect_candidates_for_java_method_aliases into
2562 build_java_method_aliases.
2563 Remove call to finalize_compilation_unit.
2564 Move vtable handling into cxx_post_compilation_parsing_cleanups.
2565 Do not call check_global_declarations or
2566 emit_debug_global_declarations.
2567 (cxx_post_compilation_parsing_cleanups): New.
2568 * mangle.c (mangle_decl): Move code to note_mangling_alias.
2569 * name-lookup.c (do_namespace_alias): Call early_global_decl.
2570
ac59f9be
NS
25712015-06-05 Nathan Sidwell <nathan@acm.org>
2572
2573 PR c++/52595
2574 * parser.c (cp_parser_cache_defarg): Continue looking for
2575 declarators when scanning a potential template argument list of an
2576 NSDMI.
2577
ecb9f223
AM
25782015-06-04 Andrew MacLeod <amacleod@redhat.com>
2579
2580 * call.c: Adjust includes for restructured coretypes.h.
2581 * class.c: Likewise.
2582 * constexpr.c: Likewise.
2583 * cp-array-notation.c: Likewise.
2584 * cp-gimplify.c: Likewise.
2585 * cp-lang.c: Likewise.
2586 * cp-objcp-common.c: Likewise.
2587 * cp-tree.h: Likewise.
2588 * cp-ubsan.c: Likewise.
2589 * cvt.c: Likewise.
2590 * decl.c: Likewise.
2591 * decl2.c: Likewise.
2592 * dump.c: Likewise.
2593 * error.c: Likewise.
2594 * except.c: Likewise.
2595 * expr.c: Likewise.
2596 * friend.c: Likewise.
2597 * init.c: Likewise.
2598 * lambda.c: Likewise.
2599 * lex.c: Likewise.
2600 * mangle.c: Likewise.
2601 * method.c: Likewise.
2602 * name-lookup.c: Likewise.
2603 * optimize.c: Likewise.
2604 * parser.c: Likewise.
2605 * pt.c: Likewise.
2606 * ptree.c: Likewise.
2607 * repo.c: Likewise.
2608 * rtti.c: Likewise.
2609 * search.c: Likewise.
2610 * semantics.c: Likewise.
2611 * tree.c: Likewise.
2612 * typeck.c: Likewise.
2613 * typeck2.c: Likewise.
2614 * vtable-class-hierarchy.c: Likewise.
2615
e93ca5ca
RR
26162015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2617
2618 PR c++/66192
2619 PR target/66200
2620 * cp-tree.h (get_guard_cond): Adjust declaration
2621 * decl.c (expand_static_init): Use atomic load acquire
2622 and adjust call to get_guard_cond.
2623 * decl2.c (build_atomic_load_byte): New function.
2624 (get_guard_cond): Handle thread_safety.
2625 (one_static_initialization_or_destruction): Adjust call to
2626 get_guard_cond.
2627
1cc1ac7f
JM
26282015-06-03 Jason Merrill <jason@redhat.com>
2629
2630 PR c++/44282
2631 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2632 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2633 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2634 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2635
d3ea4c06
MLI
26362015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2637 Paolo Carlini <paolo.carlini@oracle.com>
2638
2639 PR c++/66130
2640 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2641 use it in the diagnostic.
2642 (decay_conversion): Adjust call.
2643 * semantics.c (finish_decltype_type): Likewise.
2644 * call.c (resolve_args, build_new_op_1,
2645 perform_implicit_conversion_flags): Adjust calls.
2646 * cvt.c (ocp_convert, convert_to_void): Likewise.
2647 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2648
4753e009
PC
26492015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2650
2651 * decl.c (check_tag_decl): Use declspecs->locations as locations in
2652 error_at and warning_at calls.
2653
7b3a9795
MP
26542015-06-03 Marek Polacek <polacek@redhat.com>
2655
2656 PR sanitizer/66190
2657 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2658 (cp_genericize_r): Don't instrument static initializers.
2659 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2660
ea5b45b6
AT
26612015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2662
2663 * decl.c (start_function): Call plugin before parsing.
2664 (finish_function): Call plugin after parsing.
2665
5d58db82
PP
26662015-06-02 Patrick Palka <patrick@parcs.ath.cx>
2667
2668 * cp-tree.h (init_error): Remove declaration.
2669 * error.c (scratch_pretty_printer): Rename to ...
2670 (actual_pretty_printer): ... this.
2671 (cxx_pp): Constify and update accordingly.
2672 (init_error): Remove definition.
2673 * lex.c (cxx_init): Do not call init_error.
2674
a983abd2
PC
26752015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2676
2677 PR c++/61683
2678 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2679
603eaec4
JM
26802015-06-01 Jason Merrill <jason@redhat.com>
2681
81371eff
JM
2682 PR c++/65942
2683 * decl2.c (mark_used): Don't always instantiate constexpr fns.
2684 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2685
603eaec4
JM
2686 PR c++/44282
2687 * mangle.c (attr_strcmp): New.
2688 (write_CV_qualifiers_for_type): Also write out attributes that
2689 affect type identity.
2690 (write_type): Strip all attributes after writing qualifiers.
2691
6ad6af49
JM
26922015-05-31 Jason Merrill <jason@redhat.com>
2693
255a48d6
JM
2694 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2695
6ad6af49
JM
2696 PR c++/66320
2697 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2698 with the wrong type as non-constant.
2699
f4252989
JM
27002015-05-27 Jason Merrill <jason@redhat.com>
2701
cba16cca
JM
2702 * decl.c (check_redeclaration_exception_specification): Depend on
2703 -Wsystem-headers rather than -pedantic.
2704
f4252989
JM
2705 * decl.c (warn_extern_redeclared_static): Use the location of
2706 newdecl in diagnostics, not input_location.
2707 (validate_constexpr_redeclaration): Likewise.
2708 (check_redeclaration_no_default_args): Likewise.
2709 (duplicate_decls): Likewise.
2710 (check_redeclaration_exception_specification): Likewise.
2711 Change second diagnostic to inform.
2712
6f2d72e0
NS
27132015-05-24 Nathan Sidwell <nathan@acm.org>
2714
2715 PR c++/66243
2716 * decl.c (build_enumerator): Don't silently convert scoped enums.
2717
27182015-05-24 Jan Hubicka <hubicka@ucw.cz>
233ce289
JH
2719
2720 PR lto/66180
2721 * mangle.c (mangle_decl): Mangle anonymous namespace types as
2722 "<anon>".
2723
84a3423b
NS
27242015-05-23 Nathan Sidwell <nathan@acm.org>
2725
2726 PR c++/65936
2727 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2728
a95492ab
JW
27292015-05-22 Jim Wilson <jim.wilson@linaro.org>
2730
2731 * Make-lang.in (check_g++_parallelize): Update comment.
2732
320d13ec
PC
27332015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2734
2735 PR c++/65598
2736 * decl.c (grokdeclarator): Use the correct location in error
2737 messages about 'explicit'.
2738
fd5c817a
MP
27392015-05-22 Marek Polacek <polacek@redhat.com>
2740 Edward Smith-Rowland <3dw4rd@verizon.net>
2741
2742 PR c/47043
2743 * cp-tree.h (build_enumerator): Update declaration.
2744 * decl.c (build_enumerator): Add attributes parameter. Call
2745 cplus_decl_attributes.
2746 * init.c (constant_value_1): Pass tf_none to mark_used.
2747 * parser.c (cp_parser_enumerator_definition): Parse attributes and
2748 pass them down to build_enumerator.
2749 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2750 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2751
9ab2fcc1
NS
27522015-05-21 Nathan Sidwell <nathan@acm.org>
2753
2754 PR c++/60943
2755 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2756
6b6dd1aa
MP
27572015-05-21 Marek Polacek <polacek@redhat.com>
2758
2759 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2760
12101053
JM
27612015-05-20 Jason Merrill <jason@redhat.com>
2762
226a93b7
JM
2763 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2764 before register_specialization.
2765
12101053
JM
2766 * decl.c (grok_op_properties): Don't complain about size_t
2767 placement delete here.
2768 * call.c (second_parm_is_size_t): Split out from...
2769 (non_placement_deallocation_fn_p): ...here.
2770 (build_op_delete_call): Warn about size_t placement delete with
2771 -Wc++14-compat.
2772
9ab2fcc1 27732015-05-19 Nathan Sidwell <nathan@acm.org>
09b59d4d
NS
2774
2775 PR c++/65954
2776 * typeck.c (finish_class_member_access_expr): Diagnose failed
2777 lookup of enum class member.
2778
41b37d5e
JJ
27792015-05-19 Jakub Jelinek <jakub@redhat.com>
2780
2781 PR middle-end/66199
2782 * parser.c (cp_parser_omp_for_loop): Don't add
2783 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2784 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2785 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2786 constructs.
2787
fab27f52
MM
27882015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2789
2790 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2791 swaps.
2792
80f1c14d
JM
27932015-05-18 Jason Merrill <jason@redhat.com>
2794
f41aecf4
JM
2795 * pt.c (retrieve_specialization): Make sure our arguments have
2796 gone through strip_typedefs.
2797
b237c4cb
JM
2798 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2799 (determine_specialization): Call coerce_template_parms.
2800
c4d6d7bc
JM
2801 DR 1391
2802 * pt.c (type_unification_real): Check convertibility here.
2803 (unify_one_argument): Not here.
2804
8f56fadc
JM
2805 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2806 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2807 [TREE_LIST]: Fix no-change case.
2808
80f1c14d
JM
2809 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2810
40de31cf
MLI
28112015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2812
2813 PR fortran/44054
2814 * error.c (cp_diagnostic_starter): Use diagnostic_location
2815 function.
2816 (cp_print_error_function): Likewise.
2817 (cp_printer): Replace locus pointer with accessor function.
2818
c3388e62
DM
28192015-05-12 David Malcolm <dmalcolm@redhat.com>
2820
2821 * parser.c (cp_parser_selection_statement): Add location and
2822 guard_kind arguments to calls to
2823 cp_parser_implicitly_scoped_statement.
2824 (cp_parser_iteration_statement): Likewise for calls to
2825 cp_parser_already_scoped_statement.
2826 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2827 "guard_kind" params; use them to warn for misleading
2828 indentation.
2829 (cp_parser_already_scoped_statement): Likewise.
2830
5ce039df
JH
28312015-05-11 Jan Hubicka <hubicka@ucw.cz>
2832
2833 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2834 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2835 * semantics.c (finish_member_declaration): Likewise.
2836 * method.c (lazily_declare_fn): Allways add method to main variant list.
2837
a31765ef
AH
28382015-05-09 Aldy Hernandez <aldyh@redhat.com>
2839
2840 PR bootstrap/66085
2841 * decl2.c (note_mangling_alias): Declare arguments as unused.
2842
765189ff
JM
28432015-05-08 Jason Merrill <jason@redhat.com>
2844
2845 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2846 -Wc++0x-compat.
2847
613aba20
JM
28482015-05-08 Jason Merrill <jason@redhat.com>
2849
2850 * decl2.c (mangling_aliases): New variable.
2851 (note_mangling_alias, generate_mangling_aliases): New.
2852 (cp_write_global_declarations): Call generate_mangling_aliases.
2853 (generate_mangling_alias): Split out from...
2854 * mangle.c (mangle_decl): ...here.
2855 * cp-tree.h: Declare note_mangling_alias.
2856
09c5f835
AH
28572015-05-08 Aldy Hernandez <aldyh@redhat.com>
2858
2859 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2860 (build_java_method_aliases): Adapt to use create_same_body_alias
2861 instead of assemble_alias. Move variable declarations to
2862 definition and tidy up.
2863 (cp_write_global_declarations): Call build_java_method_aliases
2864 instead of collecting candidates first.
2865
90f11cf9
JM
28662015-05-07 Jason Merrill <jason@redhat.com>
2867
2868 PR c++/59012
2869 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2870 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2871 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2872 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2873 (apply_late_template_attributes): Handle attribute pack expansion.
2874
0173bd2a
MP
28752015-05-07 Marek Polacek <polacek@redhat.com>
2876
2877 PR c/65179
2878 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2879 value.
2880
d5449acf
JM
28812015-05-07 Jason Merrill <jason@redhat.com>
2882
2883 DR 1467
2884 PR c++/51747
2885 * typeck2.c (digest_init_r): Fix single element list.
2886
b8dd6913
JM
28872015-05-05 Jason Merrill <jason@redhat.com>
2888
8243e2a9
JM
2889 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2890 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2891 MUST_NOT_THROW_EXPR.
2892 (cp_genericize_data): Add try_block field.
2893 (cp_genericize_tree): Initialize it.
2894 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2895 implicit rethrow.
2896
81b6a6c5
JM
2897 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2898 Return false.
2899
32ad49af
JM
2900 * semantics.c (finish_call_expr): Check complain.
2901
15ed2619
JM
2902 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2903 maybe-in-charge constructor.
2904
f8aa3dd3
JM
2905 * decl.c (start_decl): Don't push the plain VAR_DECL for a
2906 variable template.
2907
b8dd6913
JM
2908 DR 1518
2909 DR 1630
2910 PR c++/54835
2911 PR c++/60417
2912 * call.c (convert_like_real): Check value-initialization before
2913 explicit.
2914 * typeck2.c (process_init_constructor_record): Don't set
2915 CONSTRUCTOR_IS_DIRECT_INIT.
2916 (process_init_constructor_array): Likewise.
2917 * init.c (build_vec_init): Likewise.
2918
21c0a521
DM
29192015-05-05 David Malcolm <dmalcolm@redhat.com>
2920
2921 * parser.c (cp_parser_asm_definition): Only test for
2922 error_mark_node if "outputs" was just set. Likewise for "inputs".
2923
f5322614
PC
29242015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2925 Jakub Jelinek <jakub@redhat.com>
2926
2927 PR c++/66007
2928 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2929 result in an actual error.
2930
38920aec
PC
29312015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2932 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
2933
2934 PR c++/65858
2935 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2936 false.
2937
6f3d1a5e
DM
29382015-04-30 David Malcolm <dmalcolm@redhat.com>
2939
2940 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2941 trailing semicolon.
2942
9f7fb685
JM
29432015-04-29 Jason Merrill <jason@redhat.com>
2944
2945 PR c++/50800
2946 * tree.c (apply_identity_attributes): Fix handling of classes.
2947
b811915d
TS
29482015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2949
2950 * parser.c (cp_parser_oacc_enter_exit_data): Use
2951 OMP_STANDALONE_CLAUSES.
2952
0aa359c1
PC
29532015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
2954
2955 PR c++/64667
2956 * init.c (perform_member_init): Handle references for -Winit-self.
2957
2c8f0683
TS
29582015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2959
2960 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2961 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2962
7bfc5ada
JM
29632015-04-28 Jason Merrill <jason@redhat.com>
2964
3f8e2835
JM
2965 PR c++/65896
2966 * constexpr.c (cxx_eval_store_expression): Don't try to actually
2967 store an empty class.
2968
5756d0f9
JM
2969 PR c++/65656
2970 * constexpr.c (cxx_eval_builtin_function_call): Fix
2971 __builtin_constant_p.
2972
b71983a5
JM
2973 PR c++/50800
2974 * tree.c (strip_typedefs): Add remove_attributes parm.
2975 (strip_typedefs_expr): Likewise.
2976 (apply_identity_attributes): New subroutine of strip_typedefs.
2977 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2978 (convert_nontype_argument, unify): Likewise.
2979 * cp-tree.h: Adjust.
2980
7bfc5ada
JM
2981 PR c++/65734
2982 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2983
1d0275e2
TS
29842015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2985
2986 * class.c (layout_class_type): Remove check if
2987 PCC_BITFIELD_TYPE_MATTERS is defined.
2988
46bf0b0a
JW
29892015-04-27 Jim Wilson <jim.wilson@linaro.org>
2990
2991 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2992
f8815f7a
JM
29932015-04-24 Jason Merrill <jason@redhat.com>
2994
c6f044f7
JM
2995 PR c++/50800
2996 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2997
f8815f7a
JM
2998 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2999 Remove obsolete code.
3000 [NE_EXPR]: Likewise.
3001
6c283621
JM
30022015-04-23 Jason Merrill <jason@redhat.com>
3003
3004 PR c++/65646
3005 * pt.c (check_explicit_specialization): Don't
3006 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
3007 headers.
3008 * decl.c (grokvardecl): Revert earlier fix.
3009
2821fc6b
PC
30102015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
3011
3012 PR c++/65801
3013 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
3014 suppresses the diagnostic.
3015
0cfabb37
VV
30162015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
3017
3018 Reject trailing return type for an operator auto().
3019 * decl.c (grokdeclarator): Reject trailing return types for
3020 all conversion operators, don't handle conversion operators
3021 in the previous checks that deal with auto.
3022
06aca1d5
IV
30232015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3024
3025 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
3026
988db853
PC
30272015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
3028
3029 * class.c (resolve_address_of_overloaded_function, instantiate_type):
3030 Rename tsubst_flags_t parameter flags -> complain.
3031
9f635aba
PC
30322015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
3033
3034 * call.c (build_op_delete_call, build_over_call): Check mark_used
3035 return value.
3036 * class.c (resolve_address_of_overloaded_function): Likewise.
3037 * decl.c (cxx_maybe_build_cleanup): Likewise.
3038 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
3039 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
3040 * rtti.c (build_dynamic_cast_1): Likewise.
3041 * semantics.c (process_outer_var_ref): Likewise.
3042 * typeck.c (build_class_member_access_expr,
3043 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
3044
bf5730d7
JM
30452015-04-15 Jason Merrill <jason@redhat.com>
3046
58cc255c
JM
3047 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
3048 (build_constexpr_constructor_member_initializers): Loop to find
3049 the BIND_EXPR.
3050 * decl.c (start_preparsed_function): Clobber the object at the
3051 beginning of a constructor.
3052
efb5e817
JM
3053 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
3054 * method.c (implicitly_declare_fn): Likewise.
3055 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
3056
bf5730d7
JM
3057 * decl2.c (determine_visibility): Use get_template_info.
3058
5ce3039e
JM
30592015-04-15 Jason Merrill <jason@redhat.com>
3060 Marek Polacek <polacek@redhat.com>
3061
3062 PR c++/65727
3063 * lambda.c (lambda_expr_this_capture): In unevaluated context go
3064 through the normal loop, just don't capture.
3065 (maybe_resolve_dummy): Handle null return.
3066
3a1351b9
PC
30672015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
3068
3069 * call.c (enforce_access): Emit error + inform.
3070
0567dcd2
MP
30712015-04-15 Marek Polacek <polacek@redhat.com>
3072
3073 * constexpr.c (use_new_call): Remove #define.
3074 (lookup_parameter_binding): Remove function.
3075 (cxx_bind_parameters_in_call): Remove unused code.
3076 (cxx_eval_call_expression): Likewise.
3077 (cxx_eval_constant_expression): Likewise.
3078
182d115c
MM
30792015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
3080
3081 * tree.c (replace_placeholders_t): Remove unused type.
3082 (replace_placeholders): Remove unused pset.
3083
0f19e7ad
JM
30842015-04-14 Jason Merrill <jason@redhat.com>
3085
57c5e96e
JM
3086 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
3087
fb899e32
JM
3088 PR c++/65695
3089 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
3090
0f19e7ad
JM
3091 PR c++/65721
3092 * name-lookup.c (do_class_using_decl): Complain about specifying
3093 the current class even if there are dependent bases.
3094
688e531e
DK
30952015-04-14 David Krauss <david_work@me.com>
3096
3097 PR c++/59766
3098 * decl.c (grokdeclarator): Do not flag friends with deduced return.
3099
2fd16d0f
MV
31002015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
3101 Jason Merrill <jason@redhat.com>
3102
3103 PR c++/60994
3104 * parser.c (cp_parser_class_name): Add enum_ok parameter.
3105 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
3106 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
3107 a class template.
3108
6338536c
JJ
31092015-04-12 Jakub Jelinek <jakub@redhat.com>
3110
3111 PR c++/65736
3112 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
3113 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
3114 the expression to the original type at the end.
3115
00da5e28
JJ
31162015-04-09 Jakub Jelinek <jakub@redhat.com>
3117
0212e31e
JJ
3118 PR c++/65690
3119 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
3120 TYPE_USER_ALIGN.
3121
00da5e28
JJ
3122 PR c++/65690
3123 * tree.c (build_cplus_array_type): Layout type before variants are
3124 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
3125 variant.
3126
a3d94329
PC
31272015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3128
3129 PR c++/64085
3130 * lambda.c (add_capture): Use dependent_type_p for capture by
3131 reference too.
3132
894bec68
MP
31332015-04-02 Marek Polacek <polacek@redhat.com>
3134
3135 PR c++/65642
3136 * constexpr.c (cxx_eval_pointer_plus_expression): Call
3137 cxx_eval_constant_expression on the first operand.
3138
37978db4
JM
31392015-04-01 Jason Merrill <jason@redhat.com>
3140
3141 PR c++/65625
3142 * decl.c (make_typename_type): Handle seeing a variable template.
3143
c23a9ec5
PC
31442015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
3145
3146 PR c++/56100
3147 * pt.c (instantiating_current_function_p): New.
3148 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
3149 * cp-tree.h (instantiating_current_function_p): Declare.
3150
f87cb0b7
JM
31512015-04-01 Jason Merrill <jason@redhat.com>
3152
3153 PR c++/65646
3154 * decl.c (grokvardecl): Don't call check_explicit_specialization
3155 for non-template members of a class template.
3156
14e51ef2
MP
31572015-04-01 Marek Polacek <polacek@redhat.com>
3158
3159 PR c++/65554
3160 * class.c (finish_struct): Require that the second field of a
3161 user-defined initializer_list be of size type.
3162
397ad54d
MP
31632015-03-31 Marek Polacek <polacek@redhat.com>
3164
3165 PR c++/65390
3166 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
3167 checking for constness.
3168
ef4bac78
MP
31692015-03-30 Marek Polacek <polacek@redhat.com>
3170
3171 PR c++/65398
3172 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
3173 *(&A[i] p+ j) => A[i + j] transformation here.
3174 (cxx_eval_pointer_plus_expression): New function.
3175 (cxx_eval_constant_expression): Use it here.
3176
62021f64
TB
31772015-03-27 Tobias Burnus <burnus@net-b.de>
3178
3179 PR c/65586
3180 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
3181 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
3182 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
3183 -fopenmp-simd.
3184
5964a3a6
MP
31852015-03-27 Marek Polacek <polacek@redhat.com>
3186
3187 PR c++/65556
3188 * semantics.c (finish_switch_cond): If the unlowered type is not an
3189 enum, use the type of the condition.
3190
0b7dccc6
JM
31912015-03-27 Jason Merrill <jason@redhat.com>
3192
3193 PR c++/65509
3194 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
3195 constants.
3196
08227658
MM
31972015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
3198
3199 PR c++/65154
3200 * init.c (build_vec_init): Fix initializing aggregates
3201 with empty init list.
3202
41b38772
JM
32032015-03-26 Jason Merrill <jason@redhat.com>
3204
3205 PR c++/65525
3206 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
3207
1cc57b59
MP
32082015-03-25 Marek Polacek <polacek@redhat.com>
3209
3210 PR c++/65558
3211 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
3212 on an anonymous namespace.
3213
2a924bb4
MP
32142015-03-25 Marek Polacek <polacek@redhat.com>
3215
3216 PR c++/61670
3217 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
3218
4b7c558d
JM
32192015-03-24 Jason Merrill <jason@redhat.com>
3220
a9f0423f
JM
3221 PR c++/65046
3222 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
3223 * parser.c (cp_parser_namespace_definition): Don't set it.
3224 * name-lookup.c (handle_namespace_attrs): Check
3225 DECL_NAMESPACE_ASSOCIATIONS instead.
3226
4b7c558d
JM
3227 PR c++/65498
3228 * pt.c (get_mostly_instantiated_function_type): Just return the
3229 type of the partially instantiated template in DECL_TI_TEMPLATE.
3230
f594abf4
MP
32312015-03-20 Marek Polacek <polacek@redhat.com>
3232
3233 PR c++/65398
3234 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
3235 A[i + j].
3236
b75cebc4
MP
32372015-03-20 Marek Polacek <polacek@redhat.com>
3238
3239 PR c++/65072
3240 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
3241 variant.
3242
7cb73573
JM
32432015-03-19 Jason Merrill <jason@redhat.com>
3244
3245 PR c++/65046
3246 Automatically propagate ABI tags to variables and functions
3247 from their (return) type.
3248 * class.c (check_tag): Handle variables and functions.
3249 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
3250 (mark_or_check_tags): Likewise.
3251 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
3252 (check_abi_tags): Add single argument overload for decls.
3253 Handle inheriting tags for decls.
3254 * mangle.c (write_mangled_name): Call it.
3255 (mangle_return_type_p): Split out from write_encoding.
3256 (unmangled_name_p): Split out from write_mangled_name.
3257 (write_mangled_name): Ignore abi_tag on namespace.
3258 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
3259 * parser.c (cp_parser_namespace_definition): Set it.
3260 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
3261 about abi_tag attribute on non-inline namespace.
3262 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
3263 (handle_abi_tag_attribute): Allow tags on variables.
3264
9b65e171
JJ
32652015-03-19 Jakub Jelinek <jakub@redhat.com>
3266
3267 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
3268 attribute for DECL_EXTERNAL VAR_DECLs.
3269
41cee85a
PC
32702015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3271
3272 PR c++/65340
3273 * call.c (build_over_call): Pass the tsubst_flags_t argument to
3274 mark_used.
3275 * decl2.c (mark_used): Inline the require_deduced_type call and
3276 guard the error call.
3277
3d17be83
JM
32782015-03-16 Jason Merrill <jason@redhat.com>
3279
3280 PR c++/65061
3281 * parser.c (cp_parser_template_name): Call strip_using_decl.
3282
ec638c55
MP
32832015-03-16 Marek Polacek <polacek@redhat.com>
3284
3285 DR 1688
3286 PR c++/65327
3287 * decl.c (grokdeclarator): Allow volatile and constexpr together.
3288
b7e7f412
PC
32892015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
3290
3291 PR c++/65323
3292 * decl.c (check_default_argument): Don't call
3293 maybe_warn_zero_as_null_pointer_constant.
3294
25de0a29
AH
32952015-03-11 Aldy Hernandez <aldyh@redhat.com>
3296
3297 * cp-gimplify.c (simple_empty_class_p): New.
3298 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
3299 the code for empty class copies into simple_empty_class_p, and
3300 adapt it to handle COMPOUND_EXPRs.
3301
58cbf8d4
PC
33022015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
3303
3304 PR c++/65370
3305 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
3306 only if the location of newdecl doesn't match the location of olddecl.
3307
704c7904
JJ
33082015-03-10 Jakub Jelinek <jakub@redhat.com>
3309
3310 PR c++/65127
3311 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
3312 is not a PARM_DECL.
3313
a4d66d7d
JM
33142015-03-10 Jason Merrill <jason@redhat.com>
3315
3316 PR c++/65333
3317 DR 1558
3318 * pt.c (dependent_type_p_r): Check both class and alias template args.
3319
7ccb1a11
JJ
33202015-03-10 Jakub Jelinek <jakub@redhat.com>
3321
3322 PR c/65120
3323 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
3324 before preparing arguments to warn_logical_not_parentheses.
3325 Use maybe_constant_value on rhs.
3326
a2f259ef
JM
33272015-03-09 Jason Merrill <jason@redhat.com>
3328
3329 PR c++/65339
3330 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
3331
01177669
JJ
33322015-03-09 Jakub Jelinek <jakub@redhat.com>
3333
3334 PR c/65120
3335 * parser.c (cp_parser_binary_expression): Don't warn for
3336 !!x == y or !b == y where b is bool.
3337
a78cbe29
AH
33382015-03-06 Aldy Hernandez <aldyh@redhat.com>
3339
3340 * ptree.c (cxx_print_lambda_node): New.
3341 (cxx_print_xnode): Handle LAMBDA_EXPR.
3342
bf66b9b4
AH
33432015-03-03 Aldy Hernandez <aldyh@redhat.com>
3344
3345 PR c++/65295
3346 * constexpr.c (cxx_eval_constant_expression): Remove assert in
3347 RESULT_DECL handling.
3348
75e0295b
MP
33492015-02-26 Marek Polacek <polacek@redhat.com>
3350
3351 PR c++/65202
3352 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
3353 a RETURN_EXPR if its operand is null.
3354
9b276dad
JM
33552015-02-25 Jason Merrill <jason@redhat.com>
3356
2b8f9c8f
JM
3357 PR c++/65209
3358 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
3359 DECL_COMDAT.
3360 (constrain_visibility_for_template): Handle reference arguments.
3361
9b276dad
JM
3362 PR debug/58315
3363 * decl.c (start_preparsed_function): Use create_artificial_label
3364 for cdtor_label.
3365
4414e22e
PC
33662015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
3367 Jakub Jelinek <jakub@redhat.com>
3368
3369 PR c++/65075
3370 * constexpr.c (check_constexpr_bind_expr_vars): Allow
3371 implicit typedefs for lambda types.
3372
6e4f01ff
PC
33732015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3374
3375 PR c++/60894
3376 * decl.c (lookup_and_check_tag): Use strip_using_decl.
3377
ef796bef
JM
33782015-02-13 Jason Merrill <jason@redhat.com>
3379
3380 PR c++/65054
3381 * pt.c (template_args_equal): Look through conversions here.
3382 * tree.c (cp_tree_equal): Not here.
3383
e84abfa4
PC
33842015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3385
3386 PR c++/60211
3387 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
3388 pragma_external context.
3389
f9b600ba
JM
33902015-02-13 Jason Merrill <jason@redhat.com>
3391
3392 PR c++/65051
3393 * call.c (reference_binding): Don't look for bad conversion
3394 if TO is incomplete.
3395
81adbcea
PC
33962015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
3397
3398 PR c++/64970
3399 * decl.c (make_typename_type): Pass tsubst_flags_t argument
3400 to lookup_template_class.
3401
730f474b
JJ
34022015-02-13 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR ipa/65034
3405 * decl.c (start_preparsed_function): Use void_type_node instead
3406 of NULL_TREE as LABEL_DECL type.
3407
f522930c
JM
34082015-02-12 Jason Merrill <jason@redhat.com>
3409
3b95b65c
JM
3410 PR c++/64898
3411 * mangle.c (write_mangled_name): Fix test for variable template
3412 instantiation.
3413
f522930c
JM
3414 * decl.c (begin_destructor_body): Condition clobber on
3415 -flifetime-dse.
3416
bc81eb3f
AA
34172015-02-12 Andrea Azzarone <azzaronea@gmail.com>
3418
3419 PR c++/64959
3420 * parser.c (lookup_literal_operator): Return all candidates.
3421 (cp_parser_userdef_char_literal): Simplify error handling.
3422 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
3423 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
3424 Also give higher priority to standard string UDL operator.
3425
40595b8e
JJ
34262015-02-12 Jakub Jelinek <jakub@redhat.com>
3427
12d0d358
JJ
3428 PR debug/55541
3429 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
3430 * decl.c (poplevel): If functionbody, try not to create an extra
3431 BLOCK for function body and use subblocks as that, if it is non-NULL
3432 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
3433 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
3434
40595b8e
JJ
3435 PR sanitizer/64984
3436 * except.c (check_noexcept_r): Return NULL for internal
3437 calls.
3438
0ec052fe
JM
34392015-02-10 Jason Merrill <jason@redhat.com>
3440
3441 PR c++/64994
3442 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
3443
d90cae08
JH
34442015-02-10 Jan Hubicka <hubicka@ucw.cz>
3445
3446 PR ipa/64982
3447 * method.c (use_thunk): Do not check for stdarg thunks.
3448
a02f26f6
JM
34492015-02-06 Jason Merrill <jason@redhat.com>
3450
3451 PR c++/64899
3452 * init.c (build_vec_init): Handle default-initialized array with
3453 constexpr default constructor.
3454
4886ec8e
JJ
34552015-02-04 Jakub Jelinek <jakub@redhat.com>
3456
3457 PR c/64824
3458 PR c/64868
3459 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
3460
457d0ace
PC
34612015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3462
3463 PR c++/64877
3464 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
3465 for generated expressions.
3466
879887f1
VV
34672015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3468
3469 PR c++/64901
3470 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
3471 DECL_OVERRIDE_P.
3472
4c5cf0b2
JM
34732015-02-02 Jason Merrill <jason@redhat.com>
3474
3475 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
3476
40fecdd6
JM
34772015-01-30 Joseph Myers <joseph@codesourcery.com>
3478
3479 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
3480 changed to pass input_location as first argument.
3481
a7c3e87e
JJ
34822015-01-29 Jakub Jelinek <jakub@redhat.com>
3483
3484 PR c++/64717
3485 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
3486 into SAVE_EXPR.
3487
e1ef8aa9
JM
34882015-01-29 Jason Merrill <jason@redhat.com>
3489
3dbb8427
JM
3490 PR c++/49508
3491 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
3492 erroneous return statement.
3493
e1ef8aa9
JM
3494 PR c++/64521
3495 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
3496 point.
3497
f7f049fa
CT
34982015-01-27 Caroline Tice <cmtice@google.com>
3499
3500 Committing VTV Cywin/Ming patch for Patrick Wollgast
3501 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
3502 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
3503
94e54b8d
JM
35042015-01-27 Jason Merrill <jason@redhat.com>
3505
2cc7f90b
JM
3506 PR c++/58597
3507 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
3508 current_function_decl.
3509
94e54b8d
JM
3510 PR c++/63889
3511 * pt.c (finish_template_variable): Move from semantics.c.
3512 Handle multiple template arg levels. Handle coercion here.
3513 (lookup_template_variable): Not here.
3514
7c83622c
JM
35152015-01-23 Jason Merrill <jason@redhat.com>
3516
fa4e8db2
JM
3517 PR c++/64314
3518 PR c++/57510
3519 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
3520 that has been completely split out.
3521
c6e7c499 3522 PR c++/64701
8a7261b2
JM
3523 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
3524 statement codes.
c6e7c499 3525
7c83622c
JM
3526 PR c++/64727
3527 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
3528 of CONST_DECL.
3529
f1eac182
JM
35302015-01-21 Jason Merrill <jason@redhat.com>
3531
b85a3242
JM
3532 PR c++/64603
3533 * constexpr.c (cxx_eval_constant_expression): Only shortcut
3534 constant CONSTRUCTORs.
3535
f1eac182
JM
3536 PR c++/64647
3537 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
3538 give a hard error in a template instantiation.
3539
cbf5d0e7
RB
35402015-01-21 Richard Biener <rguenther@suse.de>
3541
3542 PR middle-end/64313
3543 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
3544 for builtins the user declared correctly.
3545
de37b21e
PC
35462015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3547
3548 PR c++/58614
3549 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
3550 TREE_TYPE (elt) == error_mark_node.
3551
67933728
JH
35522015-01-15 Jan Hubicka <hubicka@ucw.cz>
3553
3554 PR tree-optimization/62053
3555 * tree.c (build_cplus_array_type): Layout type after variants are set.
3556
35228ac7
JJ
35572015-01-15 Jakub Jelinek <jakub@redhat.com>
3558
3559 * cp-gimplify.c (cp_genericize_r): Call
3560 cp_ubsan_maybe_instrument_member_call for member calls.
3561 (cp_ubsan_check_member_access_r): New function.
3562 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
3563 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
3564 cp_ubsan_instrument_member_accesses,
3565 cp_ubsan_maybe_instrument_downcast,
3566 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
3567 * cp-ubsan.c: New file.
3568 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
3569 * constexpr.c (cxx_eval_call_expression): Return void_node
3570 for IFN_UBSAN_VPTR.
3571 (potential_constant_expression_1): Return true for
3572 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
3573 * typeck.c (build_class_member_access_expr): Provide locus
3574 for COMPONENT_REFs.
3575 (build_static_cast_1): Instrument downcasts.
3576 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
3577 add ubsan instrumentation for virtual_access.
3578 * call.c: Include internal-fn.h.
3579 (set_flags_from_callee): Handle internal calls.
3580
199b7a35
MV
35812015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
3582
3583 PR c++/59366
3584 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
3585 and function templates, declared only in the class.
3586 * decl.c (duplicate_decls): Reveal hidden friend functions or
3587 function templates, if they are redeclared outside the class.
3588
c3c29ba5
JM
35892015-01-15 Jason Merrill <jason@redhat.com>
3590
134efa82
JM
3591 PR c++/64356
3592 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
3593
c3c29ba5
JM
3594 PR c++/63283
3595 * constexpr.c (potential_constant_expression_1): Handle reference
3596 args in templates.
3597
41dbbb37
TS
35982015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3599 James Norris <jnorris@codesourcery.com>
3600 Cesar Philippidis <cesar@codesourcery.com>
3601 Ilmir Usmanov <i.usmanov@samsung.com>
3602 Jakub Jelinek <jakub@redhat.com>
3603
3604 * parser.c: Include "gomp-constants.h".
3605 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3606 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3607 Use OMP_CLAUSE_SET_MAP_KIND.
3608 (cp_parser_omp_construct, cp_parser_pragma): Handle
3609 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3610 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3611 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3612 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3613 "create", "delete", "deviceptr", "host", "num_gangs",
3614 "num_workers", "present", "present_or_copy", "pcopy",
3615 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3616 "present_or_create", "pcreate", "vector_length", "wait".
3617 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3618 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3619 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3620 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3621 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3622 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3623 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3624 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3625 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3626 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3627 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3628 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3629 (cp_parser_oacc_parallel, cp_parser_oacc_update)
3630 (cp_parser_oacc_wait): New functions.
3631 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3632 (finish_oacc_parallel): New prototypes.
3633 * semantics.c: Include "gomp-constants.h".
3634 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3635 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3636 OMP_CLAUSE_SET_MAP_KIND.
3637 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3638 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3639 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3640 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3641 functions.
3642
36b218ee
PC
36432015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
3644
3645 PR c++/58671
3646 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3647 self-initialization.
3648
8f413ae2
JM
36492015-01-13 Jason Merrill <jason@redhat.com>
3650
caee690e
JM
3651 PR c++/64356
3652 PR libstdc++/58777
3653 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3654 pointer expressions.
3655 (cxx_eval_increment_expression): Likewise.
3656
7c368fb2
JM
3657 PR c++/64514
3658 * pt.c (coerce_template_parameter_pack): Return NULL for a
3659 zero-length fixed parameter pack with a pack expansion arg.
3660
8f413ae2
JM
3661 PR c++/64520
3662 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3663
49c8bc0c
JM
36642015-01-12 Jason Merrill <jason@redhat.com>
3665
3666 PR c++/64547
3667 * constexpr.c (cxx_eval_call_expression): A call to a void
3668 function doesn't need to return a value.
3669
adfac8df
JJ
36702015-01-09 Michael Collison <michael.collison@linaro.org>
3671
3672 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3673 input.h, alias.h, symtab.h, options.h, fold-const.h,
3674 wide-int.h, and inchash.h due to flattening of tree.h.
3675 * class.c: Ditto.
3676 * constexpr.c: Ditto.
3677 * cp-array-notation.c: Ditto.
3678 * cp-gimplify.c: Ditto.
3679 * cp-lang.c: Ditto.
3680 * cp-objcp-common.c: Ditto.
3681 * cvt.c: Ditto.
3682 * decl2.c: Ditto.
3683 * decl.c: Ditto.
3684 * dump.c: Ditto.
3685 * error.c: Ditto.
3686 * except.c: Ditto.
3687 * expr.c: Ditto.
3688 * friend.c: Ditto.
3689 * init.c: Ditto.
3690 * lambda.c: Ditto.
3691 * lex.c: Ditto.
3692 * mangle.c: Ditto.
3693 * name-lookup.c: Ditto.
3694 * optimize.c: Ditto.
3695 * parser.c: Ditto.
3696 * pt.c: Ditto.
3697 * ptree.c: Ditto.
3698 * repo.c: Ditto.
3699 * rtti.c: Ditto.
3700 * search.c: Ditto.
3701 * semantics.c: Ditto.
3702 * tree.c: Ditto.
3703 * typeck2.c: Ditto.
3704 * typeck.c: Ditto.
3705
f5481fc4
JM
37062015-01-08 Jason Merrill <jason@redhat.com>
3707
3708 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3709 * decl.c (compute_array_index_type): Likewise.
3710 * init.c (build_vec_init): Likewise.
3711 * typeck.c (cp_build_binary_op): Likewise.
3712
46621807
JM
37132015-01-08 Jason Merrill <jason@redhat.com>
3714
3715 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3716 whether an initializer-list is too big for a VLA.
3717 (throw_bad_array_length): Remove.
3718 * cp-tree.h: Remove prototype.
3719
247ecdf3
PC
37202015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
3721
3722 PR c++/60753
3723 * decl.c (grokfndecl): Add bool parameter.
3724 (grokdeclarator): Adjust calls.
3725 (start_decl): Don't set DECL_DELETED_FN here.
3726
47867b4f
JM
37272015-01-06 Jason Merrill <jason@redhat.com>
3728
efcdb22f
JM
3729 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3730 template-ids.
3731
c6a38536
JM
3732 PR c++/64455
3733 * pt.c (type_dependent_expression_p): Handle variable templates.
3734 * constexpr.c (potential_constant_expression_1): Use it.
3735
b433d944
JM
3736 PR c++/64487
3737 * semantics.c (finish_offsetof): Handle templates here.
3738 * parser.c (cp_parser_builtin_offsetof): Not here.
3739
47867b4f
JM
3740 PR c++/64496
3741 * semantics.c (process_outer_var_ref): Diagnose lambda in local
3742 class NSDMI.
3743
864822bd
VV
37442015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3745
3746 PR c++/64489
3747 * class.c (check_field_decls): Make copy assignment operators
3748 complex only in c++98 mode.
3749
2f42e5de
TS
37502015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3751
3752 PR c++/31397
3753 * class.c (check_for_override): Warn when a virtual function is an
3754 override not marked override.
3755
86cfdb4e
TS
37562015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3757
3758 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3759 hold base_fndecls.
3760 (get_basefndecls): Adjust.
3761
5624e564
JJ
37622015-01-05 Jakub Jelinek <jakub@redhat.com>
3763
3764 Update copyright years.
3765
5bd012f8
MP
37662015-01-05 Marek Polacek <polacek@redhat.com>
3767
3768 PR c/64423
3769 * typeck.c (cp_build_array_ref): Pass loc down to
3770 warn_array_subscript_with_type_char.
3771
ad41bd84 3772\f
5624e564 3773Copyright (C) 2015 Free Software Foundation, Inc.
ad41bd84
JM
3774
3775Copying and distribution of this file, with or without modification,
3776are permitted in any medium without royalty provided the copyright
3777notice and this notice are preserved.