]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
cp-tree.h (AUTO_IS_DECLTYPE): New.
[gcc.git] / gcc / cp / ChangeLog
1 2013-03-29 Jason Merrill <jason@redhat.com>
2
3 N3582
4 * cp-tree.h (AUTO_IS_DECLTYPE): New.
5 * parser.c (cp_parser_decltype): Handle decltype(auto).
6 (cp_parser_type_id_1): Allow auto without a late-specified
7 return in C++1y.
8 (cp_parser_primary_expression): Use the return value of
9 finish_parenthesized_expr.
10 (cp_parser_transaction_expression): Likewise.
11 * semantics.c (force_paren_expr): New.
12 (finish_parenthesized_expr): Use it.
13 * call.c (build_conditional_expr_1): Likewise.
14 * pt.c (do_auto_deduction): Handle decltype(auto).
15 (tsubst_copy): Handle PAREN_EXPR.
16 (tsubst_copy_and_build): Likewise.
17 * error.c (dump_expr): Handle PAREN_EXPR.
18 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
19 * mangle.c (write_expression): Ignore PAREN_EXPR.
20
21 * parser.c (cp_parser_decltype_expr): Split out...
22 (cp_parser_decltype): ...from here.
23
24 PR c++/56774
25 PR c++/35722
26 * pt.c (unify_pack_expansion): Fix indexing.
27
28 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
29
30 * call.c (build_java_interface_fn_ref): Likewise.
31 (make_temporary_var_for_ref_to_temp): Likewise.
32 * class.c (check_field_decls): Likewise.
33 (layout_class_type): Likewise.
34 (finish_struct_1): Likewise.
35 (fixed_type_or_null): Likewise.
36 (get_vtbl_decl_for_binfo): Likewise.
37 * cp-gimplify.c (omp_var_to_track): Likewise.
38 (cp_genericize_r): Likewise.
39 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
40 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
41 (DECL_DISCRIMINATOR_P): Likewise.
42 * decl.c (poplevel): Likewise.
43 (decls_match): Likewise.
44 (duplicate_decls): Likewise.
45 (decl_jump_unsafe): Likewise.
46 (start_decl): Likewise.
47 (check_for_uninitialized_const_var): Likewise.
48 (make_rtl_for_nonlocal_decl): Likewise.
49 (cp_finish_decl): Likewise.
50 (expand_static_init): Likewise.
51 (local_variable_p): Likewise.
52 (maybe_register_incomplete_var): Likewise.
53 * decl2.c (grokfield): Likewise.
54 (comdat_linkage): Likewise.
55 (determine_visibility): Likewise.
56 (import_export_decl): Likewise.
57 (prune_vars_needing_no_initialization): Likewise.
58 (decl_maybe_constant_var_p): Likewise.
59 * error.c (dump_simple_decl): Likewise.
60 (dump_template_decl): Likewise.
61 (cp_printer): Likewise.
62 * except.c (build_throw): Likewise.
63 * init.c (build_vtbl_address): Likewise.
64 (member_init_ok_or_else): Likewise.
65 (build_aggr_init): Likewise.
66 (expand_aggr_init_1): Likewise.
67 (build_offset_ref): Likewise.
68 (constant_value_1): Likewise.
69 * mangle.c (write_mangled_name): Likewise.
70 (write_prefix): Likewise.
71 * name-lookup.c (supplement_binding_1): Likewise.
72 (add_decl_to_level): Likewise.
73 (pushdecl_maybe_friend_1): Likewise.
74 (check_for_out_of_scope_variable): Likewise.
75 (validate_nonmember_using_decl): Likewise.
76 (lookup_name_innermost_nonclass_level_1): Likewise.
77 (lookup_arg_dependent_1): Likewise.
78 * parser.c (cp_parser_lambda_introducer): Likewise.
79 (cp_parser_template_argument): Likewise.
80 (cp_parser_single_declaration): Likewise.
81 * pt.c (convert_nontype_argument): Likewise.
82 (instantiate_class_template_1): Likewise.
83 (tsubst_decl): Likewise.
84 (tsubst_expr): Likewise.
85 (do_decl_instantiation): Likewise.
86 (do_type_instantiation): Likewise.
87 (regenerate_decl_from_template): Likewise.
88 (always_instantiate_p): Likewise.
89 (instantiate_decl): Likewise.
90 (type_dependent_expression_p): Likewise.
91 (build_non_dependent_expr): Likewise.
92 * repo.c (repo_emit_p): Likewise.
93 * rtti.c (build_dynamic_cast_1): Likewise.
94 * search.c (shared_member_p): Likewise.
95 * semantics.c (outer_var_p): Likewise.
96 (finish_id_expression): Likewise.
97 (finish_omp_clauses): Likewise.
98 (finish_decltype_type): Likewise.
99 (ensure_literal_type_for_constexpr_object): Likewise.
100 * tree.c (lvalue_kind): Likewise.
101 (bot_replace): Likewise.
102 (cp_tree_equal): Likewise.
103 (handle_init_priority_attribute): Likewise.
104 (decl_storage_duration): Likewise.
105 * typeck.c (cxx_sizeof_expr): Likewise.
106 (cxx_alignof_expr): Likewise.
107 (decay_conversion): Likewise.
108 (build_class_member_access_expr): Likewise.
109 (cp_build_array_ref): Likewise.
110 (cxx_mark_addressable): Likewise.
111 (maybe_warn_about_returning_address_of_local): Likewise.
112 (check_return_expr): Likewise.
113 * typeck2.c (cxx_readonly_error): Likewise.
114 (abstract_virtuals_error_sfinae): Likewise.
115 (cxx_incomplete_type_diagnostic): Likewise.
116
117 2013-03-28 Lawrence Crowl <crowl@google.com>
118
119 * Make-lang.in
120 (CXX_PARSER_H): Add header dependence.
121 * cp-tree.h
122 (extern debug (cp_binding_level &)): New.
123 (extern debug (cp_binding_level *)): New.
124 * name-lookup.h
125 (debug (cp_binding_level &)): New.
126 (debug (cp_binding_level *)): New.
127 * parser.c
128 (debug (cp_parser &)): New.
129 (debug (cp_parser *)): New.
130 (debug (cp_token &)): New.
131 (debug (cp_token *)): New.
132 (debug (vec<cp_token, va_gc> &)): New.
133 (debug (vec<cp_token, va_gc> *)): New.
134 * parser.c: Add header dependence.
135 (extern debug (cp_parser &)): New.
136 (extern debug (cp_parser *)): New.
137 (extern debug (cp_token &)): New.
138 (extern debug (cp_token *)): New.
139 (extern debug (vec<cp_token, va_gc> &)): New.
140 (extern debug (vec<cp_token, va_gc> *)): New.
141
142 2013-03-28 Jason Merrill <jason@redhat.com>
143
144 PR c++/17232
145 PR c++/52748
146 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
147 the type if tf_decltype is set.
148 * pt.c (fn_type_unification): Add decltype_p parm.
149 (get_bindings): Adjust.
150 * cp-tree.h: Adjust.
151 * class.c (resolve_address_of_overloaded_function): Adjust.
152 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
153
154 PR c++/56679
155 * parser.c (cp_parser_sizeof_pack): Split out from...
156 (cp_parser_sizeof_operand): ...here. Require (id).
157
158 PR c++/56701
159 * semantics.c (finish_this_expr): 'this' is an rvalue.
160 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
161
162 PR c++/56710
163 * semantics.c (finish_member_declaration): Don't push closure
164 members.
165
166 * name-lookup.c (pushdecl_maybe_friend_1): Use
167 nonlambda_method_basetype and current_nonlambda_class_type.
168
169 PR c++/56728
170 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
171 conversion from integer to pointer.
172 (cxx_eval_constant_expression): Likewise.
173 (cxx_eval_indirect_ref): Use the folded operand if we still think
174 this might be constant.
175
176 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
177 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
178
179 PR c++/56725
180 * call.c (convert_like_real): Change series of two permerrors
181 to permerror + inform (and likewise for two errors).
182 (build_new_method_call_1): Likewise.
183 * typeck.c (convert_for_initialization): Change additional
184 warning or error to inform.
185
186 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
187
188 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
189 (first_aggr_init_expr): Likewise.
190 (more_aggr_init_expr_args_p): Likewise.
191 (type_of_this_parm): Likewise.
192 (class_of_this_parm): Likewise.
193 * name-lookup.h (get_global_value_if_present): Likewise.
194 (is_typename_at_global_scope): Likewise.
195
196 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
197
198 * call.c (joust): Don't call inform for a permerror returning false.
199 * parser.c (cp_parser_check_class_key): Likewise.
200 * pt.c (tsubst_copy_and_build): Likewise.
201
202 2013-03-27 Jason Merrill <jason@redhat.com>
203
204 PR c++/56749
205 * semantics.c (finish_qualified_id_expr): Return early
206 for enum scope.
207
208 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
209
210 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
211 * cvt.c (convert_to_void): Likewise.
212 * error.c (dump_expr): Likewise.
213 * mangle.c (write_expression): Likewise.
214 * parser.c (cp_parser_template_argument): Likewise.
215 * pt.c (convert_nontype_argument): Likewise.
216 (tsubst_copy_and_build): Likewise.
217 * rtti.c (build_typeid): Likewise.
218 * semantics.c (finish_call_expr): Likewise.
219 (finish_decltype_type): Likewise.
220 (build_data_member_initialization): Likewise.
221 * tree.c (is_dummy_object): Likewise.
222 * typeck.c (decay_conversion): Likewise.
223 (build_class_member_access_expr): Likewise.
224 (cp_build_addr_expr_1): Likewise.
225 (unary_complex_lvalue): Likewise.
226 (check_return_expr): Likewise.
227 * typeck2.c (cxx_readonly_error): Likewise.
228
229 2013-03-26 Jason Merrill <jason@redhat.com>
230
231 PR c++/52597
232 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
233 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
234 * cp-tree.h: Adjust prototype.
235
236 PR c++/45282
237 * typeck2.c (build_m_component_ref): Handle prvalue object.
238
239 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
240
241 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
242 * decl.c (duplicate_decls): Likewise.
243 (cp_finish_decl): Likewise.
244 (check_class_member_definition_namespace): Likewise.
245 * decl2.c (grokfield): Likewise.
246 (decl_needed_p): Likewise.
247 (import_export_decl): Likewise.
248 (mark_used): Likewise.
249 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
250 * pt.c (push_access_scope): Likewise.
251 (instantiate_decl): Likewise.
252 * ptree.c (cxx_print_decl): Likewise.
253 * repo.c (repo_emit_p): Likewise.
254 * semantics.c (note_decl_for_pch): Likewise.
255 * tree.c (decl_linkage): Likewise.
256
257 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
258
259 PR c++/55951
260 * decl.c (check_array_designated_initializer): Handle CONST_DECL
261 as ce->index.
262
263 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
264
265 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
266 error messages.
267
268 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
269
270 2013-03-25 Jason Merrill <jason@redhat.com>
271
272 PR c++/56699
273 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
274 class is derived from the type of the object.
275
276 PR c++/52014
277 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
278 unevaluated context.
279
280 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
281
282 PR c++/56722
283 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
284 DECL_TEMPLATE_INSTANTIATION.
285
286 2013-03-22 Jason Merrill <jason@redhat.com>
287
288 PR c++/56684
289 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
290 and CONST_DECL.
291
292 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
293
294 * cp-tree.h (identifier_p): New.
295 * call.c: Throughout, call identifier_p insstead of direct
296 comparaison of TREE_CODE against IDENTIFIER_NODE.
297 * decl.c: Likewisse.
298 * decl2.c: Likewise.
299 * init.c: Likewise.
300 * mangle.c: Likewise.
301 * name-lookup.c: Likewise.
302 * parser.c: Likewise.
303 * pt.c: Likewise.
304 * search.c: Likewise.
305 * semantics.c: Likewise.
306 * tree.c: Likewise.
307 * typeck.c: Likewise.
308 * typeck2.c: Likewise.
309
310 2013-03-21 Jakub Jelinek <jakub@redhat.com>
311
312 PR middle-end/48087
313 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
314 * call.c (build_temp): Likewise.
315 * method.c (synthesize_method): Likewise.
316 * typeck.c (convert_for_initialization): Likewise.
317
318 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
319
320 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
321
322 2013-03-21 Richard Biener <rguenther@suse.de>
323
324 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
325 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
326
327 2013-03-20 Jason Merrill <jason@redhat.com>
328
329 PR c++/56646
330 * parser.c (cp_parser_late_return_type_opt): Save and restore
331 current_class_ptr/ref.
332
333 PR c++/54532
334 * expr.c (cplus_expand_constant): Do nothing if the class is
335 incomplete.
336 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
337 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
338 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
339 (complete_vars): Likewise.
340
341 * name-lookup.c (get_anonymous_namespace_name): Never use
342 get_file_function_name.
343
344 * pt.c (retrieve_specialization): Handle null tmpl argument.
345
346 PR c++/17232
347 PR c++/56642
348 * pt.c (tsubst_decl): Check return value of register_specialization.
349 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
350 change.
351
352 2013-03-17 Jason Merrill <jason@redhat.com>
353
354 PR c++/54359
355 PR c++/56639
356 * parser.c (cp_parser_direct_declarator): Bail if we see a
357 qualified-id not at namespace scope.
358
359 PR c++/17232
360 PR c++/56642
361 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
362 change for now.
363
364 2013-03-16 Jason Merrill <jason@redhat.com>
365
366 * decl.c (grokdeclarator): Assert that we won't see a pointer to
367 METHOD_TYPE.
368
369 PR c++/54277
370 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
371 (MAYBE_CLASS_TYPE_P): ...here.
372 * semantics.c (lambda_capture_field_type): Only build a
373 magic decltype for wildcard types.
374 (lambda_proxy_type): Likewise.
375 (finish_non_static_data_member): Get the quals from
376 the object.
377
378 PR c++/55931
379 * parser.c (cp_parser_template_argument): Don't
380 fold_non_dependent_expr.
381
382 * parser.c (cp_parser_lambda_declarator_opt): Use
383 cp_parser_trailing_type_id.
384
385 PR c++/45917
386 * parser.c (cp_parser_template_id): Don't forget access checks.
387
388 PR c++/52374
389 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
390
391 PR c++/54764
392 PR c++/55972
393 * name-lookup.h (tag_scope): Add ts_lambda.
394 * semantics.c (begin_lambda_type): Use it.
395 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
396 * pt.c (check_default_tmpl_args): Ignore lambdas.
397 (push_template_decl_real): Handle lambdas.
398 * tree.c (no_linkage_check): Adjust lambda check.
399
400 PR c++/56039
401 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
402
403 PR c++/54359
404 * parser.c (cp_parser_direct_declarator): Fix late return
405 for out-of-class defn of member function.
406
407 PR c++/55357
408 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
409 parms to avoid duplicate -Wshadow warnings.
410
411 * search.c (lookup_base): Handle NULL_TREE.
412
413 PR c++/56481
414 * semantics.c (potential_constant_expression_1): Use of 'this' in
415 a non-constexpr function makes the expression not potentially
416 constant.
417
418 N3276
419 PR c++/52748
420 * cp-tree.h (tsubst_flags): Add tf_decltype.
421 * call.c (build_cxx_call): Don't build a temporary if it's set.
422 (build_over_call): Make sure it's only passed to build_cxx_call.
423 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
424 (cp_parser_unary_expression): Likewise.
425 (cp_parser_cast_expression): Likewise.
426 (cp_parser_binary_expression): Likewise.
427 (cp_parser_assignment_expression): Likewise.
428 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
429 (cp_parser_expression): Add decltype_p. Force a
430 temporary for a call on the LHS of a comma.
431 (cp_parser_decltype): Pass true to decltype_p parms.
432 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
433 (tsubst_copy_and_build): Pass tf_decltype down only for
434 CALL_EXPR and the RHS of COMPOUND_EXPR.
435 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
436
437 * cp-tree.h (abstract_class_use): New enum.
438 * typeck2.c (pending_abstract_type): Add use field.
439 (abstract_virtuals_error_sfinae): Add overloads taking
440 abstract_class_use instead of tree.
441 * typeck.c (build_static_cast_1): Call it.
442 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
443 * pt.c: Adjust calls.
444 * decl.c (cp_finish_decl): Don't handle functions specially.
445 (grokdeclarator): Always check return type.
446 * init.c (build_new_1): Adjust call.
447
448 DR 337
449 PR c++/17232
450 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
451 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
452
453 DR 657
454 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
455 (tsubst_arg_types): Likewise.
456
457 DR 1518
458 PR c++/54835
459 * call.c (convert_like_real): Check for explicit constructors
460 even for value-initialization.
461
462 PR c++/54946
463 * pt.c (convert_nontype_argument): Handle invalid pointer.
464
465 * parser.c (cp_parser_lambda_expression): Use nreverse.
466
467 PR c++/56447
468 PR c++/55532
469 * pt.c (instantiate_class_template_1): Instantiate lambda capture
470 list here.
471 (tsubst_copy_and_build): Not here.
472
473 PR c++/55017
474 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
475
476 PR c++/55240
477 * parser.c (parsing_nsdmi): New.
478 * semantics.c (outer_automatic_var_p): Check it.
479 (finish_id_expression): Likewise.
480 * cp-tree.h: Declare it.
481
482 PR c++/55241
483 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
484
485 * parser.c (lookup_literal_operator): Correct parm/arg naming
486 mixup.
487
488 PR c++/56238
489 * pt.c (fold_non_dependent_expr_sfinae): Check
490 instantiation_dependent_expression_p.
491
492 PR c++/56095
493 * class.c (resolve_address_of_overloaded_function): Accept a
494 reference to function for target_type.
495 (instantiate_type): Likewise.
496 * pt.c (convert_nontype_argument): Pass it to
497 convert_nontype_argument_function.
498
499 2013-03-16 Jakub Jelinek <jakub@redhat.com>
500
501 * tree.c (cp_tree_equal): Fix a pasto.
502
503 PR c++/56607
504 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
505 pass op1 through maybe_constant_value first.
506
507 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
508
509 PR c++/56582
510 * semantics.c (cxx_eval_array_reference): Check for negative index.
511
512 2013-03-14 Jason Merrill <jason@redhat.com>
513
514 PR c++/56614
515 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
516
517 PR c++/56346
518 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
519 dso_handle parm on targets without __cxa_atexit.
520
521 2013-03-11 Jason Merrill <jason@redhat.com>
522
523 PR c++/56567
524 * typeck.c (check_return_expr): Disallow returning init list here.
525 * semantics.c (apply_deduced_return_type): Not here.
526
527 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
528
529 PR c++/51412
530 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
531 * error.c (dump_expr): Likewise.
532
533 2013-03-08 Jason Merrill <jason@redhat.com>
534
535 PR c++/51884
536 * class.c (modify_all_vtables): Mangle the vtable name before
537 entering dfs_walk.
538
539 * semantics.c (lambda_expr_this_capture): In unevaluated context,
540 just return the nearest 'this'.
541
542 PR c++/51494
543 PR c++/52183
544 PR c++/56222
545 * tree.c (maybe_dummy_object): Don't capture 'this'.
546 * semantics.c (maybe_resolve_dummy): New.
547 (finish_non_static_data_member): Use it.
548 (finish_qualified_id_expr): Don't test is_dummy_object.
549 * cp-tree.h: Declare maybe_resolve_dummy.
550 * call.c (build_new_method_call_1): Use it.
551
552 PR c++/56567
553 * semantics.c (apply_deduced_return_type): Don't allow returning
554 std::initializer_list.
555
556 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
557
558 PR c++/56534
559 * parser.c (cp_parser_elaborated_type_specifier): Don't call
560 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
561 * decl.c (check_elaborated_type_specifier): Tidy.
562
563 2013-03-06 Jakub Jelinek <jakub@redhat.com>
564
565 PR c++/56543
566 * tree.c (strip_typedefs): Don't copy args if they are NULL.
567
568 2013-03-05 Jakub Jelinek <jakub@redhat.com>
569
570 * parser.c (cp_parser_braced_list): For {} initialize
571 *non_constant_p to false.
572
573 2013-03-04 Jason Merrill <jason@redhat.com>
574
575 PR c++/56464
576 PR c++/54383
577 * semantics.c (lambda_expr_this_capture): Handle NSDMI
578 and non-class scopes.
579
580 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
581
582 * decl.c (grokdeclarator): Remove dead code.
583
584 2013-02-28 Jason Merrill <jason@redhat.com>
585
586 PR c++/56481
587 * semantics.c (potential_constant_expression_1): Use
588 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
589
590 PR c++/56243
591 * call.c (build_over_call): Avoid virtual lookup in a template.
592
593 2013-02-27 Jason Merrill <jason@redhat.com>
594
595 PR c++/56358
596 PR c++/56323
597 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
598 of the base name for inheriting ctors.
599 (push_class_level_binding_1): Remove inheriting ctor handling.
600 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
601 * class.c (add_implicitly_declared_members): Adjust.
602
603 2013-02-26 David Binderman <dcb314@hotmail.com>
604
605 PR c++/55632
606 * decl.c (grokdeclarator): Tidy publicp assignment.
607
608 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
609
610 PR c++/56419
611 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
612 (build_transaction_expr): Same.
613
614 2013-02-25 Jason Merrill <jason@redhat.com>
615
616 PR c++/56377
617 * pt.c (fn_type_unification): Wait to call push_tinst_level until
618 we know what args we're looking at.
619
620 PR c++/56438
621 * semantics.c (potential_constant_expression_1): In C++98, a cast
622 to non-integral type can't be a constant expression.
623
624 2013-02-24 Jakub Jelinek <jakub@redhat.com>
625
626 PR c++/56403
627 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
628 of CLASS_TYPE_P.
629
630 2013-02-22 Jason Merrill <jason@redhat.com>
631
632 PR c++/40405
633 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
634 if we got the wrong number of template parms.
635
636 PR c++/56377
637 * pt.c (fn_type_unification): Use explicit args in template
638 instantiation context.
639
640 PR c++/56359
641 * call.c (can_convert_arg): Discard access checks.
642
643 PR c++/56395
644 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
645 args.
646
647 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
648
649 PR c++/56373
650 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
651 * cvt.c (ocp_convert): Use the latter.
652 (cp_convert_to_pointer): Likewise.
653 * decl.c (check_default_argument): Likewise.
654 * typeck.c (cp_build_binary_op): Likewise.
655 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
656
657 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
658 Paolo Carlini <paolo.carlini@oracle.com>
659
660 PR c++/51242
661 * decl2.c (grokbitfield): Allow scoped enumeration types.
662
663 2013-02-15 Jason Merrill <jason@redhat.com>
664
665 PR c++/54276
666 * semantics.c (finish_id_expression): Also return the identifier
667 for an outer local static.
668
669 PR c++/56343
670 * class.c (check_bases_and_members): Deduce noexcept after
671 checking bases.
672
673 PR c++/52026
674 * semantics.c (finish_id_expression): In a template, return
675 the identifier for a constant variable.
676
677 2013-02-14 Jason Merrill <jason@redhat.com>
678
679 PR c++/54922
680 * semantics.c (build_anon_member_initialization): New.
681 (build_data_member_initialization): Use it.
682
683 PR c++/55003
684 * decl.c (cp_finish_decl): Force instantiation of an
685 auto static data member.
686
687 PR c++/55220
688 * pt.c (unify): A pack expansion that is not the last template
689 argument makes the entire template argument list non-deduced.
690
691 PR c++/56323
692 * name-lookup.c (do_class_using_decl): Handle typedefs with
693 inheriting constructors.
694 (push_class_level_binding_1): Allow inheriting from template
695 template parameter, too.
696 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
697
698 PR c++/55223
699 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
700 default argument scope.
701 * mangle.c (write_name): Likewise.
702
703 PR c++/55232
704 * error.c (find_typenames_r): Don't walk into a pack expansion.
705
706 2013-02-13 Jason Merrill <jason@redhat.com>
707
708 PR c++/55670
709 * parser.c (cp_parser_member_declaration): Check the declarator
710 form when detecting a function declaration via typedef.
711
712 PR c++/55680
713 * pt.c (maybe_process_partial_specialization): A lambda
714 isn't what's being specialized.
715
716 PR c++/55710
717 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
718 TREE_USED.
719
720 PR c++/55879
721 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
722
723 PR c++/55993
724 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
725 non-zero offsets, too.
726
727 PR c++/56155
728 * decl.c (build_enumerator): Always convert the value to a
729 fixed underlying type.
730
731 PR c++/56135
732 * pt.c (tsubst_copy_and_build): Don't forget any new
733 captures that arose from use of dependent names.
734
735 2013-02-13 Jakub Jelinek <jakub@redhat.com>
736
737 PR c++/56302
738 * semantics.c (finish_asm_stmt): If input constraints allow
739 neither register nor memory, try maybe_constant_value to get
740 a constant if possible.
741
742 2013-02-12 Jason Merrill <jason@redhat.com>
743
744 PR c++/56285
745 * method.c (add_one_base_init): Handle base constructor
746 taking rvalue reference parm.
747
748 PR c++/56291
749 * semantics.c (sort_constexpr_mem_initializers): Handle
750 vptr out of order.
751
752 2013-02-09 Jason Merrill <jason@redhat.com>
753
754 PR c++/56268
755 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
756 maybe_instantiate_noexcept.
757
758 PR c++/56247
759 * pt.c (eq_specializations): Set comparing_specializations.
760 * tree.c (cp_tree_equal): Check it.
761 * cp-tree.h: Declare it.
762
763 * decl.c (decls_match): Check versions later.
764
765 PR c++/56238
766 * pt.c (build_non_dependent_expr): Don't try to fold
767 instantiation-dependent expressions.
768 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
769 [BIND_EXPR]: Treat as dependent.
770
771 2013-02-07 Jakub Jelinek <jakub@redhat.com>
772
773 PR c++/56241
774 * init.c (build_vec_init): Don't append NULL values into new_vec.
775 (build_zero_init_1): Don't push anything into v if recursive call
776 returned NULL_TREE.
777 (build_value_init_noctor): Don't push anything into v if
778 build_value_init call returned NULL_TREE.
779
780 PR c++/56239
781 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
782 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
783 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
784 return true only if 2nd token isn't CPP_CLOSE_PAREN.
785 (cp_parser_cast_expression): Adjust caller.
786
787 PR c++/56237
788 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
789 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
790 DECL_LANG_SPECIFIC (t).
791
792 2013-02-07 Jason Merrill <jason@redhat.com>
793
794 PR c++/56235
795 * method.c (do_build_copy_constructor): Don't bother turning
796 scalars from lvalues to xvalues.
797 (do_build_copy_assign): Likewise.
798
799 2013-02-06 Jason Merrill <jason@redhat.com>
800
801 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
802
803 2013-02-05 Jason Merrill <jason@redhat.com>
804
805 PR c++/54122
806 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
807 METHOD_TYPE.
808
809 PR c++/56177
810 * decl.c (start_preparsed_function): Update restype if we change
811 decl1.
812
813 PR c++/56208
814 * pt.c (fn_type_unification): Discard any access checks from
815 substituting explicit args.
816
817 2013-01-31 Jason Merrill <jason@redhat.com>
818
819 PR c++/56162
820 PR c++/56104
821 * typeck.c (get_member_function_from_ptrfunc): Fix
822 ptrmemfunc_vbit_in_delta case.
823
824 2013-01-29 Jason Merrill <jason@redhat.com>
825
826 PR libstdc++/54314
827 * class.c (build_ctor_vtbl_group): Give construction vtables
828 hidden visibility.
829
830 2013-01-25 Jason Merrill <jason@redhat.com>
831
832 PR c++/56095
833 * pt.c (convert_nontype_argument_function): Handle invalid input.
834 (convert_nontype_argument): Likewise.
835
836 PR c++/56104
837 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
838 dynamic type has no virtual functions.
839
840 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
841
842 PR c++/55944
843 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
844 on TARGET_EXPR nodes.
845
846 2013-01-22 Jason Merrill <jason@redhat.com>
847
848 PR c++/56071
849 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
850
851 2013-01-22 Dodji Seketeli <dodji@redhat.com>
852
853 PR c++/53609
854 * pt.c (argument_pack_element_is_expansion_p)
855 (make_argument_pack_select, use_pack_expansion_extra_args_p)
856 (gen_elem_of_pack_expansion_instantiation): New static functions.
857 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
858 look through the possibly resulting pack expansion as well.
859 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
860 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
861 Use gen_elem_of_pack_expansion_instantiation to build the
862 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
863 as gen_elem_of_pack_expansion_instantiation and the change in
864 tsubst above generalize this particular case.
865 (arg_from_parm_pack_p): Remove this for it's not used by
866 tsubst_pack_expansion anymore.
867
868 2013-01-21 Jason Merrill <jason@redhat.com>
869
870 PR c++/56059
871 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
872 template args count.
873
874 2013-01-18 Jason Merrill <jason@redhat.com>
875
876 PR target/54908
877 * decl2.c (get_local_tls_init_fn): New.
878 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
879 with aliases for internal variables. Don't use weakrefs if
880 the variable needs destruction.
881 (generate_tls_wrapper): Mark the wrapper as const if no
882 initialization is needed.
883 (handle_tls_init): Don't require aliases.
884
885 2013-01-15 Dodji Seketeli <dodji@redhat.com>
886
887 PR c++/55663
888 * pt.c (coerce_innermost_template_parms): New static function.
889 (instantiate_alias_template): Use it here.
890
891 2013-01-09 Jason Merrill <jason@redhat.com>
892
893 PR c++/55878
894 * rtti.c (build_typeid, get_typeid): Add complain parm.
895 (get_tinfo_decl_dynamic): Likewise.
896 * cp-tree.h, parser.c, pt.c: Adjust.
897
898 PR c++/55893
899 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
900 needs destruction.
901
902 2013-01-09 Jakub Jelinek <jakub@redhat.com>
903
904 PR c/48418
905 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
906 call maybe_constant_value for the negative or too big shift
907 count warnings.
908
909 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
910
911 PR c++/55801
912 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
913 of the argument is true.
914
915 2013-01-08 Joel Brobecker <brobecker@adacore.com>
916
917 * parser.c (cp_parser_initializer_list): Move declaration
918 of variable non_const to start of lexical block.
919
920 2013-01-07 Jason Merrill <jason@redhat.com>
921
922 PR c++/55753
923 * tree.c (build_aggr_init_expr): Do nothing in a template.
924 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
925 a FUNCTION_DECL before tsubsting.
926
927 2013-01-04 Dodji Seketeli <dodji@redhat.com>
928
929 PR c++/52343
930 * pt.c (check_instantiated_arg): Allow type template arguments.
931
932 2013-01-04 Jason Merrill <jason@redhat.com>
933
934 PR c++/55877
935 * decl.c (reset_type_linkage, bt_reset_linkage): New.
936 (grokdeclarator): Use reset_type_linkage.
937 * name-lookup.c (binding_table_foreach): Handle null table.
938 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
939
940 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
941
942 PR c++/54526 (again)
943 * parser.c (cp_parser_template_id): Revert core of previous change
944 (keep adjusted inform message).
945
946 2013-01-03 Jason Merrill <jason@redhat.com>
947
948 PR c++/55419
949 PR c++/55753
950 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
951 TREE_CONSTANT.
952
953 PR c++/55842
954 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
955
956 PR c++/55856
957 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
958
959 PR c++/53650
960 * call.c (type_has_extended_temps): New.
961 * cp-tree.h: Declare it.
962 * decl.c (check_initializer): Use build_aggr_init for arrays
963 if it is false.
964 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
965
966 2013-01-02 Jason Merrill <jason@redhat.com>
967
968 PR c++/54325
969 * call.c (build_new_method_call_1): Don't use build_value_init for
970 user-provided default constructors.
971
972 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
973
974 PR c++/55032
975 PR c++/55245
976 * tree.c (build_cplus_array_type): Copy layout information
977 to main variant if necessary.
978 \f
979 Copyright (C) 2013 Free Software Foundation, Inc.
980
981 Copying and distribution of this file, with or without modification,
982 are permitted in any medium without royalty provided the copyright
983 notice and this notice are preserved.
This page took 0.081769 seconds and 5 git commands to generate.