remove unused files
[platform/upstream/gcc48.git] / gcc / cp / ChangeLog
1 2013-10-16  Release Manager
2
3         * GCC 4.8.2 released.
4
5 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
6
7         PR c++/58568
8         * semantics.c (begin_lambda_type): Check return value of xref_tag
9         for error_mark_node; tidy.
10         * decl.c (grokdeclarator): Tweak error message.
11
12 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
13
14         PR c++/58535
15         * parser.c (cp_parser_function_specifier_opt): Upon error about
16         virtual templates don't set ds_virtual.
17
18 2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
19
20         PR c++/58457
21         * class.c (instantiate_type): Loosen a bit the gcc_assert.
22
23 2013-09-13  Jason Merrill  <jason@redhat.com>
24
25         PR c++/58273
26         * pt.c (any_type_dependent_elements_p): Actually check for
27         type-dependence, not value-dependence.
28
29 2013-09-09  Jakub Jelinek  <jakub@redhat.com>
30
31         PR c++/58325
32         * init.c (build_vec_delete): Call mark_rvalue_use on base.
33
34 2013-08-20  Jason Merrill  <jason@redhat.com>
35
36         PR c++/58119
37         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
38         (MAYBE_CLASS_TYPE_P): ...here.
39         * cvt.c (build_expr_type_conversion): Don't complain about a
40         template that can't match the desired type category.
41
42 2013-08-17  Jason Merrill  <jason@redhat.com>
43
44         PR c++/58083
45         * name-lookup.c (push_class_level_binding_1): It's OK to push a
46         lambda type after the enclosing type is complete.
47
48 2013-08-06  Jason Merrill  <jason@redhat.com>
49
50         PR c++/57825
51         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
52
53 2013-07-29  Jason Merrill  <jason@redhat.com>
54
55         PR c++/57901
56         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
57         Use break_out_target_exprs instead of unshare_expr.
58
59         PR c++/58022
60         * typeck2.c (abstract_virtuals_error_sfinae): Don't remember
61         lookup in SFINAE context.
62
63 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
64
65         PR c++/57981
66         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
67         (grokparms): Adjust.
68         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
69         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
70         a tsubst_flags_t parameter.
71         (tsubst_decl): Adjust.
72         * call.c (convert_default_arg): Likewise.
73         * cp-tree.h (check_default_argument, tsubst_default_argument):
74         Update declarations.
75
76 2013-07-12  Jason Merrill  <jason@redhat.com>
77
78         * init.c (build_vec_init): Value-initialize the rest of the array.
79
80 2013-07-09  Jason Merrill  <jason@redhat.com>
81
82         PR c++/57526
83         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
84         if the variable type uses 'auto'.
85
86         PR c++/57437
87         * typeck.c (check_return_expr): Lambda proxies aren't eligible
88         for nrv or return by move.
89
90         PR c++/57532
91         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
92         a ref-qualifier in C++98 mode.
93
94         PR c++/57545
95         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
96         argument to have the exact type of the parameter.
97
98         PR c++/57551
99         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
100         a POINTER_PLUS_EXPR for type punning diagnostic.
101
102         PR c++/57831
103         * pt.c (tsubst_copy): Handle USING_DECL.
104
105 2013-07-08  Jason Merrill  <jason@redhat.com>
106
107         PR c++/57550
108         * pt.c (fn_type_unification): Only defer during substitution.
109         (type_unification_real): Defer during defarg substitution,
110         add checks parm to pass back deferred checks.
111         (unify, do_auto_deduction): Adjust.
112         * semantics.c (reopen_deferring_access_checks): New.
113         * cp-tree.h: Declare it.
114
115 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
116
117         PR c++/57645
118         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
119         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
120         destructors.
121
122 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
123
124         PR c++/57771
125         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
126         Temporarily set parser->greater_than_is_operator_p for
127         cp_parser_expression and restore from saved value afterwards.
128
129 2013-06-21  Paolo Carlini  <paolo.carlini@oracle.com>
130
131         PR c++/53211
132         * pt.c (type_dependent_expression_p): Handle an array of unknown
133         bound depending on a variadic parameter.
134         * parser.c (cp_parser_range_for): Revert PR56794 changes.
135
136 2013-05-31  Jason Merrill  <jason@redhat.com>
137
138         PR c++/57319
139         * class.c (vbase_has_user_provided_move_assign): New.
140         * method.c (synthesized_method_walk): Check it.
141         * cp-tree.h: Declare it.
142
143         PR c++/56930
144         * call.c (convert_like_real): Use cp_convert_and_check.
145         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
146         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
147         (potential_constant_expression_1): Handle OMP_ATOMIC*.
148
149 2013-05-31  Release Manager
150
151         * GCC 4.8.1 released.
152
153 2013-05-24  Jason Merrill  <jason@redhat.com>
154
155         PR c++/57388
156         * tree.c (build_ref_qualified_type): Clear
157         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
158
159         PR c++/57016
160         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
161         if there is one.
162
163 2013-05-20  Jason Merrill  <jason@redhat.com>
164
165         PR c++/57325
166         * tree.c (build_cplus_array_type): Copy layout info if element
167         type is complete.
168
169         PR c++/57317
170         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
171         whether a template has its own args.
172
173 2013-05-16  Jason Merrill  <jason@redhat.com>
174
175         PR c++/57279
176         * decl.c (grokdeclarator): Allow member function qualifiers in
177         TYPENAME context in C++11 mode.
178
179 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
180
181         PR c++/56782 - Regression with empty pack expansions
182         * pt.c (use_pack_expansion_extra_args_p): When at least a
183         parameter pack has an empty argument pack, and another parameter
184         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
185         mechanism.
186
187 2013-05-14  Jason Merrill  <jason@redhat.com>
188
189         PR c++/57243
190         * parser.c (cp_parser_range_for): Call complete_type.
191
192         PR c++/57041
193         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
194
195 2013-05-13  Jason Merrill  <jason@redhat.com>
196
197         PR c++/56998
198         * semantics.c (potential_constant_expression_1): Make sure the
199         called function is potentially constant.
200
201         PR c++/57041
202         * decl.c (reshape_init_class): Handle error_mark_node.
203
204         PR c++/57254
205         * typeck.c (merge_types): Propagate ref-qualifier
206         in METHOD_TYPE case.
207
208         PR c++/57253
209         * decl.c (grokdeclarator): Apply ref-qualifier
210         in the TYPENAME case.
211
212         PR c++/57252
213         * decl.c (decls_match): Compare ref-qualifiers.
214
215         PR c++/57196
216         * pt.c (convert_template_argument): Use dependent_template_arg_p,
217         not uses_template_parms.
218
219 2013-05-10  Jason Merrill  <jason@redhat.com>
220
221         PR c++/57047
222         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
223
224 2013-05-09  Jason Merrill  <jason@redhat.com>
225
226         PR c++/57222
227         * pt.c (lookup_template_class_1): Handle getting a template
228         template parameter as D1.
229
230 2013-05-08  Jason Merrill  <jason@redhat.com>
231
232         PR c++/57068
233         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
234         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
235         * error.c (maybe_warn_cpp0x): s/0x/11/.
236
237 2013-05-08  Marc Glisse  <marc.glisse@inria.fr>
238
239         * typeck.c (cp_build_binary_op): Call save_expr before
240         build_vector_from_val.
241
242 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
243
244         PR c++/57183
245         * decl.c (cp_finish_decl): After do_auto_deduction copy the
246         qualifers with cp_apply_type_quals_to_decl.
247
248 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
249
250         PR c++/57092
251         * semantics.c (finish_decltype_type): Handle instantiated template
252         non-type arguments.
253
254 2013-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
255
256         PR c++/56450
257         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
258
259 2013-04-25  Jason Merrill  <jason@redhat.com>
260
261         PR c++/57064
262         * call.c (add_function_candidate): Strip ref-to-ptr conversion.
263
264         PR c++/56859
265         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
266
267         PR c++/50261
268         * init.c (perform_member_init): Call reshape_init.
269
270 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
271
272         PR c++/56970
273         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
274         * semantics.c (finish_qualified_id_expr): Likewise.
275         (finish_id_expression): Update.
276         * typeck.c (cp_build_addr_expr_1): Likewise.
277         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
278         * cp-tree.h: Update declarations.
279
280 2013-04-17  Jason Merrill  <jason@redhat.com>
281
282         DR 941
283         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
284         template specializations.
285
286 2013-04-15  Jason Merrill  <jason@redhat.com>
287
288         PR c++/52748
289         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
290         rather than a destructor name, it isn't an unqualified-name.
291         (tsubst_copy_and_build): Pass down decltype_flag to operator
292         handling code, too.
293
294         PR c++/56388
295         * semantics.c (insert_capture_proxy): Just use index 1 in the
296         stmt_list_stack.
297
298 2013-04-11  Jason Merrill  <jason@redhat.com>
299
300         PR c++/52748
301         * parser.c (complain_flags): New.
302         (cp_parser_postfix_expression): Use it.
303         (cp_parser_unary_expression): Likewise.
304         (cp_parser_binary_expression): Likewise.
305         (cp_parser_assignment_expression): Likewise.
306         (cp_parser_expression): Likewise.
307         (cp_parser_postfix_open_square_expression): Take decltype_p.
308         (cp_parser_builtin_offsetof): Adjust.
309         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
310         * decl2.c (grok_array_decl): Add decltype_p parm.
311         * cp-tree.h: Adjust prototype.
312         * semantics.c (finish_unary_op_expr): Add complain parm.
313
314 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
315
316         PR c++/56895
317         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
318         calling maybe_constant_value for C++98.
319
320 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
321
322         PR c++/56913
323         * typeck2.c (build_m_component_ref): Protect error calls with
324         (complain & tf_error).
325
326 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
327
328         PR c++/56895
329         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
330         first before calling maybe_constant_value for warn_for_div_by_zero
331         or invalid shift count warning purposes.
332
333 2013-04-06  Jason Merrill  <jason@redhat.com>
334
335         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
336         noreturn attribute.
337
338 2013-04-03  Jason Merrill  <jason@redhat.com>
339
340         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
341         (FUNCTION_REF_QUALIFIED): Use FUNC_OR_METHOD_CHECK instead.
342         (FUNCTION_RVALUE_QUALIFIED): Likewise.
343
344 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
345
346         PR debug/56819
347         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
348         from args to new_args.
349         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
350         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
351
352 2013-04-02  Jason Merrill  <jason@redhat.com>
353
354         PR c++/56821
355         * mangle.c (write_function_type): Mangle ref-qualifier.
356         (write_nested_name): Likewise.
357         (canonicalize_for_substitution): Preserve ref-qualifier.
358         (write_type): Likewise.
359
360 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
361
362         PR c++/55951
363         * decl.c (check_array_designated_initializer): Handle CONST_DECL
364         as ce->index.
365
366 2013-04-01  Jason Merrill  <jason@redhat.com>
367
368         PR c++/56772
369         * init.c (build_new): Don't try to process an array initializer
370         at template definition time.
371
372 2013-04-01  Jason Merrill  <jason@redhat.com>
373
374         PR c++/56793
375         * typeck.c (finish_class_member_access_expr): Handle enum scope.
376
377 2013-04-01  Jason Merrill  <jason@redhat.com>
378
379         PR c++/56794
380         * parser.c (cp_parser_range_for): Don't try to do auto deduction
381         in a template if the type of the range is incomplete.
382
383 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
384             Jason Merrill  <jason@redhat.com>
385
386         Implement N2439 (ref-qualifiers for 'this')
387         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
388         (FUNCTION_RVALUE_QUALIFIED): New.
389         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
390         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
391         (cp_ref_qualifier): New enum.
392         (cp_declarator): Add ref_qualifier.
393         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
394         (cp_parser_direct_declarator): Use it.
395         (make_call_declarator): Adjust.
396         (cp_parser_lambda_declarator_opt): Adjust.
397         * call.c (add_function_candidate): Handle ref-qualifier overload
398         resolution semantics.
399         (standard_conversion): Adjust.
400         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
401         * decl.c (grokdeclarator): Handle ref-qualifiers.
402         (grokfndecl): Check for invalid ref-qualifiers.
403         (static_fn_type, revert_static_member_fn): Adjust.
404         * decl2.c (build_memfn_type): Handle ref-qualifiers.
405         (check_classfn): Check them.
406         (cp_reconstruct_complex_type): Retain them.
407         * error.c (dump_ref_qualifier): New.
408         (dump_type_suffix, dump_function_decl): Use it.
409         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
410         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
411         (unify): Retain them.
412         * tree.c (cp_check_qualified_type): New.
413         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
414         (build_ref_qualified_type): New.
415         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
416         (cp_build_type_attribute_variant): Keep ref-qualifier.
417         * typeck.c (merge_types): Keep ref-qualifier.
418         (structural_comptypes): Compare ref-qualifier.
419         (type_memfn_rqual): New.
420         (apply_memfn_quals): Take ref-qual argument.
421         * typeck2.c (build_m_component_ref): Check ref-qualifier.
422
423 2013-03-29  Jason Merrill  <jason@redhat.com>
424
425         PR c++/56774
426         PR c++/35722
427         * pt.c (unify_pack_expansion): Fix indexing.
428
429 2013-03-28  Jason Merrill  <jason@redhat.com>
430
431         PR c++/56728
432         * semantics.c (cxx_eval_indirect_ref): Use the folded operand if
433         we still think this might be constant.
434
435 2013-03-27  Jason Merrill  <jason@redhat.com>
436
437         PR c++/56749
438         * semantics.c (finish_qualified_id_expr): Return early
439         for enum scope.
440
441 2013-03-26  Jason Merrill  <jason@redhat.com>
442
443         PR c++/45282
444         * typeck2.c (build_m_component_ref): Handle prvalue object.
445
446 2013-03-25  Jason Merrill  <jason@redhat.com>
447
448         PR c++/56699
449         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
450         class is derived from the type of the object.
451
452         PR c++/56692
453         * search.c (lookup_base): Handle NULL_TREE.
454
455 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
456
457         PR c++/56722
458         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
459         DECL_TEMPLATE_INSTANTIATION.
460
461 2013-03-25  Jason Merrill  <jason@redhat.com>
462
463         PR c++/52014
464         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
465         unevaluated context.
466
467 2013-03-23  Jason Merrill  <jason@redhat.com>
468
469         PR c++/54359
470         * parser.c (cp_parser_direct_declarator): Fix late return
471         for out-of-class defn of member function.
472
473 2013-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
474
475         PR c++/56582
476         * semantics.c (cxx_eval_array_reference): Check for negative index.
477
478 2013-03-22  Jason Merrill  <jason@redhat.com>
479
480         PR c++/56646
481         * parser.c (cp_parser_late_return_type_opt): Save and restore
482         current_class_ptr/ref.
483
484         N3276
485         PR c++/52748
486         * cp-tree.h (tsubst_flags): Add tf_decltype.
487         * call.c (build_cxx_call): Don't build a temporary if it's set.
488         (build_over_call): Make sure it's only passed to build_cxx_call.
489         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
490         (cp_parser_unary_expression): Likewise.
491         (cp_parser_cast_expression): Likewise.
492         (cp_parser_binary_expression): Likewise.
493         (cp_parser_assignment_expression): Likewise.
494         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
495         (cp_parser_explicit_instantiation): Add decltype_p.  Force a
496         temporary for a call on the LHS of a comma.
497         (cp_parser_decltype): Pass true to decltype_p parms.
498         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
499         (tsubst_copy_and_build): Pass tf_decltype down only for
500         CALL_EXPR and the RHS of COMPOUND_EXPR.
501         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
502
503         DR 657
504         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
505         (tsubst_arg_types): Likewise.
506
507         PR c++/54277
508         * semantics.c (lambda_capture_field_type): Don't build a
509         magic decltype for pointer types.
510         (lambda_proxy_type): Likewise.
511         (finish_non_static_data_member): Get the quals from
512         the object.
513
514         PR c++/52374
515         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
516
517         PR c++/54764
518         PR c++/55972
519         * name-lookup.h (tag_scope): Add ts_lambda.
520         * semantics.c (begin_lambda_type): Use it.
521         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
522         * pt.c (check_default_tmpl_args): Ignore lambdas.
523         (push_template_decl_real): Handle lambdas.
524         * tree.c (no_linkage_check): Adjust lambda check.
525
526         PR c++/56039
527         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
528
529         PR c++/56447
530         PR c++/55532
531         * pt.c (instantiate_class_template_1): Instantiate lambda capture
532         list here.
533         (tsubst_copy_and_build): Not here.
534
535 2013-03-22  Jakub Jelinek  <jakub@redhat.com>
536
537         Backported from mainline
538         2013-03-16  Jakub Jelinek  <jakub@redhat.com>
539
540         PR c++/56607
541         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
542         pass op1 through maybe_constant_value first.
543
544         * tree.c (cp_tree_equal): Fix a pasto.
545
546 2013-03-22  Release Manager
547
548         * GCC 4.8.0 released.
549
550 2013-03-14  Jason Merrill  <jason@redhat.com>
551
552         PR c++/56614
553         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
554
555         PR c++/56346
556         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
557         dso_handle parm on targets without __cxa_atexit.
558
559 2013-03-11  Jason Merrill  <jason@redhat.com>
560
561         PR c++/56567
562         * typeck.c (check_return_expr): Disallow returning init list here.
563         * semantics.c (apply_deduced_return_type): Not here.
564
565 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
566
567         PR c++/51412
568         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
569         * error.c (dump_expr): Likewise.
570
571 2013-03-08  Jason Merrill  <jason@redhat.com>
572
573         PR c++/51884
574         * class.c (modify_all_vtables): Mangle the vtable name before
575         entering dfs_walk.
576
577         * semantics.c (lambda_expr_this_capture): In unevaluated context,
578         just return the nearest 'this'.
579
580         PR c++/51494
581         PR c++/52183
582         PR c++/56222
583         * tree.c (maybe_dummy_object): Don't capture 'this'.
584         * semantics.c (maybe_resolve_dummy): New.
585         (finish_non_static_data_member): Use it.
586         (finish_qualified_id_expr): Don't test is_dummy_object.
587         * cp-tree.h: Declare maybe_resolve_dummy.
588         * call.c (build_new_method_call_1): Use it.
589
590         PR c++/56567
591         * semantics.c (apply_deduced_return_type): Don't allow returning
592         std::initializer_list.
593
594 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
595
596         PR c++/56534
597         * parser.c (cp_parser_elaborated_type_specifier): Don't call
598         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
599         * decl.c (check_elaborated_type_specifier): Tidy.
600
601 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
602
603         PR c++/56543
604         * tree.c (strip_typedefs): Don't copy args if they are NULL.
605
606 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
607
608         * parser.c (cp_parser_braced_list): For {} initialize
609         *non_constant_p to false.
610
611 2013-03-04  Jason Merrill  <jason@redhat.com>
612
613         PR c++/56464
614         PR c++/54383
615         * semantics.c (lambda_expr_this_capture): Handle NSDMI
616         and non-class scopes.
617
618 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
619
620         * decl.c (grokdeclarator): Remove dead code.
621
622 2013-02-28  Jason Merrill  <jason@redhat.com>
623
624         PR c++/56481
625         * semantics.c (potential_constant_expression_1): Use
626         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
627
628         PR c++/56243
629         * call.c (build_over_call): Avoid virtual lookup in a template.
630
631 2013-02-27  Jason Merrill  <jason@redhat.com>
632
633         PR c++/56358
634         PR c++/56323
635         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
636         of the base name for inheriting ctors.
637         (push_class_level_binding_1): Remove inheriting ctor handling.
638         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
639         * class.c (add_implicitly_declared_members): Adjust.
640
641 2013-02-26  David Binderman  <dcb314@hotmail.com>
642
643         PR c++/55632
644         * decl.c (grokdeclarator): Tidy publicp assignment.
645
646 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
647
648         PR c++/56419
649         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
650         (build_transaction_expr): Same.
651
652 2013-02-25  Jason Merrill  <jason@redhat.com>
653
654         PR c++/56377
655         * pt.c (fn_type_unification): Wait to call push_tinst_level until
656         we know what args we're looking at.
657
658         PR c++/56438
659         * semantics.c (potential_constant_expression_1): In C++98, a cast
660         to non-integral type can't be a constant expression.
661
662 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
663
664         PR c++/56403
665         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
666         of CLASS_TYPE_P.
667
668 2013-02-22  Jason Merrill  <jason@redhat.com>
669
670         PR c++/40405
671         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
672         if we got the wrong number of template parms.
673
674         PR c++/56377
675         * pt.c (fn_type_unification): Use explicit args in template
676         instantiation context.
677
678         PR c++/56359
679         * call.c (can_convert_arg): Discard access checks.
680
681         PR c++/56395
682         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
683         args.
684
685 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
686
687         PR c++/56373
688         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
689         * cvt.c (ocp_convert): Use the latter.
690         (cp_convert_to_pointer): Likewise.
691         * decl.c (check_default_argument): Likewise.
692         * typeck.c (cp_build_binary_op): Likewise.
693         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
694
695 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
696             Paolo Carlini  <paolo.carlini@oracle.com>
697
698         PR c++/51242
699         * decl2.c (grokbitfield): Allow scoped enumeration types.
700
701 2013-02-15  Jason Merrill  <jason@redhat.com>
702
703         PR c++/54276
704         * semantics.c (finish_id_expression): Also return the identifier
705         for an outer local static.
706
707         PR c++/56343
708         * class.c (check_bases_and_members): Deduce noexcept after
709         checking bases.
710
711         PR c++/52026
712         * semantics.c (finish_id_expression): In a template, return
713         the identifier for a constant variable.
714
715 2013-02-14  Jason Merrill  <jason@redhat.com>
716
717         PR c++/54922
718         * semantics.c (build_anon_member_initialization): New.
719         (build_data_member_initialization): Use it.
720
721         PR c++/55003
722         * decl.c (cp_finish_decl): Force instantiation of an
723         auto static data member.
724
725         PR c++/55220
726         * pt.c (unify): A pack expansion that is not the last template
727         argument makes the entire template argument list non-deduced.
728
729         PR c++/56323
730         * name-lookup.c (do_class_using_decl): Handle typedefs with
731         inheriting constructors.
732         (push_class_level_binding_1): Allow inheriting from template
733         template parameter, too.
734         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
735
736         PR c++/55223
737         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
738         default argument scope.
739         * mangle.c (write_name): Likewise.
740
741         PR c++/55232
742         * error.c (find_typenames_r): Don't walk into a pack expansion.
743
744 2013-02-13  Jason Merrill  <jason@redhat.com>
745
746         PR c++/55670
747         * parser.c (cp_parser_member_declaration): Check the declarator
748         form when detecting a function declaration via typedef.
749
750         PR c++/55680
751         * pt.c (maybe_process_partial_specialization): A lambda
752         isn't what's being specialized.
753
754         PR c++/55710
755         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
756         TREE_USED.
757
758         PR c++/55879
759         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
760
761         PR c++/55993
762         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
763         non-zero offsets, too.
764
765         PR c++/56155
766         * decl.c (build_enumerator): Always convert the value to a
767         fixed underlying type.
768
769         PR c++/56135
770         * pt.c (tsubst_copy_and_build): Don't forget any new
771         captures that arose from use of dependent names.
772
773 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
774
775         PR c++/56302
776         * semantics.c (finish_asm_stmt): If input constraints allow
777         neither register nor memory, try maybe_constant_value to get
778         a constant if possible.
779
780 2013-02-12  Jason Merrill  <jason@redhat.com>
781
782         PR c++/56285
783         * method.c (add_one_base_init): Handle base constructor
784         taking rvalue reference parm.
785
786         PR c++/56291
787         * semantics.c (sort_constexpr_mem_initializers): Handle
788         vptr out of order.
789
790 2013-02-09  Jason Merrill  <jason@redhat.com>
791
792         PR c++/56268
793         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
794         maybe_instantiate_noexcept.
795
796         PR c++/56247
797         * pt.c (eq_specializations): Set comparing_specializations.
798         * tree.c (cp_tree_equal): Check it.
799         * cp-tree.h: Declare it.
800
801         * decl.c (decls_match): Check versions later.
802
803         PR c++/56238
804         * pt.c (build_non_dependent_expr): Don't try to fold
805         instantiation-dependent expressions.
806         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
807         [BIND_EXPR]: Treat as dependent.
808
809 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
810
811         PR c++/56241
812         * init.c (build_vec_init): Don't append NULL values into new_vec.
813         (build_zero_init_1): Don't push anything into v if recursive call
814         returned NULL_TREE.
815         (build_value_init_noctor): Don't push anything into v if
816         build_value_init call returned NULL_TREE.
817
818         PR c++/56239
819         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
820         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
821         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
822         return true only if 2nd token isn't CPP_CLOSE_PAREN.
823         (cp_parser_cast_expression): Adjust caller.
824
825         PR c++/56237
826         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
827         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
828         DECL_LANG_SPECIFIC (t).
829
830 2013-02-07  Jason Merrill  <jason@redhat.com>
831
832         PR c++/56235
833         * method.c (do_build_copy_constructor): Don't bother turning
834         scalars from lvalues to xvalues.
835         (do_build_copy_assign): Likewise.
836
837 2013-02-06  Jason Merrill  <jason@redhat.com>
838
839         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
840
841 2013-02-05  Jason Merrill  <jason@redhat.com>
842
843         PR c++/54122
844         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
845         METHOD_TYPE.
846
847         PR c++/56177
848         * decl.c (start_preparsed_function): Update restype if we change
849         decl1.
850
851         PR c++/56208
852         * pt.c (fn_type_unification): Discard any access checks from
853         substituting explicit args.
854
855 2013-01-31  Jason Merrill  <jason@redhat.com>
856
857         PR c++/56162
858         PR c++/56104
859         * typeck.c (get_member_function_from_ptrfunc): Fix
860         ptrmemfunc_vbit_in_delta case.
861
862 2013-01-29  Jason Merrill  <jason@redhat.com>
863
864         PR libstdc++/54314
865         * class.c (build_ctor_vtbl_group): Give construction vtables
866         hidden visibility.
867
868 2013-01-25  Jason Merrill  <jason@redhat.com>
869
870         PR c++/56095
871         * pt.c (convert_nontype_argument_function): Handle invalid input.
872         (convert_nontype_argument): Likewise.
873
874         PR c++/56104
875         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
876         dynamic type has no virtual functions.
877
878 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
879
880         PR c++/55944
881         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
882         on TARGET_EXPR nodes.
883
884 2013-01-22  Jason Merrill  <jason@redhat.com>
885
886         PR c++/56071
887         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
888
889 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
890
891         PR c++/53609
892         * pt.c (argument_pack_element_is_expansion_p)
893         (make_argument_pack_select, use_pack_expansion_extra_args_p)
894         (gen_elem_of_pack_expansion_instantiation): New static functions.
895         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
896         look through the possibly resulting pack expansion as well.
897         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
898         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
899         Use gen_elem_of_pack_expansion_instantiation to build the
900         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
901         as gen_elem_of_pack_expansion_instantiation and the change in
902         tsubst above generalize this particular case.
903         (arg_from_parm_pack_p): Remove this for it's not used by
904         tsubst_pack_expansion anymore.
905
906 2013-01-21  Jason Merrill  <jason@redhat.com>
907
908         PR c++/56059
909         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
910         template args count.
911
912 2013-01-18  Jason Merrill  <jason@redhat.com>
913
914         PR target/54908
915         * decl2.c (get_local_tls_init_fn): New.
916         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
917         with aliases for internal variables.  Don't use weakrefs if
918         the variable needs destruction.
919         (generate_tls_wrapper): Mark the wrapper as const if no
920         initialization is needed.
921         (handle_tls_init): Don't require aliases.
922
923 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
924
925         PR c++/55663
926         * pt.c (coerce_innermost_template_parms): New static function.
927         (instantiate_alias_template):  Use it here.
928
929 2013-01-09  Jason Merrill  <jason@redhat.com>
930
931         PR c++/55878
932         * rtti.c (build_typeid, get_typeid): Add complain parm.
933         (get_tinfo_decl_dynamic): Likewise.
934         * cp-tree.h, parser.c, pt.c: Adjust.
935
936         PR c++/55893
937         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
938         needs destruction.
939
940 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
941
942         PR c/48418
943         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
944         call maybe_constant_value for the negative or too big shift
945         count warnings.
946
947 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
948
949         PR c++/55801
950         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
951         of the argument is true.
952
953 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
954
955         * parser.c (cp_parser_initializer_list): Move declaration
956         of variable non_const to start of lexical block.
957
958 2013-01-07  Jason Merrill  <jason@redhat.com>
959
960         PR c++/55753
961         * tree.c (build_aggr_init_expr): Do nothing in a template.
962         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
963         a FUNCTION_DECL before tsubsting.
964
965 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
966
967         PR c++/52343
968         * pt.c (check_instantiated_arg): Allow type template arguments.
969
970 2013-01-04  Jason Merrill  <jason@redhat.com>
971
972         PR c++/55877
973         * decl.c (reset_type_linkage, bt_reset_linkage): New.
974         (grokdeclarator): Use reset_type_linkage.
975         * name-lookup.c (binding_table_foreach): Handle null table.
976         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
977
978 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
979
980         PR c++/54526 (again)
981         * parser.c (cp_parser_template_id): Revert core of previous change
982         (keep adjusted inform message).
983
984 2013-01-03  Jason Merrill  <jason@redhat.com>
985
986         PR c++/55419
987         PR c++/55753
988         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
989         TREE_CONSTANT.
990
991         PR c++/55842
992         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
993
994         PR c++/55856
995         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
996
997         PR c++/53650
998         * call.c (type_has_extended_temps): New.
999         * cp-tree.h: Declare it.
1000         * decl.c (check_initializer): Use build_aggr_init for arrays
1001         if it is false.
1002         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1003
1004 2013-01-02  Jason Merrill  <jason@redhat.com>
1005
1006         PR c++/54325
1007         * call.c (build_new_method_call_1): Don't use build_value_init for
1008         user-provided default constructors.
1009
1010         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1011
1012         PR c++/55032
1013         PR c++/55245
1014         * tree.c (build_cplus_array_type): Copy layout information
1015         to main variant if necessary.
1016 \f
1017 Copyright (C) 2013 Free Software Foundation, Inc.
1018
1019 Copying and distribution of this file, with or without modification,
1020 are permitted in any medium without royalty provided the copyright
1021 notice and this notice are preserved.