]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
hash-traits.h (free_ptr_hash): New class.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
8d67ee55
RS
12015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2
3 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
4 rather than pointer_hash.
5 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
6 * semantics.c (nrv_data): Likewise.
7 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
8
024f2d89
JM
92015-06-24 Jason Merrill <jason@redhat.com>
10
e6d61513
JM
11 PR c++/66647
12 * pt.c (dependent_type_p_r): Check for dependent alias template
13 specialization sooner.
14
024f2d89
JM
15 PR c++/66501
16 * class.c (type_has_nontrivial_assignment): Remove.
17 * cp-tree.h: Remove declaration.
18 * init.c (vec_copy_assign_is_trivial): New.
19 (build_vec_init): Use it.
20
e79fc3d4
ESR
212015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
22
23 Implement N3928 - Extending static_assert
24 * parser.c (cp_parser_static_assert): Support static_assert with
25 no message string. Supply an empty string in this case.
26 * semantics.c (finish_static_assert): Don't try to print a message if
27 the message strnig is empty.
28
aa97bb6f
AB
292015-06-24 Adam Butcher <adam@jessamine.co.uk>
30
31 PR c++/65750
32 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
33 implicit template parm if 'auto' is a placeholder for trailing
34 return type.
35
7af8ef58
PP
362015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
37
38 Revert:
39 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
40
41 PR c++/30044
42 * parser.c (cp_parser_template_parameter_list): Update
43 current_template_parms right after processing a paramater.
44 * pt.c (template_parms_to_args): Remove obsolete hack for
45 giving template template arguments the proper level.
46 (check_default_tmpl_args): Account for tested template
47 parameter_lists.
48 (splite_late_return_type): Remove obsolete hack for giving
49 template template arguments the proper level.
50
72e839ca
PC
512015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
52
53 PR c++/65811
54 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
55
1a8f8908
PP
562015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
57
6c4ed521 58 PR c++/30044
1a8f8908
PP
59 * parser.c (cp_parser_template_parameter_list): Update
60 current_template_parms right after processing a paramater.
61 * pt.c (template_parms_to_args): Remove obsolete hack for
62 giving template template arguments the proper level.
63 (check_default_tmpl_args): Account for tested template
64 parameter_lists.
65 (splite_late_return_type): Remove obsolete hack for giving
66 template template arguments the proper level.
67
d4c9e7f9
JM
682015-06-23 Jason Merrill <jason@redhat.com>
69
d88511ae
JM
70 PR c++/65879
71 * decl.c (grokfndecl): Check the linkage of ctype, not just
72 TYPE_ANONYMOUS_P.
73 * tree.c (no_linkage_check): Skip the 'this' pointer.
74
115ef7c5
JM
75 PR c++/66501
76 * class.c (type_has_nontrivial_assignment): New.
77 * init.c (build_vec_init): Use it.
78 * cp-tree.h: Declare it.
79 * method.c (trivial_fn_p): Templates aren't trivial.
80
d4c9e7f9
JM
81 PR c++/66542
82 * decl.c (expand_static_init): Make sure the destructor is callable
83 here even if we have an initializer.
84
6935a923
PMR
852015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
86
87 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
88 -fdump-ada-spec is passed.
89
c6a2f2d9
PMR
902015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
91
92 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
93
ea663be9
PC
942015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
95
96 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
97
982015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
99
100 * decl.c (grokdeclarator): Remove pointless code.
101
e8a3c597
JM
1022015-06-22 Jason Merrill <jason@redhat.com>
103
104 PR c++/66515
105 * call.c (implicit_conversion): Only reshape for classes.
106
6b4db501
MM
1072015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
108
109 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
110 manually swapping.
111 * semantics.c (finish_omp_atomic): Likewise.
112 * typeck.c (cp_build_array_ref): Likewise.
113
cd95a0d5
MM
1142015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
115
116 PR c++/65882
117 * call.c (build_new_op_1): Check tf_warning flag in all cases.
118
1539357d 1192015-06-19 Jason Merrill <jason@redhat.com>
2ddf4350
JM
120
121 PR c++/66585
122 * pt.c (instantiate_class_template_1): Clear
123 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
124
62245e6f
JM
125 PR c++/65880
126 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
127 cv-qualifiers.
128 * typeck.c (merge_types): build_ptrmemfunc_type before applying
129 quals and attributes.
130
30ac6e80
JM
131 PR c++/65973
132 * constexpr.c (build_constexpr_constructor_member_initializers):
133 Handle an empty STATEMENT_LIST.
134
892562cf
JM
135 PR c++/65843
136 * pt.c (tsubst_copy_and_build): Register a capture proxy in
137 local_specializations.
138
769430b2
JM
1392015-06-17 Jason Merrill <jason@redhat.com>
140
141 PR c++/66001
142 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
143 TRY_FINALLY_EXPR.
144 (potential_constant_expression_1): Likewise.
145
9fa6ffe1
JM
1462015-06-17 Jason Merrill <jason@redhat.com>
147
148 PR c++/66515
149 * call.c (implicit_conversion): Call reshape_init here, early.
150 (build_aggr_conv): Not here.
151
64b5fcfa
JJ
1522015-06-17 Jakub Jelinek <jakub@redhat.com>
153
154 PR c++/66571
cc63a7fa
JJ
155 * pt.c (tsubst_omp_clause_decl): New function.
156 (tsubst_omp_clauses): Use it or tsubst_copy instead of
157 tsubst_expr on OMP_CLAUSE_DECL.
64b5fcfa 158
ee47f74e
AM
1592015-06-17 Andrew MacLeod <amacleod@redhat.com>
160
161 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
162 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
163 * decl.c (grokdeclarator, xref_tag_1): Likewise.
164 * error.c (dump_aggr_type): likewise.
165 * pt.c (push_template_decl_real): Likewise.
166 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
167
abb226c9
AM
1682015-06-17 Andrew MacLeod <amacleod@redhat.com>
169
170 * call.c: Do not include input.h, line-map.h or is-a.h.
171 * class.c: Likewise.
172 * constexpr.c: Likewise.
173 * cp-array-notation.c: Likewise.
174 * cp-gimplify.c: Likewise.
175 * cp-lang.c: Likewise.
176 * cp-objcp-common.c: Likewise.
177 * cp-tree.h: Likewise.
178 * cp-ubsan.c: Likewise.
179 * cvt.c: Likewise.
180 * decl.c: Likewise.
181 * decl2.c: Likewise.
182 * dump.c: Likewise.
183 * error.c: Likewise.
184 * except.c: Likewise.
185 * expr.c: Likewise.
186 * friend.c: Likewise.
187 * init.c: Likewise.
188 * lambda.c: Likewise.
189 * lex.c: Likewise.
190 * mangle.c: Likewise.
191 * method.c: Likewise.
192 * name-lookup.c: Likewise.
193 * optimize.c: Likewise.
194 * parser.c: Likewise.
195 * pt.c: Likewise.
196 * ptree.c: Likewise.
197 * repo.c: Likewise.
198 * rtti.c: Likewise.
199 * search.c: Likewise.
200 * semantics.c: Likewise.
201 * tree.c: Likewise.
202 * typeck.c: Likewise.
203 * typeck2.c: Likewise.
204 * vtable-class-hierarchy.c: Likewise.
205
ba394ca6
PC
2062015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
207
208 PR c++/59682
209 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
210
63d02f05
JM
2112015-06-16 Jason Merrill <jason@redhat.com>
212
7599760d
JM
213 PR c++/66536
214 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
215 mismatch.
216
2ed4c029
JM
217 PR c++/58063
218 * tree.c (bot_manip): Remap SAVE_EXPR.
219
63d02f05
JM
220 PR c++/66387
221 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
222
04eca83e
NS
2232015-06-15 Nathan Sidwell <nathan@acm.org>
224
225 PR c++/58583
226 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
227 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
228 protect it from recursive instantiation.
229
f92c7426
PC
2302015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
231
232 PR c++/51048
233 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
234 using a local type is pure virtual.
235
6feffb3a
PP
2362015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
237
238 * call.c: Remove comment documenting the long-deleted
239 function build_method_call.
240
076fecad
PP
2412015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
242
243 PR c++/65168
244 * typeck.c (cp_build_binary_op): Warn when comparing an address
245 of a reference against NULL.
246
350562a7
JM
2472015-06-12 Jason Merrill <jason@redhat.com>
248
249 PR c++/65719
250 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
251 variables as DECL_NOT_REALLY_EXTERN.
252
acb2970c
JM
2532015-06-11 Jason Merrill <jason@redhat.com>
254
133bc698
JM
255 PR c++/66445
256 * constexpr.c (potential_constant_expression_1): Handle a
257 DECL_EXPR of TYPE_DECL.
258
acb2970c
JM
259 PR c++/66450
260 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
261 ctx->ctor.
262
a0349665
PMR
2632015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
264
265 * decl.c (cxx_init_decl_processing): Register the main
266 translation unit through the new debug hook.
267
1a4cd2cd
JM
2682015-06-10 Jason Merrill <jason@redhat.com>
269
270 PR c++/66289
271 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
272 * pt.c (push_template_decl_real): Set it.
273 (dependent_alias_template_spec_p): Use it.
274 (dependent_type_p_r): Use dependent_alias_template_spec_p.
275 (uses_all_template_parms_data, uses_all_template_parms_r)
276 (complex_alias_template_p): New.
277 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
278
5af874fb
JM
2792015-06-09 Jason Merrill <jason@redhat.com>
280
34f42d7b
JM
281 DR 1467
282 PR c++/51747
283 * typeck2.c (digest_init_r): Replace previous change with
284 gcc_unreachable.
285
5af874fb
JM
286 PR c++/66387
287 * semantics.c (process_outer_var_ref): Make sure the value is
288 actually constant before returning it.
289 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
290 array.
291
ebcf592c
PC
2922015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
293
294 PR c++/65815
295 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
296 * init.c (expand_default_init): Likewise.
297
6a9263f7
JM
2982015-06-09 Jason Merrill <jason@redhat.com>
299
300 PR c++/66383
301 * tree.c (replace_placeholders_r): Handle placeholders for an
302 outer object.
303 * typeck2.c (store_init_value): Only replace_placeholders for
304 objects of class type.
305
13fdf2e2
AM
3062015-06-08 Andrew MacLeod <amacleod@redhat.com>
307
308 * call.c : Adjust include files.
309 * class.c : Likewise.
310 * constexpr.c : Likewise.
311 * cp-array-notation.c : Likewise.
312 * cp-cilkplus.c : Likewise.
313 * cp-gimplify.c : Likewise.
314 * cp-lang.c : Likewise.
315 * cp-objcp-common.c : Likewise.
316 * cp-tree.h : Likewise.
317 * cp-ubsan.c : Likewise.
318 * cvt.c : Likewise.
319 * decl.c : Likewise.
320 * decl2.c : Likewise.
321 * dump.c : Likewise.
322 * error.c : Likewise.
323 * except.c : Likewise.
324 * expr.c : Likewise.
325 * friend.c : Likewise.
326 * init.c : Likewise.
327 * lambda.c : Likewise.
328 * lex.c : Likewise.
329 * mangle.c : Likewise.
330 * method.c : Likewise.
331 * name-lookup.c : Likewise.
332 * optimize.c : Likewise.
333 * parser.c : Likewise.
334 * pt.c : Likewise.
335 * ptree.c : Likewise.
336 * repo.c : Likewise.
337 * rtti.c : Likewise.
338 * search.c : Likewise.
339 * semantics.c : Likewise.
340 * tree.c : Likewise.
341 * typeck.c : Likewise.
342 * typeck2.c : Likewise.
343 * vtable-class-hierarchy.c : Likewise.
344
85d9a299
JM
3452015-06-05 Jason Merrill <jason@redhat.com>
346
39f383b7
JM
347 PR c++/66405
348 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
349 the expansion has extra args.
350 (use_pack_expansion_extra_args_p): Return true in that case.
351
85d9a299
JM
352 PR c++/66405
353 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
354 dependent even if it has a type.
355
d7438551
AH
3562015-06-05 Aldy Hernandez <aldyh@redhat.com>
357
358 * cp-objcp-common.c: Adjust comment for
359 cxx_warn_unused_global_decl.
360 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
361 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
362 * cp-tree.h (note_mangling_alias): Protoize.
363 (cp_write_global_declarations): Remove.
364 (cxx_post_compilation_parsing_cleanups): Protoize.
365 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
366 argument.
367 * decl2.c (mangling_aliases): New global.
368 (build_java_method_aliases): New. Adapted from
369 collect_candidates_for_java_method_aliases.
370 (collect_candidates_for_java_method_aliases): Remove.
371 (build_java_method_aliases): Remove.
372 (generate_mangling_aliases): New.
373 (note_mangling_alias): New. Moved from mangle_decl.
374 (locus_at_end_of_parsing): New global.
375 (c_parse_final_cleanups): Rename from
376 cp_write_global_declarations.
377 Use locus_at_end_of_parsing.
378 Call generate_mangling_aliases.
379 Rename call to collect_candidates_for_java_method_aliases into
380 build_java_method_aliases.
381 Remove call to finalize_compilation_unit.
382 Move vtable handling into cxx_post_compilation_parsing_cleanups.
383 Do not call check_global_declarations or
384 emit_debug_global_declarations.
385 (cxx_post_compilation_parsing_cleanups): New.
386 * mangle.c (mangle_decl): Move code to note_mangling_alias.
387 * name-lookup.c (do_namespace_alias): Call early_global_decl.
388
ac59f9be
NS
3892015-06-05 Nathan Sidwell <nathan@acm.org>
390
391 PR c++/52595
392 * parser.c (cp_parser_cache_defarg): Continue looking for
393 declarators when scanning a potential template argument list of an
394 NSDMI.
395
ecb9f223
AM
3962015-06-04 Andrew MacLeod <amacleod@redhat.com>
397
398 * call.c: Adjust includes for restructured coretypes.h.
399 * class.c: Likewise.
400 * constexpr.c: Likewise.
401 * cp-array-notation.c: Likewise.
402 * cp-gimplify.c: Likewise.
403 * cp-lang.c: Likewise.
404 * cp-objcp-common.c: Likewise.
405 * cp-tree.h: Likewise.
406 * cp-ubsan.c: Likewise.
407 * cvt.c: Likewise.
408 * decl.c: Likewise.
409 * decl2.c: Likewise.
410 * dump.c: Likewise.
411 * error.c: Likewise.
412 * except.c: Likewise.
413 * expr.c: Likewise.
414 * friend.c: Likewise.
415 * init.c: Likewise.
416 * lambda.c: Likewise.
417 * lex.c: Likewise.
418 * mangle.c: Likewise.
419 * method.c: Likewise.
420 * name-lookup.c: Likewise.
421 * optimize.c: Likewise.
422 * parser.c: Likewise.
423 * pt.c: Likewise.
424 * ptree.c: Likewise.
425 * repo.c: Likewise.
426 * rtti.c: Likewise.
427 * search.c: Likewise.
428 * semantics.c: Likewise.
429 * tree.c: Likewise.
430 * typeck.c: Likewise.
431 * typeck2.c: Likewise.
432 * vtable-class-hierarchy.c: Likewise.
433
e93ca5ca
RR
4342015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
435
436 PR c++/66192
437 PR target/66200
438 * cp-tree.h (get_guard_cond): Adjust declaration
439 * decl.c (expand_static_init): Use atomic load acquire
440 and adjust call to get_guard_cond.
441 * decl2.c (build_atomic_load_byte): New function.
442 (get_guard_cond): Handle thread_safety.
443 (one_static_initialization_or_destruction): Adjust call to
444 get_guard_cond.
445
1cc1ac7f
JM
4462015-06-03 Jason Merrill <jason@redhat.com>
447
448 PR c++/44282
449 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
450 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
451 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
452 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
453
d3ea4c06
MLI
4542015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
455 Paolo Carlini <paolo.carlini@oracle.com>
456
457 PR c++/66130
458 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
459 use it in the diagnostic.
460 (decay_conversion): Adjust call.
461 * semantics.c (finish_decltype_type): Likewise.
462 * call.c (resolve_args, build_new_op_1,
463 perform_implicit_conversion_flags): Adjust calls.
464 * cvt.c (ocp_convert, convert_to_void): Likewise.
465 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
466
4753e009
PC
4672015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
468
469 * decl.c (check_tag_decl): Use declspecs->locations as locations in
470 error_at and warning_at calls.
471
7b3a9795
MP
4722015-06-03 Marek Polacek <polacek@redhat.com>
473
474 PR sanitizer/66190
475 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
476 (cp_genericize_r): Don't instrument static initializers.
477 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
478
ea5b45b6
AT
4792015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
480
481 * decl.c (start_function): Call plugin before parsing.
482 (finish_function): Call plugin after parsing.
483
5d58db82
PP
4842015-06-02 Patrick Palka <patrick@parcs.ath.cx>
485
486 * cp-tree.h (init_error): Remove declaration.
487 * error.c (scratch_pretty_printer): Rename to ...
488 (actual_pretty_printer): ... this.
489 (cxx_pp): Constify and update accordingly.
490 (init_error): Remove definition.
491 * lex.c (cxx_init): Do not call init_error.
492
a983abd2
PC
4932015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
494
495 PR c++/61683
496 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
497
603eaec4
JM
4982015-06-01 Jason Merrill <jason@redhat.com>
499
81371eff
JM
500 PR c++/65942
501 * decl2.c (mark_used): Don't always instantiate constexpr fns.
502 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
503
603eaec4
JM
504 PR c++/44282
505 * mangle.c (attr_strcmp): New.
506 (write_CV_qualifiers_for_type): Also write out attributes that
507 affect type identity.
508 (write_type): Strip all attributes after writing qualifiers.
509
6ad6af49
JM
5102015-05-31 Jason Merrill <jason@redhat.com>
511
255a48d6
JM
512 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
513
6ad6af49
JM
514 PR c++/66320
515 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
516 with the wrong type as non-constant.
517
f4252989
JM
5182015-05-27 Jason Merrill <jason@redhat.com>
519
cba16cca
JM
520 * decl.c (check_redeclaration_exception_specification): Depend on
521 -Wsystem-headers rather than -pedantic.
522
f4252989
JM
523 * decl.c (warn_extern_redeclared_static): Use the location of
524 newdecl in diagnostics, not input_location.
525 (validate_constexpr_redeclaration): Likewise.
526 (check_redeclaration_no_default_args): Likewise.
527 (duplicate_decls): Likewise.
528 (check_redeclaration_exception_specification): Likewise.
529 Change second diagnostic to inform.
530
6f2d72e0
NS
5312015-05-24 Nathan Sidwell <nathan@acm.org>
532
533 PR c++/66243
534 * decl.c (build_enumerator): Don't silently convert scoped enums.
535
5362015-05-24 Jan Hubicka <hubicka@ucw.cz>
233ce289
JH
537
538 PR lto/66180
539 * mangle.c (mangle_decl): Mangle anonymous namespace types as
540 "<anon>".
541
84a3423b
NS
5422015-05-23 Nathan Sidwell <nathan@acm.org>
543
544 PR c++/65936
545 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
546
a95492ab
JW
5472015-05-22 Jim Wilson <jim.wilson@linaro.org>
548
549 * Make-lang.in (check_g++_parallelize): Update comment.
550
320d13ec
PC
5512015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
552
553 PR c++/65598
554 * decl.c (grokdeclarator): Use the correct location in error
555 messages about 'explicit'.
556
fd5c817a
MP
5572015-05-22 Marek Polacek <polacek@redhat.com>
558 Edward Smith-Rowland <3dw4rd@verizon.net>
559
560 PR c/47043
561 * cp-tree.h (build_enumerator): Update declaration.
562 * decl.c (build_enumerator): Add attributes parameter. Call
563 cplus_decl_attributes.
564 * init.c (constant_value_1): Pass tf_none to mark_used.
565 * parser.c (cp_parser_enumerator_definition): Parse attributes and
566 pass them down to build_enumerator.
567 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
568 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
569
9ab2fcc1
NS
5702015-05-21 Nathan Sidwell <nathan@acm.org>
571
572 PR c++/60943
573 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
574
6b6dd1aa
MP
5752015-05-21 Marek Polacek <polacek@redhat.com>
576
577 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
578
12101053
JM
5792015-05-20 Jason Merrill <jason@redhat.com>
580
226a93b7
JM
581 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
582 before register_specialization.
583
12101053
JM
584 * decl.c (grok_op_properties): Don't complain about size_t
585 placement delete here.
586 * call.c (second_parm_is_size_t): Split out from...
587 (non_placement_deallocation_fn_p): ...here.
588 (build_op_delete_call): Warn about size_t placement delete with
589 -Wc++14-compat.
590
9ab2fcc1 5912015-05-19 Nathan Sidwell <nathan@acm.org>
09b59d4d
NS
592
593 PR c++/65954
594 * typeck.c (finish_class_member_access_expr): Diagnose failed
595 lookup of enum class member.
596
41b37d5e
JJ
5972015-05-19 Jakub Jelinek <jakub@redhat.com>
598
599 PR middle-end/66199
600 * parser.c (cp_parser_omp_for_loop): Don't add
601 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
602 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
603 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
604 constructs.
605
fab27f52
MM
6062015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
607
608 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
609 swaps.
610
80f1c14d
JM
6112015-05-18 Jason Merrill <jason@redhat.com>
612
f41aecf4
JM
613 * pt.c (retrieve_specialization): Make sure our arguments have
614 gone through strip_typedefs.
615
b237c4cb
JM
616 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
617 (determine_specialization): Call coerce_template_parms.
618
c4d6d7bc
JM
619 DR 1391
620 * pt.c (type_unification_real): Check convertibility here.
621 (unify_one_argument): Not here.
622
8f56fadc
JM
623 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
624 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
625 [TREE_LIST]: Fix no-change case.
626
80f1c14d
JM
627 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
628
40de31cf
MLI
6292015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
630
631 PR fortran/44054
632 * error.c (cp_diagnostic_starter): Use diagnostic_location
633 function.
634 (cp_print_error_function): Likewise.
635 (cp_printer): Replace locus pointer with accessor function.
636
c3388e62
DM
6372015-05-12 David Malcolm <dmalcolm@redhat.com>
638
639 * parser.c (cp_parser_selection_statement): Add location and
640 guard_kind arguments to calls to
641 cp_parser_implicitly_scoped_statement.
642 (cp_parser_iteration_statement): Likewise for calls to
643 cp_parser_already_scoped_statement.
644 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
645 "guard_kind" params; use them to warn for misleading
646 indentation.
647 (cp_parser_already_scoped_statement): Likewise.
648
5ce039df
JH
6492015-05-11 Jan Hubicka <hubicka@ucw.cz>
650
651 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
652 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
653 * semantics.c (finish_member_declaration): Likewise.
654 * method.c (lazily_declare_fn): Allways add method to main variant list.
655
a31765ef
AH
6562015-05-09 Aldy Hernandez <aldyh@redhat.com>
657
658 PR bootstrap/66085
659 * decl2.c (note_mangling_alias): Declare arguments as unused.
660
765189ff
JM
6612015-05-08 Jason Merrill <jason@redhat.com>
662
663 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
664 -Wc++0x-compat.
665
613aba20
JM
6662015-05-08 Jason Merrill <jason@redhat.com>
667
668 * decl2.c (mangling_aliases): New variable.
669 (note_mangling_alias, generate_mangling_aliases): New.
670 (cp_write_global_declarations): Call generate_mangling_aliases.
671 (generate_mangling_alias): Split out from...
672 * mangle.c (mangle_decl): ...here.
673 * cp-tree.h: Declare note_mangling_alias.
674
09c5f835
AH
6752015-05-08 Aldy Hernandez <aldyh@redhat.com>
676
677 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
678 (build_java_method_aliases): Adapt to use create_same_body_alias
679 instead of assemble_alias. Move variable declarations to
680 definition and tidy up.
681 (cp_write_global_declarations): Call build_java_method_aliases
682 instead of collecting candidates first.
683
90f11cf9
JM
6842015-05-07 Jason Merrill <jason@redhat.com>
685
686 PR c++/59012
687 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
688 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
689 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
690 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
691 (apply_late_template_attributes): Handle attribute pack expansion.
692
0173bd2a
MP
6932015-05-07 Marek Polacek <polacek@redhat.com>
694
695 PR c/65179
696 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
697 value.
698
d5449acf
JM
6992015-05-07 Jason Merrill <jason@redhat.com>
700
701 DR 1467
702 PR c++/51747
703 * typeck2.c (digest_init_r): Fix single element list.
704
b8dd6913
JM
7052015-05-05 Jason Merrill <jason@redhat.com>
706
8243e2a9
JM
707 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
708 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
709 MUST_NOT_THROW_EXPR.
710 (cp_genericize_data): Add try_block field.
711 (cp_genericize_tree): Initialize it.
712 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
713 implicit rethrow.
714
81b6a6c5
JM
715 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
716 Return false.
717
32ad49af
JM
718 * semantics.c (finish_call_expr): Check complain.
719
15ed2619
JM
720 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
721 maybe-in-charge constructor.
722
f8aa3dd3
JM
723 * decl.c (start_decl): Don't push the plain VAR_DECL for a
724 variable template.
725
b8dd6913
JM
726 DR 1518
727 DR 1630
728 PR c++/54835
729 PR c++/60417
730 * call.c (convert_like_real): Check value-initialization before
731 explicit.
732 * typeck2.c (process_init_constructor_record): Don't set
733 CONSTRUCTOR_IS_DIRECT_INIT.
734 (process_init_constructor_array): Likewise.
735 * init.c (build_vec_init): Likewise.
736
21c0a521
DM
7372015-05-05 David Malcolm <dmalcolm@redhat.com>
738
739 * parser.c (cp_parser_asm_definition): Only test for
740 error_mark_node if "outputs" was just set. Likewise for "inputs".
741
f5322614
PC
7422015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
743 Jakub Jelinek <jakub@redhat.com>
744
745 PR c++/66007
746 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
747 result in an actual error.
748
38920aec
PC
7492015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
750 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
751
752 PR c++/65858
753 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
754 false.
755
6f3d1a5e
DM
7562015-04-30 David Malcolm <dmalcolm@redhat.com>
757
758 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
759 trailing semicolon.
760
9f7fb685
JM
7612015-04-29 Jason Merrill <jason@redhat.com>
762
763 PR c++/50800
764 * tree.c (apply_identity_attributes): Fix handling of classes.
765
b811915d
TS
7662015-04-29 Thomas Schwinge <thomas@codesourcery.com>
767
768 * parser.c (cp_parser_oacc_enter_exit_data): Use
769 OMP_STANDALONE_CLAUSES.
770
0aa359c1
PC
7712015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
772
773 PR c++/64667
774 * init.c (perform_member_init): Handle references for -Winit-self.
775
2c8f0683
TS
7762015-04-29 Thomas Schwinge <thomas@codesourcery.com>
777
778 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
779 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
780
7bfc5ada
JM
7812015-04-28 Jason Merrill <jason@redhat.com>
782
3f8e2835
JM
783 PR c++/65896
784 * constexpr.c (cxx_eval_store_expression): Don't try to actually
785 store an empty class.
786
5756d0f9
JM
787 PR c++/65656
788 * constexpr.c (cxx_eval_builtin_function_call): Fix
789 __builtin_constant_p.
790
b71983a5
JM
791 PR c++/50800
792 * tree.c (strip_typedefs): Add remove_attributes parm.
793 (strip_typedefs_expr): Likewise.
794 (apply_identity_attributes): New subroutine of strip_typedefs.
795 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
796 (convert_nontype_argument, unify): Likewise.
797 * cp-tree.h: Adjust.
798
7bfc5ada
JM
799 PR c++/65734
800 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
801
1d0275e2
TS
8022015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
803
804 * class.c (layout_class_type): Remove check if
805 PCC_BITFIELD_TYPE_MATTERS is defined.
806
46bf0b0a
JW
8072015-04-27 Jim Wilson <jim.wilson@linaro.org>
808
809 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
810
f8815f7a
JM
8112015-04-24 Jason Merrill <jason@redhat.com>
812
c6f044f7
JM
813 PR c++/50800
814 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
815
f8815f7a
JM
816 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
817 Remove obsolete code.
818 [NE_EXPR]: Likewise.
819
6c283621
JM
8202015-04-23 Jason Merrill <jason@redhat.com>
821
822 PR c++/65646
823 * pt.c (check_explicit_specialization): Don't
824 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
825 headers.
826 * decl.c (grokvardecl): Revert earlier fix.
827
2821fc6b
PC
8282015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
829
830 PR c++/65801
831 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
832 suppresses the diagnostic.
833
0cfabb37
VV
8342015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
835
836 Reject trailing return type for an operator auto().
837 * decl.c (grokdeclarator): Reject trailing return types for
838 all conversion operators, don't handle conversion operators
839 in the previous checks that deal with auto.
840
06aca1d5
IV
8412015-04-20 Ilya Verbin <ilya.verbin@intel.com>
842
843 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
844
988db853
PC
8452015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
846
847 * class.c (resolve_address_of_overloaded_function, instantiate_type):
848 Rename tsubst_flags_t parameter flags -> complain.
849
9f635aba
PC
8502015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
851
852 * call.c (build_op_delete_call, build_over_call): Check mark_used
853 return value.
854 * class.c (resolve_address_of_overloaded_function): Likewise.
855 * decl.c (cxx_maybe_build_cleanup): Likewise.
856 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
857 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
858 * rtti.c (build_dynamic_cast_1): Likewise.
859 * semantics.c (process_outer_var_ref): Likewise.
860 * typeck.c (build_class_member_access_expr,
861 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
862
bf5730d7
JM
8632015-04-15 Jason Merrill <jason@redhat.com>
864
58cc255c
JM
865 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
866 (build_constexpr_constructor_member_initializers): Loop to find
867 the BIND_EXPR.
868 * decl.c (start_preparsed_function): Clobber the object at the
869 beginning of a constructor.
870
efb5e817
JM
871 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
872 * method.c (implicitly_declare_fn): Likewise.
873 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
874
bf5730d7
JM
875 * decl2.c (determine_visibility): Use get_template_info.
876
5ce3039e
JM
8772015-04-15 Jason Merrill <jason@redhat.com>
878 Marek Polacek <polacek@redhat.com>
879
880 PR c++/65727
881 * lambda.c (lambda_expr_this_capture): In unevaluated context go
882 through the normal loop, just don't capture.
883 (maybe_resolve_dummy): Handle null return.
884
3a1351b9
PC
8852015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
886
887 * call.c (enforce_access): Emit error + inform.
888
0567dcd2
MP
8892015-04-15 Marek Polacek <polacek@redhat.com>
890
891 * constexpr.c (use_new_call): Remove #define.
892 (lookup_parameter_binding): Remove function.
893 (cxx_bind_parameters_in_call): Remove unused code.
894 (cxx_eval_call_expression): Likewise.
895 (cxx_eval_constant_expression): Likewise.
896
182d115c
MM
8972015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
898
899 * tree.c (replace_placeholders_t): Remove unused type.
900 (replace_placeholders): Remove unused pset.
901
0f19e7ad
JM
9022015-04-14 Jason Merrill <jason@redhat.com>
903
57c5e96e
JM
904 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
905
fb899e32
JM
906 PR c++/65695
907 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
908
0f19e7ad
JM
909 PR c++/65721
910 * name-lookup.c (do_class_using_decl): Complain about specifying
911 the current class even if there are dependent bases.
912
688e531e
DK
9132015-04-14 David Krauss <david_work@me.com>
914
915 PR c++/59766
916 * decl.c (grokdeclarator): Do not flag friends with deduced return.
917
2fd16d0f
MV
9182015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
919 Jason Merrill <jason@redhat.com>
920
921 PR c++/60994
922 * parser.c (cp_parser_class_name): Add enum_ok parameter.
923 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
924 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
925 a class template.
926
6338536c
JJ
9272015-04-12 Jakub Jelinek <jakub@redhat.com>
928
929 PR c++/65736
930 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
931 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
932 the expression to the original type at the end.
933
00da5e28
JJ
9342015-04-09 Jakub Jelinek <jakub@redhat.com>
935
0212e31e
JJ
936 PR c++/65690
937 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
938 TYPE_USER_ALIGN.
939
00da5e28
JJ
940 PR c++/65690
941 * tree.c (build_cplus_array_type): Layout type before variants are
942 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
943 variant.
944
a3d94329
PC
9452015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
946
947 PR c++/64085
948 * lambda.c (add_capture): Use dependent_type_p for capture by
949 reference too.
950
894bec68
MP
9512015-04-02 Marek Polacek <polacek@redhat.com>
952
953 PR c++/65642
954 * constexpr.c (cxx_eval_pointer_plus_expression): Call
955 cxx_eval_constant_expression on the first operand.
956
37978db4
JM
9572015-04-01 Jason Merrill <jason@redhat.com>
958
959 PR c++/65625
960 * decl.c (make_typename_type): Handle seeing a variable template.
961
c23a9ec5
PC
9622015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
963
964 PR c++/56100
965 * pt.c (instantiating_current_function_p): New.
966 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
967 * cp-tree.h (instantiating_current_function_p): Declare.
968
f87cb0b7
JM
9692015-04-01 Jason Merrill <jason@redhat.com>
970
971 PR c++/65646
972 * decl.c (grokvardecl): Don't call check_explicit_specialization
973 for non-template members of a class template.
974
14e51ef2
MP
9752015-04-01 Marek Polacek <polacek@redhat.com>
976
977 PR c++/65554
978 * class.c (finish_struct): Require that the second field of a
979 user-defined initializer_list be of size type.
980
397ad54d
MP
9812015-03-31 Marek Polacek <polacek@redhat.com>
982
983 PR c++/65390
984 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
985 checking for constness.
986
ef4bac78
MP
9872015-03-30 Marek Polacek <polacek@redhat.com>
988
989 PR c++/65398
990 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
991 *(&A[i] p+ j) => A[i + j] transformation here.
992 (cxx_eval_pointer_plus_expression): New function.
993 (cxx_eval_constant_expression): Use it here.
994
62021f64
TB
9952015-03-27 Tobias Burnus <burnus@net-b.de>
996
997 PR c/65586
998 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
999 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1000 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1001 -fopenmp-simd.
1002
5964a3a6
MP
10032015-03-27 Marek Polacek <polacek@redhat.com>
1004
1005 PR c++/65556
1006 * semantics.c (finish_switch_cond): If the unlowered type is not an
1007 enum, use the type of the condition.
1008
0b7dccc6
JM
10092015-03-27 Jason Merrill <jason@redhat.com>
1010
1011 PR c++/65509
1012 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1013 constants.
1014
08227658
MM
10152015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1016
1017 PR c++/65154
1018 * init.c (build_vec_init): Fix initializing aggregates
1019 with empty init list.
1020
41b38772
JM
10212015-03-26 Jason Merrill <jason@redhat.com>
1022
1023 PR c++/65525
1024 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1025
1cc57b59
MP
10262015-03-25 Marek Polacek <polacek@redhat.com>
1027
1028 PR c++/65558
1029 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1030 on an anonymous namespace.
1031
2a924bb4
MP
10322015-03-25 Marek Polacek <polacek@redhat.com>
1033
1034 PR c++/61670
1035 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1036
4b7c558d
JM
10372015-03-24 Jason Merrill <jason@redhat.com>
1038
a9f0423f
JM
1039 PR c++/65046
1040 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1041 * parser.c (cp_parser_namespace_definition): Don't set it.
1042 * name-lookup.c (handle_namespace_attrs): Check
1043 DECL_NAMESPACE_ASSOCIATIONS instead.
1044
4b7c558d
JM
1045 PR c++/65498
1046 * pt.c (get_mostly_instantiated_function_type): Just return the
1047 type of the partially instantiated template in DECL_TI_TEMPLATE.
1048
f594abf4
MP
10492015-03-20 Marek Polacek <polacek@redhat.com>
1050
1051 PR c++/65398
1052 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1053 A[i + j].
1054
b75cebc4
MP
10552015-03-20 Marek Polacek <polacek@redhat.com>
1056
1057 PR c++/65072
1058 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1059 variant.
1060
7cb73573
JM
10612015-03-19 Jason Merrill <jason@redhat.com>
1062
1063 PR c++/65046
1064 Automatically propagate ABI tags to variables and functions
1065 from their (return) type.
1066 * class.c (check_tag): Handle variables and functions.
1067 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1068 (mark_or_check_tags): Likewise.
1069 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1070 (check_abi_tags): Add single argument overload for decls.
1071 Handle inheriting tags for decls.
1072 * mangle.c (write_mangled_name): Call it.
1073 (mangle_return_type_p): Split out from write_encoding.
1074 (unmangled_name_p): Split out from write_mangled_name.
1075 (write_mangled_name): Ignore abi_tag on namespace.
1076 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1077 * parser.c (cp_parser_namespace_definition): Set it.
1078 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1079 about abi_tag attribute on non-inline namespace.
1080 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1081 (handle_abi_tag_attribute): Allow tags on variables.
1082
9b65e171
JJ
10832015-03-19 Jakub Jelinek <jakub@redhat.com>
1084
1085 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1086 attribute for DECL_EXTERNAL VAR_DECLs.
1087
41cee85a
PC
10882015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1089
1090 PR c++/65340
1091 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1092 mark_used.
1093 * decl2.c (mark_used): Inline the require_deduced_type call and
1094 guard the error call.
1095
3d17be83
JM
10962015-03-16 Jason Merrill <jason@redhat.com>
1097
1098 PR c++/65061
1099 * parser.c (cp_parser_template_name): Call strip_using_decl.
1100
ec638c55
MP
11012015-03-16 Marek Polacek <polacek@redhat.com>
1102
1103 DR 1688
1104 PR c++/65327
1105 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1106
b7e7f412
PC
11072015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1108
1109 PR c++/65323
1110 * decl.c (check_default_argument): Don't call
1111 maybe_warn_zero_as_null_pointer_constant.
1112
25de0a29
AH
11132015-03-11 Aldy Hernandez <aldyh@redhat.com>
1114
1115 * cp-gimplify.c (simple_empty_class_p): New.
1116 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1117 the code for empty class copies into simple_empty_class_p, and
1118 adapt it to handle COMPOUND_EXPRs.
1119
58cbf8d4
PC
11202015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1121
1122 PR c++/65370
1123 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1124 only if the location of newdecl doesn't match the location of olddecl.
1125
704c7904
JJ
11262015-03-10 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c++/65127
1129 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1130 is not a PARM_DECL.
1131
a4d66d7d
JM
11322015-03-10 Jason Merrill <jason@redhat.com>
1133
1134 PR c++/65333
1135 DR 1558
1136 * pt.c (dependent_type_p_r): Check both class and alias template args.
1137
7ccb1a11
JJ
11382015-03-10 Jakub Jelinek <jakub@redhat.com>
1139
1140 PR c/65120
1141 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1142 before preparing arguments to warn_logical_not_parentheses.
1143 Use maybe_constant_value on rhs.
1144
a2f259ef
JM
11452015-03-09 Jason Merrill <jason@redhat.com>
1146
1147 PR c++/65339
1148 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1149
01177669
JJ
11502015-03-09 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR c/65120
1153 * parser.c (cp_parser_binary_expression): Don't warn for
1154 !!x == y or !b == y where b is bool.
1155
a78cbe29
AH
11562015-03-06 Aldy Hernandez <aldyh@redhat.com>
1157
1158 * ptree.c (cxx_print_lambda_node): New.
1159 (cxx_print_xnode): Handle LAMBDA_EXPR.
1160
bf66b9b4
AH
11612015-03-03 Aldy Hernandez <aldyh@redhat.com>
1162
1163 PR c++/65295
1164 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1165 RESULT_DECL handling.
1166
75e0295b
MP
11672015-02-26 Marek Polacek <polacek@redhat.com>
1168
1169 PR c++/65202
1170 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1171 a RETURN_EXPR if its operand is null.
1172
9b276dad
JM
11732015-02-25 Jason Merrill <jason@redhat.com>
1174
2b8f9c8f
JM
1175 PR c++/65209
1176 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1177 DECL_COMDAT.
1178 (constrain_visibility_for_template): Handle reference arguments.
1179
9b276dad
JM
1180 PR debug/58315
1181 * decl.c (start_preparsed_function): Use create_artificial_label
1182 for cdtor_label.
1183
4414e22e
PC
11842015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1185 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c++/65075
1188 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1189 implicit typedefs for lambda types.
1190
6e4f01ff
PC
11912015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1192
1193 PR c++/60894
1194 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1195
ef796bef
JM
11962015-02-13 Jason Merrill <jason@redhat.com>
1197
1198 PR c++/65054
1199 * pt.c (template_args_equal): Look through conversions here.
1200 * tree.c (cp_tree_equal): Not here.
1201
e84abfa4
PC
12022015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1203
1204 PR c++/60211
1205 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1206 pragma_external context.
1207
f9b600ba
JM
12082015-02-13 Jason Merrill <jason@redhat.com>
1209
1210 PR c++/65051
1211 * call.c (reference_binding): Don't look for bad conversion
1212 if TO is incomplete.
1213
81adbcea
PC
12142015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1215
1216 PR c++/64970
1217 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1218 to lookup_template_class.
1219
730f474b
JJ
12202015-02-13 Jakub Jelinek <jakub@redhat.com>
1221
1222 PR ipa/65034
1223 * decl.c (start_preparsed_function): Use void_type_node instead
1224 of NULL_TREE as LABEL_DECL type.
1225
f522930c
JM
12262015-02-12 Jason Merrill <jason@redhat.com>
1227
3b95b65c
JM
1228 PR c++/64898
1229 * mangle.c (write_mangled_name): Fix test for variable template
1230 instantiation.
1231
f522930c
JM
1232 * decl.c (begin_destructor_body): Condition clobber on
1233 -flifetime-dse.
1234
bc81eb3f
AA
12352015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1236
1237 PR c++/64959
1238 * parser.c (lookup_literal_operator): Return all candidates.
1239 (cp_parser_userdef_char_literal): Simplify error handling.
1240 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1241 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1242 Also give higher priority to standard string UDL operator.
1243
40595b8e
JJ
12442015-02-12 Jakub Jelinek <jakub@redhat.com>
1245
12d0d358
JJ
1246 PR debug/55541
1247 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1248 * decl.c (poplevel): If functionbody, try not to create an extra
1249 BLOCK for function body and use subblocks as that, if it is non-NULL
1250 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1251 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1252
40595b8e
JJ
1253 PR sanitizer/64984
1254 * except.c (check_noexcept_r): Return NULL for internal
1255 calls.
1256
0ec052fe
JM
12572015-02-10 Jason Merrill <jason@redhat.com>
1258
1259 PR c++/64994
1260 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1261
d90cae08
JH
12622015-02-10 Jan Hubicka <hubicka@ucw.cz>
1263
1264 PR ipa/64982
1265 * method.c (use_thunk): Do not check for stdarg thunks.
1266
a02f26f6
JM
12672015-02-06 Jason Merrill <jason@redhat.com>
1268
1269 PR c++/64899
1270 * init.c (build_vec_init): Handle default-initialized array with
1271 constexpr default constructor.
1272
4886ec8e
JJ
12732015-02-04 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/64824
1276 PR c/64868
1277 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1278
457d0ace
PC
12792015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1280
1281 PR c++/64877
1282 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1283 for generated expressions.
1284
879887f1
VV
12852015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1286
1287 PR c++/64901
1288 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1289 DECL_OVERRIDE_P.
1290
4c5cf0b2
JM
12912015-02-02 Jason Merrill <jason@redhat.com>
1292
1293 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1294
40fecdd6
JM
12952015-01-30 Joseph Myers <joseph@codesourcery.com>
1296
1297 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1298 changed to pass input_location as first argument.
1299
a7c3e87e
JJ
13002015-01-29 Jakub Jelinek <jakub@redhat.com>
1301
1302 PR c++/64717
1303 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1304 into SAVE_EXPR.
1305
e1ef8aa9
JM
13062015-01-29 Jason Merrill <jason@redhat.com>
1307
3dbb8427
JM
1308 PR c++/49508
1309 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1310 erroneous return statement.
1311
e1ef8aa9
JM
1312 PR c++/64521
1313 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1314 point.
1315
f7f049fa
CT
13162015-01-27 Caroline Tice <cmtice@google.com>
1317
1318 Committing VTV Cywin/Ming patch for Patrick Wollgast
1319 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1320 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1321
94e54b8d
JM
13222015-01-27 Jason Merrill <jason@redhat.com>
1323
2cc7f90b
JM
1324 PR c++/58597
1325 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1326 current_function_decl.
1327
94e54b8d
JM
1328 PR c++/63889
1329 * pt.c (finish_template_variable): Move from semantics.c.
1330 Handle multiple template arg levels. Handle coercion here.
1331 (lookup_template_variable): Not here.
1332
7c83622c
JM
13332015-01-23 Jason Merrill <jason@redhat.com>
1334
fa4e8db2
JM
1335 PR c++/64314
1336 PR c++/57510
1337 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1338 that has been completely split out.
1339
c6e7c499 1340 PR c++/64701
8a7261b2
JM
1341 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1342 statement codes.
c6e7c499 1343
7c83622c
JM
1344 PR c++/64727
1345 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1346 of CONST_DECL.
1347
f1eac182
JM
13482015-01-21 Jason Merrill <jason@redhat.com>
1349
b85a3242
JM
1350 PR c++/64603
1351 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1352 constant CONSTRUCTORs.
1353
f1eac182
JM
1354 PR c++/64647
1355 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1356 give a hard error in a template instantiation.
1357
cbf5d0e7
RB
13582015-01-21 Richard Biener <rguenther@suse.de>
1359
1360 PR middle-end/64313
1361 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1362 for builtins the user declared correctly.
1363
de37b21e
PC
13642015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1365
1366 PR c++/58614
1367 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1368 TREE_TYPE (elt) == error_mark_node.
1369
67933728
JH
13702015-01-15 Jan Hubicka <hubicka@ucw.cz>
1371
1372 PR tree-optimization/62053
1373 * tree.c (build_cplus_array_type): Layout type after variants are set.
1374
35228ac7
JJ
13752015-01-15 Jakub Jelinek <jakub@redhat.com>
1376
1377 * cp-gimplify.c (cp_genericize_r): Call
1378 cp_ubsan_maybe_instrument_member_call for member calls.
1379 (cp_ubsan_check_member_access_r): New function.
1380 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1381 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1382 cp_ubsan_instrument_member_accesses,
1383 cp_ubsan_maybe_instrument_downcast,
1384 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1385 * cp-ubsan.c: New file.
1386 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1387 * constexpr.c (cxx_eval_call_expression): Return void_node
1388 for IFN_UBSAN_VPTR.
1389 (potential_constant_expression_1): Return true for
1390 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1391 * typeck.c (build_class_member_access_expr): Provide locus
1392 for COMPONENT_REFs.
1393 (build_static_cast_1): Instrument downcasts.
1394 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1395 add ubsan instrumentation for virtual_access.
1396 * call.c: Include internal-fn.h.
1397 (set_flags_from_callee): Handle internal calls.
1398
199b7a35
MV
13992015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1400
1401 PR c++/59366
1402 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1403 and function templates, declared only in the class.
1404 * decl.c (duplicate_decls): Reveal hidden friend functions or
1405 function templates, if they are redeclared outside the class.
1406
c3c29ba5
JM
14072015-01-15 Jason Merrill <jason@redhat.com>
1408
134efa82
JM
1409 PR c++/64356
1410 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1411
c3c29ba5
JM
1412 PR c++/63283
1413 * constexpr.c (potential_constant_expression_1): Handle reference
1414 args in templates.
1415
41dbbb37
TS
14162015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1417 James Norris <jnorris@codesourcery.com>
1418 Cesar Philippidis <cesar@codesourcery.com>
1419 Ilmir Usmanov <i.usmanov@samsung.com>
1420 Jakub Jelinek <jakub@redhat.com>
1421
1422 * parser.c: Include "gomp-constants.h".
1423 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1424 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1425 Use OMP_CLAUSE_SET_MAP_KIND.
1426 (cp_parser_omp_construct, cp_parser_pragma): Handle
1427 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1428 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1429 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1430 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1431 "create", "delete", "deviceptr", "host", "num_gangs",
1432 "num_workers", "present", "present_or_copy", "pcopy",
1433 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1434 "present_or_create", "pcreate", "vector_length", "wait".
1435 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1436 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1437 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1438 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1439 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1440 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1441 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1442 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1443 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1444 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1445 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1446 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1447 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1448 (cp_parser_oacc_wait): New functions.
1449 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1450 (finish_oacc_parallel): New prototypes.
1451 * semantics.c: Include "gomp-constants.h".
1452 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1453 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1454 OMP_CLAUSE_SET_MAP_KIND.
1455 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1456 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1457 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1458 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1459 functions.
1460
36b218ee
PC
14612015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1462
1463 PR c++/58671
1464 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1465 self-initialization.
1466
8f413ae2
JM
14672015-01-13 Jason Merrill <jason@redhat.com>
1468
caee690e
JM
1469 PR c++/64356
1470 PR libstdc++/58777
1471 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1472 pointer expressions.
1473 (cxx_eval_increment_expression): Likewise.
1474
7c368fb2
JM
1475 PR c++/64514
1476 * pt.c (coerce_template_parameter_pack): Return NULL for a
1477 zero-length fixed parameter pack with a pack expansion arg.
1478
8f413ae2
JM
1479 PR c++/64520
1480 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1481
49c8bc0c
JM
14822015-01-12 Jason Merrill <jason@redhat.com>
1483
1484 PR c++/64547
1485 * constexpr.c (cxx_eval_call_expression): A call to a void
1486 function doesn't need to return a value.
1487
adfac8df
JJ
14882015-01-09 Michael Collison <michael.collison@linaro.org>
1489
1490 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1491 input.h, alias.h, symtab.h, options.h, fold-const.h,
1492 wide-int.h, and inchash.h due to flattening of tree.h.
1493 * class.c: Ditto.
1494 * constexpr.c: Ditto.
1495 * cp-array-notation.c: Ditto.
1496 * cp-gimplify.c: Ditto.
1497 * cp-lang.c: Ditto.
1498 * cp-objcp-common.c: Ditto.
1499 * cvt.c: Ditto.
1500 * decl2.c: Ditto.
1501 * decl.c: Ditto.
1502 * dump.c: Ditto.
1503 * error.c: Ditto.
1504 * except.c: Ditto.
1505 * expr.c: Ditto.
1506 * friend.c: Ditto.
1507 * init.c: Ditto.
1508 * lambda.c: Ditto.
1509 * lex.c: Ditto.
1510 * mangle.c: Ditto.
1511 * name-lookup.c: Ditto.
1512 * optimize.c: Ditto.
1513 * parser.c: Ditto.
1514 * pt.c: Ditto.
1515 * ptree.c: Ditto.
1516 * repo.c: Ditto.
1517 * rtti.c: Ditto.
1518 * search.c: Ditto.
1519 * semantics.c: Ditto.
1520 * tree.c: Ditto.
1521 * typeck2.c: Ditto.
1522 * typeck.c: Ditto.
1523
f5481fc4
JM
15242015-01-08 Jason Merrill <jason@redhat.com>
1525
1526 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1527 * decl.c (compute_array_index_type): Likewise.
1528 * init.c (build_vec_init): Likewise.
1529 * typeck.c (cp_build_binary_op): Likewise.
1530
46621807
JM
15312015-01-08 Jason Merrill <jason@redhat.com>
1532
1533 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1534 whether an initializer-list is too big for a VLA.
1535 (throw_bad_array_length): Remove.
1536 * cp-tree.h: Remove prototype.
1537
247ecdf3
PC
15382015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1539
1540 PR c++/60753
1541 * decl.c (grokfndecl): Add bool parameter.
1542 (grokdeclarator): Adjust calls.
1543 (start_decl): Don't set DECL_DELETED_FN here.
1544
47867b4f
JM
15452015-01-06 Jason Merrill <jason@redhat.com>
1546
efcdb22f
JM
1547 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1548 template-ids.
1549
c6a38536
JM
1550 PR c++/64455
1551 * pt.c (type_dependent_expression_p): Handle variable templates.
1552 * constexpr.c (potential_constant_expression_1): Use it.
1553
b433d944
JM
1554 PR c++/64487
1555 * semantics.c (finish_offsetof): Handle templates here.
1556 * parser.c (cp_parser_builtin_offsetof): Not here.
1557
47867b4f
JM
1558 PR c++/64496
1559 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1560 class NSDMI.
1561
864822bd
VV
15622015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1563
1564 PR c++/64489
1565 * class.c (check_field_decls): Make copy assignment operators
1566 complex only in c++98 mode.
1567
2f42e5de
TS
15682015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1569
1570 PR c++/31397
1571 * class.c (check_for_override): Warn when a virtual function is an
1572 override not marked override.
1573
86cfdb4e
TS
15742015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1575
1576 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1577 hold base_fndecls.
1578 (get_basefndecls): Adjust.
1579
5624e564
JJ
15802015-01-05 Jakub Jelinek <jakub@redhat.com>
1581
1582 Update copyright years.
1583
5bd012f8
MP
15842015-01-05 Marek Polacek <polacek@redhat.com>
1585
1586 PR c/64423
1587 * typeck.c (cp_build_array_ref): Pass loc down to
1588 warn_array_subscript_with_type_char.
1589
ad41bd84 1590\f
5624e564 1591Copyright (C) 2015 Free Software Foundation, Inc.
ad41bd84
JM
1592
1593Copying and distribution of this file, with or without modification,
1594are permitted in any medium without royalty provided the copyright
1595notice and this notice are preserved.
This page took 2.007554 seconds and 5 git commands to generate.