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