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