]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
* pt.c (lookup_template_class_1): Clear elt.spec.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
f107ee33
JM
12015-08-04 Jason Merrill <jason@redhat.com>
2
3da33383
JM
3 * pt.c (lookup_template_class_1): Clear elt.spec.
4
f107ee33
JM
5 * tree.c (build_target_expr): Copy the location from value.
6
992118a1
PP
72015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8
9 * parser.c (cp_parser_selection_statement): Move handling of
10 semicolon body to ...
11 (cp_parser_implicitly_scoped_statement): .. here. Call
12 warn_for_misleading_indentation even when the body is a
13 semicolon. Extract token_indent_infos corresponding to the
14 guard, body and next tokens. Adjust call to
15 warn_for_misleading_indentation accordingly. Take
16 token_indent_info argument.
17 (cp_parser_already_scoped_statement): Likewise.
18 (cp_parser_selection_statement, cp_parser_iteration_statement):
19 Extract a token_indent_info corresponding to the guard token.
20
b0cca5ec
CT
212015-08-01 Caroline Tice <cmtice@google.com>
22
23 PR 66521
24 * mangle.c : Add vtable-verify.h to include files.
25 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
26 is "<anon>" get the real mangled name for the class instead, and
27 also store the real mangled name in a vector for use later.
28
ec043522
MP
292015-07-31 Marek Polacek <polacek@redhat.com>
30
31 PR sanitizer/66977
32 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
33 RSHIFT_EXPR.
34
15827d12
PC
352015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
36
37 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
38 in warning_at instead of "%q+D" in warning.
39 (warn_hidden): Likewise but use location_of.
40 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
41 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
42 (check_field_decls): Likewise for permerror.
43 (explain_non_literal_class): Likewise for inform.
44 (check_bases_and_members, layout_class_type): Likewise for warning_at.
45 (note_name_declared_in_class): Use location_of in permerror.
46 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
47 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
48 inform, and warning_at.
49 (check_for_out_of_scope_variable): Likewise for warning_at and
50 permerror.
51
4fdfdd4f
JM
522015-07-30 Jason Merrill <jason@redhat.com>
53
54 DR 1558
55 PR c++/67021
56 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
57
4b1cbcee
PC
582015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
59
60 * call.c (build_op_delete_call, convert_like_real, build_over_call):
61 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
62 of "%q+D".
63 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
64 * decl.c (duplicate_decls): Likewise for warning/warning_at.
65 * except.c (maybe_noexcept_warning): Likewise.
66 * friend.c (make_friend_class): Likewise for inform.
67 * mangle.c (mangle_decl): Likewise for warning/warning_at.
68 * method.c (process_subob_fn, walk_field_subobs,
69 maybe_explain_implicit_delete): Likewise for inform.
70 * parser.c (cp_parser_lambda_introducer): Likewise.
71 * pt.c (check_specialization_namespace,
72 maybe_process_partial_specialization): Likewise for permerror.
73 (redeclare_class_template): Likewise for inform_n.
74 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
75 * search.c (check_final_overrider): Likewise.
76 * semantics.c (process_outer_var_ref): Likewise.
77
cca444fb
JM
782015-07-27 Jason Merrill <jason@redhat.com>
79
80 * constexpr.c (cxx_eval_call_expression): Don't add this call to
81 the hash table if !depth_ok.
82
05b28fd6
MP
832015-07-27 Marek Polacek <polacek@redhat.com>
84
85 PR c++/66555
86 PR c/54979
87 * call.c (build_new_op_1): Call warn_tautological_cmp.
88 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
89 compare warnings.
90
11f2c78a
PP
912015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
92
93 PR c++/18969
94 * typeck.c (check_return_expr): Also do the basic return-value
95 validity checking if processing_template_decl and yet types are
96 not dependent. Remove obsolete code.
97
af718670
PC
982015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
99
100 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
101 in warning_at instead of "%q+D" in warning.
102 (warn_extern_redeclared_static): Likewise for inform.
103 (check_redeclaration_no_default_args): Likewise for permerror.
104 (duplicate_decls): Likewise.
105 (check_previous_goto_1): Likewise for inform.
106 (check_goto, start_decl, check_for_uninitialized_const_var,
107 start_preparsed_function, finish_function§): Likewise.
108 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
109 * init.c (sort_mem_initializers): Likewise.
110 * typeck.c (convert_for_initialization): Likewise for inform.
111 (maybe_warn_about_returning_address_of_local): Likewise.
112 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
113 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
114
9783ae5a
PP
1152015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
116
117 PR c++/66857
118 * cvt.c (ocp_convert): Don't call scalar_constant_value when
119 converting to a class type.
120
0c0d447a
JM
1212015-07-24 Jason Merrill <jason@redhat.com>
122
00367044 123 PR c++/64969
0c0d447a
JM
124 * pt.c (splice_late_return_type): Correct deduced return type for
125 abbreviated function template.
126
24f1db9c
RB
1272015-07-24 Richard Biener <rguenther@suse.de>
128
129 * init.c (build_vec_init): Build iterator bound in the same
130 type as the iterator.
131
04e4dbd0
MP
1322015-07-23 Marek Polacek <polacek@redhat.com>
133
134 PR c++/66572
135 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
136
25f05e7b
PC
1372015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
138
139 PR c++/52987
140 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
141 redundant error messages.
142
faa16e44
PC
1432015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
144
145 * decl.c (grokdeclarator): For an erroneous template parameter
146 propagate error_mark_node as type.
147
451b5e48
MP
1482015-07-20 Marek Polacek <polacek@redhat.com>
149
150 PR c++/55095
151 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
152
0467e3eb
JM
1532015-07-15 Jason Merrill <jason@redhat.com>
154
155 PR c++/65091
156 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
157 template if there is no type x in scope.
158
09f725f4
PP
1592015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
160
161 PR c++/66850
162 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
163 template template parm in the redeclaration.
164 (lookup_template_class_1): Peel off irrelevant template levels
165 from current_template_parms before augmenting the argument
166 list.
167
973590f3
AA
1682015-07-14 Andrea Azzarone <azzaronea@gmail.com>
169
170 PR c++/65071
171 * parser.c (cp_parser_sizeof_pack): Also consider template template
172 parameters.
173
e056dfd0
JM
1742015-07-14 Jason Merrill <jason@redhat.com>
175
176 * call.c (build_new_method_call_1): Call reshape_init.
177
87679b76
PC
1782015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
179
180 * pt.c (check_template_shadow): Emit error + inform instead of
181 two errors.
182
15d6614a
PP
1832015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
184
185 PR c++/65186
186 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
187 template parm type under C++11 and later.
188
026c3cfd
AH
1892015-07-12 Aldy Hernandez <aldyh@redhat.com>
190
191 * call.c: Fix double word typos.
192 * cp-array-notation.c: Same.
193 * cp-tree.h: Same.
194 * init.c: Same.
195 * name-lookup.c: Same.
196 * parser.c: Same.
197
c5540945
PP
1982015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
199
200 PR c++/30044
201 * pt.c (begin_template_parm_list): Add a dummy parameter level
202 to current_template_parms.
203 (end_template_parm_list): Remove the dummy parameter level
204 before adding the real one.
205 (tsubst): Don't attempt to substitute for template parameters
206 corresponding to a dummy argument level.
207 (template_parms_to_args): Remove obsolete hack for
208 giving template template arguments the proper level.
209 (splite_late_return_type): Remove obsolete hack for giving
210 template template arguments the proper level.
211 * error.c (dump_template_decl): Don't print dummy template
212 levels.
213
0a73242e
PC
2142015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
215
216 PR c++/54521
217 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
218 the second step of copy-initialization.
219
55b467a0
JM
2202015-07-10 Jason Merrill <jason@redhat.com>
221
8de8fdb4
JM
222 * pt.c (find_parameter_packs_r): Handle variable templates.
223 (variable_template_specialization_p): New.
224 * cp-tree.h: Declare it.
225
55b467a0
JM
226 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
227
bb49ee66
EB
2282015-07-10 Eric Botcazou <ebotcazou@adacore.com>
229
230 * decl2.c (cpp_check): Revert latest change.
231
5c4e8e5c
JM
2322015-07-09 Jason Merrill <jason@redhat.com>
233
1bf3fe3c
JM
234 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
235 value_dependent_expression_p.
236
5c4e8e5c
JM
237 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
238 template_parameter_pack_p.
239 * parser.c (declarator_can_be_parameter_pack): False if
240 parameter_pack_p is set.
241 (make_parameter_declarator): Add template_parameter_pack_p parm.
242 (cp_parser_template_parameter): Remove parameter pack parsing.
243 (cp_parser_parameter_declaration): Handle all parameter packs.
244 Tweak default argument permerror.
245
2cc6d90e
AS
2462015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
247
248 * parser.c (cp_parser_default_type_template_argument)
249 (cp_parser_default_template_template_argument): Factor out from
250 cp_parser_type_parameter.
251
09bae928
PC
2522015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
253
254 * typeck.c (warn_args_num): Rename to error_args_num.
255 (convert_arguments): Adjust calls.
256
f51ade33
AM
2572015-07-09 Andrew MacLeod <amacleod@redhat.com>
258
259 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
260
a9dcd529
EB
2612015-07-08 Eric Botcazou <ebotcazou@adacore.com>
262
263 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
264
b03b462f
JJ
2652015-07-08 Jakub Jelinek <jakub@redhat.com>
266
267 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
268 * pt.c (apply_late_template_attributes): Likewise.
269
7b3bc1f3
MP
2702015-07-08 Marek Polacek <polacek@redhat.com>
271
272 PR c++/66748
273 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
274 accessing TYPE_LANG_SPECIFIC node.
275
c7131fb2
AM
2762015-07-07 Andrew MacLeod <amacleod@redhat.com>
277
278 * call.c: Adjust includes.
279 * class.c: Likewise.
280 * constexpr.c: Likewise.
281 * cp-array-notation.c: Likewise.
282 * cp-gimplify.c: Likewise.
283 * cp-lang.c: Likewise.
284 * cp-objcp-common.c: Likewise.
285 * cp-ubsan.c: Likewise.
286 * cvt.c: Likewise.
287 * decl.c: Likewise.
288 * decl2.c: Likewise.
289 * dump.c: Likewise.
290 * error.c: Likewise.
291 * except.c: Likewise.
292 * expr.c: Likewise.
293 * friend.c: Likewise.
294 * init.c: Likewise.
295 * lambda.c: Likewise.
296 * lex.c: Likewise.
297 * mangle.c: Likewise.
298 * method.c: Likewise.
299 * name-lookup.c: Likewise.
300 * optimize.c: Likewise.
301 * parser.c: Likewise.
302 * pt.c: Likewise.
303 * ptree.c: Likewise.
304 * repo.c: Likewise.
305 * rtti.c: Likewise.
306 * search.c: Likewise.
307 * semantics.c: Likewise.
308 * tree.c: Likewise.
309 * typeck.c: Likewise.
310 * typeck2.c: Likewise.
311
2a7fb83f
EB
3122015-07-07 Eric Botcazou <ebotcazou@adacore.com>
313
314 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
315
d762287d
JM
3162015-07-06 Jason Merrill <jason@redhat.com>
317
4366e1c0
JM
318 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
319 for a template template parameter.
320 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
321 by reduce_template_parm_level.
322
d762287d
JM
323 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
324 expansion.
325
a426f31a
JM
3262015-07-02 Jason Merrill <jason@redhat.com>
327
328 PR c++/66743
329 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
330 TYPE_VALUES_RAW rather than TYPE_FIELDS.
331
ee00eaea
AS
3322015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
333
334 * pt.c (type_dependent_expression_p): Handle expressions
335 that refer to variable templates.
336
d68f848b
JM
3372015-07-01 Jason Merrill <jason@redhat.com>
338
36a85135
JM
339 * lex.c (init_reswords): s/CXX0X/CXX11/.
340 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
341
a03c9bf1
JM
342 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
343 Attribute mangling is now -fabi-version=10.
344
d68f848b
JM
345 PR c++/65945
346 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
347 * class.c (layout_nonempty_base_or_field): Warn if that affects
348 the offset of a field.
349
a31dc4e5
PC
3502015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
351
352 PR c++/60365
353 * parser.c (cp_parser_check_std_attribute): New.
354 (cp_parser_std_attribute_list): Call it.
355
f58d5e06
PP
3562015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
357
358 PR c++/66686
359 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
360 return 0 if tsubst returns a dependent type.
361
3048c0c7
JM
3622015-06-30 Jason Merrill <jason@redhat.com>
363
47297e51
JM
364 PR debug/66653
365 * decl2.c (is_late_template_attribute): True for tls_model.
366
3048c0c7
JM
367 PR debug/66653
368 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
369 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
370 (SET_DECL_GNU_TLS_P): New.
371 * call.c (make_temporary_var_for_ref_to_temp): Use
372 CP_DECL_THREAD_LOCAL_P.
373 (set_up_extended_ref_temp): Likewise.
374 * decl.c (duplicate_decls, expand_static_init): Likewise.
375 (redeclaration_error_message, grokvardecl): Likewise.
376 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
377 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
378 (handle_tls_init): Likewise.
379 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
380 * semantics.c (finish_id_expression): Likewise.
381 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
382 (finish_omp_threadprivate): Likewise.
383 * tree.c (decl_storage_duration): Likewise.
384 * cp-gimplify.c (omp_var_to_track): Likewise.
385 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
386 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
387 already set.
388
fe95b036
ESR
3892015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
390
391 Implement N4197 - Adding u8 character literals
392 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
393 and CPP_UTF8CHAR_USERDEF tokens;
394 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
395
71506d41
PC
3962015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
397
398 PR c++/65977
399 * decl.c (grokfndecl): Allow constexpr declarations of friend
400 template specializations.
401
da2e71c9
MLI
4022015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
403
404 PR fortran/66605
405 * decl.c (finish_function): Call do_warn_unused_parameter.
406
b155cfd9
MP
4072015-06-29 Marek Polacek <polacek@redhat.com>
408
409 PR c/66322
410 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
411 (push_switch): Set OUTSIDE_RANGE_P.
412 (pop_switch): Update c_do_switch_warnings call.
413 (finish_case_label): Update c_add_case_label call.
414 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
415 here.
416
b55b02ea
MP
4172015-06-27 Marek Polacek <polacek@redhat.com>
418
419 * call.c: Use VECTOR_TYPE_P.
420 * constexpr.c: Likewise.
421 * cvt.c: Likewise.
422 * decl.c: Likewise.
423 * decl2.c: Likewise.
424 * init.c: Likewise.
425 * semantics.c: Likewise.
426 * tree.c: Likewise.
427 * typeck.c: Likewise.
428 * typeck2.c: Likewise.
429
56a6f1d3
MP
4302015-06-27 Marek Polacek <polacek@redhat.com>
431
432 * call.c (set_up_extended_ref_temp): Use VAR_P.
433 * class.c: Use VAR_P throughout.
434 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
435 * cp-array-notation.c (make_triplet_val_inv): Likewise.
436 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
437 throughout.
438 * decl2.c: Likewise.
439 * error.c (dump_decl): Use VAR_P.
440 * mangle.c (decl_implicit_alias_p): Likewise.
441 * parser.c: Use VAR_P throughout.
442 * pt.c: Likewise.
443 * semantics.c: Likewise.
444 * vtable-class-hierarchy.c: Likewise.
445 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
446
e1cc2355
AS
4472015-06-27 Andreas Schwab <schwab@linux-m68k.org>
448
449 * pt.c (check_unstripped_args): Mark parameter as unused.
450
7457279b
JM
4512015-06-26 Jason Merrill <jason@redhat.com>
452
e0ff153d
JM
453 PR c++/66216
454 * class.c (finish_struct): Call fixup_attribute_variants.
455
9579e906
JM
456 PR c++/66684
457 * typeck2.c (merge_exception_specifiers): Allow different
458 noexcept-specifiers if we've had errors.
459
7498239e
JM
460 PR c++/66255
461 * pt.c (check_unstripped_args): Split out from...
462 (retrieve_specialization): ...here. Allow typedefs in the type of
463 a non-type argument.
464
d15364ce
JM
465 PR c++/66067
466 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
467 TYPE_DECLs.
468 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
469
7457279b
JM
470 PR c++/66654
471 * typeck2.c (digest_init_r): Only expect reshaping if the class is
472 aggregate.
473
311bd4d8
MP
4742015-06-26 Marek Polacek <polacek@redhat.com>
475
476 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
477 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
478
f0889939
AM
4792015-06-25 Andrew MacLeod <amacleod@redhat.com>
480
481 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
482 * class.c: Likewise.
483 * cp-ubsan.c: Likewise.
484 * decl.c: Likewise.
485 * decl2.c: Likewise.
486 * lambda.c: Likewise.
487 * mangle.c: Likewise.
488 * method.c: Likewise.
489 * optimize.c: Likewise.
490 * parser.c: Likewise.
491 * semantics.c: Likewise.
492 * tree.c: Likewise.
493 * vtable-class-hierarchy.c: Likewise.
494
ca752f39
RS
4952015-06-25 Richard Sandiford <richard.sandiford@arm.com>
496
497 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
498 rather than ggc_hasher.
499 (constexpr_call_hasher): Likewise.
500 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
501 * decl.c (typename_hasher): Likewise.
502 * mangle.c (conv_type_hasher): Likewise.
503 * pt.c (spec_hasher): Likewise.
504 * tree.c (cplus_array_hasher, list_hasher): Likewise.
505 * typeck2.c (abstract_type_hasher): Likewise.
506
8d67ee55
RS
5072015-06-25 Richard Sandiford <richard.sandiford@arm.com>
508
509 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
510 rather than pointer_hash.
511 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
512 * semantics.c (nrv_data): Likewise.
513 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
514
024f2d89
JM
5152015-06-24 Jason Merrill <jason@redhat.com>
516
e6d61513
JM
517 PR c++/66647
518 * pt.c (dependent_type_p_r): Check for dependent alias template
519 specialization sooner.
520
024f2d89
JM
521 PR c++/66501
522 * class.c (type_has_nontrivial_assignment): Remove.
523 * cp-tree.h: Remove declaration.
524 * init.c (vec_copy_assign_is_trivial): New.
525 (build_vec_init): Use it.
526
e79fc3d4
ESR
5272015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
528
529 Implement N3928 - Extending static_assert
530 * parser.c (cp_parser_static_assert): Support static_assert with
531 no message string. Supply an empty string in this case.
532 * semantics.c (finish_static_assert): Don't try to print a message if
533 the message strnig is empty.
534
aa97bb6f
AB
5352015-06-24 Adam Butcher <adam@jessamine.co.uk>
536
537 PR c++/65750
538 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
539 implicit template parm if 'auto' is a placeholder for trailing
540 return type.
541
7af8ef58
PP
5422015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
543
544 Revert:
545 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
546
547 PR c++/30044
548 * parser.c (cp_parser_template_parameter_list): Update
549 current_template_parms right after processing a paramater.
550 * pt.c (template_parms_to_args): Remove obsolete hack for
551 giving template template arguments the proper level.
552 (check_default_tmpl_args): Account for tested template
553 parameter_lists.
554 (splite_late_return_type): Remove obsolete hack for giving
555 template template arguments the proper level.
556
72e839ca
PC
5572015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
558
559 PR c++/65811
560 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
561
1a8f8908
PP
5622015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
563
6c4ed521 564 PR c++/30044
1a8f8908
PP
565 * parser.c (cp_parser_template_parameter_list): Update
566 current_template_parms right after processing a paramater.
567 * pt.c (template_parms_to_args): Remove obsolete hack for
568 giving template template arguments the proper level.
569 (check_default_tmpl_args): Account for tested template
570 parameter_lists.
571 (splite_late_return_type): Remove obsolete hack for giving
572 template template arguments the proper level.
573
d4c9e7f9
JM
5742015-06-23 Jason Merrill <jason@redhat.com>
575
d88511ae
JM
576 PR c++/65879
577 * decl.c (grokfndecl): Check the linkage of ctype, not just
578 TYPE_ANONYMOUS_P.
579 * tree.c (no_linkage_check): Skip the 'this' pointer.
580
115ef7c5
JM
581 PR c++/66501
582 * class.c (type_has_nontrivial_assignment): New.
583 * init.c (build_vec_init): Use it.
584 * cp-tree.h: Declare it.
585 * method.c (trivial_fn_p): Templates aren't trivial.
586
d4c9e7f9
JM
587 PR c++/66542
588 * decl.c (expand_static_init): Make sure the destructor is callable
589 here even if we have an initializer.
590
6935a923
PMR
5912015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
592
593 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
594 -fdump-ada-spec is passed.
595
c6a2f2d9
PMR
5962015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
597
598 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
599
ea663be9
PC
6002015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
601
602 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
603
6042015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
605
606 * decl.c (grokdeclarator): Remove pointless code.
607
e8a3c597
JM
6082015-06-22 Jason Merrill <jason@redhat.com>
609
610 PR c++/66515
611 * call.c (implicit_conversion): Only reshape for classes.
612
6b4db501
MM
6132015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
614
615 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
616 manually swapping.
617 * semantics.c (finish_omp_atomic): Likewise.
618 * typeck.c (cp_build_array_ref): Likewise.
619
cd95a0d5
MM
6202015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
621
622 PR c++/65882
623 * call.c (build_new_op_1): Check tf_warning flag in all cases.
624
1539357d 6252015-06-19 Jason Merrill <jason@redhat.com>
2ddf4350
JM
626
627 PR c++/66585
628 * pt.c (instantiate_class_template_1): Clear
629 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
630
62245e6f
JM
631 PR c++/65880
632 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
633 cv-qualifiers.
634 * typeck.c (merge_types): build_ptrmemfunc_type before applying
635 quals and attributes.
636
30ac6e80
JM
637 PR c++/65973
638 * constexpr.c (build_constexpr_constructor_member_initializers):
639 Handle an empty STATEMENT_LIST.
640
892562cf
JM
641 PR c++/65843
642 * pt.c (tsubst_copy_and_build): Register a capture proxy in
643 local_specializations.
644
769430b2
JM
6452015-06-17 Jason Merrill <jason@redhat.com>
646
647 PR c++/66001
648 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
649 TRY_FINALLY_EXPR.
650 (potential_constant_expression_1): Likewise.
651
9fa6ffe1
JM
6522015-06-17 Jason Merrill <jason@redhat.com>
653
654 PR c++/66515
655 * call.c (implicit_conversion): Call reshape_init here, early.
656 (build_aggr_conv): Not here.
657
64b5fcfa
JJ
6582015-06-17 Jakub Jelinek <jakub@redhat.com>
659
660 PR c++/66571
cc63a7fa
JJ
661 * pt.c (tsubst_omp_clause_decl): New function.
662 (tsubst_omp_clauses): Use it or tsubst_copy instead of
663 tsubst_expr on OMP_CLAUSE_DECL.
64b5fcfa 664
ee47f74e
AM
6652015-06-17 Andrew MacLeod <amacleod@redhat.com>
666
667 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
668 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
669 * decl.c (grokdeclarator, xref_tag_1): Likewise.
670 * error.c (dump_aggr_type): likewise.
671 * pt.c (push_template_decl_real): Likewise.
672 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
673
abb226c9
AM
6742015-06-17 Andrew MacLeod <amacleod@redhat.com>
675
676 * call.c: Do not include input.h, line-map.h or is-a.h.
677 * class.c: Likewise.
678 * constexpr.c: Likewise.
679 * cp-array-notation.c: Likewise.
680 * cp-gimplify.c: Likewise.
681 * cp-lang.c: Likewise.
682 * cp-objcp-common.c: Likewise.
683 * cp-tree.h: Likewise.
684 * cp-ubsan.c: Likewise.
685 * cvt.c: Likewise.
686 * decl.c: Likewise.
687 * decl2.c: Likewise.
688 * dump.c: Likewise.
689 * error.c: Likewise.
690 * except.c: Likewise.
691 * expr.c: Likewise.
692 * friend.c: Likewise.
693 * init.c: Likewise.
694 * lambda.c: Likewise.
695 * lex.c: Likewise.
696 * mangle.c: Likewise.
697 * method.c: Likewise.
698 * name-lookup.c: Likewise.
699 * optimize.c: Likewise.
700 * parser.c: Likewise.
701 * pt.c: Likewise.
702 * ptree.c: Likewise.
703 * repo.c: Likewise.
704 * rtti.c: Likewise.
705 * search.c: Likewise.
706 * semantics.c: Likewise.
707 * tree.c: Likewise.
708 * typeck.c: Likewise.
709 * typeck2.c: Likewise.
710 * vtable-class-hierarchy.c: Likewise.
711
ba394ca6
PC
7122015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
713
714 PR c++/59682
715 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
716
63d02f05
JM
7172015-06-16 Jason Merrill <jason@redhat.com>
718
7599760d
JM
719 PR c++/66536
720 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
721 mismatch.
722
2ed4c029
JM
723 PR c++/58063
724 * tree.c (bot_manip): Remap SAVE_EXPR.
725
63d02f05
JM
726 PR c++/66387
727 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
728
04eca83e
NS
7292015-06-15 Nathan Sidwell <nathan@acm.org>
730
731 PR c++/58583
732 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
733 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
734 protect it from recursive instantiation.
735
f92c7426
PC
7362015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
737
738 PR c++/51048
739 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
740 using a local type is pure virtual.
741
6feffb3a
PP
7422015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
743
744 * call.c: Remove comment documenting the long-deleted
745 function build_method_call.
746
076fecad
PP
7472015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
748
749 PR c++/65168
750 * typeck.c (cp_build_binary_op): Warn when comparing an address
751 of a reference against NULL.
752
350562a7
JM
7532015-06-12 Jason Merrill <jason@redhat.com>
754
755 PR c++/65719
756 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
757 variables as DECL_NOT_REALLY_EXTERN.
758
acb2970c
JM
7592015-06-11 Jason Merrill <jason@redhat.com>
760
133bc698
JM
761 PR c++/66445
762 * constexpr.c (potential_constant_expression_1): Handle a
763 DECL_EXPR of TYPE_DECL.
764
acb2970c
JM
765 PR c++/66450
766 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
767 ctx->ctor.
768
a0349665
PMR
7692015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
770
771 * decl.c (cxx_init_decl_processing): Register the main
772 translation unit through the new debug hook.
773
1a4cd2cd
JM
7742015-06-10 Jason Merrill <jason@redhat.com>
775
776 PR c++/66289
777 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
778 * pt.c (push_template_decl_real): Set it.
779 (dependent_alias_template_spec_p): Use it.
780 (dependent_type_p_r): Use dependent_alias_template_spec_p.
781 (uses_all_template_parms_data, uses_all_template_parms_r)
782 (complex_alias_template_p): New.
783 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
784
5af874fb
JM
7852015-06-09 Jason Merrill <jason@redhat.com>
786
34f42d7b
JM
787 DR 1467
788 PR c++/51747
789 * typeck2.c (digest_init_r): Replace previous change with
790 gcc_unreachable.
791
5af874fb
JM
792 PR c++/66387
793 * semantics.c (process_outer_var_ref): Make sure the value is
794 actually constant before returning it.
795 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
796 array.
797
ebcf592c
PC
7982015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
799
800 PR c++/65815
801 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
802 * init.c (expand_default_init): Likewise.
803
6a9263f7
JM
8042015-06-09 Jason Merrill <jason@redhat.com>
805
806 PR c++/66383
807 * tree.c (replace_placeholders_r): Handle placeholders for an
808 outer object.
809 * typeck2.c (store_init_value): Only replace_placeholders for
810 objects of class type.
811
13fdf2e2
AM
8122015-06-08 Andrew MacLeod <amacleod@redhat.com>
813
814 * call.c : Adjust include files.
815 * class.c : Likewise.
816 * constexpr.c : Likewise.
817 * cp-array-notation.c : Likewise.
818 * cp-cilkplus.c : Likewise.
819 * cp-gimplify.c : Likewise.
820 * cp-lang.c : Likewise.
821 * cp-objcp-common.c : Likewise.
822 * cp-tree.h : Likewise.
823 * cp-ubsan.c : Likewise.
824 * cvt.c : Likewise.
825 * decl.c : Likewise.
826 * decl2.c : Likewise.
827 * dump.c : Likewise.
828 * error.c : Likewise.
829 * except.c : Likewise.
830 * expr.c : Likewise.
831 * friend.c : Likewise.
832 * init.c : Likewise.
833 * lambda.c : Likewise.
834 * lex.c : Likewise.
835 * mangle.c : Likewise.
836 * method.c : Likewise.
837 * name-lookup.c : Likewise.
838 * optimize.c : Likewise.
839 * parser.c : Likewise.
840 * pt.c : Likewise.
841 * ptree.c : Likewise.
842 * repo.c : Likewise.
843 * rtti.c : Likewise.
844 * search.c : Likewise.
845 * semantics.c : Likewise.
846 * tree.c : Likewise.
847 * typeck.c : Likewise.
848 * typeck2.c : Likewise.
849 * vtable-class-hierarchy.c : Likewise.
850
85d9a299
JM
8512015-06-05 Jason Merrill <jason@redhat.com>
852
39f383b7
JM
853 PR c++/66405
854 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
855 the expansion has extra args.
856 (use_pack_expansion_extra_args_p): Return true in that case.
857
85d9a299
JM
858 PR c++/66405
859 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
860 dependent even if it has a type.
861
d7438551
AH
8622015-06-05 Aldy Hernandez <aldyh@redhat.com>
863
864 * cp-objcp-common.c: Adjust comment for
865 cxx_warn_unused_global_decl.
866 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
867 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
868 * cp-tree.h (note_mangling_alias): Protoize.
869 (cp_write_global_declarations): Remove.
870 (cxx_post_compilation_parsing_cleanups): Protoize.
871 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
872 argument.
873 * decl2.c (mangling_aliases): New global.
874 (build_java_method_aliases): New. Adapted from
875 collect_candidates_for_java_method_aliases.
876 (collect_candidates_for_java_method_aliases): Remove.
877 (build_java_method_aliases): Remove.
878 (generate_mangling_aliases): New.
879 (note_mangling_alias): New. Moved from mangle_decl.
880 (locus_at_end_of_parsing): New global.
881 (c_parse_final_cleanups): Rename from
882 cp_write_global_declarations.
883 Use locus_at_end_of_parsing.
884 Call generate_mangling_aliases.
885 Rename call to collect_candidates_for_java_method_aliases into
886 build_java_method_aliases.
887 Remove call to finalize_compilation_unit.
888 Move vtable handling into cxx_post_compilation_parsing_cleanups.
889 Do not call check_global_declarations or
890 emit_debug_global_declarations.
891 (cxx_post_compilation_parsing_cleanups): New.
892 * mangle.c (mangle_decl): Move code to note_mangling_alias.
893 * name-lookup.c (do_namespace_alias): Call early_global_decl.
894
ac59f9be
NS
8952015-06-05 Nathan Sidwell <nathan@acm.org>
896
897 PR c++/52595
898 * parser.c (cp_parser_cache_defarg): Continue looking for
899 declarators when scanning a potential template argument list of an
900 NSDMI.
901
ecb9f223
AM
9022015-06-04 Andrew MacLeod <amacleod@redhat.com>
903
904 * call.c: Adjust includes for restructured coretypes.h.
905 * class.c: Likewise.
906 * constexpr.c: Likewise.
907 * cp-array-notation.c: Likewise.
908 * cp-gimplify.c: Likewise.
909 * cp-lang.c: Likewise.
910 * cp-objcp-common.c: Likewise.
911 * cp-tree.h: Likewise.
912 * cp-ubsan.c: Likewise.
913 * cvt.c: Likewise.
914 * decl.c: Likewise.
915 * decl2.c: Likewise.
916 * dump.c: Likewise.
917 * error.c: Likewise.
918 * except.c: Likewise.
919 * expr.c: Likewise.
920 * friend.c: Likewise.
921 * init.c: Likewise.
922 * lambda.c: Likewise.
923 * lex.c: Likewise.
924 * mangle.c: Likewise.
925 * method.c: Likewise.
926 * name-lookup.c: Likewise.
927 * optimize.c: Likewise.
928 * parser.c: Likewise.
929 * pt.c: Likewise.
930 * ptree.c: Likewise.
931 * repo.c: Likewise.
932 * rtti.c: Likewise.
933 * search.c: Likewise.
934 * semantics.c: Likewise.
935 * tree.c: Likewise.
936 * typeck.c: Likewise.
937 * typeck2.c: Likewise.
938 * vtable-class-hierarchy.c: Likewise.
939
e93ca5ca
RR
9402015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
941
942 PR c++/66192
943 PR target/66200
944 * cp-tree.h (get_guard_cond): Adjust declaration
945 * decl.c (expand_static_init): Use atomic load acquire
946 and adjust call to get_guard_cond.
947 * decl2.c (build_atomic_load_byte): New function.
948 (get_guard_cond): Handle thread_safety.
949 (one_static_initialization_or_destruction): Adjust call to
950 get_guard_cond.
951
1cc1ac7f
JM
9522015-06-03 Jason Merrill <jason@redhat.com>
953
954 PR c++/44282
955 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
956 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
957 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
958 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
959
d3ea4c06
MLI
9602015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
961 Paolo Carlini <paolo.carlini@oracle.com>
962
963 PR c++/66130
964 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
965 use it in the diagnostic.
966 (decay_conversion): Adjust call.
967 * semantics.c (finish_decltype_type): Likewise.
968 * call.c (resolve_args, build_new_op_1,
969 perform_implicit_conversion_flags): Adjust calls.
970 * cvt.c (ocp_convert, convert_to_void): Likewise.
971 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
972
4753e009
PC
9732015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
974
975 * decl.c (check_tag_decl): Use declspecs->locations as locations in
976 error_at and warning_at calls.
977
7b3a9795
MP
9782015-06-03 Marek Polacek <polacek@redhat.com>
979
980 PR sanitizer/66190
981 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
982 (cp_genericize_r): Don't instrument static initializers.
983 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
984
ea5b45b6
AT
9852015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
986
987 * decl.c (start_function): Call plugin before parsing.
988 (finish_function): Call plugin after parsing.
989
5d58db82
PP
9902015-06-02 Patrick Palka <patrick@parcs.ath.cx>
991
992 * cp-tree.h (init_error): Remove declaration.
993 * error.c (scratch_pretty_printer): Rename to ...
994 (actual_pretty_printer): ... this.
995 (cxx_pp): Constify and update accordingly.
996 (init_error): Remove definition.
997 * lex.c (cxx_init): Do not call init_error.
998
a983abd2
PC
9992015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1000
1001 PR c++/61683
1002 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1003
603eaec4
JM
10042015-06-01 Jason Merrill <jason@redhat.com>
1005
81371eff
JM
1006 PR c++/65942
1007 * decl2.c (mark_used): Don't always instantiate constexpr fns.
1008 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1009
603eaec4
JM
1010 PR c++/44282
1011 * mangle.c (attr_strcmp): New.
1012 (write_CV_qualifiers_for_type): Also write out attributes that
1013 affect type identity.
1014 (write_type): Strip all attributes after writing qualifiers.
1015
6ad6af49
JM
10162015-05-31 Jason Merrill <jason@redhat.com>
1017
255a48d6
JM
1018 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1019
6ad6af49
JM
1020 PR c++/66320
1021 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1022 with the wrong type as non-constant.
1023
f4252989
JM
10242015-05-27 Jason Merrill <jason@redhat.com>
1025
cba16cca
JM
1026 * decl.c (check_redeclaration_exception_specification): Depend on
1027 -Wsystem-headers rather than -pedantic.
1028
f4252989
JM
1029 * decl.c (warn_extern_redeclared_static): Use the location of
1030 newdecl in diagnostics, not input_location.
1031 (validate_constexpr_redeclaration): Likewise.
1032 (check_redeclaration_no_default_args): Likewise.
1033 (duplicate_decls): Likewise.
1034 (check_redeclaration_exception_specification): Likewise.
1035 Change second diagnostic to inform.
1036
6f2d72e0
NS
10372015-05-24 Nathan Sidwell <nathan@acm.org>
1038
1039 PR c++/66243
1040 * decl.c (build_enumerator): Don't silently convert scoped enums.
1041
10422015-05-24 Jan Hubicka <hubicka@ucw.cz>
233ce289
JH
1043
1044 PR lto/66180
1045 * mangle.c (mangle_decl): Mangle anonymous namespace types as
1046 "<anon>".
1047
84a3423b
NS
10482015-05-23 Nathan Sidwell <nathan@acm.org>
1049
1050 PR c++/65936
1051 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1052
a95492ab
JW
10532015-05-22 Jim Wilson <jim.wilson@linaro.org>
1054
1055 * Make-lang.in (check_g++_parallelize): Update comment.
1056
320d13ec
PC
10572015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1058
1059 PR c++/65598
1060 * decl.c (grokdeclarator): Use the correct location in error
1061 messages about 'explicit'.
1062
fd5c817a
MP
10632015-05-22 Marek Polacek <polacek@redhat.com>
1064 Edward Smith-Rowland <3dw4rd@verizon.net>
1065
1066 PR c/47043
1067 * cp-tree.h (build_enumerator): Update declaration.
1068 * decl.c (build_enumerator): Add attributes parameter. Call
1069 cplus_decl_attributes.
1070 * init.c (constant_value_1): Pass tf_none to mark_used.
1071 * parser.c (cp_parser_enumerator_definition): Parse attributes and
1072 pass them down to build_enumerator.
1073 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1074 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1075
9ab2fcc1
NS
10762015-05-21 Nathan Sidwell <nathan@acm.org>
1077
1078 PR c++/60943
1079 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1080
6b6dd1aa
MP
10812015-05-21 Marek Polacek <polacek@redhat.com>
1082
1083 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1084
12101053
JM
10852015-05-20 Jason Merrill <jason@redhat.com>
1086
226a93b7
JM
1087 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1088 before register_specialization.
1089
12101053
JM
1090 * decl.c (grok_op_properties): Don't complain about size_t
1091 placement delete here.
1092 * call.c (second_parm_is_size_t): Split out from...
1093 (non_placement_deallocation_fn_p): ...here.
1094 (build_op_delete_call): Warn about size_t placement delete with
1095 -Wc++14-compat.
1096
9ab2fcc1 10972015-05-19 Nathan Sidwell <nathan@acm.org>
09b59d4d
NS
1098
1099 PR c++/65954
1100 * typeck.c (finish_class_member_access_expr): Diagnose failed
1101 lookup of enum class member.
1102
41b37d5e
JJ
11032015-05-19 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR middle-end/66199
1106 * parser.c (cp_parser_omp_for_loop): Don't add
1107 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1108 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1109 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1110 constructs.
1111
fab27f52
MM
11122015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1113
1114 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1115 swaps.
1116
80f1c14d
JM
11172015-05-18 Jason Merrill <jason@redhat.com>
1118
f41aecf4
JM
1119 * pt.c (retrieve_specialization): Make sure our arguments have
1120 gone through strip_typedefs.
1121
b237c4cb
JM
1122 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1123 (determine_specialization): Call coerce_template_parms.
1124
c4d6d7bc
JM
1125 DR 1391
1126 * pt.c (type_unification_real): Check convertibility here.
1127 (unify_one_argument): Not here.
1128
8f56fadc
JM
1129 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1130 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1131 [TREE_LIST]: Fix no-change case.
1132
80f1c14d
JM
1133 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1134
40de31cf
MLI
11352015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1136
1137 PR fortran/44054
1138 * error.c (cp_diagnostic_starter): Use diagnostic_location
1139 function.
1140 (cp_print_error_function): Likewise.
1141 (cp_printer): Replace locus pointer with accessor function.
1142
c3388e62
DM
11432015-05-12 David Malcolm <dmalcolm@redhat.com>
1144
1145 * parser.c (cp_parser_selection_statement): Add location and
1146 guard_kind arguments to calls to
1147 cp_parser_implicitly_scoped_statement.
1148 (cp_parser_iteration_statement): Likewise for calls to
1149 cp_parser_already_scoped_statement.
1150 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1151 "guard_kind" params; use them to warn for misleading
1152 indentation.
1153 (cp_parser_already_scoped_statement): Likewise.
1154
5ce039df
JH
11552015-05-11 Jan Hubicka <hubicka@ucw.cz>
1156
1157 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1158 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1159 * semantics.c (finish_member_declaration): Likewise.
1160 * method.c (lazily_declare_fn): Allways add method to main variant list.
1161
a31765ef
AH
11622015-05-09 Aldy Hernandez <aldyh@redhat.com>
1163
1164 PR bootstrap/66085
1165 * decl2.c (note_mangling_alias): Declare arguments as unused.
1166
765189ff
JM
11672015-05-08 Jason Merrill <jason@redhat.com>
1168
1169 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1170 -Wc++0x-compat.
1171
613aba20
JM
11722015-05-08 Jason Merrill <jason@redhat.com>
1173
1174 * decl2.c (mangling_aliases): New variable.
1175 (note_mangling_alias, generate_mangling_aliases): New.
1176 (cp_write_global_declarations): Call generate_mangling_aliases.
1177 (generate_mangling_alias): Split out from...
1178 * mangle.c (mangle_decl): ...here.
1179 * cp-tree.h: Declare note_mangling_alias.
1180
09c5f835
AH
11812015-05-08 Aldy Hernandez <aldyh@redhat.com>
1182
1183 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1184 (build_java_method_aliases): Adapt to use create_same_body_alias
1185 instead of assemble_alias. Move variable declarations to
1186 definition and tidy up.
1187 (cp_write_global_declarations): Call build_java_method_aliases
1188 instead of collecting candidates first.
1189
90f11cf9
JM
11902015-05-07 Jason Merrill <jason@redhat.com>
1191
1192 PR c++/59012
1193 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1194 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1195 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1196 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1197 (apply_late_template_attributes): Handle attribute pack expansion.
1198
0173bd2a
MP
11992015-05-07 Marek Polacek <polacek@redhat.com>
1200
1201 PR c/65179
1202 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1203 value.
1204
d5449acf
JM
12052015-05-07 Jason Merrill <jason@redhat.com>
1206
1207 DR 1467
1208 PR c++/51747
1209 * typeck2.c (digest_init_r): Fix single element list.
1210
b8dd6913
JM
12112015-05-05 Jason Merrill <jason@redhat.com>
1212
8243e2a9
JM
1213 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1214 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1215 MUST_NOT_THROW_EXPR.
1216 (cp_genericize_data): Add try_block field.
1217 (cp_genericize_tree): Initialize it.
1218 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1219 implicit rethrow.
1220
81b6a6c5
JM
1221 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1222 Return false.
1223
32ad49af
JM
1224 * semantics.c (finish_call_expr): Check complain.
1225
15ed2619
JM
1226 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1227 maybe-in-charge constructor.
1228
f8aa3dd3
JM
1229 * decl.c (start_decl): Don't push the plain VAR_DECL for a
1230 variable template.
1231
b8dd6913
JM
1232 DR 1518
1233 DR 1630
1234 PR c++/54835
1235 PR c++/60417
1236 * call.c (convert_like_real): Check value-initialization before
1237 explicit.
1238 * typeck2.c (process_init_constructor_record): Don't set
1239 CONSTRUCTOR_IS_DIRECT_INIT.
1240 (process_init_constructor_array): Likewise.
1241 * init.c (build_vec_init): Likewise.
1242
21c0a521
DM
12432015-05-05 David Malcolm <dmalcolm@redhat.com>
1244
1245 * parser.c (cp_parser_asm_definition): Only test for
1246 error_mark_node if "outputs" was just set. Likewise for "inputs".
1247
f5322614
PC
12482015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1249 Jakub Jelinek <jakub@redhat.com>
1250
1251 PR c++/66007
1252 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1253 result in an actual error.
1254
38920aec
PC
12552015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1256 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
1257
1258 PR c++/65858
1259 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1260 false.
1261
6f3d1a5e
DM
12622015-04-30 David Malcolm <dmalcolm@redhat.com>
1263
1264 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1265 trailing semicolon.
1266
9f7fb685
JM
12672015-04-29 Jason Merrill <jason@redhat.com>
1268
1269 PR c++/50800
1270 * tree.c (apply_identity_attributes): Fix handling of classes.
1271
b811915d
TS
12722015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1273
1274 * parser.c (cp_parser_oacc_enter_exit_data): Use
1275 OMP_STANDALONE_CLAUSES.
1276
0aa359c1
PC
12772015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
1278
1279 PR c++/64667
1280 * init.c (perform_member_init): Handle references for -Winit-self.
1281
2c8f0683
TS
12822015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1283
1284 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1285 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1286
7bfc5ada
JM
12872015-04-28 Jason Merrill <jason@redhat.com>
1288
3f8e2835
JM
1289 PR c++/65896
1290 * constexpr.c (cxx_eval_store_expression): Don't try to actually
1291 store an empty class.
1292
5756d0f9
JM
1293 PR c++/65656
1294 * constexpr.c (cxx_eval_builtin_function_call): Fix
1295 __builtin_constant_p.
1296
b71983a5
JM
1297 PR c++/50800
1298 * tree.c (strip_typedefs): Add remove_attributes parm.
1299 (strip_typedefs_expr): Likewise.
1300 (apply_identity_attributes): New subroutine of strip_typedefs.
1301 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1302 (convert_nontype_argument, unify): Likewise.
1303 * cp-tree.h: Adjust.
1304
7bfc5ada
JM
1305 PR c++/65734
1306 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1307
1d0275e2
TS
13082015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1309
1310 * class.c (layout_class_type): Remove check if
1311 PCC_BITFIELD_TYPE_MATTERS is defined.
1312
46bf0b0a
JW
13132015-04-27 Jim Wilson <jim.wilson@linaro.org>
1314
1315 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1316
f8815f7a
JM
13172015-04-24 Jason Merrill <jason@redhat.com>
1318
c6f044f7
JM
1319 PR c++/50800
1320 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1321
f8815f7a
JM
1322 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1323 Remove obsolete code.
1324 [NE_EXPR]: Likewise.
1325
6c283621
JM
13262015-04-23 Jason Merrill <jason@redhat.com>
1327
1328 PR c++/65646
1329 * pt.c (check_explicit_specialization): Don't
1330 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1331 headers.
1332 * decl.c (grokvardecl): Revert earlier fix.
1333
2821fc6b
PC
13342015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
1335
1336 PR c++/65801
1337 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1338 suppresses the diagnostic.
1339
0cfabb37
VV
13402015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
1341
1342 Reject trailing return type for an operator auto().
1343 * decl.c (grokdeclarator): Reject trailing return types for
1344 all conversion operators, don't handle conversion operators
1345 in the previous checks that deal with auto.
1346
06aca1d5
IV
13472015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1348
1349 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1350
988db853
PC
13512015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1352
1353 * class.c (resolve_address_of_overloaded_function, instantiate_type):
1354 Rename tsubst_flags_t parameter flags -> complain.
1355
9f635aba
PC
13562015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1357
1358 * call.c (build_op_delete_call, build_over_call): Check mark_used
1359 return value.
1360 * class.c (resolve_address_of_overloaded_function): Likewise.
1361 * decl.c (cxx_maybe_build_cleanup): Likewise.
1362 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1363 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1364 * rtti.c (build_dynamic_cast_1): Likewise.
1365 * semantics.c (process_outer_var_ref): Likewise.
1366 * typeck.c (build_class_member_access_expr,
1367 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1368
bf5730d7
JM
13692015-04-15 Jason Merrill <jason@redhat.com>
1370
58cc255c
JM
1371 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1372 (build_constexpr_constructor_member_initializers): Loop to find
1373 the BIND_EXPR.
1374 * decl.c (start_preparsed_function): Clobber the object at the
1375 beginning of a constructor.
1376
efb5e817
JM
1377 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1378 * method.c (implicitly_declare_fn): Likewise.
1379 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1380
bf5730d7
JM
1381 * decl2.c (determine_visibility): Use get_template_info.
1382
5ce3039e
JM
13832015-04-15 Jason Merrill <jason@redhat.com>
1384 Marek Polacek <polacek@redhat.com>
1385
1386 PR c++/65727
1387 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1388 through the normal loop, just don't capture.
1389 (maybe_resolve_dummy): Handle null return.
1390
3a1351b9
PC
13912015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1392
1393 * call.c (enforce_access): Emit error + inform.
1394
0567dcd2
MP
13952015-04-15 Marek Polacek <polacek@redhat.com>
1396
1397 * constexpr.c (use_new_call): Remove #define.
1398 (lookup_parameter_binding): Remove function.
1399 (cxx_bind_parameters_in_call): Remove unused code.
1400 (cxx_eval_call_expression): Likewise.
1401 (cxx_eval_constant_expression): Likewise.
1402
182d115c
MM
14032015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1404
1405 * tree.c (replace_placeholders_t): Remove unused type.
1406 (replace_placeholders): Remove unused pset.
1407
0f19e7ad
JM
14082015-04-14 Jason Merrill <jason@redhat.com>
1409
57c5e96e
JM
1410 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1411
fb899e32
JM
1412 PR c++/65695
1413 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1414
0f19e7ad
JM
1415 PR c++/65721
1416 * name-lookup.c (do_class_using_decl): Complain about specifying
1417 the current class even if there are dependent bases.
1418
688e531e
DK
14192015-04-14 David Krauss <david_work@me.com>
1420
1421 PR c++/59766
1422 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1423
2fd16d0f
MV
14242015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1425 Jason Merrill <jason@redhat.com>
1426
1427 PR c++/60994
1428 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1429 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1430 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1431 a class template.
1432
6338536c
JJ
14332015-04-12 Jakub Jelinek <jakub@redhat.com>
1434
1435 PR c++/65736
1436 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1437 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1438 the expression to the original type at the end.
1439
00da5e28
JJ
14402015-04-09 Jakub Jelinek <jakub@redhat.com>
1441
0212e31e
JJ
1442 PR c++/65690
1443 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1444 TYPE_USER_ALIGN.
1445
00da5e28
JJ
1446 PR c++/65690
1447 * tree.c (build_cplus_array_type): Layout type before variants are
1448 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1449 variant.
1450
a3d94329
PC
14512015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1452
1453 PR c++/64085
1454 * lambda.c (add_capture): Use dependent_type_p for capture by
1455 reference too.
1456
894bec68
MP
14572015-04-02 Marek Polacek <polacek@redhat.com>
1458
1459 PR c++/65642
1460 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1461 cxx_eval_constant_expression on the first operand.
1462
37978db4
JM
14632015-04-01 Jason Merrill <jason@redhat.com>
1464
1465 PR c++/65625
1466 * decl.c (make_typename_type): Handle seeing a variable template.
1467
c23a9ec5
PC
14682015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1469
1470 PR c++/56100
1471 * pt.c (instantiating_current_function_p): New.
1472 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1473 * cp-tree.h (instantiating_current_function_p): Declare.
1474
f87cb0b7
JM
14752015-04-01 Jason Merrill <jason@redhat.com>
1476
1477 PR c++/65646
1478 * decl.c (grokvardecl): Don't call check_explicit_specialization
1479 for non-template members of a class template.
1480
14e51ef2
MP
14812015-04-01 Marek Polacek <polacek@redhat.com>
1482
1483 PR c++/65554
1484 * class.c (finish_struct): Require that the second field of a
1485 user-defined initializer_list be of size type.
1486
397ad54d
MP
14872015-03-31 Marek Polacek <polacek@redhat.com>
1488
1489 PR c++/65390
1490 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1491 checking for constness.
1492
ef4bac78
MP
14932015-03-30 Marek Polacek <polacek@redhat.com>
1494
1495 PR c++/65398
1496 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1497 *(&A[i] p+ j) => A[i + j] transformation here.
1498 (cxx_eval_pointer_plus_expression): New function.
1499 (cxx_eval_constant_expression): Use it here.
1500
62021f64
TB
15012015-03-27 Tobias Burnus <burnus@net-b.de>
1502
1503 PR c/65586
1504 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1505 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1506 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1507 -fopenmp-simd.
1508
5964a3a6
MP
15092015-03-27 Marek Polacek <polacek@redhat.com>
1510
1511 PR c++/65556
1512 * semantics.c (finish_switch_cond): If the unlowered type is not an
1513 enum, use the type of the condition.
1514
0b7dccc6
JM
15152015-03-27 Jason Merrill <jason@redhat.com>
1516
1517 PR c++/65509
1518 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1519 constants.
1520
08227658
MM
15212015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1522
1523 PR c++/65154
1524 * init.c (build_vec_init): Fix initializing aggregates
1525 with empty init list.
1526
41b38772
JM
15272015-03-26 Jason Merrill <jason@redhat.com>
1528
1529 PR c++/65525
1530 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1531
1cc57b59
MP
15322015-03-25 Marek Polacek <polacek@redhat.com>
1533
1534 PR c++/65558
1535 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1536 on an anonymous namespace.
1537
2a924bb4
MP
15382015-03-25 Marek Polacek <polacek@redhat.com>
1539
1540 PR c++/61670
1541 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1542
4b7c558d
JM
15432015-03-24 Jason Merrill <jason@redhat.com>
1544
a9f0423f
JM
1545 PR c++/65046
1546 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1547 * parser.c (cp_parser_namespace_definition): Don't set it.
1548 * name-lookup.c (handle_namespace_attrs): Check
1549 DECL_NAMESPACE_ASSOCIATIONS instead.
1550
4b7c558d
JM
1551 PR c++/65498
1552 * pt.c (get_mostly_instantiated_function_type): Just return the
1553 type of the partially instantiated template in DECL_TI_TEMPLATE.
1554
f594abf4
MP
15552015-03-20 Marek Polacek <polacek@redhat.com>
1556
1557 PR c++/65398
1558 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1559 A[i + j].
1560
b75cebc4
MP
15612015-03-20 Marek Polacek <polacek@redhat.com>
1562
1563 PR c++/65072
1564 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1565 variant.
1566
7cb73573
JM
15672015-03-19 Jason Merrill <jason@redhat.com>
1568
1569 PR c++/65046
1570 Automatically propagate ABI tags to variables and functions
1571 from their (return) type.
1572 * class.c (check_tag): Handle variables and functions.
1573 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1574 (mark_or_check_tags): Likewise.
1575 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1576 (check_abi_tags): Add single argument overload for decls.
1577 Handle inheriting tags for decls.
1578 * mangle.c (write_mangled_name): Call it.
1579 (mangle_return_type_p): Split out from write_encoding.
1580 (unmangled_name_p): Split out from write_mangled_name.
1581 (write_mangled_name): Ignore abi_tag on namespace.
1582 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1583 * parser.c (cp_parser_namespace_definition): Set it.
1584 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1585 about abi_tag attribute on non-inline namespace.
1586 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1587 (handle_abi_tag_attribute): Allow tags on variables.
1588
9b65e171
JJ
15892015-03-19 Jakub Jelinek <jakub@redhat.com>
1590
1591 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1592 attribute for DECL_EXTERNAL VAR_DECLs.
1593
41cee85a
PC
15942015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1595
1596 PR c++/65340
1597 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1598 mark_used.
1599 * decl2.c (mark_used): Inline the require_deduced_type call and
1600 guard the error call.
1601
3d17be83
JM
16022015-03-16 Jason Merrill <jason@redhat.com>
1603
1604 PR c++/65061
1605 * parser.c (cp_parser_template_name): Call strip_using_decl.
1606
ec638c55
MP
16072015-03-16 Marek Polacek <polacek@redhat.com>
1608
1609 DR 1688
1610 PR c++/65327
1611 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1612
b7e7f412
PC
16132015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1614
1615 PR c++/65323
1616 * decl.c (check_default_argument): Don't call
1617 maybe_warn_zero_as_null_pointer_constant.
1618
25de0a29
AH
16192015-03-11 Aldy Hernandez <aldyh@redhat.com>
1620
1621 * cp-gimplify.c (simple_empty_class_p): New.
1622 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1623 the code for empty class copies into simple_empty_class_p, and
1624 adapt it to handle COMPOUND_EXPRs.
1625
58cbf8d4
PC
16262015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1627
1628 PR c++/65370
1629 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1630 only if the location of newdecl doesn't match the location of olddecl.
1631
704c7904
JJ
16322015-03-10 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR c++/65127
1635 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1636 is not a PARM_DECL.
1637
a4d66d7d
JM
16382015-03-10 Jason Merrill <jason@redhat.com>
1639
1640 PR c++/65333
1641 DR 1558
1642 * pt.c (dependent_type_p_r): Check both class and alias template args.
1643
7ccb1a11
JJ
16442015-03-10 Jakub Jelinek <jakub@redhat.com>
1645
1646 PR c/65120
1647 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1648 before preparing arguments to warn_logical_not_parentheses.
1649 Use maybe_constant_value on rhs.
1650
a2f259ef
JM
16512015-03-09 Jason Merrill <jason@redhat.com>
1652
1653 PR c++/65339
1654 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1655
01177669
JJ
16562015-03-09 Jakub Jelinek <jakub@redhat.com>
1657
1658 PR c/65120
1659 * parser.c (cp_parser_binary_expression): Don't warn for
1660 !!x == y or !b == y where b is bool.
1661
a78cbe29
AH
16622015-03-06 Aldy Hernandez <aldyh@redhat.com>
1663
1664 * ptree.c (cxx_print_lambda_node): New.
1665 (cxx_print_xnode): Handle LAMBDA_EXPR.
1666
bf66b9b4
AH
16672015-03-03 Aldy Hernandez <aldyh@redhat.com>
1668
1669 PR c++/65295
1670 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1671 RESULT_DECL handling.
1672
75e0295b
MP
16732015-02-26 Marek Polacek <polacek@redhat.com>
1674
1675 PR c++/65202
1676 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1677 a RETURN_EXPR if its operand is null.
1678
9b276dad
JM
16792015-02-25 Jason Merrill <jason@redhat.com>
1680
2b8f9c8f
JM
1681 PR c++/65209
1682 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1683 DECL_COMDAT.
1684 (constrain_visibility_for_template): Handle reference arguments.
1685
9b276dad
JM
1686 PR debug/58315
1687 * decl.c (start_preparsed_function): Use create_artificial_label
1688 for cdtor_label.
1689
4414e22e
PC
16902015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1691 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c++/65075
1694 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1695 implicit typedefs for lambda types.
1696
6e4f01ff
PC
16972015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1698
1699 PR c++/60894
1700 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1701
ef796bef
JM
17022015-02-13 Jason Merrill <jason@redhat.com>
1703
1704 PR c++/65054
1705 * pt.c (template_args_equal): Look through conversions here.
1706 * tree.c (cp_tree_equal): Not here.
1707
e84abfa4
PC
17082015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1709
1710 PR c++/60211
1711 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1712 pragma_external context.
1713
f9b600ba
JM
17142015-02-13 Jason Merrill <jason@redhat.com>
1715
1716 PR c++/65051
1717 * call.c (reference_binding): Don't look for bad conversion
1718 if TO is incomplete.
1719
81adbcea
PC
17202015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1721
1722 PR c++/64970
1723 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1724 to lookup_template_class.
1725
730f474b
JJ
17262015-02-13 Jakub Jelinek <jakub@redhat.com>
1727
1728 PR ipa/65034
1729 * decl.c (start_preparsed_function): Use void_type_node instead
1730 of NULL_TREE as LABEL_DECL type.
1731
f522930c
JM
17322015-02-12 Jason Merrill <jason@redhat.com>
1733
3b95b65c
JM
1734 PR c++/64898
1735 * mangle.c (write_mangled_name): Fix test for variable template
1736 instantiation.
1737
f522930c
JM
1738 * decl.c (begin_destructor_body): Condition clobber on
1739 -flifetime-dse.
1740
bc81eb3f
AA
17412015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1742
1743 PR c++/64959
1744 * parser.c (lookup_literal_operator): Return all candidates.
1745 (cp_parser_userdef_char_literal): Simplify error handling.
1746 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1747 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1748 Also give higher priority to standard string UDL operator.
1749
40595b8e
JJ
17502015-02-12 Jakub Jelinek <jakub@redhat.com>
1751
12d0d358
JJ
1752 PR debug/55541
1753 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1754 * decl.c (poplevel): If functionbody, try not to create an extra
1755 BLOCK for function body and use subblocks as that, if it is non-NULL
1756 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1757 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1758
40595b8e
JJ
1759 PR sanitizer/64984
1760 * except.c (check_noexcept_r): Return NULL for internal
1761 calls.
1762
0ec052fe
JM
17632015-02-10 Jason Merrill <jason@redhat.com>
1764
1765 PR c++/64994
1766 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1767
d90cae08
JH
17682015-02-10 Jan Hubicka <hubicka@ucw.cz>
1769
1770 PR ipa/64982
1771 * method.c (use_thunk): Do not check for stdarg thunks.
1772
a02f26f6
JM
17732015-02-06 Jason Merrill <jason@redhat.com>
1774
1775 PR c++/64899
1776 * init.c (build_vec_init): Handle default-initialized array with
1777 constexpr default constructor.
1778
4886ec8e
JJ
17792015-02-04 Jakub Jelinek <jakub@redhat.com>
1780
1781 PR c/64824
1782 PR c/64868
1783 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1784
457d0ace
PC
17852015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1786
1787 PR c++/64877
1788 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1789 for generated expressions.
1790
879887f1
VV
17912015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1792
1793 PR c++/64901
1794 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1795 DECL_OVERRIDE_P.
1796
4c5cf0b2
JM
17972015-02-02 Jason Merrill <jason@redhat.com>
1798
1799 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1800
40fecdd6
JM
18012015-01-30 Joseph Myers <joseph@codesourcery.com>
1802
1803 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1804 changed to pass input_location as first argument.
1805
a7c3e87e
JJ
18062015-01-29 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR c++/64717
1809 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1810 into SAVE_EXPR.
1811
e1ef8aa9
JM
18122015-01-29 Jason Merrill <jason@redhat.com>
1813
3dbb8427
JM
1814 PR c++/49508
1815 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1816 erroneous return statement.
1817
e1ef8aa9
JM
1818 PR c++/64521
1819 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1820 point.
1821
f7f049fa
CT
18222015-01-27 Caroline Tice <cmtice@google.com>
1823
1824 Committing VTV Cywin/Ming patch for Patrick Wollgast
1825 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1826 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1827
94e54b8d
JM
18282015-01-27 Jason Merrill <jason@redhat.com>
1829
2cc7f90b
JM
1830 PR c++/58597
1831 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1832 current_function_decl.
1833
94e54b8d
JM
1834 PR c++/63889
1835 * pt.c (finish_template_variable): Move from semantics.c.
1836 Handle multiple template arg levels. Handle coercion here.
1837 (lookup_template_variable): Not here.
1838
7c83622c
JM
18392015-01-23 Jason Merrill <jason@redhat.com>
1840
fa4e8db2
JM
1841 PR c++/64314
1842 PR c++/57510
1843 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1844 that has been completely split out.
1845
c6e7c499 1846 PR c++/64701
8a7261b2
JM
1847 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1848 statement codes.
c6e7c499 1849
7c83622c
JM
1850 PR c++/64727
1851 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1852 of CONST_DECL.
1853
f1eac182
JM
18542015-01-21 Jason Merrill <jason@redhat.com>
1855
b85a3242
JM
1856 PR c++/64603
1857 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1858 constant CONSTRUCTORs.
1859
f1eac182
JM
1860 PR c++/64647
1861 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1862 give a hard error in a template instantiation.
1863
cbf5d0e7
RB
18642015-01-21 Richard Biener <rguenther@suse.de>
1865
1866 PR middle-end/64313
1867 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1868 for builtins the user declared correctly.
1869
de37b21e
PC
18702015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1871
1872 PR c++/58614
1873 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1874 TREE_TYPE (elt) == error_mark_node.
1875
67933728
JH
18762015-01-15 Jan Hubicka <hubicka@ucw.cz>
1877
1878 PR tree-optimization/62053
1879 * tree.c (build_cplus_array_type): Layout type after variants are set.
1880
35228ac7
JJ
18812015-01-15 Jakub Jelinek <jakub@redhat.com>
1882
1883 * cp-gimplify.c (cp_genericize_r): Call
1884 cp_ubsan_maybe_instrument_member_call for member calls.
1885 (cp_ubsan_check_member_access_r): New function.
1886 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1887 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1888 cp_ubsan_instrument_member_accesses,
1889 cp_ubsan_maybe_instrument_downcast,
1890 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1891 * cp-ubsan.c: New file.
1892 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1893 * constexpr.c (cxx_eval_call_expression): Return void_node
1894 for IFN_UBSAN_VPTR.
1895 (potential_constant_expression_1): Return true for
1896 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1897 * typeck.c (build_class_member_access_expr): Provide locus
1898 for COMPONENT_REFs.
1899 (build_static_cast_1): Instrument downcasts.
1900 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1901 add ubsan instrumentation for virtual_access.
1902 * call.c: Include internal-fn.h.
1903 (set_flags_from_callee): Handle internal calls.
1904
199b7a35
MV
19052015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1906
1907 PR c++/59366
1908 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1909 and function templates, declared only in the class.
1910 * decl.c (duplicate_decls): Reveal hidden friend functions or
1911 function templates, if they are redeclared outside the class.
1912
c3c29ba5
JM
19132015-01-15 Jason Merrill <jason@redhat.com>
1914
134efa82
JM
1915 PR c++/64356
1916 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1917
c3c29ba5
JM
1918 PR c++/63283
1919 * constexpr.c (potential_constant_expression_1): Handle reference
1920 args in templates.
1921
41dbbb37
TS
19222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1923 James Norris <jnorris@codesourcery.com>
1924 Cesar Philippidis <cesar@codesourcery.com>
1925 Ilmir Usmanov <i.usmanov@samsung.com>
1926 Jakub Jelinek <jakub@redhat.com>
1927
1928 * parser.c: Include "gomp-constants.h".
1929 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1930 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1931 Use OMP_CLAUSE_SET_MAP_KIND.
1932 (cp_parser_omp_construct, cp_parser_pragma): Handle
1933 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1934 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1935 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1936 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1937 "create", "delete", "deviceptr", "host", "num_gangs",
1938 "num_workers", "present", "present_or_copy", "pcopy",
1939 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1940 "present_or_create", "pcreate", "vector_length", "wait".
1941 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1942 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1943 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1944 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1945 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1946 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1947 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1948 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1949 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1950 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1951 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1952 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1953 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1954 (cp_parser_oacc_wait): New functions.
1955 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1956 (finish_oacc_parallel): New prototypes.
1957 * semantics.c: Include "gomp-constants.h".
1958 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1959 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1960 OMP_CLAUSE_SET_MAP_KIND.
1961 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1962 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1963 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1964 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1965 functions.
1966
36b218ee
PC
19672015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1968
1969 PR c++/58671
1970 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1971 self-initialization.
1972
8f413ae2
JM
19732015-01-13 Jason Merrill <jason@redhat.com>
1974
caee690e
JM
1975 PR c++/64356
1976 PR libstdc++/58777
1977 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1978 pointer expressions.
1979 (cxx_eval_increment_expression): Likewise.
1980
7c368fb2
JM
1981 PR c++/64514
1982 * pt.c (coerce_template_parameter_pack): Return NULL for a
1983 zero-length fixed parameter pack with a pack expansion arg.
1984
8f413ae2
JM
1985 PR c++/64520
1986 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1987
49c8bc0c
JM
19882015-01-12 Jason Merrill <jason@redhat.com>
1989
1990 PR c++/64547
1991 * constexpr.c (cxx_eval_call_expression): A call to a void
1992 function doesn't need to return a value.
1993
adfac8df
JJ
19942015-01-09 Michael Collison <michael.collison@linaro.org>
1995
1996 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1997 input.h, alias.h, symtab.h, options.h, fold-const.h,
1998 wide-int.h, and inchash.h due to flattening of tree.h.
1999 * class.c: Ditto.
2000 * constexpr.c: Ditto.
2001 * cp-array-notation.c: Ditto.
2002 * cp-gimplify.c: Ditto.
2003 * cp-lang.c: Ditto.
2004 * cp-objcp-common.c: Ditto.
2005 * cvt.c: Ditto.
2006 * decl2.c: Ditto.
2007 * decl.c: Ditto.
2008 * dump.c: Ditto.
2009 * error.c: Ditto.
2010 * except.c: Ditto.
2011 * expr.c: Ditto.
2012 * friend.c: Ditto.
2013 * init.c: Ditto.
2014 * lambda.c: Ditto.
2015 * lex.c: Ditto.
2016 * mangle.c: Ditto.
2017 * name-lookup.c: Ditto.
2018 * optimize.c: Ditto.
2019 * parser.c: Ditto.
2020 * pt.c: Ditto.
2021 * ptree.c: Ditto.
2022 * repo.c: Ditto.
2023 * rtti.c: Ditto.
2024 * search.c: Ditto.
2025 * semantics.c: Ditto.
2026 * tree.c: Ditto.
2027 * typeck2.c: Ditto.
2028 * typeck.c: Ditto.
2029
f5481fc4
JM
20302015-01-08 Jason Merrill <jason@redhat.com>
2031
2032 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2033 * decl.c (compute_array_index_type): Likewise.
2034 * init.c (build_vec_init): Likewise.
2035 * typeck.c (cp_build_binary_op): Likewise.
2036
46621807
JM
20372015-01-08 Jason Merrill <jason@redhat.com>
2038
2039 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2040 whether an initializer-list is too big for a VLA.
2041 (throw_bad_array_length): Remove.
2042 * cp-tree.h: Remove prototype.
2043
247ecdf3
PC
20442015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2045
2046 PR c++/60753
2047 * decl.c (grokfndecl): Add bool parameter.
2048 (grokdeclarator): Adjust calls.
2049 (start_decl): Don't set DECL_DELETED_FN here.
2050
47867b4f
JM
20512015-01-06 Jason Merrill <jason@redhat.com>
2052
efcdb22f
JM
2053 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2054 template-ids.
2055
c6a38536
JM
2056 PR c++/64455
2057 * pt.c (type_dependent_expression_p): Handle variable templates.
2058 * constexpr.c (potential_constant_expression_1): Use it.
2059
b433d944
JM
2060 PR c++/64487
2061 * semantics.c (finish_offsetof): Handle templates here.
2062 * parser.c (cp_parser_builtin_offsetof): Not here.
2063
47867b4f
JM
2064 PR c++/64496
2065 * semantics.c (process_outer_var_ref): Diagnose lambda in local
2066 class NSDMI.
2067
864822bd
VV
20682015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2069
2070 PR c++/64489
2071 * class.c (check_field_decls): Make copy assignment operators
2072 complex only in c++98 mode.
2073
2f42e5de
TS
20742015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2075
2076 PR c++/31397
2077 * class.c (check_for_override): Warn when a virtual function is an
2078 override not marked override.
2079
86cfdb4e
TS
20802015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2081
2082 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2083 hold base_fndecls.
2084 (get_basefndecls): Adjust.
2085
5624e564
JJ
20862015-01-05 Jakub Jelinek <jakub@redhat.com>
2087
2088 Update copyright years.
2089
5bd012f8
MP
20902015-01-05 Marek Polacek <polacek@redhat.com>
2091
2092 PR c/64423
2093 * typeck.c (cp_build_array_ref): Pass loc down to
2094 warn_array_subscript_with_type_char.
2095
ad41bd84 2096\f
5624e564 2097Copyright (C) 2015 Free Software Foundation, Inc.
ad41bd84
JM
2098
2099Copying and distribution of this file, with or without modification,
2100are permitted in any medium without royalty provided the copyright
2101notice and this notice are preserved.
This page took 2.152103 seconds and 5 git commands to generate.