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