]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Makefile.in (LLINKER): New variable.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2013-05-16 Jason Merrill <jason@redhat.com>
2
3 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
4
5 PR c++/57279
6 * decl.c (grokdeclarator): Allow member function qualifiers in
7 TYPENAME context in C++11 mode.
8
9 2013-05-16 Dodji Seketeli <dodji@redhat.com>
10
11 PR c++/56782 - Regression with empty pack expansions
12 * pt.c (use_pack_expansion_extra_args_p): When at least a
13 parameter pack has an empty argument pack, and another parameter
14 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
15 mechanism.
16
17 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
18
19 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
20 warning_at and permerror with warning_at/inform and permerror/
21 inform, respectively.
22
23 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
24
25 PR c++/31952
26 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
27 redeclarations.
28
29 2013-05-14 Jason Merrill <jason@redhat.com>
30
31 PR c++/57243
32 * parser.c (cp_parser_range_for): Call complete_type.
33
34 PR c++/57041
35 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
36
37 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
38
39 PR c++/53903
40 * method.c (defaulted_late_check): Check for compatible exception
41 specification out of class explicitly defaulted functions too.
42
43 2013-05-14 Jason Merrill <jason@redhat.com>
44
45 PR c++/56998
46 * semantics.c (potential_constant_expression_1): Make sure the
47 called function is potentially constant.
48 * call.c (null_ptr_cst_p): Revert earlier change.
49
50 2013-05-13 Jason Merrill <jason@redhat.com>
51
52 PR c++/56998
53 * call.c (null_ptr_cst_p): An expression with side-effects can't
54 be a C++03 null pointer constant.
55
56 PR c++/57041
57 * decl.c (reshape_init_class): Handle error_mark_node.
58
59 PR c++/57254
60 * typeck.c (merge_types): Propagate ref-qualifier
61 in METHOD_TYPE case.
62
63 PR c++/57253
64 * decl.c (grokdeclarator): Apply ref-qualifier
65 in the TYPENAME case.
66
67 PR c++/57252
68 * decl.c (decls_match): Compare ref-qualifiers.
69
70 2013-05-10 Jason Merrill <jason@redhat.com>
71
72 PR c++/57196
73 * pt.c (convert_template_argument): Use dependent_template_arg_p,
74 not uses_template_parms.
75
76 PR c++/57047
77 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
78
79 PR c++/55149
80 * semantics.c (add_capture): Error rather than abort on copy
81 capture of VLA.
82 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
83 warn about capture proxy.
84
85 2013-05-09 Jason Merrill <jason@redhat.com>
86
87 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
88
89 PR c++/57222
90 * pt.c (lookup_template_class_1): Handle getting a template
91 template parameter as D1.
92
93 N3639 C++1y VLA diagnostics
94 * decl.c (grokdeclarator): Complain about reference, pointer, or
95 typedef to VLA.
96 (create_array_type_for_decl): Complain about array of VLA.
97 * pt.c (tsubst): Likewise.
98 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
99 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
100 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
101 (cxx_sizeof_or_alignof_type): Likewise.
102
103 N3639 C++1y VLA support
104 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
105 (check_array_initializer): Allow VLA init.
106 (reshape_init_array_1): Adjust.
107 (cp_finish_decl): Check for invalid VLA length.
108 * typeck2.c (process_init_constructor_array): Adjust.
109 (store_init_value): Use build_vec_init for VLAs.
110 * semantics.c (add_capture): Capture VLA as ptr+len.
111 (vla_capture_type): New.
112 (build_capture_proxy): Rebuild the VLA.
113 * typeck.c (build_simple_component_ref): Split out from...
114 (build_ptrmemfunc_access_expr): ...here.
115 * tree.c (array_of_runtime_bound_p): New.
116 * init.c (throw_bad_array_length): New.
117 (build_vec_init): Use it.
118 * parser.c (cp_convert_range_for): When iterating over a VLA,
119 use it directly rather than bind a reference.
120 * cp-tree.h: Declare new functions.
121
122 2013-05-08 Jason Merrill <jason@redhat.com>
123
124 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
125 variably_modified_type_p.
126 (expand_start_catch_block): Mark the typeinfo used here.
127 * semantics.c (finish_handler_parms): Not here.
128
129 * error.c (dump_type_suffix): Try harder on VLA length.
130
131 Core 624/N2932
132 * init.c (throw_bad_array_new_length): New.
133 (build_new_1): Use it. Don't warn about braced-init-list.
134 (build_vec_init): Use it.
135 * call.c (build_operator_new_call): Use it.
136
137 PR c++/57068
138 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
139 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
140 * error.c (maybe_warn_cpp0x): s/0x/11/.
141
142 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
143
144 PR c++/51226
145 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
146 == error_mark_node.
147
148 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
149
150 * typeck.c (cp_build_binary_op): Call save_expr before
151 build_vector_from_val.
152
153 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
154
155 PR c++/57183
156 * decl.c (cp_finish_decl): After do_auto_deduction copy the
157 qualifers with cp_apply_type_quals_to_decl.
158
159 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
160
161 * pt.c (convert_nontype_argument): Add missing whitespace in
162 error message.
163
164 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
165
166 PR c++/53745
167 * decl.c (build_enumerator): Improve error message.
168
169 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
170
171 PR c++/14283
172 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
173 messages for template types and fix column numbers.
174
175 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
176
177 PR c++/57132
178 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
179 c_inhibit_evaluation_warnings around build_x_modify_expr call.
180
181 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
182
183 PR c++/57092
184 * semantics.c (finish_decltype_type): Handle instantiated template
185 non-type arguments.
186
187 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
188
189 PR c++/56450
190 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
191
192 2013-04-26 Jakub Jelinek <jakub@redhat.com>
193
194 * error.c (cp_print_error_function): Adjust file_name_as_prefix
195 caller.
196
197 2013-04-25 Jason Merrill <jason@redhat.com>
198
199 PR c++/56859
200 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
201
202 PR c++/50261
203 * init.c (perform_member_init): Call reshape_init.
204
205 2013-04-24 Jason Merrill <jason@redhat.com>
206
207 PR c++/53721
208 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
209
210 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
211
212 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
213 pedwarn to simply use OPT_Wpointer_arith.
214 (cp_build_unary_op): Likewise.
215
216 2013-04-24 Jason Merrill <jason@redhat.com>
217
218 N3648: init-captures are named.
219 * semantics.c (add_capture): Don't prepend "__" to init-captures.
220 (build_capture_proxy): Adjust.
221 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
222
223 N3648: Allow braced and parenthesized initializers.
224 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
225 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
226 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
227 (add_capture): Collapse a parenthesized initializer into a single
228 expression.
229 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
230
231 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
232
233 PR c++/56970
234 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
235 * semantics.c (finish_qualified_id_expr): Likewise.
236 (finish_id_expression): Update.
237 * typeck.c (cp_build_addr_expr_1): Likewise.
238 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
239 * cp-tree.h: Update declarations.
240
241 2013-04-22 Jason Merrill <jason@redhat.com>
242
243 Core 1586
244 * parser.c (cp_parser_unqualified_id): Handle ~auto.
245 (cp_parser_pseudo_destructor_name): Likewise.
246 (cp_parser_postfix_dot_deref_expression): Adjust.
247 (cp_lexer_nth_token_is_keyword): New.
248 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
249 * typeck.c (lookup_destructor): Handle ~auto.
250
251 * pt.c (fn_type_unification): Push tinst level around
252 type_unification_real if we aren't explaining.
253 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
254 * error.c (dump_function_decl): Respect it.
255 (subst_to_string): Pass it.
256
257 PR c++/48665
258 * rtti.c (get_typeid): Diagnose qualified function type.
259 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
260
261 * error.c (dump_aggr_type): Fix lambda detection.
262 (dump_simple_decl): Pretty-print capture field.
263
264 N3323
265 * cvt.c (build_expr_type_conversion): Two conversions that return
266 the same type aren't necessarily ambiguous.
267
268 N3648
269 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
270 pedwarn unconditional except in C++1y mode.
271
272 * semantics.c (potential_constant_expression_1): Don't crash on
273 'this' in NSDMI.
274
275 Core 1612
276 * semantics.c (finish_id_expression): Reject capture of anonymous
277 union member.
278
279 Core 1609
280 * decl2.c (check_default_args): Check for pack expansion.
281
282 * mangle.c (write_type): Mangle decltype(auto).
283
284 2013-04-19 Jason Merrill <jason@redhat.com>
285
286 N3638 changes to return type deduction
287 * decl.c (undeduced_auto_decl): New.
288 (require_deduced_type): New.
289 (fndecl_declared_return_type): New.
290 (decls_match): Use it.
291 (duplicate_decls): Don't check for auto return.
292 (grokdeclarator): Reject virtual auto.
293 * class.c (resolve_address_of_overloaded_function): Handle
294 auto function templates.
295 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
296 * cp-tree.h: Declare new fns.
297 * error.c (dump_function_decl): Use fndecl_declared_return_type.
298 * search.c (check_final_overrider): Likewise.
299 * pt.c (make_decltype_auto): New.
300 (do_auto_deduction): Require plain decltype(auto).
301 (is_auto): Adjust.
302
303 DR 941
304 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
305 template specializations.
306
307 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
308
309 Implement n3599 - Literal operator templates for strings.
310 * parser.c (make_string_pack (tree value)): New function.
311 (cp_parser_userdef_string_literal (cp_token *)): Use it
312 to construct calls to character string literal operator templates.
313 (cp_parser_template_declaration_after_export): Check for new string
314 literal operator template parameter form.
315
316 2013-04-15 Jason Merrill <jason@redhat.com>
317
318 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
319
320 PR c++/52748
321 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
322 rather than a destructor name, it isn't an unqualified-name.
323 (tsubst_copy_and_build): Pass down decltype_flag to operator
324 handling code, too.
325
326 PR c++/56388
327 * semantics.c (insert_capture_proxy): Just use index 1 in the
328 stmt_list_stack.
329
330 2013-04-12 Jakub Jelinek <jakub@redhat.com>
331
332 * error.c (cp_print_error_function,
333 print_instantiation_partial_context_line,
334 maybe_print_constexpr_context): Colorize locus strings.
335
336 2013-04-11 Jason Merrill <jason@redhat.com>
337
338 PR c++/52748
339 * parser.c (complain_flags): New.
340 (cp_parser_postfix_expression): Use it.
341 (cp_parser_unary_expression): Likewise.
342 (cp_parser_binary_expression): Likewise.
343 (cp_parser_assignment_expression): Likewise.
344 (cp_parser_expression): Likewise.
345 (cp_parser_postfix_open_square_expression): Take decltype_p.
346 (cp_parser_builtin_offsetof): Adjust.
347 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
348 * decl2.c (grok_array_decl): Add decltype_p parm.
349 * cp-tree.h: Adjust prototype.
350 * semantics.c (finish_unary_op_expr): Add complain parm.
351
352 2013-04-11 Jakub Jelinek <jakub@redhat.com>
353
354 PR c++/56895
355 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
356 calling maybe_constant_value for C++98.
357
358 2013-04-11 Jason Merrill <jason@redhat.com>
359
360 PR c++/56901
361 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
362 Strip references before checking WILDCARD_TYPE_P.
363
364 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
365
366 * call.c (build_conditional_expr_1, build_over_call): Protect
367 error calls with complain & tf_error.
368 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
369 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
370 build_ptrmemfunc): Likewise.
371 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
372
373 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
374 (convert_to_reference): Adjust.
375
376 2013-04-11 Jason Merrill <jason@redhat.com>
377
378 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
379 local variables, look them up instead.
380 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
381 proxies and substitution in unevaluated context.
382 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
383 before the iterators.
384
385 PR c++/23055
386 * pt.c (uses_deducible_template_parms): New.
387 (deducible_array_bound, deducible_expression): New.
388 (deducible_template_args): New.
389 (unify_one_argument): Call uses_deducible_template_parms.
390
391 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
392
393 PR c++/56913
394 * typeck2.c (build_m_component_ref): Protect error calls with
395 (complain & tf_error).
396
397 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
398
399 PR c++/54216
400 * parser.c (cp_parser_enum_specifier): Check for empty
401 anonymous enums and anonymous scoped enums.
402
403 2013-04-10 Jakub Jelinek <jakub@redhat.com>
404
405 PR c++/56895
406 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
407 first before calling maybe_constant_value for warn_for_div_by_zero
408 or invalid shift count warning purposes.
409
410 2013-04-09 Jason Merrill <jason@redhat.com>
411
412 PR c++/25466
413 * rtti.c (build_typeid): Check the address of the argument
414 rather than looking for an INDIRECT_REF.
415
416 2013-04-04 Jason Merrill <jason@redhat.com>
417
418 PR c++/56838
419 PR c++/17232
420 * typeck2.c (abstract_virtuals_error_sfinae): Disable
421 complete_type again.
422
423 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
424
425 PR c++/56871
426 * decl.c (validate_constexpr_redeclaration): Allow an explicit
427 specialization to be different wrt the constexpr specifier.
428
429 2013-04-06 Jason Merrill <jason@redhat.com>
430
431 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
432 noreturn attribute.
433
434 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
435
436 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
437 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
438
439 2013-04-03 Jason Merrill <jason@redhat.com>
440
441 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
442 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
443 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
444
445 * mangle.c (write_type): When writing a function type with
446 function-cv-quals, don't add the unqualified type as a
447 substitution candidate.
448
449 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
450
451 PR c++/56815
452 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
453 pedwarn.
454
455 2013-04-03 Jakub Jelinek <jakub@redhat.com>
456
457 PR debug/56819
458 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
459 from args to new_args.
460 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
461 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
462
463 2013-04-02 Jason Merrill <jason@redhat.com>
464
465 PR c++/56821
466 * mangle.c (write_function_type): Mangle ref-qualifier.
467 (write_nested_name): Likewise.
468 (canonicalize_for_substitution): Preserve ref-qualifier.
469 (write_type): Likewise.
470
471 PR c++/34949
472 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
473
474 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
475
476 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
477 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
478 (for_each_template_parm_r): Use TYPE_TI_ARGS.
479
480 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
481
482 * cp-tree.h (TAGGED_TYPE_P): Remove.
483 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
484 (TYPE_ANONYMOUS_P): Adjust.
485 * call.c (build_new_op_1): Likewise.
486 * class.c (find_abi_tags_r): Likewise.
487 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
488 type_is_deprecated): Likewise.
489 * decl2.c (grokfield, min_vis_r): Likewise.
490 * pt.c (get_template_info): Likewise.
491 * tree.c (handle_abi_tag_attribute): Likewise.
492
493 2013-04-01 Jason Merrill <jason@redhat.com>
494
495 * semantics.c (maybe_constant_value): Check
496 instantiation_dependent_expression_p.
497 * pt.c (build_non_dependent_expr): Don't check it here.
498
499 PR c++/56772
500 * init.c (build_new): Don't try to process an array initializer
501 at template definition time.
502
503 PR c++/56793
504 * typeck.c (finish_class_member_access_expr): Handle enum scope.
505
506 PR c++/56794
507 * parser.c (cp_parser_range_for): Don't try to do auto deduction
508 in a template if the type of the range is incomplete.
509
510 * call.c (add_function_candidate): Take the address of 'this' here.
511 (build_over_call): And here.
512 (build_new_method_call_1, build_op_call_1): Not here.
513 (build_user_type_conversion_1): Or here.
514 (add_candidates): Adjust.
515
516 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
517 * class.c (same_signature_p): Use type_memfn_quals.
518 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
519 FUNCTION_OR_METHOD_TYPE_CHECK.
520 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
521 * pt.c (unify): Use static_fn_type.
522
523 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
524 Jason Merrill <jason@redhat.com>
525
526 Implement N2439 (ref-qualifiers for 'this')
527 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
528 (FUNCTION_RVALUE_QUALIFIED): New.
529 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
530 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
531 (cp_ref_qualifier): New enum.
532 (cp_declarator): Add ref_qualifier.
533 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
534 (cp_parser_direct_declarator): Use it.
535 (make_call_declarator): Adjust.
536 (cp_parser_lambda_declarator_opt): Adjust.
537 * call.c (add_function_candidate): Handle ref-qualifier overload
538 resolution semantics.
539 (standard_conversion): Adjust.
540 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
541 * decl.c (grokdeclarator): Handle ref-qualifiers.
542 (grokfndecl): Check for invalid ref-qualifiers.
543 (static_fn_type, revert_static_member_fn): Adjust.
544 * decl2.c (build_memfn_type): Handle ref-qualifiers.
545 (check_classfn): Check them.
546 (cp_reconstruct_complex_type): Retain them.
547 * error.c (dump_ref_qualifier): New.
548 (dump_type_suffix, dump_function_decl): Use it.
549 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
550 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
551 (unify): Retain them.
552 * tree.c (cp_check_qualified_type): New.
553 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
554 (build_ref_qualified_type): New.
555 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
556 (cp_build_type_attribute_variant): Keep ref-qualifier.
557 * typeck.c (merge_types): Keep ref-qualifier.
558 (structural_comptypes): Compare ref-qualifier.
559 (type_memfn_rqual): New.
560 (apply_memfn_quals): Take ref-qual argument.
561 * typeck2.c (build_m_component_ref): Check ref-qualifier.
562
563 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
564
565 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
566 (DECL_FUNCTION_TEMPLATE_P): Adjust.
567
568 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
569 pp_cxx_qualified_id): Use get_containing_scope.
570 * parser.c (cp_parser_class_head): Likewise.
571 * pt.c (push_template_decl_real): Likewise.
572
573 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
574 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
575
576 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
577
578 * decl2.c (collect_candidates_for_java_method_aliases): Use
579 DECL_CLASS_SCOPE_P.
580 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
581 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
582 * decl.c (duplicate_decls): Likewise.
583 * parser.c (cp_parser_template_declaration_after_export): Likewise,
584 also DECL_DECLARES_TYPE_P.
585 * pt.c (instantiate_class_template_1): Likewise.
586 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
587 (lookup_field_r): Likewise.
588 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
589 (lookup_fnfields_slot_nolazy): Likewise.
590 * semantics.c (finish_member_declaration): Likewise.
591 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
592
593 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
594
595 * pt.c (template_parms_to_args): Fix typo in comment.
596
597 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
598
599 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
600
601 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
602
603 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
604 (build_op_call_1): Likewise.
605 (build_over_call): Likewise.
606 (compare_ics): Likewise.
607 * class.c (build_base_path): Likewise.
608 (resolve_address_of_overloaded_function): Likewise.
609 * cp-tree.h: Likewise.
610 * cvt.c (cp_convert_to_pointer): Likewise.
611 (convert_to_reference): Likewise.
612 (ocp_convert): Likewise.
613 (convert_force): Likewise, tidy.
614 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
615 (pp_cxx_ptr_operator): Likewise.
616 * decl.c (duplicate_decls): Likewise.
617 (start_decl): Likewise.
618 (grok_op_properties): Likewise.
619 (start_preparsed_function): Likewise.
620 (store_parm_decls): Likewise.
621 (finish_function): Likewise.
622 * decl2.c (delete_sanity): Likewise.
623 (acceptable_java_type): Likewise.
624 (grokbitfield): Likewise.
625 (cp_reconstruct_complex_type): Likewise.
626 * error.c (dump_type_prefix): Likewise.
627 (dump_expr): Likewise.
628 * except.c (push_eh_cleanup): Likewise.
629 (complete_ptr_ref_or_void_ptr_p): Likewise.
630 (can_convert_eh): Likewise.
631 * init.c (build_new_1): Likewise.
632 (build_delete): Likewise.
633 (build_vec_delete): Likewise.
634 * mangle.c (write_type): Likewise.
635 * parser.c (lookup_literal_operator): Likewise.
636 * pt.c (convert_nontype_argument_function): Likewise.
637 (convert_nontype_argument): Likewise.
638 (tsubst): Likewise.
639 (unify): Likewise.
640 (dependent_type_p_r): Likewise.
641 * rtti.c (build_headof): Likewise.
642 (build_typeid): Likewise.
643 (build_dynamic_cast_1): Likewise.
644 (target_incomplete_p): Likewise.
645 (typeinfo_in_lib_p): Likewise.
646 * semantics.c (finish_omp_for): Likewise.
647 (cxx_eval_call_expression): Likewise.
648 (maybe_resolve_dummy): Likewise.
649 * tree.c (build_target_expr): Likewise.
650 (cp_build_qualified_type_real): Likewise.
651 * typeck.c (composite_pointer_type_r): Likewise.
652 (composite_pointer_type): Likewise.
653 (comp_except_types): Likewise.
654 (cxx_sizeof_nowarn): Likewise.
655 (string_conv_p): Likewise.
656 (cp_build_array_ref): Likewise.
657 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
658 (pointer_diff): Likewise.
659 (cp_build_addr_expr_1): Likewise.
660 (cp_build_unary_op): Likewise.
661 (build_static_cast_1): Likewise.
662 (cp_build_c_cast): Likewise.
663 (comp_ptr_ttypes_real): Likewise.
664 (ptr_reasonably_similar): Likewise.
665 (comp_ptr_ttypes_const): Likewise.
666 (casts_away_constness): Likewise.
667 (check_literal_operator_args): Likewise.
668 * typeck2.c (build_x_arrow): Likewise.
669 (add_exception_specifier): Likewise.
670
671 2013-03-29 Jason Merrill <jason@redhat.com>
672
673 N3582
674 * cp-tree.h (AUTO_IS_DECLTYPE): New.
675 * parser.c (cp_parser_decltype): Handle decltype(auto).
676 (cp_parser_type_id_1): Allow auto without a late-specified
677 return in C++1y.
678 (cp_parser_primary_expression): Use the return value of
679 finish_parenthesized_expr.
680 (cp_parser_transaction_expression): Likewise.
681 * semantics.c (force_paren_expr): New.
682 (finish_parenthesized_expr): Use it.
683 * call.c (build_conditional_expr_1): Likewise.
684 * pt.c (do_auto_deduction): Handle decltype(auto).
685 (tsubst_copy): Handle PAREN_EXPR.
686 (tsubst_copy_and_build): Likewise.
687 * error.c (dump_expr): Handle PAREN_EXPR.
688 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
689 * mangle.c (write_expression): Ignore PAREN_EXPR.
690
691 * parser.c (cp_parser_decltype_expr): Split out...
692 (cp_parser_decltype): ...from here.
693
694 PR c++/56774
695 PR c++/35722
696 * pt.c (unify_pack_expansion): Fix indexing.
697
698 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
699
700 * call.c (build_java_interface_fn_ref): Likewise.
701 (make_temporary_var_for_ref_to_temp): Likewise.
702 * class.c (check_field_decls): Likewise.
703 (layout_class_type): Likewise.
704 (finish_struct_1): Likewise.
705 (fixed_type_or_null): Likewise.
706 (get_vtbl_decl_for_binfo): Likewise.
707 * cp-gimplify.c (omp_var_to_track): Likewise.
708 (cp_genericize_r): Likewise.
709 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
710 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
711 (DECL_DISCRIMINATOR_P): Likewise.
712 * decl.c (poplevel): Likewise.
713 (decls_match): Likewise.
714 (duplicate_decls): Likewise.
715 (decl_jump_unsafe): Likewise.
716 (start_decl): Likewise.
717 (check_for_uninitialized_const_var): Likewise.
718 (make_rtl_for_nonlocal_decl): Likewise.
719 (cp_finish_decl): Likewise.
720 (expand_static_init): Likewise.
721 (local_variable_p): Likewise.
722 (maybe_register_incomplete_var): Likewise.
723 * decl2.c (grokfield): Likewise.
724 (comdat_linkage): Likewise.
725 (determine_visibility): Likewise.
726 (import_export_decl): Likewise.
727 (prune_vars_needing_no_initialization): Likewise.
728 (decl_maybe_constant_var_p): Likewise.
729 * error.c (dump_simple_decl): Likewise.
730 (dump_template_decl): Likewise.
731 (cp_printer): Likewise.
732 * except.c (build_throw): Likewise.
733 * init.c (build_vtbl_address): Likewise.
734 (member_init_ok_or_else): Likewise.
735 (build_aggr_init): Likewise.
736 (expand_aggr_init_1): Likewise.
737 (build_offset_ref): Likewise.
738 (constant_value_1): Likewise.
739 * mangle.c (write_mangled_name): Likewise.
740 (write_prefix): Likewise.
741 * name-lookup.c (supplement_binding_1): Likewise.
742 (add_decl_to_level): Likewise.
743 (pushdecl_maybe_friend_1): Likewise.
744 (check_for_out_of_scope_variable): Likewise.
745 (validate_nonmember_using_decl): Likewise.
746 (lookup_name_innermost_nonclass_level_1): Likewise.
747 (lookup_arg_dependent_1): Likewise.
748 * parser.c (cp_parser_lambda_introducer): Likewise.
749 (cp_parser_template_argument): Likewise.
750 (cp_parser_single_declaration): Likewise.
751 * pt.c (convert_nontype_argument): Likewise.
752 (instantiate_class_template_1): Likewise.
753 (tsubst_decl): Likewise.
754 (tsubst_expr): Likewise.
755 (do_decl_instantiation): Likewise.
756 (do_type_instantiation): Likewise.
757 (regenerate_decl_from_template): Likewise.
758 (always_instantiate_p): Likewise.
759 (instantiate_decl): Likewise.
760 (type_dependent_expression_p): Likewise.
761 (build_non_dependent_expr): Likewise.
762 * repo.c (repo_emit_p): Likewise.
763 * rtti.c (build_dynamic_cast_1): Likewise.
764 * search.c (shared_member_p): Likewise.
765 * semantics.c (outer_var_p): Likewise.
766 (finish_id_expression): Likewise.
767 (finish_omp_clauses): Likewise.
768 (finish_decltype_type): Likewise.
769 (ensure_literal_type_for_constexpr_object): Likewise.
770 * tree.c (lvalue_kind): Likewise.
771 (bot_replace): Likewise.
772 (cp_tree_equal): Likewise.
773 (handle_init_priority_attribute): Likewise.
774 (decl_storage_duration): Likewise.
775 * typeck.c (cxx_sizeof_expr): Likewise.
776 (cxx_alignof_expr): Likewise.
777 (decay_conversion): Likewise.
778 (build_class_member_access_expr): Likewise.
779 (cp_build_array_ref): Likewise.
780 (cxx_mark_addressable): Likewise.
781 (maybe_warn_about_returning_address_of_local): Likewise.
782 (check_return_expr): Likewise.
783 * typeck2.c (cxx_readonly_error): Likewise.
784 (abstract_virtuals_error_sfinae): Likewise.
785 (cxx_incomplete_type_diagnostic): Likewise.
786
787 2013-03-28 Lawrence Crowl <crowl@google.com>
788
789 * Make-lang.in
790 (CXX_PARSER_H): Add header dependence.
791 * cp-tree.h
792 (extern debug (cp_binding_level &)): New.
793 (extern debug (cp_binding_level *)): New.
794 * name-lookup.h
795 (debug (cp_binding_level &)): New.
796 (debug (cp_binding_level *)): New.
797 * parser.c
798 (debug (cp_parser &)): New.
799 (debug (cp_parser *)): New.
800 (debug (cp_token &)): New.
801 (debug (cp_token *)): New.
802 (debug (vec<cp_token, va_gc> &)): New.
803 (debug (vec<cp_token, va_gc> *)): New.
804 * parser.c: Add header dependence.
805 (extern debug (cp_parser &)): New.
806 (extern debug (cp_parser *)): New.
807 (extern debug (cp_token &)): New.
808 (extern debug (cp_token *)): New.
809 (extern debug (vec<cp_token, va_gc> &)): New.
810 (extern debug (vec<cp_token, va_gc> *)): New.
811
812 2013-03-28 Jason Merrill <jason@redhat.com>
813
814 PR c++/17232
815 PR c++/52748
816 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
817 the type if tf_decltype is set.
818 * pt.c (fn_type_unification): Add decltype_p parm.
819 (get_bindings): Adjust.
820 * cp-tree.h: Adjust.
821 * class.c (resolve_address_of_overloaded_function): Adjust.
822 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
823
824 PR c++/56679
825 * parser.c (cp_parser_sizeof_pack): Split out from...
826 (cp_parser_sizeof_operand): ...here. Require (id).
827
828 PR c++/56701
829 * semantics.c (finish_this_expr): 'this' is an rvalue.
830 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
831
832 PR c++/56710
833 * semantics.c (finish_member_declaration): Don't push closure
834 members.
835
836 * name-lookup.c (pushdecl_maybe_friend_1): Use
837 nonlambda_method_basetype and current_nonlambda_class_type.
838
839 PR c++/56728
840 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
841 conversion from integer to pointer.
842 (cxx_eval_constant_expression): Likewise.
843 (cxx_eval_indirect_ref): Use the folded operand if we still think
844 this might be constant.
845
846 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
847 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
848
849 PR c++/56725
850 * call.c (convert_like_real): Change series of two permerrors
851 to permerror + inform (and likewise for two errors).
852 (build_new_method_call_1): Likewise.
853 * typeck.c (convert_for_initialization): Change additional
854 warning or error to inform.
855
856 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
857
858 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
859 (first_aggr_init_expr): Likewise.
860 (more_aggr_init_expr_args_p): Likewise.
861 (type_of_this_parm): Likewise.
862 (class_of_this_parm): Likewise.
863 * name-lookup.h (get_global_value_if_present): Likewise.
864 (is_typename_at_global_scope): Likewise.
865
866 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
867
868 * call.c (joust): Don't call inform for a permerror returning false.
869 * parser.c (cp_parser_check_class_key): Likewise.
870 * pt.c (tsubst_copy_and_build): Likewise.
871
872 2013-03-27 Jason Merrill <jason@redhat.com>
873
874 PR c++/56749
875 * semantics.c (finish_qualified_id_expr): Return early
876 for enum scope.
877
878 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
879
880 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
881 * cvt.c (convert_to_void): Likewise.
882 * error.c (dump_expr): Likewise.
883 * mangle.c (write_expression): Likewise.
884 * parser.c (cp_parser_template_argument): Likewise.
885 * pt.c (convert_nontype_argument): Likewise.
886 (tsubst_copy_and_build): Likewise.
887 * rtti.c (build_typeid): Likewise.
888 * semantics.c (finish_call_expr): Likewise.
889 (finish_decltype_type): Likewise.
890 (build_data_member_initialization): Likewise.
891 * tree.c (is_dummy_object): Likewise.
892 * typeck.c (decay_conversion): Likewise.
893 (build_class_member_access_expr): Likewise.
894 (cp_build_addr_expr_1): Likewise.
895 (unary_complex_lvalue): Likewise.
896 (check_return_expr): Likewise.
897 * typeck2.c (cxx_readonly_error): Likewise.
898
899 2013-03-26 Jason Merrill <jason@redhat.com>
900
901 PR c++/52597
902 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
903 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
904 * cp-tree.h: Adjust prototype.
905
906 PR c++/45282
907 * typeck2.c (build_m_component_ref): Handle prvalue object.
908
909 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
910
911 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
912 * decl.c (duplicate_decls): Likewise.
913 (cp_finish_decl): Likewise.
914 (check_class_member_definition_namespace): Likewise.
915 * decl2.c (grokfield): Likewise.
916 (decl_needed_p): Likewise.
917 (import_export_decl): Likewise.
918 (mark_used): Likewise.
919 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
920 * pt.c (push_access_scope): Likewise.
921 (instantiate_decl): Likewise.
922 * ptree.c (cxx_print_decl): Likewise.
923 * repo.c (repo_emit_p): Likewise.
924 * semantics.c (note_decl_for_pch): Likewise.
925 * tree.c (decl_linkage): Likewise.
926
927 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
928
929 PR c++/55951
930 * decl.c (check_array_designated_initializer): Handle CONST_DECL
931 as ce->index.
932
933 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
934
935 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
936 error messages.
937
938 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
939
940 2013-03-25 Jason Merrill <jason@redhat.com>
941
942 PR c++/56699
943 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
944 class is derived from the type of the object.
945
946 PR c++/52014
947 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
948 unevaluated context.
949
950 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
951
952 PR c++/56722
953 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
954 DECL_TEMPLATE_INSTANTIATION.
955
956 2013-03-22 Jason Merrill <jason@redhat.com>
957
958 PR c++/56684
959 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
960 and CONST_DECL.
961
962 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
963
964 * cp-tree.h (identifier_p): New.
965 * call.c: Throughout, call identifier_p insstead of direct
966 comparaison of TREE_CODE against IDENTIFIER_NODE.
967 * decl.c: Likewisse.
968 * decl2.c: Likewise.
969 * init.c: Likewise.
970 * mangle.c: Likewise.
971 * name-lookup.c: Likewise.
972 * parser.c: Likewise.
973 * pt.c: Likewise.
974 * search.c: Likewise.
975 * semantics.c: Likewise.
976 * tree.c: Likewise.
977 * typeck.c: Likewise.
978 * typeck2.c: Likewise.
979
980 2013-03-21 Jakub Jelinek <jakub@redhat.com>
981
982 PR middle-end/48087
983 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
984 * call.c (build_temp): Likewise.
985 * method.c (synthesize_method): Likewise.
986 * typeck.c (convert_for_initialization): Likewise.
987
988 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
989
990 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
991
992 2013-03-21 Richard Biener <rguenther@suse.de>
993
994 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
995 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
996
997 2013-03-20 Jason Merrill <jason@redhat.com>
998
999 PR c++/56646
1000 * parser.c (cp_parser_late_return_type_opt): Save and restore
1001 current_class_ptr/ref.
1002
1003 PR c++/54532
1004 * expr.c (cplus_expand_constant): Do nothing if the class is
1005 incomplete.
1006 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
1007 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
1008 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
1009 (complete_vars): Likewise.
1010
1011 * name-lookup.c (get_anonymous_namespace_name): Never use
1012 get_file_function_name.
1013
1014 * pt.c (retrieve_specialization): Handle null tmpl argument.
1015
1016 PR c++/17232
1017 PR c++/56642
1018 * pt.c (tsubst_decl): Check return value of register_specialization.
1019 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
1020 change.
1021
1022 2013-03-17 Jason Merrill <jason@redhat.com>
1023
1024 PR c++/54359
1025 PR c++/56639
1026 * parser.c (cp_parser_direct_declarator): Bail if we see a
1027 qualified-id not at namespace scope.
1028
1029 PR c++/17232
1030 PR c++/56642
1031 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
1032 change for now.
1033
1034 2013-03-16 Jason Merrill <jason@redhat.com>
1035
1036 * decl.c (grokdeclarator): Assert that we won't see a pointer to
1037 METHOD_TYPE.
1038
1039 PR c++/54277
1040 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
1041 (MAYBE_CLASS_TYPE_P): ...here.
1042 * semantics.c (lambda_capture_field_type): Only build a
1043 magic decltype for wildcard types.
1044 (lambda_proxy_type): Likewise.
1045 (finish_non_static_data_member): Get the quals from
1046 the object.
1047
1048 PR c++/55931
1049 * parser.c (cp_parser_template_argument): Don't
1050 fold_non_dependent_expr.
1051
1052 * parser.c (cp_parser_lambda_declarator_opt): Use
1053 cp_parser_trailing_type_id.
1054
1055 PR c++/45917
1056 * parser.c (cp_parser_template_id): Don't forget access checks.
1057
1058 PR c++/52374
1059 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
1060
1061 PR c++/54764
1062 PR c++/55972
1063 * name-lookup.h (tag_scope): Add ts_lambda.
1064 * semantics.c (begin_lambda_type): Use it.
1065 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
1066 * pt.c (check_default_tmpl_args): Ignore lambdas.
1067 (push_template_decl_real): Handle lambdas.
1068 * tree.c (no_linkage_check): Adjust lambda check.
1069
1070 PR c++/56039
1071 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
1072
1073 PR c++/54359
1074 * parser.c (cp_parser_direct_declarator): Fix late return
1075 for out-of-class defn of member function.
1076
1077 PR c++/55357
1078 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
1079 parms to avoid duplicate -Wshadow warnings.
1080
1081 * search.c (lookup_base): Handle NULL_TREE.
1082
1083 PR c++/56481
1084 * semantics.c (potential_constant_expression_1): Use of 'this' in
1085 a non-constexpr function makes the expression not potentially
1086 constant.
1087
1088 N3276
1089 PR c++/52748
1090 * cp-tree.h (tsubst_flags): Add tf_decltype.
1091 * call.c (build_cxx_call): Don't build a temporary if it's set.
1092 (build_over_call): Make sure it's only passed to build_cxx_call.
1093 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
1094 (cp_parser_unary_expression): Likewise.
1095 (cp_parser_cast_expression): Likewise.
1096 (cp_parser_binary_expression): Likewise.
1097 (cp_parser_assignment_expression): Likewise.
1098 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
1099 (cp_parser_expression): Add decltype_p. Force a
1100 temporary for a call on the LHS of a comma.
1101 (cp_parser_decltype): Pass true to decltype_p parms.
1102 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
1103 (tsubst_copy_and_build): Pass tf_decltype down only for
1104 CALL_EXPR and the RHS of COMPOUND_EXPR.
1105 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
1106
1107 * cp-tree.h (abstract_class_use): New enum.
1108 * typeck2.c (pending_abstract_type): Add use field.
1109 (abstract_virtuals_error_sfinae): Add overloads taking
1110 abstract_class_use instead of tree.
1111 * typeck.c (build_static_cast_1): Call it.
1112 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
1113 * pt.c: Adjust calls.
1114 * decl.c (cp_finish_decl): Don't handle functions specially.
1115 (grokdeclarator): Always check return type.
1116 * init.c (build_new_1): Adjust call.
1117
1118 DR 337
1119 PR c++/17232
1120 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
1121 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
1122
1123 DR 657
1124 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
1125 (tsubst_arg_types): Likewise.
1126
1127 DR 1518
1128 PR c++/54835
1129 * call.c (convert_like_real): Check for explicit constructors
1130 even for value-initialization.
1131
1132 PR c++/54946
1133 * pt.c (convert_nontype_argument): Handle invalid pointer.
1134
1135 * parser.c (cp_parser_lambda_expression): Use nreverse.
1136
1137 PR c++/56447
1138 PR c++/55532
1139 * pt.c (instantiate_class_template_1): Instantiate lambda capture
1140 list here.
1141 (tsubst_copy_and_build): Not here.
1142
1143 PR c++/55017
1144 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
1145
1146 PR c++/55240
1147 * parser.c (parsing_nsdmi): New.
1148 * semantics.c (outer_automatic_var_p): Check it.
1149 (finish_id_expression): Likewise.
1150 * cp-tree.h: Declare it.
1151
1152 PR c++/55241
1153 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
1154
1155 * parser.c (lookup_literal_operator): Correct parm/arg naming
1156 mixup.
1157
1158 PR c++/56238
1159 * pt.c (fold_non_dependent_expr_sfinae): Check
1160 instantiation_dependent_expression_p.
1161
1162 PR c++/56095
1163 * class.c (resolve_address_of_overloaded_function): Accept a
1164 reference to function for target_type.
1165 (instantiate_type): Likewise.
1166 * pt.c (convert_nontype_argument): Pass it to
1167 convert_nontype_argument_function.
1168
1169 2013-03-16 Jakub Jelinek <jakub@redhat.com>
1170
1171 * tree.c (cp_tree_equal): Fix a pasto.
1172
1173 PR c++/56607
1174 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
1175 pass op1 through maybe_constant_value first.
1176
1177 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
1178
1179 PR c++/56582
1180 * semantics.c (cxx_eval_array_reference): Check for negative index.
1181
1182 2013-03-14 Jason Merrill <jason@redhat.com>
1183
1184 PR c++/56614
1185 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
1186
1187 PR c++/56346
1188 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
1189 dso_handle parm on targets without __cxa_atexit.
1190
1191 2013-03-11 Jason Merrill <jason@redhat.com>
1192
1193 PR c++/56567
1194 * typeck.c (check_return_expr): Disallow returning init list here.
1195 * semantics.c (apply_deduced_return_type): Not here.
1196
1197 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
1198
1199 PR c++/51412
1200 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
1201 * error.c (dump_expr): Likewise.
1202
1203 2013-03-08 Jason Merrill <jason@redhat.com>
1204
1205 PR c++/51884
1206 * class.c (modify_all_vtables): Mangle the vtable name before
1207 entering dfs_walk.
1208
1209 * semantics.c (lambda_expr_this_capture): In unevaluated context,
1210 just return the nearest 'this'.
1211
1212 PR c++/51494
1213 PR c++/52183
1214 PR c++/56222
1215 * tree.c (maybe_dummy_object): Don't capture 'this'.
1216 * semantics.c (maybe_resolve_dummy): New.
1217 (finish_non_static_data_member): Use it.
1218 (finish_qualified_id_expr): Don't test is_dummy_object.
1219 * cp-tree.h: Declare maybe_resolve_dummy.
1220 * call.c (build_new_method_call_1): Use it.
1221
1222 PR c++/56567
1223 * semantics.c (apply_deduced_return_type): Don't allow returning
1224 std::initializer_list.
1225
1226 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1227
1228 PR c++/56534
1229 * parser.c (cp_parser_elaborated_type_specifier): Don't call
1230 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
1231 * decl.c (check_elaborated_type_specifier): Tidy.
1232
1233 2013-03-06 Jakub Jelinek <jakub@redhat.com>
1234
1235 PR c++/56543
1236 * tree.c (strip_typedefs): Don't copy args if they are NULL.
1237
1238 2013-03-05 Jakub Jelinek <jakub@redhat.com>
1239
1240 * parser.c (cp_parser_braced_list): For {} initialize
1241 *non_constant_p to false.
1242
1243 2013-03-04 Jason Merrill <jason@redhat.com>
1244
1245 PR c++/56464
1246 PR c++/54383
1247 * semantics.c (lambda_expr_this_capture): Handle NSDMI
1248 and non-class scopes.
1249
1250 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
1251
1252 * decl.c (grokdeclarator): Remove dead code.
1253
1254 2013-02-28 Jason Merrill <jason@redhat.com>
1255
1256 PR c++/56481
1257 * semantics.c (potential_constant_expression_1): Use
1258 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
1259
1260 PR c++/56243
1261 * call.c (build_over_call): Avoid virtual lookup in a template.
1262
1263 2013-02-27 Jason Merrill <jason@redhat.com>
1264
1265 PR c++/56358
1266 PR c++/56323
1267 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
1268 of the base name for inheriting ctors.
1269 (push_class_level_binding_1): Remove inheriting ctor handling.
1270 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
1271 * class.c (add_implicitly_declared_members): Adjust.
1272
1273 2013-02-26 David Binderman <dcb314@hotmail.com>
1274
1275 PR c++/55632
1276 * decl.c (grokdeclarator): Tidy publicp assignment.
1277
1278 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
1279
1280 PR c++/56419
1281 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
1282 (build_transaction_expr): Same.
1283
1284 2013-02-25 Jason Merrill <jason@redhat.com>
1285
1286 PR c++/56377
1287 * pt.c (fn_type_unification): Wait to call push_tinst_level until
1288 we know what args we're looking at.
1289
1290 PR c++/56438
1291 * semantics.c (potential_constant_expression_1): In C++98, a cast
1292 to non-integral type can't be a constant expression.
1293
1294 2013-02-24 Jakub Jelinek <jakub@redhat.com>
1295
1296 PR c++/56403
1297 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
1298 of CLASS_TYPE_P.
1299
1300 2013-02-22 Jason Merrill <jason@redhat.com>
1301
1302 PR c++/40405
1303 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
1304 if we got the wrong number of template parms.
1305
1306 PR c++/56377
1307 * pt.c (fn_type_unification): Use explicit args in template
1308 instantiation context.
1309
1310 PR c++/56359
1311 * call.c (can_convert_arg): Discard access checks.
1312
1313 PR c++/56395
1314 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
1315 args.
1316
1317 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
1318
1319 PR c++/56373
1320 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
1321 * cvt.c (ocp_convert): Use the latter.
1322 (cp_convert_to_pointer): Likewise.
1323 * decl.c (check_default_argument): Likewise.
1324 * typeck.c (cp_build_binary_op): Likewise.
1325 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
1326
1327 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
1328 Paolo Carlini <paolo.carlini@oracle.com>
1329
1330 PR c++/51242
1331 * decl2.c (grokbitfield): Allow scoped enumeration types.
1332
1333 2013-02-15 Jason Merrill <jason@redhat.com>
1334
1335 PR c++/54276
1336 * semantics.c (finish_id_expression): Also return the identifier
1337 for an outer local static.
1338
1339 PR c++/56343
1340 * class.c (check_bases_and_members): Deduce noexcept after
1341 checking bases.
1342
1343 PR c++/52026
1344 * semantics.c (finish_id_expression): In a template, return
1345 the identifier for a constant variable.
1346
1347 2013-02-14 Jason Merrill <jason@redhat.com>
1348
1349 PR c++/54922
1350 * semantics.c (build_anon_member_initialization): New.
1351 (build_data_member_initialization): Use it.
1352
1353 PR c++/55003
1354 * decl.c (cp_finish_decl): Force instantiation of an
1355 auto static data member.
1356
1357 PR c++/55220
1358 * pt.c (unify): A pack expansion that is not the last template
1359 argument makes the entire template argument list non-deduced.
1360
1361 PR c++/56323
1362 * name-lookup.c (do_class_using_decl): Handle typedefs with
1363 inheriting constructors.
1364 (push_class_level_binding_1): Allow inheriting from template
1365 template parameter, too.
1366 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
1367
1368 PR c++/55223
1369 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
1370 default argument scope.
1371 * mangle.c (write_name): Likewise.
1372
1373 PR c++/55232
1374 * error.c (find_typenames_r): Don't walk into a pack expansion.
1375
1376 2013-02-13 Jason Merrill <jason@redhat.com>
1377
1378 PR c++/55670
1379 * parser.c (cp_parser_member_declaration): Check the declarator
1380 form when detecting a function declaration via typedef.
1381
1382 PR c++/55680
1383 * pt.c (maybe_process_partial_specialization): A lambda
1384 isn't what's being specialized.
1385
1386 PR c++/55710
1387 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
1388 TREE_USED.
1389
1390 PR c++/55879
1391 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
1392
1393 PR c++/55993
1394 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
1395 non-zero offsets, too.
1396
1397 PR c++/56155
1398 * decl.c (build_enumerator): Always convert the value to a
1399 fixed underlying type.
1400
1401 PR c++/56135
1402 * pt.c (tsubst_copy_and_build): Don't forget any new
1403 captures that arose from use of dependent names.
1404
1405 2013-02-13 Jakub Jelinek <jakub@redhat.com>
1406
1407 PR c++/56302
1408 * semantics.c (finish_asm_stmt): If input constraints allow
1409 neither register nor memory, try maybe_constant_value to get
1410 a constant if possible.
1411
1412 2013-02-12 Jason Merrill <jason@redhat.com>
1413
1414 PR c++/56285
1415 * method.c (add_one_base_init): Handle base constructor
1416 taking rvalue reference parm.
1417
1418 PR c++/56291
1419 * semantics.c (sort_constexpr_mem_initializers): Handle
1420 vptr out of order.
1421
1422 2013-02-09 Jason Merrill <jason@redhat.com>
1423
1424 PR c++/56268
1425 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
1426 maybe_instantiate_noexcept.
1427
1428 PR c++/56247
1429 * pt.c (eq_specializations): Set comparing_specializations.
1430 * tree.c (cp_tree_equal): Check it.
1431 * cp-tree.h: Declare it.
1432
1433 * decl.c (decls_match): Check versions later.
1434
1435 PR c++/56238
1436 * pt.c (build_non_dependent_expr): Don't try to fold
1437 instantiation-dependent expressions.
1438 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
1439 [BIND_EXPR]: Treat as dependent.
1440
1441 2013-02-07 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c++/56241
1444 * init.c (build_vec_init): Don't append NULL values into new_vec.
1445 (build_zero_init_1): Don't push anything into v if recursive call
1446 returned NULL_TREE.
1447 (build_value_init_noctor): Don't push anything into v if
1448 build_value_init call returned NULL_TREE.
1449
1450 PR c++/56239
1451 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
1452 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
1453 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
1454 return true only if 2nd token isn't CPP_CLOSE_PAREN.
1455 (cp_parser_cast_expression): Adjust caller.
1456
1457 PR c++/56237
1458 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
1459 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
1460 DECL_LANG_SPECIFIC (t).
1461
1462 2013-02-07 Jason Merrill <jason@redhat.com>
1463
1464 PR c++/56235
1465 * method.c (do_build_copy_constructor): Don't bother turning
1466 scalars from lvalues to xvalues.
1467 (do_build_copy_assign): Likewise.
1468
1469 2013-02-06 Jason Merrill <jason@redhat.com>
1470
1471 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
1472
1473 2013-02-05 Jason Merrill <jason@redhat.com>
1474
1475 PR c++/54122
1476 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
1477 METHOD_TYPE.
1478
1479 PR c++/56177
1480 * decl.c (start_preparsed_function): Update restype if we change
1481 decl1.
1482
1483 PR c++/56208
1484 * pt.c (fn_type_unification): Discard any access checks from
1485 substituting explicit args.
1486
1487 2013-01-31 Jason Merrill <jason@redhat.com>
1488
1489 PR c++/56162
1490 PR c++/56104
1491 * typeck.c (get_member_function_from_ptrfunc): Fix
1492 ptrmemfunc_vbit_in_delta case.
1493
1494 2013-01-29 Jason Merrill <jason@redhat.com>
1495
1496 PR libstdc++/54314
1497 * class.c (build_ctor_vtbl_group): Give construction vtables
1498 hidden visibility.
1499
1500 2013-01-25 Jason Merrill <jason@redhat.com>
1501
1502 PR c++/56095
1503 * pt.c (convert_nontype_argument_function): Handle invalid input.
1504 (convert_nontype_argument): Likewise.
1505
1506 PR c++/56104
1507 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
1508 dynamic type has no virtual functions.
1509
1510 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
1511
1512 PR c++/55944
1513 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
1514 on TARGET_EXPR nodes.
1515
1516 2013-01-22 Jason Merrill <jason@redhat.com>
1517
1518 PR c++/56071
1519 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
1520
1521 2013-01-22 Dodji Seketeli <dodji@redhat.com>
1522
1523 PR c++/53609
1524 * pt.c (argument_pack_element_is_expansion_p)
1525 (make_argument_pack_select, use_pack_expansion_extra_args_p)
1526 (gen_elem_of_pack_expansion_instantiation): New static functions.
1527 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
1528 look through the possibly resulting pack expansion as well.
1529 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
1530 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
1531 Use gen_elem_of_pack_expansion_instantiation to build the
1532 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
1533 as gen_elem_of_pack_expansion_instantiation and the change in
1534 tsubst above generalize this particular case.
1535 (arg_from_parm_pack_p): Remove this for it's not used by
1536 tsubst_pack_expansion anymore.
1537
1538 2013-01-21 Jason Merrill <jason@redhat.com>
1539
1540 PR c++/56059
1541 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
1542 template args count.
1543
1544 2013-01-18 Jason Merrill <jason@redhat.com>
1545
1546 PR target/54908
1547 * decl2.c (get_local_tls_init_fn): New.
1548 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
1549 with aliases for internal variables. Don't use weakrefs if
1550 the variable needs destruction.
1551 (generate_tls_wrapper): Mark the wrapper as const if no
1552 initialization is needed.
1553 (handle_tls_init): Don't require aliases.
1554
1555 2013-01-15 Dodji Seketeli <dodji@redhat.com>
1556
1557 PR c++/55663
1558 * pt.c (coerce_innermost_template_parms): New static function.
1559 (instantiate_alias_template): Use it here.
1560
1561 2013-01-09 Jason Merrill <jason@redhat.com>
1562
1563 PR c++/55878
1564 * rtti.c (build_typeid, get_typeid): Add complain parm.
1565 (get_tinfo_decl_dynamic): Likewise.
1566 * cp-tree.h, parser.c, pt.c: Adjust.
1567
1568 PR c++/55893
1569 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
1570 needs destruction.
1571
1572 2013-01-09 Jakub Jelinek <jakub@redhat.com>
1573
1574 PR c/48418
1575 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
1576 call maybe_constant_value for the negative or too big shift
1577 count warnings.
1578
1579 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
1580
1581 PR c++/55801
1582 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
1583 of the argument is true.
1584
1585 2013-01-08 Joel Brobecker <brobecker@adacore.com>
1586
1587 * parser.c (cp_parser_initializer_list): Move declaration
1588 of variable non_const to start of lexical block.
1589
1590 2013-01-07 Jason Merrill <jason@redhat.com>
1591
1592 PR c++/55753
1593 * tree.c (build_aggr_init_expr): Do nothing in a template.
1594 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
1595 a FUNCTION_DECL before tsubsting.
1596
1597 2013-01-04 Dodji Seketeli <dodji@redhat.com>
1598
1599 PR c++/52343
1600 * pt.c (check_instantiated_arg): Allow type template arguments.
1601
1602 2013-01-04 Jason Merrill <jason@redhat.com>
1603
1604 PR c++/55877
1605 * decl.c (reset_type_linkage, bt_reset_linkage): New.
1606 (grokdeclarator): Use reset_type_linkage.
1607 * name-lookup.c (binding_table_foreach): Handle null table.
1608 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
1609
1610 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1611
1612 PR c++/54526 (again)
1613 * parser.c (cp_parser_template_id): Revert core of previous change
1614 (keep adjusted inform message).
1615
1616 2013-01-03 Jason Merrill <jason@redhat.com>
1617
1618 PR c++/55419
1619 PR c++/55753
1620 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
1621 TREE_CONSTANT.
1622
1623 PR c++/55842
1624 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
1625
1626 PR c++/55856
1627 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
1628
1629 PR c++/53650
1630 * call.c (type_has_extended_temps): New.
1631 * cp-tree.h: Declare it.
1632 * decl.c (check_initializer): Use build_aggr_init for arrays
1633 if it is false.
1634 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1635
1636 2013-01-02 Jason Merrill <jason@redhat.com>
1637
1638 PR c++/54325
1639 * call.c (build_new_method_call_1): Don't use build_value_init for
1640 user-provided default constructors.
1641
1642 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1643
1644 PR c++/55032
1645 PR c++/55245
1646 * tree.c (build_cplus_array_type): Copy layout information
1647 to main variant if necessary.
1648 \f
1649 Copyright (C) 2013 Free Software Foundation, Inc.
1650
1651 Copying and distribution of this file, with or without modification,
1652 are permitted in any medium without royalty provided the copyright
1653 notice and this notice are preserved.