typeck.c (decay_conversion): Any expression with type nullptr_t decays to nullptr.
[gcc.git] / gcc / cp / ChangeLog
1 2010-08-06 Jason Merrill <jason@redhat.com>
2
3 * typeck.c (decay_conversion): Any expression with type nullptr_t
4 decays to nullptr.
5
6 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7
8 PR c++/45112
9 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
10
11 2010-07-27 Jason Merrill <jason@redhat.com>
12
13 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
14 from build_value_init.
15 * init.c (build_value_init_noctor): Give error for unknown array
16 bound.
17
18 2010-07-27 Joseph Myers <joseph@codesourcery.com>
19
20 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
21
22 2010-07-27 Joseph Myers <joseph@codesourcery.com>
23
24 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
25 c_common_initialize_diagnostics.
26 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
27 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
28
29 2010-07-21 Jason Merrill <jason@redhat.com>
30
31 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
32
33 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
34 to cp_finish_decl.
35
36 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
37
38 PR c++/44641
39 * pt.c (instantiate_class_template): Propagate the template's
40 location to its instance.
41
42 2010-07-20 Jason Merrill <jason@redhat.com>
43
44 PR c++/44967
45 * pt.c (tsubst_copy_and_build): Rework last change.
46
47 PR c++/44967
48 * pt.c (tsubst_copy_and_build): Handle partial substitution of
49 CALL_EXPR.
50
51 2010-07-19 Jason Merrill <jason@redhat.com>
52
53 PR c++/44996
54 * semantics.c (finish_decltype_type): Correct decltype
55 of parenthesized rvalue reference variable.
56
57 PR c++/44969
58 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
59 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
60
61 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
62
63 PR c++/44969
64 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
65 parameter.
66 * cp-tree.h: Adjust declaration.
67 * init.c (perform_member_init): Adjust caller.
68 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
69 * typeck2.c (store_init_value): Likewise.
70 (build_functional_cast): Pass complain argument to
71 build_x_compound_expr_from_list.
72
73 2010-07-16 Jason Merrill <jason@redhat.com>
74
75 PR c++/32505
76 * pt.c (process_partial_specialization): Diagnose partial
77 specialization after instantiation.
78 (most_specialized_class): Add complain parm.
79
80 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
81
82 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
83
84 * init.c (build_new_1): Use cp_build_function_call_nary instead of
85 cp_build_function_call.
86
87 2010-07-15 Jason Merrill <jason@redhat.com>
88
89 PR c++/44909
90 * call.c (add_function_candidate): If we're working on an implicit
91 declaration, don't consider candidates that won't match.
92 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
93 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
94
95 Revert:
96 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
97 (TYPE_HAS_USER_OPEQ): New.
98 * decl.c (grok_special_member_properties): Set it.
99 * class.c (add_implicitly_declared_members): Don't lazily declare
100 constructors/operator= if a base or member has a user-declared one.
101 (check_bases_and_members, check_bases): Adjust.
102 (check_field_decls, check_field_decl): Adjust.
103
104 2010-07-15 Anatoly Sokolov <aesok@post.ru>
105
106 * decl.c (integer_three_node): Remove.
107 (cxx_init_decl_processing): Do not initialize the integer_three_node.
108 * cp-tree.h (integer_three_node): Remove.
109
110 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
111
112 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
113 * call.c: Likewise.
114 * class.c: Likewise.
115 * cp-gimplify.c: Likewise.
116 * decl.c: Likewise.
117 * decl2.c: Likewise.
118 * init.c: Likewise.
119 * mangle.c: Likewise.
120 * name-lookup.c: Likewise.
121 * optimize.c: Likewise.
122 * parser.c: Likewise.
123 * pt.c: Likewise.
124 * rtti.c: Likewise.
125 * search.c: Likewise.
126 * semantics.c: Likewise.
127 * typeck.c: Likewise.
128 * typeck2.c: Likewise.
129
130 2010-07-14 Jason Merrill <jason@redhat.com>
131
132 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
133 (build_field_list): Cache field type.
134
135 Implement C++0x unrestricted unions (N2544)
136 * class.c (check_field_decl): Loosen union handling in C++0x.
137 * method.c (walk_field_subobs): Split out from...
138 (synthesized_method_walk): ...here. Set msg before loops.
139 (process_subob_fn): Check for triviality in union members.
140 * init.c (sort_mem_initializers): Splice out uninitialized
141 anonymous unions and union members.
142 (push_base_cleanups): Don't automatically destroy anonymous unions
143 and union members.
144
145 2010-07-13 Jason Merrill <jason@redhat.com>
146
147 PR c++/44909
148 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
149 (TYPE_HAS_USER_OPEQ): New.
150 * decl.c (grok_special_member_properties): Set it.
151 * class.c (add_implicitly_declared_members): Don't lazily declare
152 constructors/operator= if a base or member has a user-declared one.
153 (check_bases_and_members, check_bases): Adjust.
154 (check_field_decls, check_field_decl): Adjust.
155 * method.c (synthesized_method_walk): Initialize check_vdtor.
156
157 PR c++/44540
158 * mangle.c (write_type): Canonicalize.
159 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
160 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
161
162 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
163
164 PR c++/44908
165 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
166 complain argument.
167 * typeck.c (get_delta_difference): Update prototype, add a
168 tsubst_flags_t parameter; update get_delta_difference_1 calls and
169 add checks for error_mark_node.
170 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
171 parameter; update lookup_base call.
172 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
173 parameter; update get_delta_difference call and add check for
174 error_mark_node.
175 (convert_ptrmem): Update prototype, add a tsubst_flags_t
176 parameter; update get_delta_difference call and add check for
177 error_mark_node; update build_ptrmemfunc call.
178 (build_static_cast_1): Adjust convert_ptrmem call.
179 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
180 (cp_build_unary_op): Adjust build_ptrmemfunc call.
181 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
182 and build_ptrmemfunc calls.
183 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
184
185 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
186
187 PR c++/44907
188 * call.c (build_temp): Add tsubst_flags_t complain parameter;
189 adjust build_special_member_call call, pass complain.
190 (convert_like_real): Adjust build_temp call, pass complain.
191
192 2010-07-09 Jason Merrill <jason@redhat.com>
193
194 PR c++/43120
195 * cp-tree.h (BV_LOST_PRIMARY): New macro.
196 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
197 Set BV_LOST_PRIMARY.
198 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
199
200 2010-07-08 Jason Merrill <jason@redhat.com>
201
202 PR c++/43120
203 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
204 virtual bases for covariant thunks.
205
206 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
207
208 * cp-tree.h: Do not include toplev.h.
209
210 2010-07-06 Jason Merrill <jason@redhat.com>
211
212 PR c++/44703
213 * call.c (is_std_init_list): Look through typedefs.
214
215 PR c++/44778
216 * init.c (build_offset_ref): If scope isn't dependent,
217 don't exit early. Look at TYPE_MAIN_VARIANT.
218 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
219
220 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
221
222 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
223
224 * cp-tree.h (impl_conv_void): New type.
225 (convert_to_void): Adjust prototype.
226 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
227 diagnostic for easy translation. Change caller.
228 * typeck.c: Update call to convert_to_void.
229 * semantics.c: Likewise.
230 * init.c: Likewise.
231
232 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
233
234 * decl.c (cp_finish_decl): Call add_local_decl.
235 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
236
237 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
238
239 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
240 throughout.
241
242 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
243
244 PR c++/22138
245 * parser.c (cp_parser_primary_expression): Error if local template is
246 declared.
247
248 2010-07-02 Le-Chun Wu <lcwu@google.com>
249
250 PR/44128
251 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
252 (variable or type) shadows another type.
253
254 2010-07-02 Jakub Jelinek <jakub@redhat.com>
255
256 PR c++/44780
257 * typeck.c (convert_for_assignment): When converting a convertible
258 vector type or objc++ types, call mark_rvalue_use.
259 * typeck2.c (build_m_component_ref): Use return values from
260 mark_rvalue_use or mark_lvalue_use.
261 * class.c (build_base_path): Likewise.
262 * call.c (build_conditional_expr): Likewise.
263
264 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
265
266 PR c++/44039
267 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
268 returns NULL_TREE.
269
270 2010-07-01 Richard Guenther <rguenther@suse.de>
271
272 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
273 predicate we are looking for, allow non-gimplified
274 INDIRECT_REFs.
275
276 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
277
278 PR c++/44628
279 * typeck.c (cp_build_unary_op): Early return error_mark_node when
280 arg is NULL_TREE too.
281 * call.c (convert_class_to_reference): Return error_mark_node when
282 expr is NULL_TREE.
283
284 2010-06-30 Michael Matz <matz@suse.de>
285
286 * repo.c (finish_repo): Fix typo.
287
288 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
289
290 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
291
292 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
293
294 * repo.c (pending_repo): Change type to a VEC.
295 (finish_repo): Adjust for new type of pending_repo.
296 (repo_emit_p): Likewise.
297
298 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
299
300 * tree.c: Include gimple.h. Do not include tree-flow.h
301 * decl.c: Do not include tree-flow.h
302 * Make-lang.in: Adjust dependencies.
303
304 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
305
306 * decl.c (incomplete_var): Declare. Declare VECs containing them.
307 (incomplete_vars): Adjust comment. Change type to a VEC.
308 (maybe_register_incomplete_var): Adjust for new type.
309 (complete_vars): Adjust iteration over incomplete_vars.
310
311 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
312
313 * decl.c (struct named_label_entry): Change type of bad_decls field
314 to a VEC.
315 (poplevel_named_label_1): Adjust for new type of bad_decls.
316 (check_goto): Likewise.
317
318 2010-06-29 Jason Merrill <jason@redhat.com>
319
320 Enable implicitly declared move constructor/operator= (N3053).
321 * class.c (add_implicitly_declared_members): A class with no
322 explicitly declared copy or move constructor gets both declared
323 implicitly, and similarly for operator=.
324 (check_bases): A type with no copy ctor does not inhibit
325 a const copy ctor in a derived class. It does mean the derived
326 one is non-trivial.
327 (check_field_decl): Likewise.
328 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
329 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
330 (trivially_copyable_p): Likewise.
331 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
332 * class.c (finish_struct_bits): Likewise.
333 * tree.c (build_target_expr_with_type): Likewise.
334 * typeck2.c (store_init_value): Likewise.
335
336 Enable implicitly deleted functions (N2346)
337 * class.c (check_bases_and_members): Adjust lambda flags.
338 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
339
340 * decl2.c (mark_used): Adjust error for use of deleted function.
341
342 Machinery to support implicit delete/move.
343 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
344 has_complex_move_ctor, has_complex_move_assign bitfields.
345 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
346 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
347 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
348 (enum special_function_kind): Add sfk_move_assignment.
349 (LOOKUP_SPECULATIVE): New.
350 * call.c (build_over_call): Return early if it's set.
351 (build_over_call): Use trivial_fn_p.
352 * class.c (check_bases): If the base has no default constructor,
353 the derived one is non-trivial. Handle move ctor/op=.
354 (check_field_decl): Likewise.
355 (check_bases_and_members): Handle move ctor/op=.
356 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
357 (type_has_move_constructor, type_has_move_assign): New.
358 * decl.c (grok_special_member_properties): Handle move ctor/op=.
359 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
360 (trivial_fn_p): New.
361 (do_build_copy_constructor): Use it.
362 (do_build_assign_ref): Likewise. Handle move assignment.
363 (build_stub_type, build_stub_object, locate_fn_flags): New.
364 (locate_ctor): Use locate_fn_flags.
365 (locate_copy, locate_dtor): Remove.
366 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
367 (process_subob_fn, synthesized_method_walk): New.
368 (maybe_explain_implicit_delete): New.
369 (implicitly_declare_fn): Use synthesized_method_walk,
370 type_has_trivial_fn, and type_set_nontrivial_flag.
371 (defaulted_late_check): Set DECL_DELETED_FN.
372 (defaultable_fn_check): Handle sfk_move_assignment.
373 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
374 implicitly deleted move ctor/op=.
375 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
376 (lookup_fnfields_slot): New.
377 * semantics.c (omp_clause_info_fndecl): Remove.
378 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
379 get_copy_assign, trivial_fn_p.
380 (trait_expr_value): Adjust call to locate_ctor.
381 * tree.c (special_function_p): Handle sfk_move_assignment.
382
383 * class.c (type_has_virtual_destructor): New.
384 * cp-tree.h: Declare it.
385 * semantics.c (trait_expr_value): Use it.
386
387 * call.c (build_over_call): Only give warnings with tf_warning.
388
389 * name-lookup.c (pop_scope): Handle NULL_TREE.
390
391 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
392 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
393 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
394 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
395 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
396 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
397 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
398 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
399 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
400 (sfk_assignment_operator): Rename to sfk_copy_assignment.
401 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
402 * search.c, semantics.c, tree.c: Adjust.
403
404 * pt.c (dependent_scope_ref_p): Remove.
405 (value_dependent_expression_p): Don't call it.
406 (type_dependent_expression_p): Here either.
407 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
408 if the scope isn't dependent.
409
410 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
411 a reference.
412
413 PR c++/44587
414 * pt.c (has_value_dependent_address): New.
415 (value_dependent_expression_p): Check it.
416 (convert_nontype_argument): Likewise. Call decay_conversion before
417 folding if we want a pointer.
418 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
419 scope is the current instantiation.
420
421 2010-06-28 Jakub Jelinek <jakub@redhat.com>
422
423 PR c++/44682
424 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
425 on expr.
426
427 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
428
429 * init.c: Do not include except.h.
430 * decl.c: Likewise.
431 * expr.c: Likewise.
432 * cp-lang.c: Likewise.
433 * pt.c: Likewise.
434 * semantics.c: Likewise.
435 * decl2.c: Likewise.
436 * except.c: Likewise.
437 (init_exception_processing): Do not set the removed
438 lang_protect_cleanup_actions here.
439 (cp_protect_cleanup_actions): Make non-static and remove prototype.
440 (doing_eh): New, moved from except.c but removed the do_warning flag.
441 (expand_start_catch_block): Update doing_eh call.
442 (expand_end_catch_block): Likewise.
443 (build_throw): Likewise.
444 * cp-tree.h: Prototype cp_protect_cleanup_actions.
445 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
446 cp_protect_cleanup_actions.
447 * Make-lang.in: Update dependencies.
448
449 2010-06-26 Jason Merrill <jason@redhat.com>
450
451 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
452 constructor called with a single argument that takes a reference
453 to the constructor's class.
454 (BAD_CONVERSION_RANK): New.
455 (compare_ics): Use it to compare bad ICSes.
456
457 2010-06-25 Joseph Myers <joseph@codesourcery.com>
458
459 * lang-specs.h: Remove +e handling.
460
461 2010-06-24 Andi Kleen <ak@linux.intel.com>
462
463 * parser.c: (cp_parser_question_colon_clause):
464 Switch to use cp_lexer_peek_token.
465 Call warn_for_omitted_condop. Call pedwarn for omitted
466 middle operand.
467
468 2010-06-22 Jakub Jelinek <jakub@redhat.com>
469
470 PR c++/44619
471 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
472 datum and mark_rvalue_use on component.
473
474 PR c++/44627
475 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
476 the CALL_EXPR has no arguments.
477
478 2010-06-21 Jason Merrill <jason@redhat.com>
479
480 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
481
482 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
483 element type.
484
485 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
486
487 * name-lookup.c (struct arg_lookup): Convert namespaces and
488 classes fields to VEC.
489 (arg_assoc_namespace): Adjust for new type of namespaces.
490 (arg_assoc_class): Adjust for new type of classes.
491 (lookup_arg_dependent): Use make_tree_vector and
492 release_tree_vector.
493 * typeck2.c (build_x_arrow): Use vec_member.
494
495 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
496
497 PR c++/44486
498 * error.c (dump_decl): Better wording for anonymous namespace.
499
500 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
501
502 * class.c (build_vtbl_initializer): Adjust computation of new_position
503 and which entry to add padding for.
504
505 2010-06-16 Jason Merrill <jason@redhat.com>
506
507 * except.c (check_noexcept_r): Return the problematic function.
508 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
509 * pt.c (tsubst_copy_and_build): Pass it.
510 * parser.c (cp_parser_unary_expression): Likewise.
511 * cp-tree.h: Adjust prototype.
512
513 * method.c (defaulted_late_check): Give the defaulted method
514 the same exception specification as the implicit declaration.
515
516 2010-06-15 Jason Merrill <jason@redhat.com>
517
518 * class.c (add_implicitly_declared_members): Implicit assignment
519 operators can also be virtual overriders.
520 * method.c (lazily_declare_fn): Likewise.
521
522 * call.c (convert_like_real): Give "initializing argument of"
523 information for ambiguous conversion. Give source position
524 of function.
525
526 * call.c (print_z_candidates): Do print viable deleted candidates.
527 (joust): Don't choose a deleted function just because its worst
528 conversion is better than another candidate's worst.
529
530 * call.c (convert_like_real): Don't complain about
531 list-value-initialization from an explicit constructor.
532
533 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
534 DECL_SOURCE_LOCATION directly.
535
536 * class.c (type_has_user_provided_default_constructor): Use
537 sufficient_parms_p.
538
539 * call.c (is_subseq): Handle ck_aggr, ck_list.
540 (compare_ics): Treat an aggregate or ambiguous conversion to the
541 same type as involving the same function.
542
543 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
544
545 * typeck.c (convert_for_assignment): Fix comment. Change message
546 format from %d to %qP.
547 (convert_for_initialization): Fix comment.
548
549 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
550
551 * cp-tree.h (expr_list_kind): New type.
552 (impl_conv_rhs): New type.
553 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
554 prototype.
555 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
556 diagnostics for easy translation. Change caller.
557 (convert_for_initialization): Use impl_conv_rhs and change caller.
558 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
559 diagnostics for easy translation. Change caller.
560 * decl.c (bad_spec_place): New enum.
561 (bad_specifiers): Use it and emit the diagnostics for easy
562 translation. Change caller.
563 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
564
565 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
566
567 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
568 to a VEC.
569 * decl2.c (cp_write_global_declarations): Adjust for new type of
570 decl_namespace_list.
571 * name-lookup.c (current_decl_namespace): Likewise.
572 (push_decl_namespace): Likewise.
573 (pop_decl_namespace): Likewise.
574
575 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
576
577 * call.c (build_java_interface_fn_ref): Call build_function_type_list
578 instead of build_function_type.
579 * decl.c (cxx_init_decl_processing): Likewise.
580 (declare_global_var): Likewise.
581 (get_atexit_node): Likewise.
582 (expand_static_init): Likewise.
583 * decl2.c (start_objects): Likewise.
584 (start_static_storage_duration_function): Likewise.
585 * except.c (init_exception_processing): Likewise.
586 (build_exc_ptr): Likewise.
587 (build_throw): Likewise.
588 * rtti.c (throw_bad_cast): Likewise.
589 (throw_bad_typeid): Likewise.
590 (build_dynamic_cast_1): Likewise.
591
592 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
593
594 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
595 (build_op_delete_call): Likewise.
596 (build_over_call): Likewise.
597 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
598 * pt.c (process_partial_specialization): Likewise.
599 (tsubst_template_args): Likewise.
600 * semantics.c (finish_asm_stmt): Likewise.
601
602 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
603
604 * decl.c (record_key_method_defined): New, broken out of ...
605 (finish_function): ... here. Call it.
606 (start_decl): Treat aliases as definitions.
607
608 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
609
610 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
611
612 * pt.c (maybe_process_partial_specialization): Likewise.
613 (register_specialization): Likewise.
614 (add_pending_template): Likewise.
615 (lookup_template_class): Likewise.
616 (push_tinst_level): Likewise.
617
618 * parser.c (cp_lexer_new_main): Likewise.
619 (cp_lexer_new_from_tokens): Likewise.
620 (cp_token_cache_new): Likewise.
621 (cp_parser_context_new): Likewise.
622 (cp_parser_new): Likewise.
623 (cp_parser_nested_name_specifier_opt): Likewise.
624 (cp_parser_template_id): Likewise.
625
626 * name-lookup.c (binding_entry_make): Likewise.
627 (binding_table_construct): Likewise.
628 (binding_table_new): Likewise.
629 (cxx_binding_make): Likewise.
630 (pushdecl_maybe_friend): Likewise.
631 (begin_scope): Likewise.
632 (push_to_top_level): Likewise.
633
634 * lex.c (init_reswords): Likewise.
635 (retrofit_lang_decl): Likewise.
636 (cxx_dup_lang_specific_decl): Likewise.
637 (copy_lang_type): Likewise.
638 (cxx_make_type): Likewise.
639
640 * decl.c (make_label_decl): Likewise.
641 (check_goto): Likewise.
642 (start_preparsed_function): Likewise.
643 (save_function_data): Likewise.
644
645 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
646
647 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
648
649 * class.c (finish_struct_1): Likewise.
650
651 * cp-tree.h (struct lang_type): Add variable_size GTY option.
652 (struct lang_decl): Likewise.
653
654 * parser.c (cp_parser_new): Update comment to not reference
655 ggc_alloc.
656
657 2010-06-07 Jason Merrill <jason@redhat.com>
658
659 PR c++/44366
660 * error.c (dump_parameters): Mask out TFF_SCOPE.
661 (dump_simple_decl): Don't print the scope of a PARM_DECL.
662 (dump_scope): Remove no-op mask.
663
664 PR c++/44401
665 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
666
667 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
668 * init.c (build_offset_ref): Use it.
669 * pt.c (maybe_process_partial_specialization): Use it.
670 (instantiate_class_template): Use it.
671 * search.c (lookup_base): Use it.
672
673 2010-06-07 Jakub Jelinek <jakub@redhat.com>
674
675 PR c++/44444
676 * expr.c (mark_exp_read): Handle INDIRECT_REF.
677 * cvt.c (convert_to_void): Handle INDIRECT_REF like
678 handled_component_p.
679
680 PR c++/44443
681 * decl.c (initialize_local_var): If TREE_USED is set on the type,
682 set also DECL_READ_P on the decl.
683
684 2010-05-25 Dodji Seketeli <dodji@redhat.com>
685
686 PR c++/44188
687 * cp-tree.h (typedef_variant_p): Move this declaration to
688 gcc/tree.h.
689 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
690 * decl.c (grokdeclarator): Do not rename debug info of an
691 anonymous tagged type named by a typedef.
692
693 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
694
695 PR c++/44086
696 * class.c (check_field_decls): Move the call to
697 check_bitfield_decl before trying to set the
698 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
699
700 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
701
702 * typeck.c: Update include path for moved files.
703 * decl.c: Likewise.
704 * rtti.c: Likewise.
705 * cp-gimplify.c: Likewise.
706 * cp-lang.c: Likewise.
707 * pt.c: Likewise.
708 * semantics.c: Likewise.
709 * cxx-pretty-print.h: Likewise.
710 * decl2.c: Likewise.
711 * parser.c: Likewise.
712 * cp-objcp-common.c: Likewise.
713 * cp-tree.h: Likewise.
714 * name-lookup.c: Likewise.
715 * lex.c: Likewise.
716 * name-lookup.h: Likewise.
717 * config-lang.in: Update paths in gtfiles for files in c-family/.
718 * Make-lang.in: Likewise.
719
720 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
721
722 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
723 * typeck.c (build_ptrmemfunc): Likewise.
724
725 2010-06-04 Jason Merrill <jason@redhat.com>
726
727 * typeck2.c (merge_exception_specifiers): Adjust merging of
728 throw() and noexcept(true).
729
730 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
731 using an uninitialized variable.
732
733 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
734 (pp_cxx_expression): Likewise.
735
736 Implement noexcept-specification (15.4)
737 * parser.c (cp_parser_exception_specification_opt): Parse it.
738 Give -Wdeprecated warning about throw() specs.
739 * pt.c (tsubst_exception_specification): Handle it.
740 * error.c (dump_exception_spec): Handle it.
741 (dump_expr): Handle NOEXCEPT_EXPR.
742 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
743 * typeck.c (comp_except_specs): Handle compatibility rules.
744 Change exact parm to take an enum.
745 * typeck2.c (merge_exception_specifiers): Handle noexcept.
746 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
747 (type_throw_all_p, build_noexcept_spec): New fns.
748 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
749 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
750 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
751 (noexcept_true_spec, noexcept_false_spec): New macros.
752 * name-lookup.c (pushdecl_maybe_friend): Adjust.
753 * search.c (check_final_overrider): Adjust.
754 * decl.c (check_redeclaration_exception_specification): Adjust.
755 (use_eh_spec_block): Use type_throw_all_p.
756 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
757 Give operator new a noexcept-specification in C++0x mode.
758 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
759 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
760
761 Implement noexcept operator (5.3.7)
762 * cp-tree.def (NOEXCEPT_EXPR): New.
763 * except.c (check_noexcept_r, finish_noexcept_expr): New.
764 * cp-tree.h: Declare finish_noexcept_expr.
765 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
766 * pt.c (tsubst_copy_and_build): And tsubst it.
767 (type_dependent_expression_p): Handle it.
768 (value_dependent_expression_p): Handle it.
769
770 * call.c (build_conditional_expr): Never fold in unevaluated context.
771 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
772 * semantics.c (simplify_aggr_init_expr): Likewise.
773 * typeck.c (merge_types): Call merge_exception_specifiers.
774 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
775 DECL_ANTICIPATED for preferring new type.
776
777 2010-06-04 Joseph Myers <joseph@codesourcery.com>
778
779 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
780 diagnostics.
781
782 2010-06-04 Jakub Jelinek <jakub@redhat.com>
783
784 PR c++/44412
785 * typeck.c (build_class_member_access_expr): Call mark_exp_read
786 on object for static data members.
787
788 2010-06-04 Jakub Jelinek <jakub@redhat.com>
789 Jason Merrill <jason@redhat.com>
790
791 PR c++/44362
792 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
793 with the same type, call mark_lvalue_use on both.
794
795 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
796
797 * class.c (struct vtbl_init_data_s): Remove last_init field.
798 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
799 to a VEC.
800 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
801 initializers.
802 (build_vtt): Likewise.
803 (initialize_vtable): Take a VEC instead of a tree.
804 (build_vtt_inits): Change return type to void. Take a VEC **
805 instead of a tree *; accumulate results into said VEC.
806 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
807 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
808 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
809 instead of a tree.
810 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
811 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
812 into it.
813 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
814 rather than tree_cons.
815 (build_vbase_offset_vtbl_entries): Likewise.
816 (add_vcall_offset): Likewise.
817 (build_rtti_vtbl_entries): Likewise.
818 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
819 * decl.c (initialize_artificial_var): Use build_constructor instead
820 of build_constructor_from_list.
821
822 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
823
824 PR c++/44294
825 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
826 bit-field.
827
828 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
829
830 * parser.c (cp_parser_mem_initializer_list): Change error text.
831
832 2010-06-02 Jakub Jelinek <jakub@redhat.com>
833
834 * cp-objcp-common.c (shadowed_var_for_decl): Change into
835 tree_decl_map hashtab from tree_map.
836 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
837 (init_shadowed_var_for_decl): Adjust initialization.
838
839 PR c++/44361
840 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
841 instead of calling mark_exp_read only when not an assignment.
842
843 PR debug/44367
844 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
845 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
846 Set DECL_VALUE_EXPR on var.
847
848 2010-06-02 Jason Merrill <jason@redhat.com>
849
850 * error.c (dump_type): Improve typedef handling.
851
852 PR c++/9726
853 PR c++/23594
854 PR c++/44333
855 * name-lookup.c (same_entity_p): New.
856 (ambiguous_decl): Multiple declarations of the same entity
857 are not ambiguous.
858
859 2010-06-01 Jason Merrill <jason@redhat.com>
860
861 DR 990
862 * call.c (add_list_candidates): Prefer the default constructor.
863 (build_aggr_conv): Treat missing initializers like { }.
864 * typeck2.c (process_init_constructor_record): Likewise.
865 * init.c (expand_default_init): Use digest_init for
866 direct aggregate initialization, too.
867
868 * call.c (add_list_candidates): Split out...
869 (build_user_type_conversion_1): ...from here.
870 (build_new_method_call): And here.
871 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
872
873 PR c++/44358
874 * call.c (build_list_conv): Set list-initialization flags properly.
875
876 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
877
878 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
879
880 2010-06-01 Arnaud Charlet <charlet@adacore.com>
881 Matthew Gingell <gingell@adacore.com>
882
883 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
884 * decl2.c: Include langhooks.h and c-ada-spec.h.
885 (cpp_check, collect_source_refs, collect_ada_namespace,
886 collect_all_refs): New functions.
887 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
888 * lang-specs.h: Ditto.
889
890 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
891
892 * cp-tree.h (cp_build_function_call_nary): Declare.
893 * typeck.c (cp_build_function_call_nary): Define.
894 * decl.c (register_dtor_fn): Use it instead of
895 cp_build_function_call.
896 (cxx_maybe_build_cleanup): Likewise.
897 * decl2.c (generate_ctor_or_dtor_function): Likewise.
898 * except.c (do_get_exception_ptr): Likewise.
899 (do_begin_catch): Likewise.
900 (do_allocate_exception): Likewise.
901 (do_free_exception): Likewise.
902 (build_throw): Likewise. Use cp_build_function_call_vec instead
903 of cp_build_function_call.
904 (do_end_catch): Likewise.
905
906 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
907
908 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
909 (struct cp_declarator): Move id_loc field up.
910
911 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
912
913 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
914 this file is included before c-common.h. Define GCC_DIAG_STYLE
915 before including diagnostic-core.h and toplev.h.
916 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
917 * pt.c: Include cp-tree.h before c-common.h.
918
919 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
920
921 * tree.c (c_register_addr_space): Add stub.
922
923 2010-05-28 Joseph Myers <joseph@codesourcery.com>
924
925 * g++spec.c (lang_specific_driver): Use fatal_error instead of
926 fatal.
927
928 2010-05-28 Dodji Seketeli <dodji@redhat.com>
929
930 Revert fix of PR c++/44188
931 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
932 gcc/tree.h.
933 * tree.c (typedef_variant_p): Revert moving this definition to
934 gcc/tree.c.
935 * decl.c (grokdeclarator): Revert naming typedef handling.
936
937 2010-05-27 Joseph Myers <joseph@codesourcery.com>
938
939 * call.c: Include diagnostic-core.h instead of diagnostic.h.
940 * cp-lang.c: Don't include diagnostic.h
941 * name-lookup.c: Include diagnostic-core.h instead of
942 diagnostic.h.
943 (cp_emit_debug_info_for_using): Use seen_error.
944 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
945 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
946 * pt.c (iterative_hash_template_arg): Use seen_error.
947 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
948 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
949 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
950 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
951 dependencies.
952
953 2010-05-25 Dodji Seketeli <dodji@redhat.com>
954
955 PR c++/44188
956 * cp-tree.h (typedef_variant_p): Move this declaration to
957 gcc/tree.h.
958 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
959 * decl.c (grokdeclarator): Do not rename debug info of an
960 anonymous tagged type named by a typedef.
961
962 2010-05-27 Jason Merrill <jason@redhat.com>
963
964 PR c++/43555
965 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
966 anonymous VLA size.
967
968 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
969
970 PR bootstrap/44287
971 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
972 * class.c (layout_class_type): Likewise.
973 * decl.c (finish_enum): Likewise.
974 * mangle.c (write_builitin_type): Likewise.
975
976 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
977
978 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
979 explicit_int128_p.
980 * decl.c (grokdeclarator): Handle __int128.
981 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
982 (cp_parser_simple_type_specifier): Likewise.
983 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
984 * typeck.c (cp_common_type): Handle __int128.
985 * mangle.c (integer_type_codes): Add itk_int128 and
986 itk_unsigned_int128.
987
988 2010-05-26 Jason Merrill <jason@redhat.com>
989
990 PR c++/43382
991 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
992 unification.
993
994 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
995
996 * cp-lang.c: Do not include expr.h.
997
998 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
999
1000 * decl.c: Do not include rtl.h
1001 * semantics.c: Likewise.
1002
1003 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1004
1005 * cp-tree.h: Do not include splay-tree.h.
1006 (struct prtmem_cst): Remove unused field and false comment.
1007 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1008 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1009 * init.c: Do not include rtl.h and expr.h.
1010 * class.c: Do not include rtl.h. Include splay-tree.h.
1011 (build_clone): Use plain NULL instead of NULL_RTX.
1012 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1013 included. Include splay-tree.h.
1014 * method.c: Do not include rtl.h and expr.h.
1015 (use_thunk): Use plain NULL instead of NULL_RTX.
1016 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1017 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1018 and target.h. Include splay-tree.h.
1019 * expr.c: Do not include rtl.h and expr.h.
1020 * pt.c: Do not include obstack.h and rtl.h.
1021 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1022 (tsubst_decl): Likewise.
1023 (instantiate_decl): Likewise.
1024 * semantics.c: Do not include exprt.h and debug.h. Explain why
1025 rtl.h has to be included.
1026 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1027 * call.c: Do not include rtl.h and expr.h.
1028 * search.c: Do not include obstack.h and rtl.h.
1029 * friend.c: Do not include rtl.h and expr.h.
1030 * Make-lang.in: Update dependencies.
1031
1032 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1033
1034 PR c++/18249
1035 * parser.c (non_integral_constant): Add NIC_NONE.
1036 (required_token): Add RT_NONE.
1037 (cp_parser_unary_expression): Initialize non_constant_p
1038 to NIC_NONE.
1039 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1040 (cp_parser_primary_expression, cp_parser_postfix_expression,
1041 cp_parser_cast_expression, cp_parser_binary_expression,
1042 cp_parser_functional_cast): Fix formatting.
1043
1044 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1045
1046 PR c++/18249
1047 * parser.c: Remove inclusion of dyn-string.h.
1048 (non_integral_constant): New enum.
1049 (name_lookup_error): New enum.
1050 (required_token): New enum.
1051 (cp_parser_required_error): New function.
1052 (cp_parser_require): Change the type of variable token_desc to
1053 required_token and use cp_parser_required_error.
1054 (cp_parser_require_keyword): Likewise.
1055 (cp_parser_error): Use gmsgid as parameter.
1056 (cp_parser_name_lookup_error): Change the type of variable desired to
1057 name_lookup_error and put the diagnostic in the full sentences. Change
1058 caller.
1059 (cp_parser_non_integral_constant_expression): Change the type of the
1060 variable thing to non_integral_constant and put the diagnostics in
1061 full sentences. Change caller.
1062
1063 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1064
1065 PR middle-end/44100
1066 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1067
1068 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1069
1070 * error.c (cp_diagnostic_starter): Update call to
1071 diagnostic_build_prefix.
1072 (cp_print_error_function,
1073 print_instantiation_partial_context_line): Check show_column flag
1074 in context.
1075
1076 2010-05-24 Jason Merrill <jason@redhat.com>
1077
1078 PR c++/41510
1079 * decl.c (check_initializer): Don't wrap an init-list in a
1080 TREE_LIST.
1081 * init.c (build_aggr_init): Don't assume copy-initialization if
1082 init has CONSTRUCTOR_IS_DIRECT_INIT.
1083 * call.c (build_new_method_call): Sanity check.
1084
1085 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1086
1087 * rtti.c (tinfo_base_init): Use build_constructor instead of
1088 build_constructor_from_list. Don't cons a tree node for
1089 returning.
1090 (generic_initializer): Use build_constructor_single instead of
1091 build_constructor_from_list.
1092 (ptr_initializer): Use build_constructor instead of
1093 build_constructor_from_list
1094 (ptm_initializer): Likewise.
1095 (class_initializer): Likewise. Take varargs instead of TRAIL.
1096 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1097 build_constructor instead of build_constructor_from_list.
1098
1099 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1100
1101 * semantics.c: Include bitmap.h.
1102 * Make-lang.in: Update dependencies.
1103
1104 2010-05-22 Jan Hubicka <jh@suse.cz>
1105
1106 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1107 comdat vtables.
1108 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1109
1110 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1111
1112 * cxx-pretty-print.c: Correct merge error.
1113
1114 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1115
1116 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1117 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1118 (cp_printer): Handle %K here using percent_K_format.
1119 * cxx-pretty-print.c: Include tree-pretty-print.h.
1120 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1121 dependencies.
1122
1123 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1124
1125 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1126 Clean up redundant includes.
1127
1128 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1129
1130 PR c++/30298
1131 * decl.c (xref_basetypes): Return false in case of ill-formed
1132 redefinition.
1133
1134 2010-05-19 Jason Merrill <jason@redhat.com>
1135
1136 * call.c (reference_binding): Use cp_build_qualified_type_real
1137 and cp_type_quals consistently.
1138 (add_function_candidate): Likewise.
1139 (build_conditional_expr): Likewise.
1140 (convert_like_real): Likewise.
1141 (type_passed_as): Likewise.
1142 * class.c (add_method): Likewise.
1143 (same_signature_p): Likewise.
1144 (layout_class_type): Likewise.
1145 * decl.c (cxx_init_decl_processing): Likewise.
1146 (cp_fname_init): Likewise.
1147 (grokdeclarator): Likewise.
1148 * decl2.c (cp_reconstruct_complex_type): Likewise.
1149 * init.c (build_new_1): Likewise.
1150 * method.c (do_build_copy_constructor): Likewise.
1151 (implicitly_declare_fn): Likewise.
1152 * pt.c (tsubst_aggr_type): Likewise.
1153 (tsubst): Likewise.
1154 * rtti.c (init_rtti_processing): Likewise.
1155 (build_headof): Likewise.
1156 (build_dynamic_cast_1): Likewise.
1157 (tinfo_base_init): Likewise.
1158 (emit_support_tinfos): Likewise.
1159 * semantics.c (capture_decltype): Likewise.
1160 * tree.c (cv_unqualified): Likewise.
1161 * typeck.c (composite_pointer_type): Likewise.
1162 (string_conv_p): Likewise.
1163
1164 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1165
1166 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1167 * decl.c (start_decl): Likewise.
1168 * semantics.c (finish_compound_literal): Likewise.
1169 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1170 (cp_type_readonly): Remove.
1171 * cp-tree.h: Remove declaration.
1172
1173 * typeck.c (merge_types): Preserve memfn quals.
1174
1175 * decl.c (grokdeclarator): Don't check quals on fn type.
1176 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1177 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1178
1179 PR c++/44193
1180 * typeck.c (type_memfn_quals): New fn.
1181 (apply_memfn_quals): New fn.
1182 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1183 (cp_type_readonly): Use cp_type_quals.
1184 * cp-tree.h: Add declarations.
1185 * tree.c (cp_build_qualified_type_real): Don't set, but do
1186 preserve, quals on FUNCTION_TYPE.
1187 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1188 * decl.c (build_ptrmem_type): Likewise.
1189 (grokdeclarator): Likewise.
1190 (static_fn_type): Likewise.
1191 * decl2.c (change_return_type): Likewise.
1192 (cp_reconstruct_complex_type): Likewise.
1193 * pt.c (tsubst_function_type): Likewise.
1194 (unify): Likewise.
1195 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1196
1197 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1198
1199 * tree.c (build_min_non_dep_call_vec): Update comment.
1200
1201 2010-05-17 Jason Merrill <jason@redhat.com>
1202
1203 * call.c (struct z_candidate): Add explicit_targs field.
1204 (add_template_candidate_real): Set it.
1205 (build_over_call): Use it to control init-list warning.
1206
1207 PR c++/44157
1208 * call.c (build_over_call): Limit init-list deduction warning to
1209 cases where the argument is actually an init-list.
1210
1211 PR c++/44158
1212 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1213
1214 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1215 Jason Merrill <jason@redhat.com>
1216
1217 PR c++/44108
1218 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1219
1220 2010-05-15 Jason Merrill <jason@redhat.com>
1221
1222 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1223 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1224 TYPE_NOEXCEPT_P.
1225 (finish_eh_spec_block): Adjust.
1226
1227 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1228
1229 PR c++/44148
1230 * pt.c (tsubst): Unshare template argument.
1231
1232 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1233
1234 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1235 * Make-lang.in: Fix dependencies accordingly.
1236
1237 2010-05-14 Jason Merrill <jason@redhat.com>
1238
1239 C++ DR 475
1240 * except.c (build_throw): Simplify, adjust for DR 475.
1241
1242 PR c++/44127
1243 * except.c (dtor_nothrow): Return nonzero for type with
1244 trivial destructor.
1245
1246 PR c++/44127
1247 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1248 gimple_build_eh_must_not_throw.
1249
1250 2010-05-14 Martin Jambor <mjambor@suse.cz>
1251
1252 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1253 and define.
1254
1255 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1256
1257 * call.c (build_new_method_call): Change warning text.
1258 * typeck2.c (build_functional_cast): Change error text.
1259
1260 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1261
1262 PR c++/30566
1263 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1264 shadowing the outer parameter or variables by the declaration of
1265 nested function in nested structure or class. Warn the shadowing by
1266 the declaration of nested lambda expression.
1267
1268 2010-05-13 Jason Merrill <jason@redhat.com>
1269
1270 * typeck.c (cp_build_array_ref): Factor out from...
1271 (build_array_ref): ...here. Drop complain parm.
1272 (build_new_op): Adjust.
1273 * class.c (build_vtbl_ref_1): Adjust.
1274 * decl2.c (grok_array_decl): Adjust.
1275 * cp-tree.h: Adjust prototypes.
1276
1277 2010-05-13 Jan Hubicka <jh@suse.cz>
1278
1279 * decl.c (cp_finish_decl): Do not worry about used attribute.
1280
1281 2010-05-12 Jason Merrill <jason@redhat.com>
1282
1283 * typeck.c (build_array_ref): Take complain parm.
1284 * cp-tree.h: Add it to prototype.
1285 * call.c (build_new_op): Pass it.
1286 * class.c (build_vtbl_ref): Pass it.
1287 * decl2.c (grok_array_decl): Pass it.
1288
1289 PR bootstrap/44048
1290 PR target/44099
1291 * cp-tree.def (NULLPTR_TYPE): Remove.
1292 * cp-tree.h (NULLPTR_TYPE_P): New.
1293 (SCALAR_TYPE_P): Use it.
1294 (nullptr_type_node): New.
1295 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1296 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1297 nullptr_type_node.
1298 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1299 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1300 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1301 * mangle.c (write_type): Likewise.
1302 * name-lookup.c (arg_assoc_type): Likewise.
1303 * typeck.c (build_reinterpret_cast_1): Likewise.
1304 * rtti.c (typeinfo_in_lib_p): Likewise.
1305 (emit_support_tinfos): Remove local nullptr_type_node.
1306
1307 * cp-tree.h (UNKNOWN_TYPE): Remove.
1308 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1309 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1310 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1311 * class.c (instantiate_type): Check unknown_type_node rather than
1312 UNKNOWN_TYPE.
1313 * name-lookup.c (maybe_push_decl): Likewise.
1314 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1315 (get_typeid): Likewise.
1316 * semantics.c (finish_offsetof): Likewise.
1317
1318 PR c++/20669
1319 * call.c (add_template_candidate_real): If deduction fails, still
1320 add the template as a non-viable candidate.
1321 (equal_functions): Handle template candidates.
1322 (print_z_candidate): Likewise.
1323 (print_z_candidates): Likewise.
1324 (build_new_function_call): Likewise.
1325
1326 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1327 * call.c (add_candidates): Enforce it.
1328 (build_new_method_call): Try non-list ctor if no viable list ctor.
1329 (build_user_type_conversion_1): Likewise.
1330
1331 * call.c (add_candidates): Distinguish between type(x) and
1332 x.operator type().
1333 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1334 (build_new_method_call): Give better error for conversion op.
1335
1336 * call.c (add_candidates): Add first_arg and return_type parms.
1337 Add special constructor/conversion op handling.
1338 (convert_class_to_reference): Use it.
1339 (build_user_type_conversion_1): Likewise.
1340 (build_op_call): Likewise.
1341 (build_new_method_call): Likewise.
1342 (build_new_op): Adjust.
1343 (perform_overload_resolution): Adjust.
1344
1345 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1346
1347 PR c++/34272
1348 PR c++/43630
1349 PR c++/34491
1350 * pt.c (process_partial_specialization): Return error_mark_node
1351 in case of unused template parameters in partial specialization.
1352
1353 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c++/44062
1356 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1357 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1358 look at its second operand.
1359
1360 2010-05-10 Jason Merrill <jason@redhat.com>
1361
1362 PR c++/44017
1363 * semantics.c (baselink_for_fns): Revert earlier change.
1364
1365 PR c++/44045
1366 * typeck.c (cp_build_modify_expr): Complain about assignment to
1367 array from init list.
1368
1369 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1370
1371 PR c++/43719
1372 * decl.c (check_initializer): strip array type before checking for
1373 uninitialized const or ref members.
1374
1375 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1376
1377 PR c++/43951
1378 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1379 error count. Emit errors only if compain is true.
1380 (build_new_1): Do not return error_mark_node if
1381 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1382 errors. Delay the check for user-provided constructor.
1383 (perform_member_init): Adjust.
1384 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1385 prototype.
1386
1387 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1388 Jason Merrill <jason@redhat.com>
1389
1390 Add support for C++0x nullptr.
1391 * cp-tree.def: Add NULLPTR_TYPE.
1392 * cp-tree.h: Add nullptr_node.
1393 (cp_tree_index): Add CPTI_NULLPTR.
1394 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1395 * call.c (null_ptr_cst_p): Handle nullptr.
1396 (standard_conversion): Likewise.
1397 (convert_arg_to_ellipsis): Likewise.
1398 * mangle.c (write_type): Likewise.
1399 * name-lookup.c (arg_assoc_type): Likewise.
1400 * parser.c (cp_parser_primary_expression): Likewise.
1401 * typeck.c (cp_build_binary_op): Likewise.
1402 (build_reinterpret_cast_1): Likewise.
1403 * error.c (dump_type): Likewise.
1404 (dump_type_prefix, dump_type_suffix): Likewise.
1405 * decl.c (cxx_init_decl_processing): Likewise.
1406 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1407 * cvt.c (ocp_convert): Likewise.
1408 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1409 nullptr_t tinfo in libsupc++.
1410
1411 2010-05-06 Jason Merrill <jason@redhat.com>
1412
1413 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1414
1415 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1416 Dodji Seketeli <dodji@redhat.com>
1417
1418 PR c/18624
1419 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1420 Declare ...
1421 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1422 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1423 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1424 (cp_build_unary_op): Call lvalue_use.
1425 * decl.c (unused_but_set_errorcount): New variable.
1426 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1427 (duplicate_decls): Merge DECL_READ_P flags.
1428 (start_cleanup_fn): Set DECL_READ_P flag.
1429 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1430 * tree.c (rvalue): Call rvalue_use.
1431 * pt.c (convert_nontype_argument): Likewise.
1432 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1433 finish_decltype_type): Likewise.
1434 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1435 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1436 or rvalue_use depending on the expr.
1437 * init.c (build_new, build_delete): Likewise.
1438 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1439
1440 2010-05-05 Jason Merrill <jason@redhat.com>
1441
1442 PR c++/43787
1443 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1444 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1445
1446 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1447
1448 PR c++/43028
1449 * pt.c (unify): Check each elt for error_mark_node.
1450
1451 2010-05-04 Jason Merrill <jason@redhat.com>
1452
1453 PR c++/38064
1454 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1455
1456 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1457
1458 PR c++/43705
1459 * call.c (build_new_method_call): Return error_mark_node if fns is
1460 NULL_TREE.
1461
1462 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1463
1464 PR c++/43953
1465 * pt.c (most_specialized_class): Pretend we are processing
1466 a template decl during the call to coerce_template_parms.
1467
1468 2010-05-03 Jason Merrill <jason@redhat.com>
1469
1470 PR c++/42810
1471 PR c++/43680
1472 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1473 from the selected underlying type unless -fstrict-enums. Set
1474 ENUM_UNDERLYING_TYPE to have the restricted range.
1475 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1476 * class.c (check_bitfield_decl): Likewise.
1477
1478 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1479
1480 PR c++/43951
1481 * init.c (build_new_1): Revert the accidental checkin in
1482 revision 158918.
1483
1484 2010-04-30 Jason Merrill <jason@redhat.com>
1485
1486 PR c++/43868
1487 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1488 (pp_cxx_type_specifier_seq): ...here.
1489
1490 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1491
1492 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1493 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1494
1495 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1496
1497 PR c++/43779
1498 * typeck.c (warn_args_num): New function.
1499 (convert_arguments): Use warn_args_num to print the diagnostic
1500 messages.
1501
1502 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1503
1504 PR c++/43890
1505 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1506 user-provided constructor while recursing.
1507
1508 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1509
1510 PR c++/9335
1511 * error.c (print_instantiation_partial_context_line): Handle
1512 recursive instantiation.
1513 (print_instantiation_partial_context): Likewise.
1514
1515 2010-04-27 Jason Merrill <jason@redhat.com>
1516
1517 * init.c (perform_member_init): Check CLASS_TYPE_P.
1518
1519 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1520
1521 PR c++/29043
1522 * init.c (perform_member_init): check for uninitialized const or
1523 reference members, including array types.
1524
1525 2010-04-24 Jason Merrill <jason@redhat.com>
1526
1527 * tree.c (get_fns): Split out from get_first_fn.
1528 * cp-tree.h: Declare it.
1529 * search.c (shared_member_p): Use it.
1530 * semantics.c (finish_qualified_id_expr): Simplify.
1531 (finish_id_expression): Simplify.
1532
1533 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1534 whenever object is NULL_TREE. Don't do 'this' capture here.
1535 (finish_qualified_id_expr): Pass NULL_TREE.
1536 (finish_id_expression): Likewise.
1537 (lambda_expr_this_capture): Likewise.
1538
1539 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1540 rather than checking current_class_ref directly.
1541 (finish_call_expr): Likewise.
1542
1543 PR c++/43856
1544 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1545 * class.c (current_nonlambda_class_type): New fn.
1546 * semantics.c (nonlambda_method_basetype): New.
1547 * cp-tree.h: Declare them.
1548 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1549
1550 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1551
1552 PR c++/43875
1553 * semantics.c (lambda_return_type): Complain about
1554 braced-init-list.
1555
1556 PR c++/43790
1557 * tree.c (cv_unqualified): Handle error_mark_node.
1558
1559 PR c++/41468
1560 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1561 if we don't want errors.
1562
1563 PR c++/41468
1564 * class.c (convert_to_base): Add complain parameter. Pass
1565 ba_quiet to lookup_base if we don't want errors.
1566 (build_vfield_ref): Pass complain to convert_to_base.
1567 * call.c (convert_like_real): Likewise.
1568 (initialize_reference): Likewise.
1569 (perform_direct_initialization_if_possible): Pass complain to
1570 convert_like_real.
1571 * cp-tree.h: Adjust.
1572
1573 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1574 Jason Merrill <jason@redhat.com>
1575
1576 PR c++/42844
1577 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1578 constructing, too.
1579 (check_initializer): Call it for classes that need constructing, too.
1580 * class.c (in_class_defaulted_default_constructor): New.
1581 * cp-tree.h: Declare it.
1582
1583 2010-04-20 Jason Merrill <jason@redhat.com>
1584
1585 PR c++/9335
1586 * init.c (constant_value_1): Treat error_mark_node as a constant
1587 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1588 * cvt.c (ocp_convert): Handle getting error_mark_node from
1589 integral_constant_value.
1590 * decl.c (compute_array_index_type): Likewise.
1591
1592 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1593
1594 PR c++/43800
1595 PR c++/43704
1596 * typeck.c (incompatible_dependent_types_p): If one of the
1597 compared types if not a typedef then honour their main variant
1598 equivalence.
1599
1600 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1601
1602 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1603
1604 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1605
1606 PR c++/43704
1607 * typeck.c (structural_comptypes): Test dependent typedefs
1608 incompatibility before testing for their main variant based
1609 equivalence.
1610
1611 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1612
1613 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1614 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1615
1616 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1617
1618 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1619 build_common_tree_nodes.
1620
1621 2010-04-14 Jason Merrill <jason@redhat.com>
1622
1623 PR c++/36625
1624 * parser.c (cp_parser_parenthesized_expression_list): Change
1625 is_attribute_list parm to int to indicate whether or not to
1626 handle initial identifier specially.
1627 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1628
1629 2010-04-13 Jason Merrill <jason@redhat.com>
1630
1631 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1632 CLASS_TYPE_P.
1633 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1634 unevaluated context.
1635 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1636
1637 2010-04-12 Jason Merrill <jason@redhat.com>
1638
1639 PR c++/43641
1640 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1641 return value directly.
1642
1643 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1644
1645 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1646
1647 PR c++/25811
1648 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1649 * init.c (build_new_1): Check for uninitialized const members and
1650 uninitialized reference members, when using new without
1651 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1652 (diagnose_uninitialized_cst_or_ref_member): Define, call
1653 diagnose_uninitialized_cst_or_ref_member_1.
1654 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1655
1656 2010-04-12 Richard Guenther <rguenther@suse.de>
1657
1658 PR c++/43611
1659 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1660 template inline functions.
1661
1662 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1663
1664 PR c++/28584
1665 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1666 pointer type.
1667
1668 2010-04-07 Jason Merrill <jason@redhat.com>
1669
1670 PR c++/43016
1671 * decl.c (start_preparsed_function): Do defer nested functions.
1672
1673 PR c++/11094, DR 408
1674 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1675 * decl2.c (finish_static_data_member_decl): Set it.
1676 * decl.c (duplicate_decls): Propagate it.
1677 * pt.c (tsubst_decl): Don't substitute the domain of an array
1678 VAR_DECL if it's set.
1679 (regenerate_decl_from_template): Substitute it here.
1680 (type_dependent_expression_p): Return true if it's set.
1681 * semantics.c (finish_decltype_type): Instantiate such a variable.
1682 * typeck.c (cxx_sizeof_expr): Likewise.
1683 (strip_array_domain): New.
1684
1685 PR c++/43145
1686 * name-lookup.c (current_decl_namespace): Non-static.
1687 (pop_nested_namespace): Sanity check.
1688 * cp-tree.h: Declare current_decl_namespace.
1689 * decl.c (grokvardecl): Use it instead of current_namespace.
1690 (grokfndecl): Likewise.
1691
1692 PR c++/38392
1693 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1694 been used.
1695
1696 * pt.c (print_template_statistics): New.
1697 * cp-tree.h: Declare it.
1698 * tree.c (cxx_print_statistics): Call it.
1699
1700 PR c++/41970
1701 * decl.c (grokvardecl): Tweak warning message.
1702 (grokfndecl): Likewise.
1703
1704 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1705
1706 PR c++/42697
1707 *pt.c (tsubst_decl): Get the arguments of a specialization from
1708 the specialization template, not from the most general template.
1709
1710 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1711
1712 PR c++/40239
1713 * typeck2.c (process_init_constructor_record):
1714 value-initialize members that are are not explicitely
1715 initialized.
1716
1717 2010-04-07 Jie Zhang <jie@codesourcery.com>
1718
1719 PR c++/42556
1720 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1721 when all of its elements are non-constant and have been split out.
1722
1723 2010-04-06 Taras Glek <taras@mozilla.com>
1724 Jason Merrill <jason@redhat.com>
1725
1726 * parser.c (cp_parser_class_specifier): Set class location to that
1727 of IDENTIFIER_NODE instead of '{' when possible.
1728 * semantics.c (begin_class_definition): Do not overide locations
1729 with less precise ones.
1730
1731 2010-04-06 Jason Merrill <jason@redhat.com>
1732
1733 PR c++/43648
1734 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1735
1736 PR c++/43621
1737 * pt.c (maybe_update_decl_type): Check the return value from
1738 push_scope.
1739
1740 2010-04-01 Jason Merrill <jason@redhat.com>
1741
1742 * decl.c (next_initializable_field): No longer static.
1743 * cp-tree.h: Declare it.
1744 * call.c (build_aggr_conv): Fail if there are more initializers
1745 than initializable fields.
1746
1747 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1748 instead of void_zero_node.
1749
1750 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1751
1752 PR c++/43558
1753 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1754 * pt.c (end_template_parm_list): Store sibling template parms of
1755 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1756 (push_template_decl_real): Don't store the containing template decl
1757 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1758 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1759 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1760 Simplify the logic.
1761
1762 2010-03-30 Jason Merrill <jason@redhat.com>
1763
1764 PR c++/43076
1765 * pt.c (push_template_decl_real): Deal better with running out of
1766 scopes before running out of template parms.
1767
1768 PR c++/41185
1769 PR c++/41786
1770 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1771 function parameter context. Don't print an error if parsing
1772 tentatively.
1773
1774 PR c++/43559
1775 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1776 with same_type_p.
1777
1778 2010-03-26 Jason Merrill <jason@redhat.com>
1779
1780 PR c++/43509
1781 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1782 c++0x mode, but not other type-names.
1783
1784 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1785
1786 PR c++/43327
1787 * pt.c (add_to_template_args): Support NULL ARGS;
1788 (most_specialized_class): call coerce_template_parms on
1789 template arguments passed to get_class_bindings. Use
1790 add_to_template_args.
1791 (unify): Handle VAR_DECLs.
1792
1793 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1794
1795 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1796 into int.
1797 * pt.c (get_template_parms_at_level): Adjust.
1798
1799 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1800
1801 PR c++/43206
1802 * cp-tree.h (get_template_parms_at_level): Declare ...
1803 * pt.c (get_template_parms_at_level): ... new function.
1804 * typeck.c (get_template_parms_of_dependent_type): If a template
1805 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1806 current_template_parms. Use get_template_parms_at_level. Remove
1807 useless test.
1808 (incompatible_dependent_types_p): If we get empty parms from just one
1809 of the template type parms we are comparing then the template parms are
1810 incompatible.
1811
1812 2010-03-24 Jason Merrill <jason@redhat.com>
1813
1814 PR c++/43502
1815 * parser.c (make_declarator): Initialize id_loc.
1816 (cp_parser_lambda_declarator_opt): And set it.
1817
1818 2010-03-23 Jason Merrill <jason@redhat.com>
1819
1820 Make lambda conversion op and op() non-static.
1821 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1822 Also add the thunk function returned by the conversion op.
1823 Mark the conversion deleted if the op() is variadic.
1824 * decl2.c (mark_used): Give helpful message about deleted conversion.
1825 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1826 * semantics.c (finish_this_expr): Adjust.
1827 * mangle.c (write_closure_type_name): Adjust.
1828 * decl.c (grok_op_properties): Don't allow it.
1829 * call.c (build_user_type_conversion_1): No static conversion ops.
1830 (build_op_call): Or op().
1831
1832 * decl2.c (change_return_type): Fix 'this' quals.
1833
1834 2010-03-22 Jason Merrill <jason@redhat.com>
1835
1836 PR c++/43333
1837 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1838
1839 PR c++/43281
1840 * pt.c (contains_auto_r): New fn.
1841 (do_auto_deduction): Use it.
1842 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1843
1844 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1845
1846 PR c++/43081:
1847 * decl2.c (grokfield): Handle invalid initializers for member
1848 functions.
1849
1850 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1851
1852 PR c++/43375
1853 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1854 is NULL.
1855 * decl2.c (vague_linkage_p): Likewise.
1856
1857 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1858
1859 PR c++/43418
1860 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1861 false, in the cp_parser_expression_statement call.
1862
1863 2010-03-05 Jason Merrill <jason@redhat.com>
1864
1865 * mangle.c (mangle_decl): Give name collision error even without
1866 ASM_OUTPUT_DEF.
1867
1868 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1869
1870 * pt.c (process_partial_specialization): Use error_n instead of
1871 error.
1872
1873 2010-03-03 Jason Merrill <jason@redhat.com>
1874
1875 PR c++/12909
1876 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1877
1878 2010-03-03 Jason Merrill <jason@redhat.com>
1879
1880 PR c++/12909
1881 * mangle.c: Include cgraph.h.
1882 (mangle_decl): If the mangled name will change in a later
1883 ABI version, make the later mangled name an alias.
1884 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1885 * Make-lang.in (mangle.o): Depend on cgraph.h.
1886 * method.c (make_alias_for): Handle VAR_DECL, too.
1887 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1888 * tree.c (no_linkage_check): Adjust.
1889 * decl.c (maybe_commonize_var): Adjust.
1890 * cp-tree.h: Adjust.
1891
1892 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1893
1894 * pt.c (redeclare_class_template): Use error_n and inform_n.
1895
1896 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1897
1898 PR c++/42748
1899 * cp-tree.h (push_tinst_level): Declare.
1900 (pop_tinst_level): Likewise.
1901 * pt.c (push_tinst_level): Give it external linkage.
1902 (pop_tinst_level): Likewise.
1903 * mangle.c (mangle_decl_string): Set the source location to that
1904 of the decl while mangling.
1905
1906 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1907
1908 PR c++/42054
1909 * pt.c (redeclare_class_template): Return false if there are erroneous
1910 template parameters.
1911
1912 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1913
1914 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1915 -ftemplate-depth=.
1916
1917 2010-02-24 Jason Merrill <jason@redhat.com>
1918
1919 PR c++/12909
1920 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1921
1922 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1923 in a previous ABI version.
1924
1925 2010-02-23 Jason Merrill <jason@redhat.com>
1926
1927 PR c++/43143
1928 * typeck2.c (digest_init_r): Accept value init of array.
1929
1930 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1931
1932 PR c++/43126
1933 * typeck.c (convert_arguments): Update error message.
1934
1935 2010-02-22 Mike Stump <mikestump@comcast.net>
1936
1937 PR c++/43125
1938 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1939
1940 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1941
1942 PR c++/23510
1943 * error.c (print_instantiation_partial_context_line): New.
1944 (print_instantiation_partial_context): Print at most 12 contexts,
1945 skip the rest with a message.
1946
1947 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1948
1949 PR c++/42824
1950 * pt.c (lookup_template_class): Better support of specialization
1951 of member of class template implicit instantiation.
1952
1953 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1954
1955 PR c++/35669
1956 * call.c (conversion_null_warnings): Replace -Wconversion with
1957 -Wconversion-null.
1958 * cvt.c (build_expr_type_conversion): Likewise.
1959
1960 2010-02-18 Jason Merrill <jason@redhat.com>
1961
1962 PR c++/42837
1963 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1964
1965 PR c++/43108
1966 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1967 C build_binary_op.
1968 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1969 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1970
1971 PR c++/43070
1972 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1973
1974 PR c++/26261
1975 PR c++/43101
1976 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1977 (maybe_update_decl_type): New fn.
1978 * parser.c (cp_parser_init_declarator): Use it.
1979
1980 PR c++/43109
1981 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1982
1983 2010-02-17 Jason Merrill <jason@redhat.com>
1984
1985 PR c++/43075
1986 * call.c (build_over_call): Don't create zero-sized assignments.
1987 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1988 * cp-objcp-common.c (cp_expr_size): Remove.
1989 * cp-tree.h: Remove prototype.
1990
1991 PR c++/43069
1992 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1993 decl we looked up doesn't match.
1994
1995 PR c++/43093
1996 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1997 have an INIT_EXPR anymore.
1998
1999 PR c++/43079
2000 * pt.c (convert_nontype_argument): Change assert to test.
2001
2002 2010-02-16 Jason Merrill <jason@redhat.com>
2003
2004 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2005
2006 PR c++/43031
2007 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2008 VIEW_CONVERT_EXPR for conversions between structural equality types
2009 that the back end can't tell are the same.
2010
2011 PR c++/43036
2012 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2013 cv-quals from element here.
2014 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2015
2016 2010-02-14 Jason Merrill <jason@redhat.com>
2017
2018 PR c++/41997
2019 * semantics.c (finish_compound_literal): Use
2020 cp_apply_type_quals_to_decl when creating a static variable.
2021
2022 2010-02-12 Jason Merrill <jason@redhat.com>
2023
2024 PR c++/43024
2025 * name-lookup.h (current_binding_level): Check for null
2026 cp_function_chain.
2027
2028 2010-02-12 Jason Merrill <jason@redhat.com>
2029
2030 PR c++/43054
2031 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2032
2033 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2034
2035 PR c++/43033
2036 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2037 instead of x.
2038
2039 2010-02-10 Jason Merrill <jason@redhat.com>
2040
2041 PR c++/41896
2042 * semantics.c (outer_lambda_capture_p): Revert.
2043 (add_capture): Only finish_member_declaration if
2044 we're in the lambda class.
2045 (register_capture_members): New.
2046 * cp-tree.h: Declare it.
2047 * parser.c (cp_parser_lambda_expression): Call it.
2048
2049 2010-02-10 Jason Merrill <jason@redhat.com>
2050
2051 PR c++/41896
2052 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2053 instead of current_class_type.
2054
2055 2010-02-10 Jason Merrill <jason@redhat.com>
2056
2057 PR c++/42983, core issue 906
2058 * method.c (defaultable_fn_check): Check virtualness.
2059
2060 2010-02-10 Jason Merrill <jason@redhat.com>
2061
2062 PR c++/43016
2063 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2064
2065 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2066
2067 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2068 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2069 translation.
2070 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2071 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2072 (cp_parser_parameter_declaration)
2073 (cp_parser_exception_specification_opt)
2074 (cp_parser_exception_declaration): Likewise.
2075 * pt.c (check_default_tmpl_args): Likewise.
2076 * search.c (lookup_field_r): Likewise.
2077
2078 2010-02-09 Jason Merrill <jason@redhat.com>
2079
2080 PR c++/42399
2081 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2082
2083 2010-02-09 Jason Merrill <jason@redhat.com>
2084
2085 PR c++/42370
2086 * decl2.c (change_return_type): New fn.
2087 * semantics.c (apply_lambda_return_type): Use it.
2088 * cp-tree.h: Declare it.
2089
2090 2010-02-05 Richard Guenther <rguenther@suse.de>
2091
2092 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2093 * cp-lang.c: Include gt-cp-cp-lang.h.
2094 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2095
2096 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2097
2098 PR c++/42915
2099 * typeck.c (get_template_parms_of_dependent_type): Try getting
2100 the template parameters fromt the type itself first.
2101
2102 2010-02-03 Jason Merrill <jason@redhat.com>
2103
2104 PR c++/4926
2105 PR c++/38600
2106 * mangle.c (write_unqualified_id): Split out from write_expression.
2107 (write_unqualified_name): Call it.
2108 (write_member_name): Likewise.
2109 (write_expression): Support TEMPLATE_ID_EXPR.
2110 Disambiguate operator names.
2111
2112 PR c++/12909
2113 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2114 -fabi-version=4.
2115
2116 2010-02-02 Jason Merrill <jason@redhat.com>
2117
2118 PR c++/41090
2119 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2120 * optimize.c (clone_body): Remap their initializers when making base
2121 variants.
2122 (maybe_clone_body): Complain if multiple clones aren't safe.
2123
2124 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2125
2126 PR c++/42758
2127 PR c++/42634
2128 PR c++/42336
2129 PR c++/42797
2130 PR c++/42880
2131 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2132 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2133 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2134 * pt.c (coerce_template_parms, type_unification_real,
2135 expand_template_argument_pack, coerce_template_parameter_pack):
2136 Set the non default template args count.
2137 (current_template_args): Always set non defaulted
2138 template args count when compiled with --enable-checking
2139 (tsubst_template_args, type_unification_real): Propagate the non
2140 defaulted template args count.
2141 * error.c (get_non_default_template_args_count): Renamed
2142 count_non_default_template_args into this. Don't calculate the
2143 non default template argument count anymore. Use the new
2144 accessor macros above to get it.
2145 (dump_template_argument_list, dump_type, dump_decl,
2146 dump_template_parms): Adjust.
2147 * parser.c (cp_parser_template_argument_list): Always set defaulted
2148 template args count when compiled with --enable-checking.
2149
2150 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2151
2152 * decl.c (redeclaration_error_message): Wrap the return messages into
2153 G_() for easy translation.
2154
2155 2010-01-28 Jason Merrill <jason@redhat.com>
2156
2157 PR c++/42880
2158 * semantics.c (begin_class_definition): Don't use type_as_string.
2159
2160 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2161
2162 PR c++/42713
2163 PR c++/42820
2164 * typeck.c (get_template_parms_of_dependent_type): Factorized
2165 this out of incompatible_template_type_parms_p
2166 (incompatible_dependent_types_p): Renamed
2167 incompatible_template_type_parms_p into this. Make it detect
2168 two incompatible dependent typedefs too.
2169 (structural_comptypes): Use incompatible_dependent_types_p.
2170 * pt.c (get_template_info):
2171 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2172
2173 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2174 Jason Merrill <jason@redhat.com>
2175
2176 * mangle.c (write_type): Mangle transparent record as member type.
2177 * semantics.c (begin_class_definition): Recognize decimal classes
2178 and set TYPE_TRANSPARENT_AGGR.
2179
2180 2010-01-20 Jason Merrill <jason@redhat.com>
2181
2182 PR c++/42338
2183 * mangle.c (write_expression): Handle tree codes that have extra
2184 arguments in the middle-end.
2185
2186 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2187
2188 PR c++/42038
2189 * except.c (expand_start_catch_block): Deal correctly with
2190 do_begin_catch returning error_mark_node.
2191
2192 2010-01-20 Jason Merrill <jason@redhat.com>
2193
2194 PR c++/41788
2195 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2196 non-PODs.
2197
2198 PR c++/41920
2199 * semantics.c (build_lambda_object): Call mark_used on captured
2200 variables.
2201
2202 PR c++/40750
2203 * decl.c (grokdeclarator): Clear type_quals for a member function
2204 declared using a typedef. Don't complain about adding cv-quals
2205 to a function typedef in C++0x mode.
2206
2207 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2208
2209 * decl.c (create_array_type_for_decl): Remove set but not used
2210 variable error_msg. Remove break stmts after return stmts.
2211
2212 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2213
2214 * error.c (dump_template_parms, count_non_default_template_args):
2215 Revert fix of PR c++/42634.
2216
2217 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2218
2219 PR c++/42634
2220 * error.c (dump_template_parms): Use innermost template
2221 arguments before calling count_non_default_template_args.
2222 (count_non_default_template_args): We are being called with
2223 template innermost arguments now. There is no need to ensure
2224 that again.
2225
2226 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2227
2228 PR c++/42766
2229 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2230
2231 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2232
2233 PR c++/42697
2234 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2235
2236 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2237
2238 PR c++/42697
2239 *pt.c (tsubst_decl): Get the arguments of a specialization from
2240 the specialization template, not from the most general template.
2241
2242 2010-01-16 Jason Merrill <jason@redhat.com>
2243
2244 PR c++/42761
2245 * semantics.c (finish_decltype_type): Within a template, treat
2246 unresolved CALL_EXPR as dependent.
2247
2248 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2249
2250 * error.c (dump_template_parms,count_non_default_template_args):
2251 Revert changes of PR c++/42634.
2252
2253 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2254
2255 PR middle-end/42674
2256 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2257 functions with noreturn attribute.
2258
2259 2010-01-14 Jason Merrill <jason@redhat.com>
2260
2261 PR c++/42701
2262 * call.c (build_new_method_call): Don't free the vec here.
2263
2264 PR c++/42655
2265 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2266
2267 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2268
2269 PR c++/42634
2270 * error.c (dump_template_parms): Use innermost template
2271 arguments before calling count_non_default_template_args.
2272 (count_non_default_template_args): We are being called with
2273 template innermost arguments now. There is no need to ensure
2274 that again.
2275
2276 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2277
2278 c++/40155
2279 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2280 arguments that were previously deduced.
2281
2282 2010-01-05 Jason Merrill <jason@redhat.com>
2283
2284 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2285 * call.c (build_over_call): Don't complain about it.
2286
2287 2010-01-04 Jason Merrill <jason@redhat.com>
2288
2289 PR c++/42555
2290 * pt.c (tsubst_decl): Don't apply type attributes in place.
2291
2292 PR c++/42567
2293 * semantics.c (describable_type): Remove decltype comment and
2294 semantics.
2295
2296
2297 \f
2298 Copyright (C) 2010 Free Software Foundation, Inc.
2299
2300 Copying and distribution of this file, with or without modification,
2301 are permitted in any medium without royalty provided the copyright
2302 notice and this notice are preserved.
2303