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