]> gcc.gnu.org Git - gcc.git/blame_incremental - gcc/cp/ChangeLog
* typeck.c (merge_types): Preserve memfn quals.
[gcc.git] / gcc / cp / ChangeLog
... / ...
CommitLineData
12010-05-19 Jason Merrill <jason@redhat.com>
2
3 * typeck.c (merge_types): Preserve memfn quals.
4
5 * decl.c (grokdeclarator): Don't check quals on fn type.
6 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
7 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
8
9 PR c++/44193
10 * typeck.c (type_memfn_quals): New fn.
11 (apply_memfn_quals): New fn.
12 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
13 (cp_type_readonly): Use cp_type_quals.
14 * cp-tree.h: Add declarations.
15 * tree.c (cp_build_qualified_type_real): Don't set, but do
16 preserve, quals on FUNCTION_TYPE.
17 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
18 * decl.c (build_ptrmem_type): Likewise.
19 (grokdeclarator): Likewise.
20 (static_fn_type): Likewise.
21 * decl2.c (change_return_type): Likewise.
22 (cp_reconstruct_complex_type): Likewise.
23 * pt.c (tsubst_function_type): Likewise.
24 (unify): Likewise.
25 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
26
272010-05-18 Nathan Froyd <froydnj@codesourcery.com>
28
29 * tree.c (build_min_non_dep_call_vec): Update comment.
30
312010-05-17 Jason Merrill <jason@redhat.com>
32
33 * call.c (struct z_candidate): Add explicit_targs field.
34 (add_template_candidate_real): Set it.
35 (build_over_call): Use it to control init-list warning.
36
37 PR c++/44157
38 * call.c (build_over_call): Limit init-list deduction warning to
39 cases where the argument is actually an init-list.
40
41 PR c++/44158
42 * call.c (build_over_call): Don't do bitwise copy for move ctor.
43
442010-05-17 Dodji Seketeli <dodji@redhat.com>
45 Jason Merrill <jason@redhat.com>
46
47 PR c++/44108
48 * decl.c (compute_array_index_type): Call mark_rvalue_use.
49
502010-05-15 Jason Merrill <jason@redhat.com>
51
52 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
53 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
54 TYPE_NOEXCEPT_P.
55 (finish_eh_spec_block): Adjust.
56
572010-05-15 Jakub Jelinek <jakub@redhat.com>
58
59 PR c++/44148
60 * pt.c (tsubst): Unshare template argument.
61
622010-05-15 Steven Bosscher <steven@gcc.gnu.org>
63
64 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
65 * Make-lang.in: Fix dependencies accordingly.
66
672010-05-14 Jason Merrill <jason@redhat.com>
68
69 C++ DR 475
70 * except.c (build_throw): Simplify, adjust for DR 475.
71
72 PR c++/44127
73 * except.c (dtor_nothrow): Return nonzero for type with
74 trivial destructor.
75
76 PR c++/44127
77 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
78 gimple_build_eh_must_not_throw.
79
802010-05-14 Martin Jambor <mjambor@suse.cz>
81
82 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
83 and define.
84
852010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
86
87 * call.c (build_new_method_call): Change warning text.
88 * typeck2.c (build_functional_cast): Change error text.
89
902010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
91
92 PR c++/30566
93 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
94 shadowing the outer parameter or variables by the declaration of
95 nested function in nested structure or class. Warn the shadowing by
96 the declaration of nested lambda expression.
97
982010-05-13 Jason Merrill <jason@redhat.com>
99
100 * typeck.c (cp_build_array_ref): Factor out from...
101 (build_array_ref): ...here. Drop complain parm.
102 (build_new_op): Adjust.
103 * class.c (build_vtbl_ref_1): Adjust.
104 * decl2.c (grok_array_decl): Adjust.
105 * cp-tree.h: Adjust prototypes.
106
1072010-05-13 Jan Hubicka <jh@suse.cz>
108
109 * decl.c (cp_finish_decl): Do not worry about used attribute.
110
1112010-05-12 Jason Merrill <jason@redhat.com>
112
113 * typeck.c (build_array_ref): Take complain parm.
114 * cp-tree.h: Add it to prototype.
115 * call.c (build_new_op): Pass it.
116 * class.c (build_vtbl_ref): Pass it.
117 * decl2.c (grok_array_decl): Pass it.
118
119 PR bootstrap/44048
120 PR target/44099
121 * cp-tree.def (NULLPTR_TYPE): Remove.
122 * cp-tree.h (NULLPTR_TYPE_P): New.
123 (SCALAR_TYPE_P): Use it.
124 (nullptr_type_node): New.
125 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
126 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
127 nullptr_type_node.
128 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
129 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
130 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
131 * mangle.c (write_type): Likewise.
132 * name-lookup.c (arg_assoc_type): Likewise.
133 * typeck.c (build_reinterpret_cast_1): Likewise.
134 * rtti.c (typeinfo_in_lib_p): Likewise.
135 (emit_support_tinfos): Remove local nullptr_type_node.
136
137 * cp-tree.h (UNKNOWN_TYPE): Remove.
138 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
139 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
140 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
141 * class.c (instantiate_type): Check unknown_type_node rather than
142 UNKNOWN_TYPE.
143 * name-lookup.c (maybe_push_decl): Likewise.
144 * rtti.c (get_tinfo_decl_dynamic): Likewise.
145 (get_typeid): Likewise.
146 * semantics.c (finish_offsetof): Likewise.
147
148 PR c++/20669
149 * call.c (add_template_candidate_real): If deduction fails, still
150 add the template as a non-viable candidate.
151 (equal_functions): Handle template candidates.
152 (print_z_candidate): Likewise.
153 (print_z_candidates): Likewise.
154 (build_new_function_call): Likewise.
155
156 * cp-tree.h (LOOKUP_LIST_ONLY): New.
157 * call.c (add_candidates): Enforce it.
158 (build_new_method_call): Try non-list ctor if no viable list ctor.
159 (build_user_type_conversion_1): Likewise.
160
161 * call.c (add_candidates): Distinguish between type(x) and
162 x.operator type().
163 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
164 (build_new_method_call): Give better error for conversion op.
165
166 * call.c (add_candidates): Add first_arg and return_type parms.
167 Add special constructor/conversion op handling.
168 (convert_class_to_reference): Use it.
169 (build_user_type_conversion_1): Likewise.
170 (build_op_call): Likewise.
171 (build_new_method_call): Likewise.
172 (build_new_op): Adjust.
173 (perform_overload_resolution): Adjust.
174
1752010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
176
177 PR c++/34272
178 PR c++/43630
179 PR c++/34491
180 * pt.c (process_partial_specialization): Return error_mark_node
181 in case of unused template parameters in partial specialization.
182
1832010-05-11 Jakub Jelinek <jakub@redhat.com>
184
185 PR c++/44062
186 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
187 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
188 look at its second operand.
189
1902010-05-10 Jason Merrill <jason@redhat.com>
191
192 PR c++/44017
193 * semantics.c (baselink_for_fns): Revert earlier change.
194
195 PR c++/44045
196 * typeck.c (cp_build_modify_expr): Complain about assignment to
197 array from init list.
198
1992010-05-10 Fabien Chêne <fabien.chene@gmail.com>
200
201 PR c++/43719
202 * decl.c (check_initializer): strip array type before checking for
203 uninitialized const or ref members.
204
2052010-05-07 Fabien Chêne <fabien.chene@gmail.com>
206
207 PR c++/43951
208 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
209 error count. Emit errors only if compain is true.
210 (build_new_1): Do not return error_mark_node if
211 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
212 errors. Delay the check for user-provided constructor.
213 (perform_member_init): Adjust.
214 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
215 prototype.
216
2172010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
218 Jason Merrill <jason@redhat.com>
219
220 Add support for C++0x nullptr.
221 * cp-tree.def: Add NULLPTR_TYPE.
222 * cp-tree.h: Add nullptr_node.
223 (cp_tree_index): Add CPTI_NULLPTR.
224 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
225 * call.c (null_ptr_cst_p): Handle nullptr.
226 (standard_conversion): Likewise.
227 (convert_arg_to_ellipsis): Likewise.
228 * mangle.c (write_type): Likewise.
229 * name-lookup.c (arg_assoc_type): Likewise.
230 * parser.c (cp_parser_primary_expression): Likewise.
231 * typeck.c (cp_build_binary_op): Likewise.
232 (build_reinterpret_cast_1): Likewise.
233 * error.c (dump_type): Likewise.
234 (dump_type_prefix, dump_type_suffix): Likewise.
235 * decl.c (cxx_init_decl_processing): Likewise.
236 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
237 * cvt.c (ocp_convert): Likewise.
238 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
239 nullptr_t tinfo in libsupc++.
240
2412010-05-06 Jason Merrill <jason@redhat.com>
242
243 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
244
2452010-04-22 Jakub Jelinek <jakub@redhat.com>
246 Dodji Seketeli <dodji@redhat.com>
247
248 PR c/18624
249 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
250 Declare ...
251 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
252 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
253 (decay_conversion, perform_integral_promotions): Call rvalue_use.
254 (cp_build_unary_op): Call lvalue_use.
255 * decl.c (unused_but_set_errorcount): New variable.
256 (poplevel): Issue -Wunused-but-set-variable diagnostics.
257 (duplicate_decls): Merge DECL_READ_P flags.
258 (start_cleanup_fn): Set DECL_READ_P flag.
259 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
260 * tree.c (rvalue): Call rvalue_use.
261 * pt.c (convert_nontype_argument): Likewise.
262 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
263 finish_decltype_type): Likewise.
264 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
265 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
266 or rvalue_use depending on the expr.
267 * init.c (build_new, build_delete): Likewise.
268 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
269
2702010-05-05 Jason Merrill <jason@redhat.com>
271
272 PR c++/43787
273 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
274 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
275
2762010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
277
278 PR c++/43028
279 * pt.c (unify): Check each elt for error_mark_node.
280
2812010-05-04 Jason Merrill <jason@redhat.com>
282
283 PR c++/38064
284 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
285
2862010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
287
288 PR c++/43705
289 * call.c (build_new_method_call): Return error_mark_node if fns is
290 NULL_TREE.
291
2922010-05-03 Dodji Seketeli <dodji@redhat.com>
293
294 PR c++/43953
295 * pt.c (most_specialized_class): Pretend we are processing
296 a template decl during the call to coerce_template_parms.
297
2982010-05-03 Jason Merrill <jason@redhat.com>
299
300 PR c++/42810
301 PR c++/43680
302 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
303 from the selected underlying type unless -fstrict-enums. Set
304 ENUM_UNDERLYING_TYPE to have the restricted range.
305 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
306 * class.c (check_bitfield_decl): Likewise.
307
3082010-05-01 H.J. Lu <hongjiu.lu@intel.com>
309
310 PR c++/43951
311 * init.c (build_new_1): Revert the accidental checkin in
312 revision 158918.
313
3142010-04-30 Jason Merrill <jason@redhat.com>
315
316 PR c++/43868
317 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
318 (pp_cxx_type_specifier_seq): ...here.
319
3202010-04-30 Steven Bosscher <steven@gcc.gnu.org>
321
322 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
323 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
324
3252010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
326
327 PR c++/43779
328 * typeck.c (warn_args_num): New function.
329 (convert_arguments): Use warn_args_num to print the diagnostic
330 messages.
331
3322010-04-29 Fabien Chêne <fabien.chene@gmail.com>
333
334 PR c++/43890
335 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
336 user-provided constructor while recursing.
337
3382010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
339
340 PR c++/9335
341 * error.c (print_instantiation_partial_context_line): Handle
342 recursive instantiation.
343 (print_instantiation_partial_context): Likewise.
344
3452010-04-27 Jason Merrill <jason@redhat.com>
346
347 * init.c (perform_member_init): Check CLASS_TYPE_P.
348
3492010-04-27 Fabien Chêne <fabien.chene@gmail.com>
350
351 PR c++/29043
352 * init.c (perform_member_init): check for uninitialized const or
353 reference members, including array types.
354
3552010-04-24 Jason Merrill <jason@redhat.com>
356
357 * tree.c (get_fns): Split out from get_first_fn.
358 * cp-tree.h: Declare it.
359 * search.c (shared_member_p): Use it.
360 * semantics.c (finish_qualified_id_expr): Simplify.
361 (finish_id_expression): Simplify.
362
363 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
364 whenever object is NULL_TREE. Don't do 'this' capture here.
365 (finish_qualified_id_expr): Pass NULL_TREE.
366 (finish_id_expression): Likewise.
367 (lambda_expr_this_capture): Likewise.
368
369 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
370 rather than checking current_class_ref directly.
371 (finish_call_expr): Likewise.
372
373 PR c++/43856
374 * name-lookup.c (qualify_lookup): Disqualify lambda op().
375 * class.c (current_nonlambda_class_type): New fn.
376 * semantics.c (nonlambda_method_basetype): New.
377 * cp-tree.h: Declare them.
378 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
379
380 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
381
382 PR c++/43875
383 * semantics.c (lambda_return_type): Complain about
384 braced-init-list.
385
386 PR c++/43790
387 * tree.c (cv_unqualified): Handle error_mark_node.
388
389 PR c++/41468
390 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
391 if we don't want errors.
392
393 PR c++/41468
394 * class.c (convert_to_base): Add complain parameter. Pass
395 ba_quiet to lookup_base if we don't want errors.
396 (build_vfield_ref): Pass complain to convert_to_base.
397 * call.c (convert_like_real): Likewise.
398 (initialize_reference): Likewise.
399 (perform_direct_initialization_if_possible): Pass complain to
400 convert_like_real.
401 * cp-tree.h: Adjust.
402
4032010-04-27 Fabien Chêne <fabien.chene@gmail.com>
404 Jason Merrill <jason@redhat.com>
405
406 PR c++/42844
407 * decl.c (check_for_uninitialized_const_var): Handle classes that need
408 constructing, too.
409 (check_initializer): Call it for classes that need constructing, too.
410 * class.c (in_class_defaulted_default_constructor): New.
411 * cp-tree.h: Declare it.
412
4132010-04-20 Jason Merrill <jason@redhat.com>
414
415 PR c++/9335
416 * init.c (constant_value_1): Treat error_mark_node as a constant
417 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
418 * cvt.c (ocp_convert): Handle getting error_mark_node from
419 integral_constant_value.
420 * decl.c (compute_array_index_type): Likewise.
421
4222010-04-20 Dodji Seketeli <dodji@redhat.com>
423
424 PR c++/43800
425 PR c++/43704
426 * typeck.c (incompatible_dependent_types_p): If one of the
427 compared types if not a typedef then honour their main variant
428 equivalence.
429
4302010-04-20 Jakub Jelinek <jakub@redhat.com>
431
432 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
433
4342010-04-19 Dodji Seketeli <dodji@redhat.com>
435
436 PR c++/43704
437 * typeck.c (structural_comptypes): Test dependent typedefs
438 incompatibility before testing for their main variant based
439 equivalence.
440
4412010-04-19 Jakub Jelinek <jakub@redhat.com>
442
443 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
444 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
445
4462010-04-18 Eric Botcazou <ebotcazou@adacore.com>
447
448 * decl.c (cxx_init_decl_processing): Remove second argument in call to
449 build_common_tree_nodes.
450
4512010-04-14 Jason Merrill <jason@redhat.com>
452
453 PR c++/36625
454 * parser.c (cp_parser_parenthesized_expression_list): Change
455 is_attribute_list parm to int to indicate whether or not to
456 handle initial identifier specially.
457 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
458
4592010-04-13 Jason Merrill <jason@redhat.com>
460
461 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
462 CLASS_TYPE_P.
463 * parser.c (cp_parser_lambda_expression): Complain about lambda in
464 unevaluated context.
465 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
466
4672010-04-12 Jason Merrill <jason@redhat.com>
468
469 PR c++/43641
470 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
471 return value directly.
472
473 * call.c (type_decays_to): Call cv_unqualified for non-class type.
474
4752010-04-12 Fabien Chene <fabien.chene@gmail.com>
476
477 PR c++/25811
478 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
479 * init.c (build_new_1): Check for uninitialized const members and
480 uninitialized reference members, when using new without
481 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
482 (diagnose_uninitialized_cst_or_ref_member): Define, call
483 diagnose_uninitialized_cst_or_ref_member_1.
484 (diagnose_uninitialized_cst_or_ref_member_1): New function.
485
4862010-04-12 Richard Guenther <rguenther@suse.de>
487
488 PR c++/43611
489 * semantics.c (expand_or_defer_fn_1): Do not keep extern
490 template inline functions.
491
4922010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
493
494 PR c++/28584
495 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
496 pointer type.
497
4982010-04-07 Jason Merrill <jason@redhat.com>
499
500 PR c++/43016
501 * decl.c (start_preparsed_function): Do defer nested functions.
502
503 PR c++/11094, DR 408
504 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
505 * decl2.c (finish_static_data_member_decl): Set it.
506 * decl.c (duplicate_decls): Propagate it.
507 * pt.c (tsubst_decl): Don't substitute the domain of an array
508 VAR_DECL if it's set.
509 (regenerate_decl_from_template): Substitute it here.
510 (type_dependent_expression_p): Return true if it's set.
511 * semantics.c (finish_decltype_type): Instantiate such a variable.
512 * typeck.c (cxx_sizeof_expr): Likewise.
513 (strip_array_domain): New.
514
515 PR c++/43145
516 * name-lookup.c (current_decl_namespace): Non-static.
517 (pop_nested_namespace): Sanity check.
518 * cp-tree.h: Declare current_decl_namespace.
519 * decl.c (grokvardecl): Use it instead of current_namespace.
520 (grokfndecl): Likewise.
521
522 PR c++/38392
523 * pt.c (tsubst_friend_function): Instatiate a friend that has already
524 been used.
525
526 * pt.c (print_template_statistics): New.
527 * cp-tree.h: Declare it.
528 * tree.c (cxx_print_statistics): Call it.
529
530 PR c++/41970
531 * decl.c (grokvardecl): Tweak warning message.
532 (grokfndecl): Likewise.
533
5342010-04-07 Dodji Seketeli <dodji@redhat.com>
535
536 PR c++/42697
537 *pt.c (tsubst_decl): Get the arguments of a specialization from
538 the specialization template, not from the most general template.
539
5402010-04-07 Dodji Seketeli <dodji@redhat.com>
541
542 PR c++/40239
543 * typeck2.c (process_init_constructor_record):
544 value-initialize members that are are not explicitely
545 initialized.
546
5472010-04-07 Jie Zhang <jie@codesourcery.com>
548
549 PR c++/42556
550 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
551 when all of its elements are non-constant and have been split out.
552
5532010-04-06 Taras Glek <taras@mozilla.com>
554 Jason Merrill <jason@redhat.com>
555
556 * parser.c (cp_parser_class_specifier): Set class location to that
557 of IDENTIFIER_NODE instead of '{' when possible.
558 * semantics.c (begin_class_definition): Do not overide locations
559 with less precise ones.
560
5612010-04-06 Jason Merrill <jason@redhat.com>
562
563 PR c++/43648
564 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
565
566 PR c++/43621
567 * pt.c (maybe_update_decl_type): Check the return value from
568 push_scope.
569
5702010-04-01 Jason Merrill <jason@redhat.com>
571
572 * decl.c (next_initializable_field): No longer static.
573 * cp-tree.h: Declare it.
574 * call.c (build_aggr_conv): Fail if there are more initializers
575 than initializable fields.
576
577 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
578 instead of void_zero_node.
579
5802010-03-31 Dodji Seketeli <dodji@redhat.com>
581
582 PR c++/43558
583 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
584 * pt.c (end_template_parm_list): Store sibling template parms of
585 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
586 (push_template_decl_real): Don't store the containing template decl
587 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
588 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
589 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
590 Simplify the logic.
591
5922010-03-30 Jason Merrill <jason@redhat.com>
593
594 PR c++/43076
595 * pt.c (push_template_decl_real): Deal better with running out of
596 scopes before running out of template parms.
597
598 PR c++/41185
599 PR c++/41786
600 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
601 function parameter context. Don't print an error if parsing
602 tentatively.
603
604 PR c++/43559
605 * pt.c (more_specialized_fn): Don't control cv-qualifier check
606 with same_type_p.
607
6082010-03-26 Jason Merrill <jason@redhat.com>
609
610 PR c++/43509
611 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
612 c++0x mode, but not other type-names.
613
6142010-03-26 Dodji Seketeli <dodji@redhat.com>
615
616 PR c++/43327
617 * pt.c (add_to_template_args): Support NULL ARGS;
618 (most_specialized_class): call coerce_template_parms on
619 template arguments passed to get_class_bindings. Use
620 add_to_template_args.
621 (unify): Handle VAR_DECLs.
622
6232010-03-26 Dodji Seketeli <dodji@redhat.com>
624
625 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
626 into int.
627 * pt.c (get_template_parms_at_level): Adjust.
628
6292010-03-25 Dodji Seketeli <dodji@redhat.com>
630
631 PR c++/43206
632 * cp-tree.h (get_template_parms_at_level): Declare ...
633 * pt.c (get_template_parms_at_level): ... new function.
634 * typeck.c (get_template_parms_of_dependent_type): If a template
635 type parm's DECL_CONTEXT isn't yet set, get its siblings from
636 current_template_parms. Use get_template_parms_at_level. Remove
637 useless test.
638 (incompatible_dependent_types_p): If we get empty parms from just one
639 of the template type parms we are comparing then the template parms are
640 incompatible.
641
6422010-03-24 Jason Merrill <jason@redhat.com>
643
644 PR c++/43502
645 * parser.c (make_declarator): Initialize id_loc.
646 (cp_parser_lambda_declarator_opt): And set it.
647
6482010-03-23 Jason Merrill <jason@redhat.com>
649
650 Make lambda conversion op and op() non-static.
651 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
652 Also add the thunk function returned by the conversion op.
653 Mark the conversion deleted if the op() is variadic.
654 * decl2.c (mark_used): Give helpful message about deleted conversion.
655 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
656 * semantics.c (finish_this_expr): Adjust.
657 * mangle.c (write_closure_type_name): Adjust.
658 * decl.c (grok_op_properties): Don't allow it.
659 * call.c (build_user_type_conversion_1): No static conversion ops.
660 (build_op_call): Or op().
661
662 * decl2.c (change_return_type): Fix 'this' quals.
663
6642010-03-22 Jason Merrill <jason@redhat.com>
665
666 PR c++/43333
667 * tree.c (pod_type_p): Use old meaning in C++98 mode.
668
669 PR c++/43281
670 * pt.c (contains_auto_r): New fn.
671 (do_auto_deduction): Use it.
672 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
673
6742010-03-20 Simon Martin <simartin@users.sourceforge.net>
675
676 PR c++/43081:
677 * decl2.c (grokfield): Handle invalid initializers for member
678 functions.
679
6802010-03-20 Dodji Seketeli <dodji@redhat.com>
681
682 PR c++/43375
683 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
684 is NULL.
685 * decl2.c (vague_linkage_p): Likewise.
686
6872010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
688
689 PR c++/43418
690 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
691 false, in the cp_parser_expression_statement call.
692
6932010-03-05 Jason Merrill <jason@redhat.com>
694
695 * mangle.c (mangle_decl): Give name collision error even without
696 ASM_OUTPUT_DEF.
697
6982010-03-04 Marco Poletti <poletti.marco@gmail.com>
699
700 * pt.c (process_partial_specialization): Use error_n instead of
701 error.
702
7032010-03-03 Jason Merrill <jason@redhat.com>
704
705 PR c++/12909
706 * mangle.c (mangle_decl): Handle VAR_DECL, too.
707
7082010-03-03 Jason Merrill <jason@redhat.com>
709
710 PR c++/12909
711 * mangle.c: Include cgraph.h.
712 (mangle_decl): If the mangled name will change in a later
713 ABI version, make the later mangled name an alias.
714 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
715 * Make-lang.in (mangle.o): Depend on cgraph.h.
716 * method.c (make_alias_for): Handle VAR_DECL, too.
717 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
718 * tree.c (no_linkage_check): Adjust.
719 * decl.c (maybe_commonize_var): Adjust.
720 * cp-tree.h: Adjust.
721
7222010-03-01 Marco Poletti <poletti.marco@gmail.com>
723
724 * pt.c (redeclare_class_template): Use error_n and inform_n.
725
7262010-02-27 Mark Mitchell <mark@codesourcery.com>
727
728 PR c++/42748
729 * cp-tree.h (push_tinst_level): Declare.
730 (pop_tinst_level): Likewise.
731 * pt.c (push_tinst_level): Give it external linkage.
732 (pop_tinst_level): Likewise.
733 * mangle.c (mangle_decl_string): Set the source location to that
734 of the decl while mangling.
735
7362010-02-27 Simon Martin <simartin@users.sourceforge.net>
737
738 PR c++/42054
739 * pt.c (redeclare_class_template): Return false if there are erroneous
740 template parameters.
741
7422010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
743
744 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
745 -ftemplate-depth=.
746
7472010-02-24 Jason Merrill <jason@redhat.com>
748
749 PR c++/12909
750 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
751
752 * class.c (layout_class_type): Don't give -Wabi warning for a bug
753 in a previous ABI version.
754
7552010-02-23 Jason Merrill <jason@redhat.com>
756
757 PR c++/43143
758 * typeck2.c (digest_init_r): Accept value init of array.
759
7602010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
761
762 PR c++/43126
763 * typeck.c (convert_arguments): Update error message.
764
7652010-02-22 Mike Stump <mikestump@comcast.net>
766
767 PR c++/43125
768 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
769
7702010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
771
772 PR c++/23510
773 * error.c (print_instantiation_partial_context_line): New.
774 (print_instantiation_partial_context): Print at most 12 contexts,
775 skip the rest with a message.
776
7772010-02-21 Dodji Seketeli <dodji@redhat.com>
778
779 PR c++/42824
780 * pt.c (lookup_template_class): Better support of specialization
781 of member of class template implicit instantiation.
782
7832010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
784
785 PR c++/35669
786 * call.c (conversion_null_warnings): Replace -Wconversion with
787 -Wconversion-null.
788 * cvt.c (build_expr_type_conversion): Likewise.
789
7902010-02-18 Jason Merrill <jason@redhat.com>
791
792 PR c++/42837
793 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
794
795 PR c++/43108
796 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
797 C build_binary_op.
798 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
799 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
800
801 PR c++/43070
802 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
803
804 PR c++/26261
805 PR c++/43101
806 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
807 (maybe_update_decl_type): New fn.
808 * parser.c (cp_parser_init_declarator): Use it.
809
810 PR c++/43109
811 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
812
8132010-02-17 Jason Merrill <jason@redhat.com>
814
815 PR c++/43075
816 * call.c (build_over_call): Don't create zero-sized assignments.
817 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
818 * cp-objcp-common.c (cp_expr_size): Remove.
819 * cp-tree.h: Remove prototype.
820
821 PR c++/43069
822 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
823 decl we looked up doesn't match.
824
825 PR c++/43093
826 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
827 have an INIT_EXPR anymore.
828
829 PR c++/43079
830 * pt.c (convert_nontype_argument): Change assert to test.
831
8322010-02-16 Jason Merrill <jason@redhat.com>
833
834 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
835
836 PR c++/43031
837 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
838 VIEW_CONVERT_EXPR for conversions between structural equality types
839 that the back end can't tell are the same.
840
841 PR c++/43036
842 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
843 cv-quals from element here.
844 (cp_build_qualified_type_real): Not here. Preserve typedef name.
845
8462010-02-14 Jason Merrill <jason@redhat.com>
847
848 PR c++/41997
849 * semantics.c (finish_compound_literal): Use
850 cp_apply_type_quals_to_decl when creating a static variable.
851
8522010-02-12 Jason Merrill <jason@redhat.com>
853
854 PR c++/43024
855 * name-lookup.h (current_binding_level): Check for null
856 cp_function_chain.
857
8582010-02-12 Jason Merrill <jason@redhat.com>
859
860 PR c++/43054
861 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
862
8632010-02-12 Jakub Jelinek <jakub@redhat.com>
864
865 PR c++/43033
866 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
867 instead of x.
868
8692010-02-10 Jason Merrill <jason@redhat.com>
870
871 PR c++/41896
872 * semantics.c (outer_lambda_capture_p): Revert.
873 (add_capture): Only finish_member_declaration if
874 we're in the lambda class.
875 (register_capture_members): New.
876 * cp-tree.h: Declare it.
877 * parser.c (cp_parser_lambda_expression): Call it.
878
8792010-02-10 Jason Merrill <jason@redhat.com>
880
881 PR c++/41896
882 * semantics.c (outer_lambda_capture_p): Use current_function_decl
883 instead of current_class_type.
884
8852010-02-10 Jason Merrill <jason@redhat.com>
886
887 PR c++/42983, core issue 906
888 * method.c (defaultable_fn_check): Check virtualness.
889
8902010-02-10 Jason Merrill <jason@redhat.com>
891
892 PR c++/43016
893 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
894
8952010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
896
897 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
898 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
899 translation.
900 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
901 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
902 (cp_parser_parameter_declaration)
903 (cp_parser_exception_specification_opt)
904 (cp_parser_exception_declaration): Likewise.
905 * pt.c (check_default_tmpl_args): Likewise.
906 * search.c (lookup_field_r): Likewise.
907
9082010-02-09 Jason Merrill <jason@redhat.com>
909
910 PR c++/42399
911 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
912
9132010-02-09 Jason Merrill <jason@redhat.com>
914
915 PR c++/42370
916 * decl2.c (change_return_type): New fn.
917 * semantics.c (apply_lambda_return_type): Use it.
918 * cp-tree.h: Declare it.
919
9202010-02-05 Richard Guenther <rguenther@suse.de>
921
922 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
923 * cp-lang.c: Include gt-cp-cp-lang.h.
924 * config-lang.in (gtfiles): Add cp/cp-lang.c.
925
9262010-02-05 Dodji Seketeli <dodji@redhat.com>
927
928 PR c++/42915
929 * typeck.c (get_template_parms_of_dependent_type): Try getting
930 the template parameters fromt the type itself first.
931
9322010-02-03 Jason Merrill <jason@redhat.com>
933
934 PR c++/4926
935 PR c++/38600
936 * mangle.c (write_unqualified_id): Split out from write_expression.
937 (write_unqualified_name): Call it.
938 (write_member_name): Likewise.
939 (write_expression): Support TEMPLATE_ID_EXPR.
940 Disambiguate operator names.
941
942 PR c++/12909
943 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
944 -fabi-version=4.
945
9462010-02-02 Jason Merrill <jason@redhat.com>
947
948 PR c++/41090
949 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
950 * optimize.c (clone_body): Remap their initializers when making base
951 variants.
952 (maybe_clone_body): Complain if multiple clones aren't safe.
953
9542010-01-29 Dodji Seketeli <dodji@redhat.com>
955
956 PR c++/42758
957 PR c++/42634
958 PR c++/42336
959 PR c++/42797
960 PR c++/42880
961 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
962 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
963 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
964 * pt.c (coerce_template_parms, type_unification_real,
965 expand_template_argument_pack, coerce_template_parameter_pack):
966 Set the non default template args count.
967 (current_template_args): Always set non defaulted
968 template args count when compiled with --enable-checking
969 (tsubst_template_args, type_unification_real): Propagate the non
970 defaulted template args count.
971 * error.c (get_non_default_template_args_count): Renamed
972 count_non_default_template_args into this. Don't calculate the
973 non default template argument count anymore. Use the new
974 accessor macros above to get it.
975 (dump_template_argument_list, dump_type, dump_decl,
976 dump_template_parms): Adjust.
977 * parser.c (cp_parser_template_argument_list): Always set defaulted
978 template args count when compiled with --enable-checking.
979
9802010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
981
982 * decl.c (redeclaration_error_message): Wrap the return messages into
983 G_() for easy translation.
984
9852010-01-28 Jason Merrill <jason@redhat.com>
986
987 PR c++/42880
988 * semantics.c (begin_class_definition): Don't use type_as_string.
989
9902010-01-28 Dodji Seketeli <dodji@redhat.com>
991
992 PR c++/42713
993 PR c++/42820
994 * typeck.c (get_template_parms_of_dependent_type): Factorized
995 this out of incompatible_template_type_parms_p
996 (incompatible_dependent_types_p): Renamed
997 incompatible_template_type_parms_p into this. Make it detect
998 two incompatible dependent typedefs too.
999 (structural_comptypes): Use incompatible_dependent_types_p.
1000 * pt.c (get_template_info):
1001 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1002
10032010-01-20 Janis Johnson <janis187@us.ibm.com>
1004 Jason Merrill <jason@redhat.com>
1005
1006 * mangle.c (write_type): Mangle transparent record as member type.
1007 * semantics.c (begin_class_definition): Recognize decimal classes
1008 and set TYPE_TRANSPARENT_AGGR.
1009
10102010-01-20 Jason Merrill <jason@redhat.com>
1011
1012 PR c++/42338
1013 * mangle.c (write_expression): Handle tree codes that have extra
1014 arguments in the middle-end.
1015
10162010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1017
1018 PR c++/42038
1019 * except.c (expand_start_catch_block): Deal correctly with
1020 do_begin_catch returning error_mark_node.
1021
10222010-01-20 Jason Merrill <jason@redhat.com>
1023
1024 PR c++/41788
1025 * class.c (layout_class_type): Set packed_maybe_necessary for packed
1026 non-PODs.
1027
1028 PR c++/41920
1029 * semantics.c (build_lambda_object): Call mark_used on captured
1030 variables.
1031
1032 PR c++/40750
1033 * decl.c (grokdeclarator): Clear type_quals for a member function
1034 declared using a typedef. Don't complain about adding cv-quals
1035 to a function typedef in C++0x mode.
1036
10372010-01-20 Jakub Jelinek <jakub@redhat.com>
1038
1039 * decl.c (create_array_type_for_decl): Remove set but not used
1040 variable error_msg. Remove break stmts after return stmts.
1041
10422010-01-19 Dodji Seketeli <dodji@redhat.com>
1043
1044 * error.c (dump_template_parms, count_non_default_template_args):
1045 Revert fix of PR c++/42634.
1046
10472010-01-18 Dodji Seketeli <dodji@redhat.com>
1048
1049 PR c++/42634
1050 * error.c (dump_template_parms): Use innermost template
1051 arguments before calling count_non_default_template_args.
1052 (count_non_default_template_args): We are being called with
1053 template innermost arguments now. There is no need to ensure
1054 that again.
1055
10562010-01-18 Dodji Seketeli <dodji@redhat.com>
1057
1058 PR c++/42766
1059 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
1060
10612010-01-17 Dodji Seketeli <dodji@redhat.com>
1062
1063 PR c++/42697
1064 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
1065
10662010-01-17 Dodji Seketeli <dodji@redhat.com>
1067
1068 PR c++/42697
1069 *pt.c (tsubst_decl): Get the arguments of a specialization from
1070 the specialization template, not from the most general template.
1071
10722010-01-16 Jason Merrill <jason@redhat.com>
1073
1074 PR c++/42761
1075 * semantics.c (finish_decltype_type): Within a template, treat
1076 unresolved CALL_EXPR as dependent.
1077
10782010-01-15 Dodji Seketeli <dodji@redhat.com>
1079
1080 * error.c (dump_template_parms,count_non_default_template_args):
1081 Revert changes of PR c++/42634.
1082
10832010-01-14 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR middle-end/42674
1086 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
1087 functions with noreturn attribute.
1088
10892010-01-14 Jason Merrill <jason@redhat.com>
1090
1091 PR c++/42701
1092 * call.c (build_new_method_call): Don't free the vec here.
1093
1094 PR c++/42655
1095 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
1096
10972010-01-13 Dodji Seketeli <dodji@redhat.com>
1098
1099 PR c++/42634
1100 * error.c (dump_template_parms): Use innermost template
1101 arguments before calling count_non_default_template_args.
1102 (count_non_default_template_args): We are being called with
1103 template innermost arguments now. There is no need to ensure
1104 that again.
1105
11062010-01-07 Dodji Seketeli <dodji@redhat.com>
1107
1108 c++/40155
1109 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
1110 arguments that were previously deduced.
1111
11122010-01-05 Jason Merrill <jason@redhat.com>
1113
1114 * pt.c (unify_pack_expansion): Handle deduction from init-list.
1115 * call.c (build_over_call): Don't complain about it.
1116
11172010-01-04 Jason Merrill <jason@redhat.com>
1118
1119 PR c++/42555
1120 * pt.c (tsubst_decl): Don't apply type attributes in place.
1121
1122 PR c++/42567
1123 * semantics.c (describable_type): Remove decltype comment and
1124 semantics.
1125
1126
1127\f
1128Copyright (C) 2010 Free Software Foundation, Inc.
1129
1130Copying and distribution of this file, with or without modification,
1131are permitted in any medium without royalty provided the copyright
1132notice and this notice are preserved.
This page took 0.033453 seconds and 5 git commands to generate.