re PR c++/46930 ([C++0x] ICE with static constexpr data member)
[gcc.git] / gcc / cp / ChangeLog
1 2010-12-14 Jason Merrill <jason@redhat.com>
2
3 PR c++/46930
4 * decl.c (grokdeclarator): Reject uninitialized constexpr
5 static data member.
6
7 2010-12-14 Nathan Froyd <froydnj@codesourcery.com>
8
9 PR c++/45330
10 * cp-tree.h (suggest_alternatives_for): Add location_t parameter.
11 * name-lookup.c (suggest_alternatives_for): Likewise. Adjust.
12 * lex.c (unqualified_name_lookup_error): Adjust call to it.
13 * semantics.c (qualified_name_lookup_error): Move to...
14 * error.c (qualified_name_lookup_error): ...here. Call.
15 suggest_alternatives_for.
16
17 2010-12-13 Jason Merrill <jason@redhat.com>
18
19 PR c++/46873
20 PR c++/46877
21 * semantics.c (build_data_member_initialization): Handle
22 cv-qualified data member.
23
24 2010-12-13 Jan Hubicka <jh@suse.cz>
25
26 PR middle-end/45388
27 * decl2.c (start_objects): Do not generate collect2 recognicable name
28 for static ctor.
29
30 2010-12-12 Paolo Carlini <paolo.carlini@oracle.com>
31
32 PR c++/46901
33 * typeck.c (convert_for_assignment): Fix typo in warning message.
34
35 2010-12-10 Jakub Jelinek <jakub@redhat.com>
36
37 PR c++/46001
38 * decl.c (record_builtin_java_type): Call build_distinct_type_copy
39 on build_nonstandard_integer_type result for __java_* types.
40
41 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
42
43 * decl.c (grokmethod): Test DECL_CLASS_SCOPE_P.
44 * error.c (dump_decl): Test DECL_FILE_SCOPE_P.
45
46 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
47
48 * cp-tree.h (readonly_error_kind): Delete.
49 (readonly_error): Rename to...
50 (cxx_readonly_error): ...this. Change second argument to be an
51 enum lvalue_use.
52 * semantics.c (finish_asm_stmt): Call cxx_readonly_error.
53 * typeck.c (cp_build_unary_op): Likewise.
54 (cp_build_modify_expr): Likewise.
55 * typeck2.c (readonly_error): Rename to...
56 (cxx_readonly_error): ...this. Delegate to readonly_error for
57 most cases.
58
59 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
60
61 * parser.c (cp_parser_objc_superclass_or_category): Recognize
62 Objective-C 2.0 class extensions. Added iface_p and
63 is_class_extension arguments.
64 (cp_parser_objc_class_interface): Updated call to
65 cp_parser_objc_superclass_or_category.
66 (cp_parser_objc_class_implementation): Same change.
67
68 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
69
70 * call.c (print_conversion_rejection): Indent messages two spaces.
71
72 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
73
74 * typeck.c (cp_build_indirect_ref): Call invalid_indirection_error.
75
76 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
77
78 * typeck.c (composite_pointer_error): New function.
79 (composite_pointer_type_r, composite_pointer_type): Call it.
80
81 2010-12-08 Jason Merrill <jason@redhat.com>
82
83 PR c++/46348
84 * semantics.c (cxx_eval_vec_init_1): Handle value-init.
85 (cxx_eval_vec_init): Pass value_init arg.
86
87 2010-12-08 Nathan Froyd <froydnj@codesourcery.com>
88
89 PR c++/45329
90 * call.c (struct conversion): Document bad_p field.
91 (enum rejection_reason_code): Define.
92 (struct conversion_info): Define.
93 (struct rejection_reason): Define.
94 (struct z_candidate): Add `reason' field.
95 (add_candidate): Add `reason' parameter. Store it in CAND.
96 (alloc_rejection, arity_rejection, arg_conversion_rejection):
97 New functions.
98 (bad_arg_conversion_rejection): New function.
99 (convert_class_to_reference): Add comment.
100 (remaining_arguments): New function.
101 (add_function_candidate): Record rejection reason and pass it to
102 add_candidate.
103 (add_conv_candidate, build_builtin_candidate): Likewise.
104 (add_template_candidate_real): Likewise.
105 (print_conversion_rejection): New function.
106 (print_z_candidate): Print CAND->REASON if it exists. Adjust
107 diagnostic strings.
108 (print_z_candidates): Add location_t argument. Adjust calling
109 sequence for print_z_candidate. Print header line directly.
110 (build_user_type_conversion_1): Add reason for rejection to
111 CAND. Adjust call to print_z_candidates.
112 (print_error_for_call_failure): New function.
113 (build_new_function_call): Call it. Adjust call to
114 print_z_candidates.
115 (build_operator_new_call): Likewise.
116 (build_op_call): Likewise.
117 (build_conditional_expr): Likewise.
118 (build_new_op): Likewise.
119 (build_new_method_call): Likewise.
120
121 2010-12-08 Jason Merrill <jason@redhat.com>
122
123 PR c++/45822
124 * cp-tree.h (LOOKUP_DEFAULTED): New.
125 * call.c (add_function_candidate): Check it.
126 * method.c (synthesized_method_walk): Set it.
127 (do_build_copy_assign): Likewise.
128 * init.c (perform_member_init): Likewise.
129 (emit_mem_initializers): Likewise.
130
131 PR c++/46736
132 * decl.c (cp_finish_decl): Complain about an implicitly deleted
133 method defaulted outside the class.
134 * method.c (maybe_explain_implicit_delete): Don't check DECL_INITIAL.
135
136 2010-12-07 Joseph Myers <joseph@codesourcery.com>
137
138 * rtti.c: Don't include assert.h.
139
140 2010-12-07 Nathan Froyd <froydnj@codesourcery.com>
141
142 PR c++/45330
143 * cp-tree.h (suggest_alternatives_for, location_of): Declare.
144 * error.c (dump_expr): Handle TYPE_DECL.
145 (location_of): Unstaticize.
146 * name-lookup.c (suggest_alternatives_for): New function.
147 * lex.c (unqualified_name_lookup_error): Call it.
148
149 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
150
151 * call.c: Include c-family/c-objc.h.
152 * decl.c: Same change.
153 * decl2.c: Same change.
154 * error.c: Same change.
155 * lex.c: Same change.
156 * parser.c: Same change.
157 * pt.c: Same change.
158 * semantics.c: Same change.
159 * typeck.c: Same change.
160 * Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h.
161 (cp/decl2.o): Same change.
162 (cp/call.o): Same change.
163 (cp/error.o): Same change.
164 (cp/lex.o): Same change.
165 (cp/parser.o): Same change.
166 (cp/pt.o): Same change.
167 (cp/semantics.o): Same change.
168 (cp/typeck.o): Same change.
169 * config-lang.in (gtfiles): Added c-family/c-objc.h.
170
171 2010-12-03 Jason Merrill <jason@redhat.com>
172
173 PR c++/46645
174 * semantics.c (build_data_member_initialization): Remove assert.
175
176 PR c++/46058
177 * tree.c (lvalue_kind) [SCOPE_REF]: Handle non-dependent case.
178
179 2010-12-03 Richard Guenther <rguenther@suse.de>
180
181 PR c/46745
182 * error.c (dump_expr): Handle MEM_REF.
183
184 2010-12-03 Laurynas Biveinis <laurynas.biveinis@gmail.com>
185
186 * cp-tree.h (struct aggr_init_expr_arg_iterator_d): Remove GTY
187 tag.
188
189 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>
190
191 * parser.c (cp_parser_objc_throw_statement): Use
192 cp_parser_expression, not cp_parser_assignment_expression, to
193 parse the argument of a @throw.
194
195 2010-12-01 Joseph Myers <joseph@codesourcery.com>
196
197 * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h.
198 * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o):
199 Update dependencies.
200
201 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
202
203 * decl.c (finish_function): Call objc_finish_function when
204 compiling Objective-C++.
205 * call.c (standard_conversion): Do not call
206 objc_non_volatilized_type().
207 (implicit_conversion): Same change.
208 * typeck.c (comp_ptr_ttypes_real): Same change.
209
210 2010-11-30 Joseph Myers <joseph@codesourcery.com>
211
212 * cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c,
213 except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c,
214 optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include
215 toplev.h.
216 * Make-lang.in: Dependencies for above files changed to remove
217 toplev.h.
218
219 2010-11-29 Dodji Seketeli <dodji@redhat.com>
220
221 PR c++/42260
222 * call.c (add_builtin_candidate): At this point the resulting type
223 of an indirection operator should be complete.
224
225 2010-11-29 Dodji Seketeli <dodji@redhat.com>
226
227 PR c++/45383
228 Reverted patch for PR c++/42260
229 * cp-tree.h (lookup_conversions): Reverted "Add new bool parameter to
230 declarationE."
231 * search.c (lookup_conversion): Reverted "Use new bool parameter in
232 definition".
233 * call.c (add_builtin_candidates): Reverted "Don't lookup template
234 conversion"
235 (convert_class_to_reference, build_user_type_conversion_1,
236 build_op_call): Reverted "Adjust".
237 * cvt.c (build_expr_type_conversion): Reverted "Likewise".
238
239 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
240
241 * parser.c (cp_parser_objc_try_catch_finally_statement): Parse
242 @catch(...) and pass NULL_TREE to objc_begin_catch_clause() in
243 that case. Improved error recovery. Reorganized code to be
244 almost identical to c_parser_objc_try_catch_finally_statement.
245
246 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
247
248 PR objc++/46222
249 * decl.c (grokdeclarator): Replaced an assert (for a case that can
250 never happen in C++, but could happen in ObjC++ for invalid code)
251 with a check that prints an error message and returns
252 error_mark_node.
253
254 2010-11-23 Jeffrey Yasskin <jyasskin@google.com>
255
256 PR c++/46527
257 * pt.c (instantiate_decl): Propagate the template's location to
258 its instance.
259
260 2010-11-20 Joseph Myers <joseph@codesourcery.com>
261
262 * name-lookup.c (handle_namespace_attrs): Don't check
263 HANDLE_PRAGMA_VISIBILITY.
264 * parser.c (cp_parser_namespace_definition): Don't check
265 HANDLE_PRAGMA_VISIBILITY.
266
267 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
268
269 PR c++/16189
270 PR c++/36888
271 PR c++/45331
272 * parser.c (cp_lexer_set_token_position): New function.
273 (cp_lexer_previous_token_position): New function.
274 (cp_lexer_previous_token): Call it.
275 (cp_parser_class_specifier): Try to gracefully handle a missing
276 semicolon.
277
278 2010-11-20 Jakub Jelinek <jakub@redhat.com>
279
280 PR c++/46538
281 * decl.c (cp_make_fname_decl): Return error_mark_node if
282 current_binding_level has already sk_function_parms kind.
283
284 PR c++/46526
285 * semantics.c (cxx_eval_call_expression): Unshare the result.
286
287 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
288
289 * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
290 to objc_declare_protocols.
291
292 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
293
294 PR c/33193
295 * typeck.c (cp_build_unary_op): Call build_real_imag_expr for
296 REALPART_EXPR and IMAGPART_EXPR.
297
298 2010-11-16 Jason Merrill <jason@redhat.com>
299
300 * call.c (convert_like_real): Don't make a temp for copy-list-init.
301 (build_over_call): Don't handle that here.
302 (build_new_method_call): Use COMPLETE_OR_OPEN_TYPE_P for error.
303
304 PR c++/46497
305 * call.c (build_over_call): Check for =delete even when trivial.
306
307 DR 1004
308 * decl.c (make_unbound_class_template): Handle using
309 injected-type-name as template.
310
311 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
312
313 * typeck.c (cp_build_unary_op): Use
314 objc_build_incr_expr_for_property_ref to build the pre/post
315 increment/decrement of an Objective-C property ref.
316
317 2010-11-13 Jason Merrill <jason@redhat.com>
318
319 * decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
320 * init.c (build_new): Likewise.
321 * pt.c (tsubst_decl): Likewise.
322 (do_auto_deduction): Likewise.
323 (resolve_nondeduced_context): Use build_offset_ref and
324 cp_build_addr_expr.
325
326 2010-11-12 Joseph Myers <joseph@codesourcery.com>
327
328 * Make-lang.in (g++spec.o): Use $(OPTS_H).
329
330 2010-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
331
332 Core 1135, 1136, 1145, 1149
333 * method.c (defaultable_fn_check): Do not disallow defaulting a
334 non-public or explicit special member function on its first
335 declaration.
336
337 2010-11-12 James Dennett <jdennett@google.com>
338
339 PR/39415
340 * typeck.c (build_static_cast_1): Convert to the target type
341 when doing static_cast<cv Derived*>(Base*).
342
343 2010-11-10 Jason Merrill <jason@redhat.com>
344
345 PR c++/46420
346 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
347 [CONSTRUCTOR]: Use the tsubsted type.
348
349 PR c++/46369
350 * semantics.c (cxx_eval_bit_field_ref): New.
351 (cxx_eval_constant_expression): Call it.
352
353 2010-11-10 Joseph Myers <joseph@codesourcery.com>
354
355 * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
356 * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
357 Use %' in diagnostics.
358 * decl2.c (check_classfn): Use %' in diagnostic.
359 * init.c (build_java_class_ref): Use %' in diagnostic.
360 (build_delete): Remove trailing '.' from diagnostic.
361 * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
362 diagnostics.
363 * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
364 * parser.c (cp_parser_exception_specification_opt): Remove
365 trailing '.' from diagnostic.
366 (cp_parser_objc_interstitial_code): Use %qs for quoting in
367 diagnostic.
368 * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
369 diagnostic.
370 * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
371
372 2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
373
374 PR c++/46065
375 * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
376
377 2010-11-09 Jakub Jelinek <jakub@redhat.com>
378
379 PR c++/45894
380 * tree.c (lvalue_kind): Don't crash if ref has NULL type.
381
382 2010-11-08 Jason Merrill <jason@redhat.com>
383
384 PR c++/46382
385 * semantics.c (check_constexpr_ctor_body): New fn.
386 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
387 * cp-tree.h: Declare it.
388
389 PR c++/46335
390 * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
391
392 Correct conversion/overflow behavior.
393 * cvt.c (ignore_overflows): Move here from typeck.c.
394 (ocp_convert): Use it.
395 (cp_fold_convert): Use it. Don't call rvalue.
396 * typeck.c (build_static_cast_1): Don't use it. Do call rvalue.
397 * error.c (location_of): Handle expressions, too.
398 * class.c (check_bitfield_decl): Set input_location around call to
399 cxx_constant_value.
400 * semantics.c (cxx_eval_outermost_constant_expr): Don't
401 print the expression if it already had TREE_OVERFLOW set.
402 (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
403 (verify_constant): Allow overflow with a permerror if we're
404 enforcing.
405 (cxx_eval_outermost_constant_expr): Use verify_constant.
406 (adjust_temp_type): Use cp_fold_convert.
407 * decl.c (build_enumerator): Don't call constant_expression_warning.
408 * decl2.c (grokbitfield): Likewise.
409
410 2010-11-06 Jason Merrill <jason@redhat.com>
411
412 PR c++/46348
413 * init.c (perform_member_init): Use build_vec_init_expr for
414 value-init of arrays, too.
415 * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
416 * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
417 (VEC_INIT_EXPR_VALUE_INIT): New macro.
418 * semantics.c (potential_constant_expression): No longer static.
419 Check VEC_INIT_EXPR_IS_CONSTEXPR.
420 * tree.c (build_vec_init_expr): Handle value-init. Set
421 VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
422
423 2010-11-06 Nathan Froyd <froydnj@codesourcery.com>
424
425 PR c++/45332
426 * parser.c (cp_lexer_previous_token): New function.
427 (cp_parser_member_declaration): Use previous token for error
428 messages. Assume semicolon presence rather than grovelling for
429 the next one.
430
431 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
432
433 PR middle-end/46314
434 * method.c (make_alias_for_thunk):
435 Use targetm.asm_out.generate_internal_label.
436
437 2010-11-05 Jason Merrill <jason@redhat.com>
438
439 PR c++/45473
440 * search.c (look_for_overrides): A constructor is never virtual.
441
442 2010-11-05 Jakub Jelinek <jakub@redhat.com>
443
444 PR c++/46160
445 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
446 on the RHS to avoid infinite recursion with gimplify_expr.
447
448 2010-11-05 Jason Merrill <jason@redhat.com>
449
450 PR c++/46304
451 * pt.c (tsubst_copy): Handle COMPLEX_CST.
452
453 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
454
455 Fixed using the Objective-C 2.0 dot-syntax with class names.
456 * parser.c (cp_parser_primary_expression): Recognize Objective-C
457 2.0 dot-syntax with class names and process it.
458 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
459 with class names.
460 (cp_parser_class_name): Same change.
461 (cp_parser_simple_type_specifier): Tidied comments.
462
463 2010-11-04 Jason Merrill <jason@redhat.com>
464
465 PR c++/46298
466 * semantics.c (build_constexpr_constructor_member_initializers):
467 Handle an enclosing STATEMENT_LIST.
468
469 * semantics.c (speculative_access_check): New.
470 * cp-tree.h: Declare it.
471 * call.c (build_over_call): Use it.
472 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
473 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
474
475 2010-11-03 Jason Merrill <jason@redhat.com>
476
477 PR c++/46293
478 * semantics.c (build_data_member_initialization): Handle
479 value-init of aggregate empty base.
480
481 PR c++/46289
482 * call.c (can_convert_array): New fn.
483 (build_aggr_conv): Use it.
484
485 PR c++/46289
486 * semantics.c (build_constexpr_constructor_member_initializers):
487 Avoid ICE on error.
488
489 2010-11-02 Dodji Seketeli <dodji@redhat.com>
490
491 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
492 Remove.
493 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
494
495 2010-11-03 Jason Merrill <jason@redhat.com>
496
497 PR c++/46277
498 * init.c (expand_default_init): Avoid ICE if we can't figure out
499 which function is being called.
500
501 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
502
503 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
504 instead of fold_convert.
505 * init.c (build_zero_init): Likewise.
506 * typeck.c (cp_build_binary_op): Likewise.
507
508 2010-11-02 Dodji Seketeli <dodji@redhat.com>
509
510 PR c++/46170
511 PR c++/46162
512 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
513 control diagnostic.
514 (convert_nontype_argument, convert_nontype_argument): Pass the
515 complain parameter down to check_valid_ptrmem_cst_expr.
516
517 2010-11-02 Dodji Seketeli <dodji@redhat.com>
518
519 PR c++/45606
520 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
521 (struct template_parm_index_s)<num_siblings>: New field.
522 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
523 (process_template_parm): Extend the API to accept the number of
524 template parms in argument.
525 (cp_set_underlying_type): Remove this.
526 * class.c (build_self_reference): Require canonical type equality
527 back on the self reference of class.
528 * decl2.c (grokfield): Require canonical type equality back on
529 typedef class fields.
530 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
531 equality back on typedefs.
532 * parser.c (cp_parser_template_parameter_list): Do not require
533 canonical type equality on dependent types created during template
534 parameters parsing.
535 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
536 (fixup_template_parm, fixup_template_parms): New private
537 functions.
538 (current_template_args): Declare this.
539 (process_template_parm): Pass the total number of template parms
540 to canonical_type_parameter.
541 (build_template_parm_index): Add a new argument to carry the total
542 number of template parms.
543 (reduce_template_parm_level, process_template_parm, make_auto):
544 Adjust.
545 (current_template_args): Fix this for template template
546 parameters.
547 (tsubst_template_parm): Split out of ...
548 (tsubst_template_parms): ... this.
549 (reduce_template_parm_level): Don't loose
550 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
551 (template_parm_to_arg): Extracted this function from
552 current_template_args. Make it represent invalid template parms
553 with an error_mark_node instead of a LIST_TREE containing an
554 error_mark_node.
555 (current_template_args): Use template_parm_to_arg.
556 (dependent_template_arg_p): Consider an invalid template argument
557 as dependent.
558 (end_template_parm_list): Do not update template sibling parms
559 here anymore. Use fixup_template_parms instead.
560 (process_template_parm): Pass the number of template parms to
561 canonical_type_parameter.
562 (make_auto): Require structural equality on auto
563 TEMPLATE_TYPE_PARM for now.
564 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
565 using all the arguments deduced so far.
566 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
567 canonical_type_parameter.
568 * tree.c (cp_set_underlying_type): Remove.
569 * typeck.c (get_template_parms_of_dependent_type)
570 (incompatible_dependent_types_p): Remove.
571 (structural_comptypes): Do not call incompatible_dependent_types_p
572 anymore.
573 (comp_template_parms_position): Re-organized. Take the length of
574 template parms list in account.
575
576 2010-11-01 Jason Merrill <jason@redhat.com>
577
578 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
579 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
580 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
581 of giving follow-on errors.
582 * error.c (maybe_print_constexpr_context): New.
583 (cp_diagnostic_starter): Call it.
584 * cp-tree.h: Declare cx_error_context.
585
586 * semantics.c (cxx_eval_constant_expression): Explain
587 unacceptable use of variable better.
588
589 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
590 Jason Merrill <jason@redhat.com>
591
592 * call.c (null_ptr_cst_p): Use maybe_constant_value.
593 (set_up_extended_ref_temp): Support constant initialization.
594 (initialize_reference): Adjust.
595 * class.c (check_bitfield_decl): Use cxx_constant_value.
596 * cvt.c (ocp_convert): Don't use integral_constant_value when
597 converting to class type.
598 * decl.c (finish_case_label): Use maybe_constant_value.
599 (build_init_list_var_init): Support constant initialization.
600 (check_initializer): Likewise. Reorganize.
601 (cp_finish_decl): Likewise.
602 (expand_static_init): Likewise.
603 (compute_array_index_type): Use maybe_constant_value.
604 Add complain parm.
605 (create_array_type_for_decl, grokdeclarator): Pass it.
606 (build_enumerator): Use cxx_constant_value.
607 * decl2.c (grokfield): Use maybe_constant_init.
608 * except.c (check_noexcept_r): Handle constexpr.
609 (build_noexcept_spec): Use maybe_constant_value.
610 * init.c (expand_default_init): Support constant initialization.
611 (build_vec_init): Likewise.
612 (constant_value_1): Adjust.
613 (build_new_1): Adjust.
614 * parser.c (cp_parser_constant_expression): Allow non-integral
615 in C++0x mode.
616 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
617 (cp_parser_initializer_clause): Toss folded result if non-constant.
618 * pt.c (fold_decl_constant_value): Remove.
619 (convert_nontype_argument): Use maybe_constant_value. Give clearer
620 error about overflow.
621 (tsubst): Move array bounds handling into compute_array_index_type.
622 (value_dependent_expression_p): Handle constant CALL_EXPR.
623 (tsubst_decl): Don't set
624 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
625 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
626 (instantiate_decl): Here too.
627 * semantics.c (finish_static_assert): Use maybe_constant_value.
628 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
629 (potential_constant_expression): Use maybe_constant_value.
630 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
631 is potentially valid in C++0x.
632 * typeck2.c (store_init_value): Handle constant init.
633 (check_narrowing): Use maybe_constant_value.
634 (build_functional_cast): Set TREE_CONSTANT on literal T().
635 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
636 (LOOKUP_ALREADY_DIGESTED): New.
637 (compute_array_index_type): Adjust prototype.
638
639 * semantics.c (constexpr_call): New datatype.
640 (constexpr_call_table): New global table.
641 (constexpr_call_hash): New.
642 (constexpr_call_equal): Likewise.
643 (maybe_initialize_constexpr_call_table): Likewise.
644 (lookup_parameter_binding): Likewise.
645 (cxx_eval_builtin_function_call): Likewise.
646 (cxx_bind_parameters_in_call): Likewise.
647 (cxx_eval_call_expression): Likewise.
648 (cxx_eval_unary_expression): Likewise.
649 (cxx_eval_binary_expression): Likewise.
650 (cxx_eval_conditional_expression): Likewise.
651 (cxx_eval_array_reference): Likewise.
652 (cxx_eval_component_reference): Likewise.
653 (cxx_eval_logical_expression): Likewise.
654 (cxx_eval_object_construction): Likewise.
655 (cxx_eval_constant_expression): Likewise.
656 (cxx_eval_indirect_ref): Likewise.
657 (cxx_constant_value): Likewise.
658 (cxx_eval_bare_aggregate): Likewise.
659 (adjust_temp_type): New.
660 (reduced_constant_expression_p): New.
661 (verify_constant): New.
662 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
663 (cxx_eval_outermost_constant_expr): New.
664 (maybe_constant_value, maybe_constant_init): New.
665 (cxx_eval_constant_expression): Use them.
666 * pt.c (iterative_hash_template_arg): No longer static.
667 * cp-tree.h: Declare fns.
668
669 * cp-tree.h (register_constexpr_fundef): Declare.
670 * decl.c (maybe_save_function_definition): New.
671 (finish_function): Use it.
672 * semantics.c (constexpr_fundef): New datatype.
673 (constexpr_fundef_table): New global table.
674 (constexpr_fundef_equal): New.
675 (constexpr_fundef_hash): Likewise.
676 (retrieve_constexpr_fundef): Likewise.
677 (validate_constexpr_fundecl): Store in the table.
678 (build_data_member_initialization): New fn.
679 (build_constexpr_constructor_member_initializers): New.
680 (register_constexpr_fundef): Define.
681 (is_this_parameter): New.
682 (get_function_named_in_call): Likewise.
683 (get_nth_callarg): Likewise.
684 (check_automatic_or_tls): New.
685 (morally_constexpr_builtin_function_p): New.
686 (potential_constant_expression): New.
687
688 2010-11-01 Jason Merrill <jason@redhat.com>
689
690 * decl2.c (decl_constant_var_p): New fn.
691 (decl_maybe_constant_var_p): New fn.
692 (mark_used): Rework instantiation of things needed for constant
693 expressions.
694 * cp-tree.h: Declare new fns.
695 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
696 (always_instantiate_p): Use decl_maybe_constant_var_p.
697 (instantiate_decl): Don't defer constexpr functions.
698 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
699 * semantics.c (finish_id_expression): Use decl_constant_var_p.
700 Check for valid name in constant expr after mark_used.
701
702 2010-10-31 Jason Merrill <jason@redhat.com>
703
704 * class.c (is_really_empty_class): Work when type is not complete.
705 (synthesized_default_constructor_is_constexpr): New.
706 (add_implicitly_declared_members): Use it.
707 (type_has_constexpr_default_constructor): Likewise.
708 * cp-tree.h: Declare it.
709 * method.c (synthesized_method_walk): Use it.
710
711 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
712 * typeck.c (convert_for_assignment): Likewise.
713
714 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
715 message about constexpr without -std=c++0x.
716
717 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
718 member.
719
720 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
721
722 * class.c (layout_vtable_decl): Call build_array_of_n_type.
723 (build_vtt, build_ctor_vtabl_group): Likewise.
724
725 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
726
727 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
728 * parser.c (cp_parser_objc_at_property_declaration): Removed
729 parsing of RID_COPIES and RID_IVAR. Updated call to
730 objc_add_property_declaration.
731 * typecheck.c (finish_class_member_access_expr): Call
732 objc_maybe_build_component_ref instead of objc_build_setter_call.
733 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
734 of objc_build_getter_call.
735
736 2010-10-27 Jason Merrill <jason@redhat.com>
737
738 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
739 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
740 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
741 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
742 (cp_parser_trait_expr): Likewise.
743
744 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
745 Jason Merrill <jason@redhat.com>
746
747 * decl.c (finish_case_label): Use decl_constant_value.
748
749 * method.c (synthesized_method_walk): Track constexprness too.
750 (process_subob_fn, walk_field_subobs): Likewise.
751 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
752 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
753 * class.c (add_implicitly_declared_members): Handle
754 constexpr default ctor.
755
756 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
757 Make sure a constexpr ctor has an empty body.
758 * class.c (type_has_constexpr_default_constructor): New.
759 * cp-tree.h: Declare it.
760 * init.c (perform_member_init): Complain about uninitialized
761 member in constexpr ctor.
762 (emit_mem_initializers): And uninitialized base.
763 * decl.c (check_tag_decl): Fix typo.
764
765 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
766 (is_valid_constexpr_fn): New fn.
767 (validate_constexpr_fundecl): Use it.
768 * decl.c (validate_constexpr_redeclaration): New.
769 (duplicate_decls): Use it.
770 (cp_finish_decl): Call validate_constexpr_fundecl and
771 ensure_literal_type_for_constexpr_object here.
772 (start_decl): Not here. Don't ICE on constexpr reference.
773 (check_for_uninitialized_const_var): Don't handle constexpr specially.
774 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
775 (check_static_variable_definition): Give friendly message about
776 missing constexpr.
777 (grokdeclarator): Complain about typedef and volatile with constexpr.
778 Reorganize. Give sorry about non-static data members in C++0x mode.
779 (start_preparsed_function): Check validate_constexpr_fundecl here.
780 (check_function_type): Not here.
781 * decl2.c (finish_static_data_member_decl): Don't complain about
782 in-class init.
783 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
784 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
785 (cp_parser_decl_specifier_seq): Handle it.
786 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
787
788 * class.c (check_bases): Propagate non-literality.
789 (check_field_decls): Likewise.
790 (finalize_literal_type_property): New.
791 (check_bases_and_members): Call it.
792 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
793 (lang_type_class): Add has_constexpr_ctor field.
794 (DECL_DECLARED_CONSTEXPR_P): Strip template.
795 * decl.c (grok_special_member_properties): Set
796 TYPE_HAS_CONSTEXPR_CTOR.
797
798 2010-10-27 Jason Merrill <jason@redhat.com>
799
800 * call.c (build_integral_nontype_arg_conv): New.
801 * cp-tree.h: Declare it.
802 * pt.c (convert_nontype_argument): Use it.
803
804 * error.c (dump_simple_decl): Print constexpr.
805
806 * cvt.c (build_up_reference): Use target_type for the temporary var.
807
808 * except.c (build_throw): Set EXPR_LOCATION.
809
810 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
811
812 * semantics.c (finish_compound_stmt): Avoid creating an
813 unnecessary BIND_EXPR.
814
815 * call.c (convert_like_real): Don't check narrowing if the element
816 is also an initializer-list.
817
818 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
819
820 * parser.c (cp_parser_objc_at_property_declaration): Recognize
821 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
822 Do not use objc_set_property_attr, but use local variables
823 instead. Detect repeated usage of setter, getter and ivar
824 attributes. Improved error processing when a setter name does not
825 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
826 that the token is a keyword. Updated call to
827 objc_add_property_declaration.
828
829 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
830
831 * parser.c (cp_parser_objc_property_decl): Renamed to
832 cp_parser_objc_struct_declaration. Return the parsed trees
833 instead of calling objc_add_property_variable directly. Detect
834 missing or invalid declspecs. Implemented attributes. Do not eat
835 the ';' at the end. Exit loop whenever a non-comma is parsed, not
836 just EOF.
837 (cp_parser_objc_at_property): Renamed to
838 cp_parser_objc_at_property_declaration. Updated calls to
839 objc_add_property_variable, now objc_add_property_declaration, and
840 to cp_parser_objc_property_decl, now
841 cp_parser_objc_struct_declaration. Rewritten all code to be more
842 robust in dealing with syntax errors, and almost identical to the
843 one in c_parser_objc_at_property_declaration.
844 (cp_parser_objc_property_attrlist): Removed.
845 (cp_parser_objc_method_prototype_list): Updated call to
846 cp_parser_objc_at_property.
847 (cp_parser_objc_method_definition_list): Same change.
848 (cp_parser_objc_class_ivars): Detect a number of invalid
849 declarations of instance variables and produce errors when they
850 are found.
851
852 2010-10-26 Jason Merrill <jason@redhat.com>
853
854 * tree.c (build_vec_init_expr): Split out from...
855 (build_array_copy): ...here.
856 * init.c (perform_member_init): Use it.
857 * cp-tree.h: Declare it.
858 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
859 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
860 (cp_gimplify_expr): Handle array default-initialization via
861 VEC_INIT_EXPR.
862
863 * tree.c (stabilize_expr): Handle xvalues properly.
864
865 * call.c (build_over_call): Use argarray[0] for 'this' argument.
866
867 * decl.c (finish_function): Don't look at function_depth.
868
869 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
870
871 Implement opaque-enum-specifiers for C++0x.
872 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
873 (OPAQUE_ENUM_P): New.
874 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
875 (start_enum): Update prototype.
876 (finish_enum_value_list): New prototype.
877 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
878 "enum class" is used in an elaborated-type-specifier.
879 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
880 * decl.c (copy_type_enum): New.
881 (finish_enum_value_list): New, with code from finish_enum.
882 (finish_enum): A lot of code removed. Added a gcc_assert.
883 (start_enum): Add parameters enumtype and is_new.
884 Rewrite to work with opaque-enum-specifiers.
885 * pt.c (maybe_process_partial_specialization): Allow for template
886 specialization of enumerations, with a pedwarn.
887 (lookup_template_class): Update call to start_enum. Call to
888 SET_OPAQUE_ENUM_P.
889 (tsubst_enum): Call to begin_scope, finish_scope and
890 finish_enum_value_list.
891
892 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
893
894 Removed Objective-C++ specific replacement of cxx_printable_name.
895 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
896 to cxx_printable_name for both C++ and Objective-C++.
897 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
898
899 * error.c (dump_decl): For Objective-C++, call
900 objc_maybe_printable_name here ...
901 * tree.c (cxx_printable_name_internal): ... instead of here.
902
903 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
904
905 * tree.c (cxx_printable_name_internal): In Objective-C++, call
906 objc_maybe_printable_name.
907
908 2010-10-22 Jason Merrill <jason@redhat.com>
909
910 PR c++/46129
911 * pt.c (instantiate_class_template): Don't instantiate default
912 arguments.
913
914 PR c++/46103
915 * init.c (build_vec_init): Handle memberwise move.
916
917 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
918
919 PR c++/46117
920 * call.c (add_function_candidate): Don't use TREE_VALUE on null
921 parmnode.
922
923 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
924
925 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
926 bool instead of calling objc_set_method_type.
927 (cp_parser_objc_method_signature): Updated calls to
928 cp_parser_objc_method_type and to objc_build_method_signature.
929 (cp_parser_objc_method_prototype_list): Updated calls to
930 objc_add_method_declaration. Use token->type to determine if it
931 is a class method or not.
932 (cp_parser_objc_method_definition_list): Same change.
933
934 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
935
936 PR c++/46056
937 * parser.c (cp_convert_range_for): Call cp_finish_decl
938 instead of finish_expr_stmt.
939
940 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
941
942 * cp-lang.c (finish_file): Removed.
943 * decl2.c (cp_write_global_declarations): Call
944 objc_write_global_declarations when compiling Objective-C++.
945
946 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
947
948 PR c++/46046
949 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
950 (coerce_template_parms): Likewise for args.
951
952 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
953
954 Implemented parsing @synthesize and @dynamic for Objective-C++.
955 * parser.c (cp_parser_objc_method_definition_list): Recognize
956 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
957 (cp_parser_objc_at_dynamic_declaration): New.
958 (cp_parser_objc_at_synthesize_declaration): New.
959
960 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
961
962 * parser.c (cp_parser_objc_identifier_list): Check the return
963 value of cp_parser_identifier and react if it is error_mark_node.
964
965 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
966
967 Merge from apple/trunk branch on FSF servers.
968
969 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
970
971 Radar 4451818
972 * call.c (standard_conversion, implicit_conversion): Ignore
973 'volatile' attribute of artificially volatized type in objc when
974 evaluating various conversion weights.
975
976 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
977
978 Radar 4330422
979 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
980 artiificially 'volatized' type before doing pointer comparison.
981
982 2010-10-18 Jakub Jelinek <jakub@redhat.com>
983
984 PR c/46015
985 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
986 goto destination.
987
988 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
989
990 Merge from apple/trunk branch on FSF servers.
991
992 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
993
994 Radar 4516785
995 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
996 objc object types if type is scope qualified.
997
998 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
999
1000 Merge from apple/trunk branch on FSF servers.
1001
1002 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
1003
1004 Radar 4133425
1005 * lex.c (unqualified_name_lookup_error): Issue diagnostic
1006 for private 'ivar' access.
1007
1008 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
1009
1010 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
1011 enum, and handle @package.
1012
1013 2010-10-15 Jason Merrill <jason@redhat.com>
1014
1015 PR c++/45983
1016 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
1017 with a different typedef variant of the element type.
1018
1019 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
1020
1021 merge from FSF apple 'trunk' branch.
1022 2006 Fariborz Jahanian <fjahanian@apple.com>
1023
1024 Radars 4436866, 4505126, 4506903, 4517826
1025 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
1026 syntax.
1027 (cp_build_modify_expr): Likewise.
1028 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
1029 (cp_parser_objc_method_definition_list): Likewise.
1030 (cp_parser_objc_property_decl): New.
1031 (cp_parser_objc_property_attrlist): New.
1032 (cp_parser_objc_at_property): New.
1033
1034 2010-10-14 Richard Guenther <rguenther@suse.de>
1035
1036 PR lto/44561
1037 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
1038 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
1039 use build_int_cst.
1040 * error.c (dump_type): Handle NULLPTR_TYPE.
1041 (dump_type_prefix): Likewise.
1042 (dump_type_suffix): Likewise.
1043 * mangle.c (write_type): Likewise.
1044 * name-lookup.c (arg_assoc_type): Likewise.
1045 * rtti.c (typeinfo_in_lib_p): Likewise.
1046 * pt.c (tsubst): Likewise.
1047
1048 2010-10-13 Jason Merrill <jason@redhat.com>
1049
1050 PR c++/45984
1051 * class.c (fixup_attribute_variants): New fn.
1052 * cp-tree.h: Declare it.
1053 * pt.c (instantiate_class_template): Call it.
1054 * semantics.c (begin_class_definition): Call it.
1055
1056 2010-10-13 Richard Henderson <rth@redhat.com>
1057
1058 * cp-lang.c (cp_eh_personality): Update call to
1059 build_personality_function.
1060 * except.c (choose_personality_routine): Update function comment.
1061
1062 2010-10-13 Richard Guenther <rguenther@suse.de>
1063
1064 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
1065 clear DECL_CHAIN of NAMESPACE_DECLs.
1066
1067 2010-10-11 Martin Jambor <mjambor@suse.cz>
1068
1069 PR c++/45562
1070 * cp-tree.h (current_class_ref): Check that cp_function_chain is
1071 non-NULL.
1072 * call.c (build_cxx_call): Likewise.
1073
1074 2010-10-10 Jason Merrill <jason@redhat.com>
1075
1076 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
1077 (tsubst_default_arguments): Only do this once for cloned fns.
1078 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
1079 handle expressions.
1080 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
1081 (tsubst_copy_and_build): Likewise.
1082 (tsubst_initializer_list): Likewise.
1083 (tsubst_copy): Change default to gcc_unreachable. Handle
1084 OVERLOAD and PTRMEM_CST.
1085
1086 2010-10-10 Jason Merrill <jason@redhat.com>
1087
1088 PR lto/45959
1089 PR lto/45960
1090 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
1091
1092 2010-10-07 Andi Kleen <ak@linux.intel.com>
1093
1094 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
1095 (cc1plus-dummy): Remove.
1096 (cc1plus-checksum): Change to run checksum over object files
1097 and options only.
1098
1099 2010-10-08 Joseph Myers <joseph@codesourcery.com>
1100
1101 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1102
1103 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
1104
1105 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
1106 tcc_expression.
1107 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
1108 AT_ENCODE_EXPR.
1109 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
1110 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
1111 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
1112 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
1113 * parser.c (cp_parser_objc_encode_expression): Updated comment.
1114
1115 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
1116
1117 Merge from apple/trunk branch on FSF servers.
1118
1119 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1120
1121 Radar 4508851
1122 * parser.c (cp_parser_objc_interstitial_code): Recognize
1123 and parse RID_NAMESPACE keyword.
1124
1125 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
1126
1127 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
1128 finding ellipsis, before checking for attributes.
1129
1130 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
1131
1132 Merge from apple/trunk branch on FSF servers.
1133 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
1134 longer existing gcc/c-common.def.
1135
1136 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
1137
1138 Radar 4278774
1139 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
1140 * parser.c (cp_parser_objc_encode_expression): Build a templatized
1141 parse tree for @encode(T).
1142
1143 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
1144
1145 Radar 4278774
1146 * c-common.def: Add new expression code AT_ENCODE_EXPR.
1147
1148 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
1149
1150 PR c++/45908
1151 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
1152 code folding offsetof-like computations.
1153
1154 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1155
1156 PR objc++/31125
1157 * parser.c (cp_parser_objc_class_interface): If no identifier
1158 follows an @interface token, stop parsing the interface after
1159 printing an error.
1160 (cp_parser_objc_class_implementation): If no identifier follows an
1161 @implementation token, stop parsing the implementation after
1162 printing an error.
1163
1164 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1165
1166 PR objc++/23707
1167 * parser.c (cp_parser_objc_method_keyword_params): If the required
1168 colon is not found while parsing parameters, stop parsing them.
1169
1170 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1171
1172 PR objc++/31126
1173 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
1174 @end after detecting it. Print an error if @end is found without
1175 a '}'.
1176 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
1177 detecting it. Fixed reading the next token when continuing
1178 because of an error in a method signature. Print an error if EOF
1179 is found without an '@end'.
1180 (cp_parser_objc_method_definition_list): Same change.
1181
1182 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1183
1184 Merge from apple/trunk branch on FSF servers:
1185
1186 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
1187
1188 Radar 4290840
1189 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
1190 method parameters and issue error.
1191 (cp_parser_objc_method_definition_list): Check for invalid tokens
1192 which cannot start a function definition.
1193
1194 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
1195
1196 Radar 4294425
1197 * parser.c (cp_parser_objc_message_args): Check for missing message
1198 arguments and syntax error.
1199
1200 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
1201
1202 Radar 4261146
1203 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
1204 looking for '}'.
1205
1206 2005-08-15 Ziemowit Laski <zlaski@apple.com>
1207
1208 Radar 4093475
1209 * parser.c (cp_parser_objc_interstitial_code): Catch stray
1210 '{' and '}' tokens and issue appropriate errors.
1211
1212 2005-08-02 Ziemowit Laski <zlaski@apple.com>
1213
1214 Radar 4185810
1215 (cp_parser_statement_seq_opt): In addition to '}' and
1216 end-of-file, a statement sequence may also be terminated
1217 by a stray '@end'.
1218
1219 2010-10-05 Joseph Myers <joseph@codesourcery.com>
1220
1221 * cp-tree.h (cxx_print_error_function,
1222 cxx_initialize_diagnostics): Declare using diagnostic_context
1223 typedef.
1224
1225 2010-10-04 Andi Kleen <ak@linux.intel.com>
1226
1227 * Make-lang.in (g++, cc1plus): Add + to build rule.
1228
1229 2010-10-04 Jason Merrill <jason@redhat.com>
1230
1231 * tree.c (decl_storage_duration): New.
1232 * cp-tree.h: Declare it.
1233 (duration_kind): Return values.
1234
1235 2010-10-03 Jason Merrill <jason@redhat.com>
1236
1237 * typeck.c (require_complete_type_sfinae): Add complain parm to...
1238 (require_complete_type): ...this function.
1239 (cp_build_array_ref, convert_arguments): Use it.
1240 (convert_for_initialization, cp_build_modify_expr): Likewise.
1241 * cp-tree.h: Declare it.
1242 * call.c (build_over_call): Use it.
1243
1244 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
1245
1246 merge from FSF 'apple/trunk' branch.
1247 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
1248
1249 Radar 4386773
1250 * cp/parser.c (cp_parser_objc_interstitial_code): For
1251 @optional/@required set the optional/required flag.
1252
1253 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
1254
1255 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
1256 and indentation when finding an Objective-C++ CPP_AT_NAME token.
1257
1258 2010-09-29 Richard Guenther <rguenther@suse.de>
1259
1260 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
1261 (CP_TYPE_CONTEXT): Similar.
1262 (FROB_CONTEXT): Frob global_namespace to the global
1263 TRANSLATION_UNIT_DECL.
1264 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
1265 set DECL_CONTEXT of global_namespace to it.
1266 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
1267 instead of zeroing context.
1268 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
1269 (grokfndecl): Likewise.
1270 (start_preparsed_function): Likewise.
1271 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
1272 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
1273 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
1274 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
1275 (push_template_decl_real): Likewise.
1276 (tsubst_friend_class): Likewise. Adjust context comparisons.
1277 (instantiate_class_template): Use CP_TYPE_CONTEXT.
1278 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
1279 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
1280 SCOPE_FILE_SCOPE_P.
1281
1282 2010-09-29 Yao Qi <yao@codesourcery.com>
1283
1284 * decl.c (get_atexit_node): Fix typo.
1285
1286 2010-09-28 Jason Merrill <jason@redhat.com>
1287
1288 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
1289 (real_lvalue_p): Take const_tree.
1290 * cp-tree.h: Adjust.
1291 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
1292 (cp_build_addr_expr_1): Likewise.
1293
1294 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1295
1296 Partially merged from apple/trunk branch on FSF servers:
1297 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1298 Radar 3803157 (method attributes)
1299
1300 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
1301 (cp_parser_objc_method_tail_params_opt): Likewise.
1302 (cp_parser_objc_method_signature): Likewise.
1303 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
1304 (cp_parser_objc_method_prototype_list): Handle attributes.
1305 (cp_parser_objc_method_definition_list): Likewise.
1306
1307 2010-09-28 Richard Henderson <rth@redhat.com>
1308
1309 * cp-lang.c: Include "target.h".
1310 (cp_eh_personality): Use targetm.except_unwind_info.
1311 * Make-lang.in (cp-lang.o): Update deps.
1312
1313 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1314
1315 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
1316 (cp_parser_declaration): Parse prefix attributes for ObjC++.
1317 (cp_parser_objc_protocol_declaration): Handle attributes.
1318 (cp_parser_objc_class_interface): Likewise.
1319 (cp_parser_objc_declaration): Likewise.
1320
1321 2010-09-27 Jason Merrill <jason@redhat.com>
1322
1323 Require lvalues as specified by the standard.
1324 * typeck.c (lvalue_or_else): Use real_lvalue_p.
1325 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
1326 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
1327 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
1328 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
1329 (build_const_cast_1): Adjust.
1330 * cp-tree.h: Declare new fns.
1331 * call.c (build_this, convert_like_real, build_over_call): Adjust.
1332 (initialize_reference): Adjust.
1333 * class.c (build_base_path, convert_to_base_statically): Adjust.
1334 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
1335 * cvt.c (build_up_reference, convert_to_reference): Adjust.
1336 * decl.c (register_dtor_fn): Adjust.
1337 * decl2.c (build_offset_ref_call_from_tree): Adjust.
1338 * except.c (initialize_handler_parm): Adjust.
1339 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
1340 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
1341 * tree.c (stabilize_expr): Adjust.
1342
1343 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1344
1345 Merge from apple/trunk branch on FSF servers:
1346
1347 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1348
1349 Radar 4229905
1350 * typeck.c (composite_pointer_type): Call objc_have_common_type
1351 when comparing two objective-c pointer types.
1352
1353 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1354
1355 Radar 4175534
1356 * call.c (standard_conversion): Do not issue warnings when
1357 comparing ObjC pointer types.
1358
1359 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1360
1361 Radar 4154928
1362 * call.c (standard_conversion): Allow for a pointer conversion
1363 between any two ObjC pointer types.
1364 * typeck.c (composite_pointer_type): Determine common type
1365 for two ObjC pointer types.
1366
1367 2010-09-24 Jan Hubicka <jh@suse.cz>
1368
1369 * decl.c (finish_function): Use decl_replaceable_p
1370 * method.c (make_alias_for_thunk): Update call of
1371 cgraph_same_body_alias.
1372
1373 2010-09-24 Jason Merrill <jason@redhat.com>
1374
1375 * decl.c (compute_array_index_type): Remember type dependence of
1376 array bound.
1377 * pt.c (dependent_type_p_r): Don't recompute it here.
1378
1379 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
1380 reference and pointer to the same type as "*" or "&".
1381
1382 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
1383
1384 * typeck.c (warn_args_num): Use warning 'too many arguments to
1385 method [methodname]' for an Objective-C method instead of the less
1386 satisfactory 'too many arguments to function' (with no method
1387 name).
1388
1389 2010-09-21 Jason Merrill <jason@redhat.com>
1390
1391 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
1392 special handling if we know the member.
1393
1394 2010-09-18 Jason Merrill <jason@redhat.com>
1395
1396 * call.c (compare_ics): Do lvalue/rvalue reference binding
1397 comparison for ck_list, too.
1398
1399 2010-09-15 Jason Merrill <jason@redhat.com>
1400
1401 * semantics.c (finish_id_expression): Diagnose use of function
1402 parms in evaluated context outside function body.
1403
1404 * decl2.c (grokbitfield): Diagnose non-integral width.
1405
1406 * call.c (convert_like_real): Use the underlying type of the
1407 reference for the temporary.
1408
1409 2010-09-15 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR c++/45635
1412 * class.c (build_vtbl_initializer): Use fn instead of init's operand
1413 as first argument to FDESC_EXPR.
1414
1415 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
1416
1417 PR c++/45665
1418 * decl.c (grokdeclarator): Check build_memfn_type return value
1419 for error_mark_node.
1420
1421 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1422
1423 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
1424 (begin_range_for_stmt): Likewise.
1425
1426 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
1427
1428 Implement range-based for-statements.
1429 * cp-tree.def (RANGE_FOR_STMT): New.
1430 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
1431 (cp_convert_range_for): Declare.
1432 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
1433 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
1434 * semantics.c (begin_range_for_stmt): New.
1435 (finish_range_for_decl): New.
1436 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1437 (perform_koenig_lookup): Add extra argument include_std.
1438 * parser.c (cp_parser_c_for): New with code from
1439 cp_parser_iteration_statement().
1440 (cp_parser_range_for): New.
1441 (cp_convert_range_for): New.
1442 (cp_parser_iteration_statement): Add range-for support.
1443 (cp_parser_condition): Adjust comment.
1444 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1445 argument.
1446 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1447 * cxx-pretty-print.c: Likewise.
1448 * lex.c (cxx_init): Likewise.
1449 * name-lookup.c (lookup_function_nonclass): Add extra argument
1450 include_std.
1451 (lookup_arg_dependent): Likewise.
1452 * name-lookup.h: Likewise.
1453
1454 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1455
1456 PR c++/43824
1457 * error.c (maybe_warn_cpp0x): Add new warning
1458 CPP0X_INLINE_NAMESPACES.
1459 * parser.c (cp_parser_namespace_definition): Likewise.
1460 * cp-tree.h (cpp0x_warn_str): Likewise.
1461
1462 2010-09-10 Richard Guenther <rguenther@suse.de>
1463
1464 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1465 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1466
1467 2010-09-10 Jan Hubicka <jh@suse.cz>
1468
1469 PR tree-optimization/45605
1470 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1471 ADDR_EXPR.
1472
1473 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c++/45588
1476 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1477 before calling fold_decl_constant_value.
1478
1479 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1480
1481 * cp-tree.h (build_enumerator): Add new location_t parameter.
1482 (build_lang_decl_loc): New function.
1483 * decl.c (build_enumerator): New parameter loc. Use it when calling
1484 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1485 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1486 * parser.c (cp_parser_enumerator_definition): Ditto.
1487 * lex.c (build_lang_decl_loc): New function.
1488
1489 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1490
1491 PR c++/45200
1492 PR c++/45293
1493 PR c++/45558
1494 * tree.c (strip_typedefs): Strip typedefs from the context of
1495 TYPENAME_TYPEs.
1496
1497 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1498
1499 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1500 * call.c (build_conditional_expr): Likewise.
1501 (convert_arg_to_ellipsis): Likewise.
1502
1503 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1504
1505 * parser.c (make_pointer_declarator, make_reference_declarator,
1506 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1507 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1508
1509 2010-09-06 Jason Merrill <jason@redhat.com>
1510
1511 * call.c (implicit_conversion): Fix value-init of enums.
1512 (convert_like_real): Likewise.
1513
1514 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1515
1516 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1517 (fold_non_dependent_expr): ...here.
1518 (convert_nontype_argument): Use it. Take complain parm.
1519 Use perform_implicit_conversion instead of ocp_convert.
1520 Allow cv-qual changes.
1521 (convert_template_argument): Pass complain down.
1522 (tsubst_template_arg): Suppress constant expression warnings.
1523 Don't fold here.
1524
1525 * method.c (synthesized_method_walk): In constructors, also check
1526 subobject destructors.
1527
1528 * semantics.c (finish_compound_literal): Always build a
1529 TARGET_EXPR.
1530
1531 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1532
1533 PR c++/45043
1534 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1535
1536 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1537
1538 PR middle-end/45423
1539 * parser.c (cp_parser_omp_atomic): Handle boolean
1540 {PRE,POST}_INCREMENT.
1541
1542 2010-08-29 Jason Merrill <jason@redhat.com>
1543
1544 PR c++/44991
1545 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1546 after tentative parsing.
1547
1548 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1549
1550 * Make-lang.in (g++spec.o): Update dependencies.
1551 * g++spec.c: Include opts.h
1552 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1553 (lang_specific_driver): Use cl_decoded_option structures.
1554
1555 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1556
1557 * call.c: Use FOR_EACH_VEC_ELT.
1558 * class.c: Likewise.
1559 * decl.c: Likewise.
1560 * decl2.c: Likewise.
1561 * error.c: Likewise.
1562 * except.c: Likewise.
1563 * mangle.c: Likewise.
1564 * method.c: Likewise.
1565 * name-lookup.c: Likewise.
1566 * parser.c: Likewise.
1567 * pt.c: Likewise.
1568 * repo.c: Likewise.
1569 * semantics.c: Likewise.
1570 * typeck2.c: Likewise.
1571
1572 2010-08-19 Jason Merrill <jason@redhat.com>
1573
1574 * call.c (reference_related_p): Check for error_mark_node.
1575 (add_function_candidate): Check it instead of
1576 same_type_ignoring_top_level_qualifiers_p.
1577
1578 PR c++/45315
1579 * init.c (build_new_1): Don't use build_value_init in a template.
1580 (build_value_init): Make sure we don't.
1581
1582 PR c++/45307
1583 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1584 of empty class CONSTRUCTOR.
1585
1586 * except.c (pending_noexcept, pending_noexcept_checks): New.
1587 (perform_deferred_noexcept_checks): New.
1588 (maybe_noexcept_warning): Split from...
1589 (finish_noexcept_expr): ...here. Adjust.
1590 * decl2.c (cp_write_global_declarations): Call
1591 perform_deferred_noexcept_checks.
1592 * cp-tree.h: And declare it.
1593
1594 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1595
1596 PR c++/45049
1597 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1598 TREE_CHAIN.
1599
1600 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1601
1602 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1603 or if -fms-extensions is enabled check, check permissive.
1604
1605 2010-08-09 Jason Merrill <jason@redhat.com>
1606
1607 PR c++/45236
1608 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1609
1610 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1611
1612 * call.c (add_builtin_candidates): Use VECs for local variable
1613 `types'. Adjust remainder of function accordingly.
1614
1615 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1616
1617 * name-lookup.c (is_associated_namespace): Convert local variables
1618 to be VECs instead of TREE_LISTs.
1619
1620 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1621
1622 * tree.c (varargs_function_p): Use stdarg_p.
1623
1624 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1625
1626 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1627 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1628 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1629 Change type to a VEC.
1630 (unparsed_funs_with_default_args): Define.
1631 (unparsed_funs_with_definitions): Define.
1632 (push_unparsed_function_queues): New function.
1633 (cp_parser_new): Call it.
1634 (pop_unparsed_function_queues): New function.
1635 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1636 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1637 (cp_parser_save_member_function_body): Likewise.
1638 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1639 and pop_unparsed_function_queues.
1640 (cp_parser_late_parsing_default_args): Likewise.
1641 (cp_parser_save_default_args): Use VEC_safe_push.
1642
1643 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1644
1645 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1646 containing it.
1647 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1648 fields to VECs.
1649 * decl.c (poplevel): Adjust for type changes.
1650 (declare_local_label): Likewise.
1651
1652 2010-08-06 Jason Merrill <jason@redhat.com>
1653
1654 * typeck.c (complete_type_or_maybe_complain): Split out from...
1655 (complete_type_or_else): Here.
1656 (build_class_member_access_expr): Call it.
1657 (finish_class_member_access_expr): Likewise.
1658 * call.c (build_special_member_call): Likewise.
1659 * cvt.c (build_expr_type_conversion): Likewise.
1660 * init.c (build_new): Likewise.
1661 * typeck2.c (build_functional_cast): Likewise.
1662 * cp-tree.h: Declare it.
1663
1664 * init.c (build_value_init): Add complain parm.
1665 (build_value_init_noctor): Likewise.
1666 (perform_member_init): Pass it.
1667 (expand_aggr_init_1): Likewise.
1668 (build_new_1): Likewise.
1669 (build_vec_init): Likewise.
1670 * pt.c (tsubst_expr): Likewise.
1671 * typeck2.c (build_functional_cast): Likewise.
1672 * cp-tree.h: Adjust.
1673 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1674
1675 * typeck.c (decay_conversion): Any expression with type nullptr_t
1676 decays to nullptr.
1677
1678 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1679
1680 PR c++/45112
1681 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1682
1683 2010-07-27 Jason Merrill <jason@redhat.com>
1684
1685 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1686 from build_value_init.
1687 * init.c (build_value_init_noctor): Give error for unknown array
1688 bound.
1689
1690 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1691
1692 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1693
1694 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1695
1696 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1697 c_common_initialize_diagnostics.
1698 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1699 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1700
1701 2010-07-21 Jason Merrill <jason@redhat.com>
1702
1703 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1704
1705 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1706 to cp_finish_decl.
1707
1708 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1709
1710 PR c++/44641
1711 * pt.c (instantiate_class_template): Propagate the template's
1712 location to its instance.
1713
1714 2010-07-20 Jason Merrill <jason@redhat.com>
1715
1716 PR c++/44967
1717 * pt.c (tsubst_copy_and_build): Rework last change.
1718
1719 PR c++/44967
1720 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1721 CALL_EXPR.
1722
1723 2010-07-19 Jason Merrill <jason@redhat.com>
1724
1725 PR c++/44996
1726 * semantics.c (finish_decltype_type): Correct decltype
1727 of parenthesized rvalue reference variable.
1728
1729 PR c++/44969
1730 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1731 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1732
1733 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1734
1735 PR c++/44969
1736 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1737 parameter.
1738 * cp-tree.h: Adjust declaration.
1739 * init.c (perform_member_init): Adjust caller.
1740 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1741 * typeck2.c (store_init_value): Likewise.
1742 (build_functional_cast): Pass complain argument to
1743 build_x_compound_expr_from_list.
1744
1745 2010-07-16 Jason Merrill <jason@redhat.com>
1746
1747 PR c++/32505
1748 * pt.c (process_partial_specialization): Diagnose partial
1749 specialization after instantiation.
1750 (most_specialized_class): Add complain parm.
1751
1752 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1753
1754 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1755
1756 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1757 cp_build_function_call.
1758
1759 2010-07-15 Jason Merrill <jason@redhat.com>
1760
1761 PR c++/44909
1762 * call.c (add_function_candidate): If we're working on an implicit
1763 declaration, don't consider candidates that won't match.
1764 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1765 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1766
1767 Revert:
1768 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1769 (TYPE_HAS_USER_OPEQ): New.
1770 * decl.c (grok_special_member_properties): Set it.
1771 * class.c (add_implicitly_declared_members): Don't lazily declare
1772 constructors/operator= if a base or member has a user-declared one.
1773 (check_bases_and_members, check_bases): Adjust.
1774 (check_field_decls, check_field_decl): Adjust.
1775
1776 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1777
1778 * decl.c (integer_three_node): Remove.
1779 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1780 * cp-tree.h (integer_three_node): Remove.
1781
1782 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1783
1784 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1785 * call.c: Likewise.
1786 * class.c: Likewise.
1787 * cp-gimplify.c: Likewise.
1788 * decl.c: Likewise.
1789 * decl2.c: Likewise.
1790 * init.c: Likewise.
1791 * mangle.c: Likewise.
1792 * name-lookup.c: Likewise.
1793 * optimize.c: Likewise.
1794 * parser.c: Likewise.
1795 * pt.c: Likewise.
1796 * rtti.c: Likewise.
1797 * search.c: Likewise.
1798 * semantics.c: Likewise.
1799 * typeck.c: Likewise.
1800 * typeck2.c: Likewise.
1801
1802 2010-07-14 Jason Merrill <jason@redhat.com>
1803
1804 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1805 (build_field_list): Cache field type.
1806
1807 Implement C++0x unrestricted unions (N2544)
1808 * class.c (check_field_decl): Loosen union handling in C++0x.
1809 * method.c (walk_field_subobs): Split out from...
1810 (synthesized_method_walk): ...here. Set msg before loops.
1811 (process_subob_fn): Check for triviality in union members.
1812 * init.c (sort_mem_initializers): Splice out uninitialized
1813 anonymous unions and union members.
1814 (push_base_cleanups): Don't automatically destroy anonymous unions
1815 and union members.
1816
1817 2010-07-13 Jason Merrill <jason@redhat.com>
1818
1819 PR c++/44909
1820 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1821 (TYPE_HAS_USER_OPEQ): New.
1822 * decl.c (grok_special_member_properties): Set it.
1823 * class.c (add_implicitly_declared_members): Don't lazily declare
1824 constructors/operator= if a base or member has a user-declared one.
1825 (check_bases_and_members, check_bases): Adjust.
1826 (check_field_decls, check_field_decl): Adjust.
1827 * method.c (synthesized_method_walk): Initialize check_vdtor.
1828
1829 PR c++/44540
1830 * mangle.c (write_type): Canonicalize.
1831 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1832 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1833
1834 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1835
1836 PR c++/44908
1837 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1838 complain argument.
1839 * typeck.c (get_delta_difference): Update prototype, add a
1840 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1841 add checks for error_mark_node.
1842 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1843 parameter; update lookup_base call.
1844 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1845 parameter; update get_delta_difference call and add check for
1846 error_mark_node.
1847 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1848 parameter; update get_delta_difference call and add check for
1849 error_mark_node; update build_ptrmemfunc call.
1850 (build_static_cast_1): Adjust convert_ptrmem call.
1851 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1852 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1853 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1854 and build_ptrmemfunc calls.
1855 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1856
1857 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1858
1859 PR c++/44907
1860 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1861 adjust build_special_member_call call, pass complain.
1862 (convert_like_real): Adjust build_temp call, pass complain.
1863
1864 2010-07-09 Jason Merrill <jason@redhat.com>
1865
1866 PR c++/43120
1867 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1868 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1869 Set BV_LOST_PRIMARY.
1870 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1871
1872 2010-07-08 Jason Merrill <jason@redhat.com>
1873
1874 PR c++/43120
1875 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1876 virtual bases for covariant thunks.
1877
1878 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1879
1880 * cp-tree.h: Do not include toplev.h.
1881
1882 2010-07-06 Jason Merrill <jason@redhat.com>
1883
1884 PR c++/44703
1885 * call.c (is_std_init_list): Look through typedefs.
1886
1887 PR c++/44778
1888 * init.c (build_offset_ref): If scope isn't dependent,
1889 don't exit early. Look at TYPE_MAIN_VARIANT.
1890 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1891
1892 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1893
1894 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1895
1896 * cp-tree.h (impl_conv_void): New type.
1897 (convert_to_void): Adjust prototype.
1898 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1899 diagnostic for easy translation. Change caller.
1900 * typeck.c: Update call to convert_to_void.
1901 * semantics.c: Likewise.
1902 * init.c: Likewise.
1903
1904 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1905
1906 * decl.c (cp_finish_decl): Call add_local_decl.
1907 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1908
1909 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1910
1911 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1912 throughout.
1913
1914 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1915
1916 PR c++/22138
1917 * parser.c (cp_parser_primary_expression): Error if local template is
1918 declared.
1919
1920 2010-07-02 Le-Chun Wu <lcwu@google.com>
1921
1922 PR/44128
1923 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1924 (variable or type) shadows another type.
1925
1926 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1927
1928 PR c++/44780
1929 * typeck.c (convert_for_assignment): When converting a convertible
1930 vector type or objc++ types, call mark_rvalue_use.
1931 * typeck2.c (build_m_component_ref): Use return values from
1932 mark_rvalue_use or mark_lvalue_use.
1933 * class.c (build_base_path): Likewise.
1934 * call.c (build_conditional_expr): Likewise.
1935
1936 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1937
1938 PR c++/44039
1939 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1940 returns NULL_TREE.
1941
1942 2010-07-01 Richard Guenther <rguenther@suse.de>
1943
1944 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1945 predicate we are looking for, allow non-gimplified
1946 INDIRECT_REFs.
1947
1948 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1949
1950 PR c++/44628
1951 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1952 arg is NULL_TREE too.
1953 * call.c (convert_class_to_reference): Return error_mark_node when
1954 expr is NULL_TREE.
1955
1956 2010-06-30 Michael Matz <matz@suse.de>
1957
1958 * repo.c (finish_repo): Fix typo.
1959
1960 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1961
1962 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1963
1964 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1965
1966 * repo.c (pending_repo): Change type to a VEC.
1967 (finish_repo): Adjust for new type of pending_repo.
1968 (repo_emit_p): Likewise.
1969
1970 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1971
1972 * tree.c: Include gimple.h. Do not include tree-flow.h
1973 * decl.c: Do not include tree-flow.h
1974 * Make-lang.in: Adjust dependencies.
1975
1976 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1977
1978 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1979 (incomplete_vars): Adjust comment. Change type to a VEC.
1980 (maybe_register_incomplete_var): Adjust for new type.
1981 (complete_vars): Adjust iteration over incomplete_vars.
1982
1983 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1984
1985 * decl.c (struct named_label_entry): Change type of bad_decls field
1986 to a VEC.
1987 (poplevel_named_label_1): Adjust for new type of bad_decls.
1988 (check_goto): Likewise.
1989
1990 2010-06-29 Jason Merrill <jason@redhat.com>
1991
1992 Enable implicitly declared move constructor/operator= (N3053).
1993 * class.c (add_implicitly_declared_members): A class with no
1994 explicitly declared copy or move constructor gets both declared
1995 implicitly, and similarly for operator=.
1996 (check_bases): A type with no copy ctor does not inhibit
1997 a const copy ctor in a derived class. It does mean the derived
1998 one is non-trivial.
1999 (check_field_decl): Likewise.
2000 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
2001 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
2002 (trivially_copyable_p): Likewise.
2003 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
2004 * class.c (finish_struct_bits): Likewise.
2005 * tree.c (build_target_expr_with_type): Likewise.
2006 * typeck2.c (store_init_value): Likewise.
2007
2008 Enable implicitly deleted functions (N2346)
2009 * class.c (check_bases_and_members): Adjust lambda flags.
2010 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
2011
2012 * decl2.c (mark_used): Adjust error for use of deleted function.
2013
2014 Machinery to support implicit delete/move.
2015 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
2016 has_complex_move_ctor, has_complex_move_assign bitfields.
2017 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
2018 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
2019 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
2020 (enum special_function_kind): Add sfk_move_assignment.
2021 (LOOKUP_SPECULATIVE): New.
2022 * call.c (build_over_call): Return early if it's set.
2023 (build_over_call): Use trivial_fn_p.
2024 * class.c (check_bases): If the base has no default constructor,
2025 the derived one is non-trivial. Handle move ctor/op=.
2026 (check_field_decl): Likewise.
2027 (check_bases_and_members): Handle move ctor/op=.
2028 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
2029 (type_has_move_constructor, type_has_move_assign): New.
2030 * decl.c (grok_special_member_properties): Handle move ctor/op=.
2031 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
2032 (trivial_fn_p): New.
2033 (do_build_copy_constructor): Use it.
2034 (do_build_assign_ref): Likewise. Handle move assignment.
2035 (build_stub_type, build_stub_object, locate_fn_flags): New.
2036 (locate_ctor): Use locate_fn_flags.
2037 (locate_copy, locate_dtor): Remove.
2038 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
2039 (process_subob_fn, synthesized_method_walk): New.
2040 (maybe_explain_implicit_delete): New.
2041 (implicitly_declare_fn): Use synthesized_method_walk,
2042 type_has_trivial_fn, and type_set_nontrivial_flag.
2043 (defaulted_late_check): Set DECL_DELETED_FN.
2044 (defaultable_fn_check): Handle sfk_move_assignment.
2045 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
2046 implicitly deleted move ctor/op=.
2047 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
2048 (lookup_fnfields_slot): New.
2049 * semantics.c (omp_clause_info_fndecl): Remove.
2050 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
2051 get_copy_assign, trivial_fn_p.
2052 (trait_expr_value): Adjust call to locate_ctor.
2053 * tree.c (special_function_p): Handle sfk_move_assignment.
2054
2055 * class.c (type_has_virtual_destructor): New.
2056 * cp-tree.h: Declare it.
2057 * semantics.c (trait_expr_value): Use it.
2058
2059 * call.c (build_over_call): Only give warnings with tf_warning.
2060
2061 * name-lookup.c (pop_scope): Handle NULL_TREE.
2062
2063 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
2064 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
2065 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
2066 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
2067 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
2068 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
2069 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
2070 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
2071 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
2072 (sfk_assignment_operator): Rename to sfk_copy_assignment.
2073 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
2074 * search.c, semantics.c, tree.c: Adjust.
2075
2076 * pt.c (dependent_scope_ref_p): Remove.
2077 (value_dependent_expression_p): Don't call it.
2078 (type_dependent_expression_p): Here either.
2079 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
2080 if the scope isn't dependent.
2081
2082 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
2083 a reference.
2084
2085 PR c++/44587
2086 * pt.c (has_value_dependent_address): New.
2087 (value_dependent_expression_p): Check it.
2088 (convert_nontype_argument): Likewise. Call decay_conversion before
2089 folding if we want a pointer.
2090 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
2091 scope is the current instantiation.
2092
2093 2010-06-28 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR c++/44682
2096 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
2097 on expr.
2098
2099 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2100
2101 * init.c: Do not include except.h.
2102 * decl.c: Likewise.
2103 * expr.c: Likewise.
2104 * cp-lang.c: Likewise.
2105 * pt.c: Likewise.
2106 * semantics.c: Likewise.
2107 * decl2.c: Likewise.
2108 * except.c: Likewise.
2109 (init_exception_processing): Do not set the removed
2110 lang_protect_cleanup_actions here.
2111 (cp_protect_cleanup_actions): Make non-static and remove prototype.
2112 (doing_eh): New, moved from except.c but removed the do_warning flag.
2113 (expand_start_catch_block): Update doing_eh call.
2114 (expand_end_catch_block): Likewise.
2115 (build_throw): Likewise.
2116 * cp-tree.h: Prototype cp_protect_cleanup_actions.
2117 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
2118 cp_protect_cleanup_actions.
2119 * Make-lang.in: Update dependencies.
2120
2121 2010-06-26 Jason Merrill <jason@redhat.com>
2122
2123 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
2124 constructor called with a single argument that takes a reference
2125 to the constructor's class.
2126 (BAD_CONVERSION_RANK): New.
2127 (compare_ics): Use it to compare bad ICSes.
2128
2129 2010-06-25 Joseph Myers <joseph@codesourcery.com>
2130
2131 * lang-specs.h: Remove +e handling.
2132
2133 2010-06-24 Andi Kleen <ak@linux.intel.com>
2134
2135 * parser.c: (cp_parser_question_colon_clause):
2136 Switch to use cp_lexer_peek_token.
2137 Call warn_for_omitted_condop. Call pedwarn for omitted
2138 middle operand.
2139
2140 2010-06-22 Jakub Jelinek <jakub@redhat.com>
2141
2142 PR c++/44619
2143 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
2144 datum and mark_rvalue_use on component.
2145
2146 PR c++/44627
2147 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
2148 the CALL_EXPR has no arguments.
2149
2150 2010-06-21 Jason Merrill <jason@redhat.com>
2151
2152 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
2153
2154 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
2155 element type.
2156
2157 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
2158
2159 * name-lookup.c (struct arg_lookup): Convert namespaces and
2160 classes fields to VEC.
2161 (arg_assoc_namespace): Adjust for new type of namespaces.
2162 (arg_assoc_class): Adjust for new type of classes.
2163 (lookup_arg_dependent): Use make_tree_vector and
2164 release_tree_vector.
2165 * typeck2.c (build_x_arrow): Use vec_member.
2166
2167 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
2168
2169 PR c++/44486
2170 * error.c (dump_decl): Better wording for anonymous namespace.
2171
2172 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
2173
2174 * class.c (build_vtbl_initializer): Adjust computation of new_position
2175 and which entry to add padding for.
2176
2177 2010-06-16 Jason Merrill <jason@redhat.com>
2178
2179 * except.c (check_noexcept_r): Return the problematic function.
2180 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
2181 * pt.c (tsubst_copy_and_build): Pass it.
2182 * parser.c (cp_parser_unary_expression): Likewise.
2183 * cp-tree.h: Adjust prototype.
2184
2185 * method.c (defaulted_late_check): Give the defaulted method
2186 the same exception specification as the implicit declaration.
2187
2188 2010-06-15 Jason Merrill <jason@redhat.com>
2189
2190 * class.c (add_implicitly_declared_members): Implicit assignment
2191 operators can also be virtual overriders.
2192 * method.c (lazily_declare_fn): Likewise.
2193
2194 * call.c (convert_like_real): Give "initializing argument of"
2195 information for ambiguous conversion. Give source position
2196 of function.
2197
2198 * call.c (print_z_candidates): Do print viable deleted candidates.
2199 (joust): Don't choose a deleted function just because its worst
2200 conversion is better than another candidate's worst.
2201
2202 * call.c (convert_like_real): Don't complain about
2203 list-value-initialization from an explicit constructor.
2204
2205 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
2206 DECL_SOURCE_LOCATION directly.
2207
2208 * class.c (type_has_user_provided_default_constructor): Use
2209 sufficient_parms_p.
2210
2211 * call.c (is_subseq): Handle ck_aggr, ck_list.
2212 (compare_ics): Treat an aggregate or ambiguous conversion to the
2213 same type as involving the same function.
2214
2215 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
2216
2217 * typeck.c (convert_for_assignment): Fix comment. Change message
2218 format from %d to %qP.
2219 (convert_for_initialization): Fix comment.
2220
2221 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
2222
2223 * cp-tree.h (expr_list_kind): New type.
2224 (impl_conv_rhs): New type.
2225 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
2226 prototype.
2227 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
2228 diagnostics for easy translation. Change caller.
2229 (convert_for_initialization): Use impl_conv_rhs and change caller.
2230 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
2231 diagnostics for easy translation. Change caller.
2232 * decl.c (bad_spec_place): New enum.
2233 (bad_specifiers): Use it and emit the diagnostics for easy
2234 translation. Change caller.
2235 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
2236
2237 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
2238
2239 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
2240 to a VEC.
2241 * decl2.c (cp_write_global_declarations): Adjust for new type of
2242 decl_namespace_list.
2243 * name-lookup.c (current_decl_namespace): Likewise.
2244 (push_decl_namespace): Likewise.
2245 (pop_decl_namespace): Likewise.
2246
2247 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
2248
2249 * call.c (build_java_interface_fn_ref): Call build_function_type_list
2250 instead of build_function_type.
2251 * decl.c (cxx_init_decl_processing): Likewise.
2252 (declare_global_var): Likewise.
2253 (get_atexit_node): Likewise.
2254 (expand_static_init): Likewise.
2255 * decl2.c (start_objects): Likewise.
2256 (start_static_storage_duration_function): Likewise.
2257 * except.c (init_exception_processing): Likewise.
2258 (build_exc_ptr): Likewise.
2259 (build_throw): Likewise.
2260 * rtti.c (throw_bad_cast): Likewise.
2261 (throw_bad_typeid): Likewise.
2262 (build_dynamic_cast_1): Likewise.
2263
2264 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
2265
2266 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
2267 (build_op_delete_call): Likewise.
2268 (build_over_call): Likewise.
2269 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
2270 * pt.c (process_partial_specialization): Likewise.
2271 (tsubst_template_args): Likewise.
2272 * semantics.c (finish_asm_stmt): Likewise.
2273
2274 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
2275
2276 * decl.c (record_key_method_defined): New, broken out of ...
2277 (finish_function): ... here. Call it.
2278 (start_decl): Treat aliases as definitions.
2279
2280 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2281
2282 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
2283
2284 * pt.c (maybe_process_partial_specialization): Likewise.
2285 (register_specialization): Likewise.
2286 (add_pending_template): Likewise.
2287 (lookup_template_class): Likewise.
2288 (push_tinst_level): Likewise.
2289
2290 * parser.c (cp_lexer_new_main): Likewise.
2291 (cp_lexer_new_from_tokens): Likewise.
2292 (cp_token_cache_new): Likewise.
2293 (cp_parser_context_new): Likewise.
2294 (cp_parser_new): Likewise.
2295 (cp_parser_nested_name_specifier_opt): Likewise.
2296 (cp_parser_template_id): Likewise.
2297
2298 * name-lookup.c (binding_entry_make): Likewise.
2299 (binding_table_construct): Likewise.
2300 (binding_table_new): Likewise.
2301 (cxx_binding_make): Likewise.
2302 (pushdecl_maybe_friend): Likewise.
2303 (begin_scope): Likewise.
2304 (push_to_top_level): Likewise.
2305
2306 * lex.c (init_reswords): Likewise.
2307 (retrofit_lang_decl): Likewise.
2308 (cxx_dup_lang_specific_decl): Likewise.
2309 (copy_lang_type): Likewise.
2310 (cxx_make_type): Likewise.
2311
2312 * decl.c (make_label_decl): Likewise.
2313 (check_goto): Likewise.
2314 (start_preparsed_function): Likewise.
2315 (save_function_data): Likewise.
2316
2317 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2318
2319 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2320
2321 * class.c (finish_struct_1): Likewise.
2322
2323 * cp-tree.h (struct lang_type): Add variable_size GTY option.
2324 (struct lang_decl): Likewise.
2325
2326 * parser.c (cp_parser_new): Update comment to not reference
2327 ggc_alloc.
2328
2329 2010-06-07 Jason Merrill <jason@redhat.com>
2330
2331 PR c++/44366
2332 * error.c (dump_parameters): Mask out TFF_SCOPE.
2333 (dump_simple_decl): Don't print the scope of a PARM_DECL.
2334 (dump_scope): Remove no-op mask.
2335
2336 PR c++/44401
2337 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
2338
2339 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
2340 * init.c (build_offset_ref): Use it.
2341 * pt.c (maybe_process_partial_specialization): Use it.
2342 (instantiate_class_template): Use it.
2343 * search.c (lookup_base): Use it.
2344
2345 2010-06-07 Jakub Jelinek <jakub@redhat.com>
2346
2347 PR c++/44444
2348 * expr.c (mark_exp_read): Handle INDIRECT_REF.
2349 * cvt.c (convert_to_void): Handle INDIRECT_REF like
2350 handled_component_p.
2351
2352 PR c++/44443
2353 * decl.c (initialize_local_var): If TREE_USED is set on the type,
2354 set also DECL_READ_P on the decl.
2355
2356 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2357
2358 PR c++/44188
2359 * cp-tree.h (typedef_variant_p): Move this declaration to
2360 gcc/tree.h.
2361 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2362 * decl.c (grokdeclarator): Do not rename debug info of an
2363 anonymous tagged type named by a typedef.
2364
2365 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
2366
2367 PR c++/44086
2368 * class.c (check_field_decls): Move the call to
2369 check_bitfield_decl before trying to set the
2370 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
2371
2372 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2373
2374 * typeck.c: Update include path for moved files.
2375 * decl.c: Likewise.
2376 * rtti.c: Likewise.
2377 * cp-gimplify.c: Likewise.
2378 * cp-lang.c: Likewise.
2379 * pt.c: Likewise.
2380 * semantics.c: Likewise.
2381 * cxx-pretty-print.h: Likewise.
2382 * decl2.c: Likewise.
2383 * parser.c: Likewise.
2384 * cp-objcp-common.c: Likewise.
2385 * cp-tree.h: Likewise.
2386 * name-lookup.c: Likewise.
2387 * lex.c: Likewise.
2388 * name-lookup.h: Likewise.
2389 * config-lang.in: Update paths in gtfiles for files in c-family/.
2390 * Make-lang.in: Likewise.
2391
2392 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
2393
2394 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
2395 * typeck.c (build_ptrmemfunc): Likewise.
2396
2397 2010-06-04 Jason Merrill <jason@redhat.com>
2398
2399 * typeck2.c (merge_exception_specifiers): Adjust merging of
2400 throw() and noexcept(true).
2401
2402 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
2403 using an uninitialized variable.
2404
2405 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
2406 (pp_cxx_expression): Likewise.
2407
2408 Implement noexcept-specification (15.4)
2409 * parser.c (cp_parser_exception_specification_opt): Parse it.
2410 Give -Wdeprecated warning about throw() specs.
2411 * pt.c (tsubst_exception_specification): Handle it.
2412 * error.c (dump_exception_spec): Handle it.
2413 (dump_expr): Handle NOEXCEPT_EXPR.
2414 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
2415 * typeck.c (comp_except_specs): Handle compatibility rules.
2416 Change exact parm to take an enum.
2417 * typeck2.c (merge_exception_specifiers): Handle noexcept.
2418 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
2419 (type_throw_all_p, build_noexcept_spec): New fns.
2420 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
2421 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
2422 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
2423 (noexcept_true_spec, noexcept_false_spec): New macros.
2424 * name-lookup.c (pushdecl_maybe_friend): Adjust.
2425 * search.c (check_final_overrider): Adjust.
2426 * decl.c (check_redeclaration_exception_specification): Adjust.
2427 (use_eh_spec_block): Use type_throw_all_p.
2428 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
2429 Give operator new a noexcept-specification in C++0x mode.
2430 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
2431 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
2432
2433 Implement noexcept operator (5.3.7)
2434 * cp-tree.def (NOEXCEPT_EXPR): New.
2435 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2436 * cp-tree.h: Declare finish_noexcept_expr.
2437 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2438 * pt.c (tsubst_copy_and_build): And tsubst it.
2439 (type_dependent_expression_p): Handle it.
2440 (value_dependent_expression_p): Handle it.
2441
2442 * call.c (build_conditional_expr): Never fold in unevaluated context.
2443 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2444 * semantics.c (simplify_aggr_init_expr): Likewise.
2445 * typeck.c (merge_types): Call merge_exception_specifiers.
2446 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2447 DECL_ANTICIPATED for preferring new type.
2448
2449 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2450
2451 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2452 diagnostics.
2453
2454 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2455
2456 PR c++/44412
2457 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2458 on object for static data members.
2459
2460 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2461 Jason Merrill <jason@redhat.com>
2462
2463 PR c++/44362
2464 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2465 with the same type, call mark_lvalue_use on both.
2466
2467 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2468
2469 * class.c (struct vtbl_init_data_s): Remove last_init field.
2470 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2471 to a VEC.
2472 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2473 initializers.
2474 (build_vtt): Likewise.
2475 (initialize_vtable): Take a VEC instead of a tree.
2476 (build_vtt_inits): Change return type to void. Take a VEC **
2477 instead of a tree *; accumulate results into said VEC.
2478 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2479 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2480 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2481 instead of a tree.
2482 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2483 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2484 into it.
2485 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2486 rather than tree_cons.
2487 (build_vbase_offset_vtbl_entries): Likewise.
2488 (add_vcall_offset): Likewise.
2489 (build_rtti_vtbl_entries): Likewise.
2490 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2491 * decl.c (initialize_artificial_var): Use build_constructor instead
2492 of build_constructor_from_list.
2493
2494 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2495
2496 PR c++/44294
2497 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2498 bit-field.
2499
2500 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2501
2502 * parser.c (cp_parser_mem_initializer_list): Change error text.
2503
2504 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2505
2506 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2507 tree_decl_map hashtab from tree_map.
2508 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2509 (init_shadowed_var_for_decl): Adjust initialization.
2510
2511 PR c++/44361
2512 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2513 instead of calling mark_exp_read only when not an assignment.
2514
2515 PR debug/44367
2516 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2517 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2518 Set DECL_VALUE_EXPR on var.
2519
2520 2010-06-02 Jason Merrill <jason@redhat.com>
2521
2522 * error.c (dump_type): Improve typedef handling.
2523
2524 PR c++/9726
2525 PR c++/23594
2526 PR c++/44333
2527 * name-lookup.c (same_entity_p): New.
2528 (ambiguous_decl): Multiple declarations of the same entity
2529 are not ambiguous.
2530
2531 2010-06-01 Jason Merrill <jason@redhat.com>
2532
2533 DR 990
2534 * call.c (add_list_candidates): Prefer the default constructor.
2535 (build_aggr_conv): Treat missing initializers like { }.
2536 * typeck2.c (process_init_constructor_record): Likewise.
2537 * init.c (expand_default_init): Use digest_init for
2538 direct aggregate initialization, too.
2539
2540 * call.c (add_list_candidates): Split out...
2541 (build_user_type_conversion_1): ...from here.
2542 (build_new_method_call): And here.
2543 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2544
2545 PR c++/44358
2546 * call.c (build_list_conv): Set list-initialization flags properly.
2547
2548 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2549
2550 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2551
2552 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2553 Matthew Gingell <gingell@adacore.com>
2554
2555 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2556 * decl2.c: Include langhooks.h and c-ada-spec.h.
2557 (cpp_check, collect_source_refs, collect_ada_namespace,
2558 collect_all_refs): New functions.
2559 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2560 * lang-specs.h: Ditto.
2561
2562 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2563
2564 * cp-tree.h (cp_build_function_call_nary): Declare.
2565 * typeck.c (cp_build_function_call_nary): Define.
2566 * decl.c (register_dtor_fn): Use it instead of
2567 cp_build_function_call.
2568 (cxx_maybe_build_cleanup): Likewise.
2569 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2570 * except.c (do_get_exception_ptr): Likewise.
2571 (do_begin_catch): Likewise.
2572 (do_allocate_exception): Likewise.
2573 (do_free_exception): Likewise.
2574 (build_throw): Likewise. Use cp_build_function_call_vec instead
2575 of cp_build_function_call.
2576 (do_end_catch): Likewise.
2577
2578 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2579
2580 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2581 (struct cp_declarator): Move id_loc field up.
2582
2583 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2584
2585 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2586 this file is included before c-common.h. Define GCC_DIAG_STYLE
2587 before including diagnostic-core.h and toplev.h.
2588 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2589 * pt.c: Include cp-tree.h before c-common.h.
2590
2591 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2592
2593 * tree.c (c_register_addr_space): Add stub.
2594
2595 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2596
2597 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2598 fatal.
2599
2600 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2601
2602 Revert fix of PR c++/44188
2603 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2604 gcc/tree.h.
2605 * tree.c (typedef_variant_p): Revert moving this definition to
2606 gcc/tree.c.
2607 * decl.c (grokdeclarator): Revert naming typedef handling.
2608
2609 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2610
2611 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2612 * cp-lang.c: Don't include diagnostic.h
2613 * name-lookup.c: Include diagnostic-core.h instead of
2614 diagnostic.h.
2615 (cp_emit_debug_info_for_using): Use seen_error.
2616 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2617 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2618 * pt.c (iterative_hash_template_arg): Use seen_error.
2619 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2620 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2621 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2622 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2623 dependencies.
2624
2625 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2626
2627 PR c++/44188
2628 * cp-tree.h (typedef_variant_p): Move this declaration to
2629 gcc/tree.h.
2630 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2631 * decl.c (grokdeclarator): Do not rename debug info of an
2632 anonymous tagged type named by a typedef.
2633
2634 2010-05-27 Jason Merrill <jason@redhat.com>
2635
2636 PR c++/43555
2637 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2638 anonymous VLA size.
2639
2640 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2641
2642 PR bootstrap/44287
2643 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2644 * class.c (layout_class_type): Likewise.
2645 * decl.c (finish_enum): Likewise.
2646 * mangle.c (write_builitin_type): Likewise.
2647
2648 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2649
2650 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2651 explicit_int128_p.
2652 * decl.c (grokdeclarator): Handle __int128.
2653 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2654 (cp_parser_simple_type_specifier): Likewise.
2655 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2656 * typeck.c (cp_common_type): Handle __int128.
2657 * mangle.c (integer_type_codes): Add itk_int128 and
2658 itk_unsigned_int128.
2659
2660 2010-05-26 Jason Merrill <jason@redhat.com>
2661
2662 PR c++/43382
2663 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2664 unification.
2665
2666 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2667
2668 * cp-lang.c: Do not include expr.h.
2669
2670 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2671
2672 * decl.c: Do not include rtl.h
2673 * semantics.c: Likewise.
2674
2675 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2676
2677 * cp-tree.h: Do not include splay-tree.h.
2678 (struct prtmem_cst): Remove unused field and false comment.
2679 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2680 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2681 * init.c: Do not include rtl.h and expr.h.
2682 * class.c: Do not include rtl.h. Include splay-tree.h.
2683 (build_clone): Use plain NULL instead of NULL_RTX.
2684 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2685 included. Include splay-tree.h.
2686 * method.c: Do not include rtl.h and expr.h.
2687 (use_thunk): Use plain NULL instead of NULL_RTX.
2688 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2689 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2690 and target.h. Include splay-tree.h.
2691 * expr.c: Do not include rtl.h and expr.h.
2692 * pt.c: Do not include obstack.h and rtl.h.
2693 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2694 (tsubst_decl): Likewise.
2695 (instantiate_decl): Likewise.
2696 * semantics.c: Do not include exprt.h and debug.h. Explain why
2697 rtl.h has to be included.
2698 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2699 * call.c: Do not include rtl.h and expr.h.
2700 * search.c: Do not include obstack.h and rtl.h.
2701 * friend.c: Do not include rtl.h and expr.h.
2702 * Make-lang.in: Update dependencies.
2703
2704 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2705
2706 PR c++/18249
2707 * parser.c (non_integral_constant): Add NIC_NONE.
2708 (required_token): Add RT_NONE.
2709 (cp_parser_unary_expression): Initialize non_constant_p
2710 to NIC_NONE.
2711 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2712 (cp_parser_primary_expression, cp_parser_postfix_expression,
2713 cp_parser_cast_expression, cp_parser_binary_expression,
2714 cp_parser_functional_cast): Fix formatting.
2715
2716 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2717
2718 PR c++/18249
2719 * parser.c: Remove inclusion of dyn-string.h.
2720 (non_integral_constant): New enum.
2721 (name_lookup_error): New enum.
2722 (required_token): New enum.
2723 (cp_parser_required_error): New function.
2724 (cp_parser_require): Change the type of variable token_desc to
2725 required_token and use cp_parser_required_error.
2726 (cp_parser_require_keyword): Likewise.
2727 (cp_parser_error): Use gmsgid as parameter.
2728 (cp_parser_name_lookup_error): Change the type of variable desired to
2729 name_lookup_error and put the diagnostic in the full sentences. Change
2730 caller.
2731 (cp_parser_non_integral_constant_expression): Change the type of the
2732 variable thing to non_integral_constant and put the diagnostics in
2733 full sentences. Change caller.
2734
2735 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2736
2737 PR middle-end/44100
2738 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2739
2740 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2741
2742 * error.c (cp_diagnostic_starter): Update call to
2743 diagnostic_build_prefix.
2744 (cp_print_error_function,
2745 print_instantiation_partial_context_line): Check show_column flag
2746 in context.
2747
2748 2010-05-24 Jason Merrill <jason@redhat.com>
2749
2750 PR c++/41510
2751 * decl.c (check_initializer): Don't wrap an init-list in a
2752 TREE_LIST.
2753 * init.c (build_aggr_init): Don't assume copy-initialization if
2754 init has CONSTRUCTOR_IS_DIRECT_INIT.
2755 * call.c (build_new_method_call): Sanity check.
2756
2757 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2758
2759 * rtti.c (tinfo_base_init): Use build_constructor instead of
2760 build_constructor_from_list. Don't cons a tree node for
2761 returning.
2762 (generic_initializer): Use build_constructor_single instead of
2763 build_constructor_from_list.
2764 (ptr_initializer): Use build_constructor instead of
2765 build_constructor_from_list
2766 (ptm_initializer): Likewise.
2767 (class_initializer): Likewise. Take varargs instead of TRAIL.
2768 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2769 build_constructor instead of build_constructor_from_list.
2770
2771 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2772
2773 * semantics.c: Include bitmap.h.
2774 * Make-lang.in: Update dependencies.
2775
2776 2010-05-22 Jan Hubicka <jh@suse.cz>
2777
2778 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2779 comdat vtables.
2780 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2781
2782 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2783
2784 * cxx-pretty-print.c: Correct merge error.
2785
2786 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2787
2788 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2789 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2790 (cp_printer): Handle %K here using percent_K_format.
2791 * cxx-pretty-print.c: Include tree-pretty-print.h.
2792 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2793 dependencies.
2794
2795 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2796
2797 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2798 Clean up redundant includes.
2799
2800 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2801
2802 PR c++/30298
2803 * decl.c (xref_basetypes): Return false in case of ill-formed
2804 redefinition.
2805
2806 2010-05-19 Jason Merrill <jason@redhat.com>
2807
2808 * call.c (reference_binding): Use cp_build_qualified_type_real
2809 and cp_type_quals consistently.
2810 (add_function_candidate): Likewise.
2811 (build_conditional_expr): Likewise.
2812 (convert_like_real): Likewise.
2813 (type_passed_as): Likewise.
2814 * class.c (add_method): Likewise.
2815 (same_signature_p): Likewise.
2816 (layout_class_type): Likewise.
2817 * decl.c (cxx_init_decl_processing): Likewise.
2818 (cp_fname_init): Likewise.
2819 (grokdeclarator): Likewise.
2820 * decl2.c (cp_reconstruct_complex_type): Likewise.
2821 * init.c (build_new_1): Likewise.
2822 * method.c (do_build_copy_constructor): Likewise.
2823 (implicitly_declare_fn): Likewise.
2824 * pt.c (tsubst_aggr_type): Likewise.
2825 (tsubst): Likewise.
2826 * rtti.c (init_rtti_processing): Likewise.
2827 (build_headof): Likewise.
2828 (build_dynamic_cast_1): Likewise.
2829 (tinfo_base_init): Likewise.
2830 (emit_support_tinfos): Likewise.
2831 * semantics.c (capture_decltype): Likewise.
2832 * tree.c (cv_unqualified): Likewise.
2833 * typeck.c (composite_pointer_type): Likewise.
2834 (string_conv_p): Likewise.
2835
2836 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2837
2838 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2839 * decl.c (start_decl): Likewise.
2840 * semantics.c (finish_compound_literal): Likewise.
2841 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2842 (cp_type_readonly): Remove.
2843 * cp-tree.h: Remove declaration.
2844
2845 * typeck.c (merge_types): Preserve memfn quals.
2846
2847 * decl.c (grokdeclarator): Don't check quals on fn type.
2848 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2849 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2850
2851 PR c++/44193
2852 * typeck.c (type_memfn_quals): New fn.
2853 (apply_memfn_quals): New fn.
2854 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2855 (cp_type_readonly): Use cp_type_quals.
2856 * cp-tree.h: Add declarations.
2857 * tree.c (cp_build_qualified_type_real): Don't set, but do
2858 preserve, quals on FUNCTION_TYPE.
2859 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2860 * decl.c (build_ptrmem_type): Likewise.
2861 (grokdeclarator): Likewise.
2862 (static_fn_type): Likewise.
2863 * decl2.c (change_return_type): Likewise.
2864 (cp_reconstruct_complex_type): Likewise.
2865 * pt.c (tsubst_function_type): Likewise.
2866 (unify): Likewise.
2867 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2868
2869 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2870
2871 * tree.c (build_min_non_dep_call_vec): Update comment.
2872
2873 2010-05-17 Jason Merrill <jason@redhat.com>
2874
2875 * call.c (struct z_candidate): Add explicit_targs field.
2876 (add_template_candidate_real): Set it.
2877 (build_over_call): Use it to control init-list warning.
2878
2879 PR c++/44157
2880 * call.c (build_over_call): Limit init-list deduction warning to
2881 cases where the argument is actually an init-list.
2882
2883 PR c++/44158
2884 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2885
2886 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2887 Jason Merrill <jason@redhat.com>
2888
2889 PR c++/44108
2890 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2891
2892 2010-05-15 Jason Merrill <jason@redhat.com>
2893
2894 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2895 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2896 TYPE_NOEXCEPT_P.
2897 (finish_eh_spec_block): Adjust.
2898
2899 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2900
2901 PR c++/44148
2902 * pt.c (tsubst): Unshare template argument.
2903
2904 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2905
2906 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2907 * Make-lang.in: Fix dependencies accordingly.
2908
2909 2010-05-14 Jason Merrill <jason@redhat.com>
2910
2911 C++ DR 475
2912 * except.c (build_throw): Simplify, adjust for DR 475.
2913
2914 PR c++/44127
2915 * except.c (dtor_nothrow): Return nonzero for type with
2916 trivial destructor.
2917
2918 PR c++/44127
2919 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2920 gimple_build_eh_must_not_throw.
2921
2922 2010-05-14 Martin Jambor <mjambor@suse.cz>
2923
2924 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2925 and define.
2926
2927 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2928
2929 * call.c (build_new_method_call): Change warning text.
2930 * typeck2.c (build_functional_cast): Change error text.
2931
2932 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2933
2934 PR c++/30566
2935 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2936 shadowing the outer parameter or variables by the declaration of
2937 nested function in nested structure or class. Warn the shadowing by
2938 the declaration of nested lambda expression.
2939
2940 2010-05-13 Jason Merrill <jason@redhat.com>
2941
2942 * typeck.c (cp_build_array_ref): Factor out from...
2943 (build_array_ref): ...here. Drop complain parm.
2944 (build_new_op): Adjust.
2945 * class.c (build_vtbl_ref_1): Adjust.
2946 * decl2.c (grok_array_decl): Adjust.
2947 * cp-tree.h: Adjust prototypes.
2948
2949 2010-05-13 Jan Hubicka <jh@suse.cz>
2950
2951 * decl.c (cp_finish_decl): Do not worry about used attribute.
2952
2953 2010-05-12 Jason Merrill <jason@redhat.com>
2954
2955 * typeck.c (build_array_ref): Take complain parm.
2956 * cp-tree.h: Add it to prototype.
2957 * call.c (build_new_op): Pass it.
2958 * class.c (build_vtbl_ref): Pass it.
2959 * decl2.c (grok_array_decl): Pass it.
2960
2961 PR bootstrap/44048
2962 PR target/44099
2963 * cp-tree.def (NULLPTR_TYPE): Remove.
2964 * cp-tree.h (NULLPTR_TYPE_P): New.
2965 (SCALAR_TYPE_P): Use it.
2966 (nullptr_type_node): New.
2967 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2968 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2969 nullptr_type_node.
2970 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2971 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2972 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2973 * mangle.c (write_type): Likewise.
2974 * name-lookup.c (arg_assoc_type): Likewise.
2975 * typeck.c (build_reinterpret_cast_1): Likewise.
2976 * rtti.c (typeinfo_in_lib_p): Likewise.
2977 (emit_support_tinfos): Remove local nullptr_type_node.
2978
2979 * cp-tree.h (UNKNOWN_TYPE): Remove.
2980 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2981 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2982 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2983 * class.c (instantiate_type): Check unknown_type_node rather than
2984 UNKNOWN_TYPE.
2985 * name-lookup.c (maybe_push_decl): Likewise.
2986 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2987 (get_typeid): Likewise.
2988 * semantics.c (finish_offsetof): Likewise.
2989
2990 PR c++/20669
2991 * call.c (add_template_candidate_real): If deduction fails, still
2992 add the template as a non-viable candidate.
2993 (equal_functions): Handle template candidates.
2994 (print_z_candidate): Likewise.
2995 (print_z_candidates): Likewise.
2996 (build_new_function_call): Likewise.
2997
2998 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2999 * call.c (add_candidates): Enforce it.
3000 (build_new_method_call): Try non-list ctor if no viable list ctor.
3001 (build_user_type_conversion_1): Likewise.
3002
3003 * call.c (add_candidates): Distinguish between type(x) and
3004 x.operator type().
3005 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
3006 (build_new_method_call): Give better error for conversion op.
3007
3008 * call.c (add_candidates): Add first_arg and return_type parms.
3009 Add special constructor/conversion op handling.
3010 (convert_class_to_reference): Use it.
3011 (build_user_type_conversion_1): Likewise.
3012 (build_op_call): Likewise.
3013 (build_new_method_call): Likewise.
3014 (build_new_op): Adjust.
3015 (perform_overload_resolution): Adjust.
3016
3017 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
3018
3019 PR c++/34272
3020 PR c++/43630
3021 PR c++/34491
3022 * pt.c (process_partial_specialization): Return error_mark_node
3023 in case of unused template parameters in partial specialization.
3024
3025 2010-05-11 Jakub Jelinek <jakub@redhat.com>
3026
3027 PR c++/44062
3028 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
3029 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
3030 look at its second operand.
3031
3032 2010-05-10 Jason Merrill <jason@redhat.com>
3033
3034 PR c++/44017
3035 * semantics.c (baselink_for_fns): Revert earlier change.
3036
3037 PR c++/44045
3038 * typeck.c (cp_build_modify_expr): Complain about assignment to
3039 array from init list.
3040
3041 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
3042
3043 PR c++/43719
3044 * decl.c (check_initializer): strip array type before checking for
3045 uninitialized const or ref members.
3046
3047 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
3048
3049 PR c++/43951
3050 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
3051 error count. Emit errors only if compain is true.
3052 (build_new_1): Do not return error_mark_node if
3053 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
3054 errors. Delay the check for user-provided constructor.
3055 (perform_member_init): Adjust.
3056 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
3057 prototype.
3058
3059 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
3060 Jason Merrill <jason@redhat.com>
3061
3062 Add support for C++0x nullptr.
3063 * cp-tree.def: Add NULLPTR_TYPE.
3064 * cp-tree.h: Add nullptr_node.
3065 (cp_tree_index): Add CPTI_NULLPTR.
3066 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
3067 * call.c (null_ptr_cst_p): Handle nullptr.
3068 (standard_conversion): Likewise.
3069 (convert_arg_to_ellipsis): Likewise.
3070 * mangle.c (write_type): Likewise.
3071 * name-lookup.c (arg_assoc_type): Likewise.
3072 * parser.c (cp_parser_primary_expression): Likewise.
3073 * typeck.c (cp_build_binary_op): Likewise.
3074 (build_reinterpret_cast_1): Likewise.
3075 * error.c (dump_type): Likewise.
3076 (dump_type_prefix, dump_type_suffix): Likewise.
3077 * decl.c (cxx_init_decl_processing): Likewise.
3078 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
3079 * cvt.c (ocp_convert): Likewise.
3080 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
3081 nullptr_t tinfo in libsupc++.
3082
3083 2010-05-06 Jason Merrill <jason@redhat.com>
3084
3085 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
3086
3087 2010-04-22 Jakub Jelinek <jakub@redhat.com>
3088 Dodji Seketeli <dodji@redhat.com>
3089
3090 PR c/18624
3091 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
3092 Declare ...
3093 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
3094 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
3095 (decay_conversion, perform_integral_promotions): Call rvalue_use.
3096 (cp_build_unary_op): Call lvalue_use.
3097 * decl.c (unused_but_set_errorcount): New variable.
3098 (poplevel): Issue -Wunused-but-set-variable diagnostics.
3099 (duplicate_decls): Merge DECL_READ_P flags.
3100 (start_cleanup_fn): Set DECL_READ_P flag.
3101 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
3102 * tree.c (rvalue): Call rvalue_use.
3103 * pt.c (convert_nontype_argument): Likewise.
3104 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
3105 finish_decltype_type): Likewise.
3106 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
3107 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
3108 or rvalue_use depending on the expr.
3109 * init.c (build_new, build_delete): Likewise.
3110 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
3111
3112 2010-05-05 Jason Merrill <jason@redhat.com>
3113
3114 PR c++/43787
3115 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
3116 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
3117
3118 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
3119
3120 PR c++/43028
3121 * pt.c (unify): Check each elt for error_mark_node.
3122
3123 2010-05-04 Jason Merrill <jason@redhat.com>
3124
3125 PR c++/38064
3126 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
3127
3128 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
3129
3130 PR c++/43705
3131 * call.c (build_new_method_call): Return error_mark_node if fns is
3132 NULL_TREE.
3133
3134 2010-05-03 Dodji Seketeli <dodji@redhat.com>
3135
3136 PR c++/43953
3137 * pt.c (most_specialized_class): Pretend we are processing
3138 a template decl during the call to coerce_template_parms.
3139
3140 2010-05-03 Jason Merrill <jason@redhat.com>
3141
3142 PR c++/42810
3143 PR c++/43680
3144 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
3145 from the selected underlying type unless -fstrict-enums. Set
3146 ENUM_UNDERLYING_TYPE to have the restricted range.
3147 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
3148 * class.c (check_bitfield_decl): Likewise.
3149
3150 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
3151
3152 PR c++/43951
3153 * init.c (build_new_1): Revert the accidental checkin in
3154 revision 158918.
3155
3156 2010-04-30 Jason Merrill <jason@redhat.com>
3157
3158 PR c++/43868
3159 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
3160 (pp_cxx_type_specifier_seq): ...here.
3161
3162 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
3163
3164 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
3165 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
3166
3167 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
3168
3169 PR c++/43779
3170 * typeck.c (warn_args_num): New function.
3171 (convert_arguments): Use warn_args_num to print the diagnostic
3172 messages.
3173
3174 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
3175
3176 PR c++/43890
3177 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
3178 user-provided constructor while recursing.
3179
3180 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
3181
3182 PR c++/9335
3183 * error.c (print_instantiation_partial_context_line): Handle
3184 recursive instantiation.
3185 (print_instantiation_partial_context): Likewise.
3186
3187 2010-04-27 Jason Merrill <jason@redhat.com>
3188
3189 * init.c (perform_member_init): Check CLASS_TYPE_P.
3190
3191 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
3192
3193 PR c++/29043
3194 * init.c (perform_member_init): check for uninitialized const or
3195 reference members, including array types.
3196
3197 2010-04-24 Jason Merrill <jason@redhat.com>
3198
3199 * tree.c (get_fns): Split out from get_first_fn.
3200 * cp-tree.h: Declare it.
3201 * search.c (shared_member_p): Use it.
3202 * semantics.c (finish_qualified_id_expr): Simplify.
3203 (finish_id_expression): Simplify.
3204
3205 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
3206 whenever object is NULL_TREE. Don't do 'this' capture here.
3207 (finish_qualified_id_expr): Pass NULL_TREE.
3208 (finish_id_expression): Likewise.
3209 (lambda_expr_this_capture): Likewise.
3210
3211 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
3212 rather than checking current_class_ref directly.
3213 (finish_call_expr): Likewise.
3214
3215 PR c++/43856
3216 * name-lookup.c (qualify_lookup): Disqualify lambda op().
3217 * class.c (current_nonlambda_class_type): New fn.
3218 * semantics.c (nonlambda_method_basetype): New.
3219 * cp-tree.h: Declare them.
3220 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
3221
3222 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
3223
3224 PR c++/43875
3225 * semantics.c (lambda_return_type): Complain about
3226 braced-init-list.
3227
3228 PR c++/43790
3229 * tree.c (cv_unqualified): Handle error_mark_node.
3230
3231 PR c++/41468
3232 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
3233 if we don't want errors.
3234
3235 PR c++/41468
3236 * class.c (convert_to_base): Add complain parameter. Pass
3237 ba_quiet to lookup_base if we don't want errors.
3238 (build_vfield_ref): Pass complain to convert_to_base.
3239 * call.c (convert_like_real): Likewise.
3240 (initialize_reference): Likewise.
3241 (perform_direct_initialization_if_possible): Pass complain to
3242 convert_like_real.
3243 * cp-tree.h: Adjust.
3244
3245 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
3246 Jason Merrill <jason@redhat.com>
3247
3248 PR c++/42844
3249 * decl.c (check_for_uninitialized_const_var): Handle classes that need
3250 constructing, too.
3251 (check_initializer): Call it for classes that need constructing, too.
3252 * class.c (in_class_defaulted_default_constructor): New.
3253 * cp-tree.h: Declare it.
3254
3255 2010-04-20 Jason Merrill <jason@redhat.com>
3256
3257 PR c++/9335
3258 * init.c (constant_value_1): Treat error_mark_node as a constant
3259 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
3260 * cvt.c (ocp_convert): Handle getting error_mark_node from
3261 integral_constant_value.
3262 * decl.c (compute_array_index_type): Likewise.
3263
3264 2010-04-20 Dodji Seketeli <dodji@redhat.com>
3265
3266 PR c++/43800
3267 PR c++/43704
3268 * typeck.c (incompatible_dependent_types_p): If one of the
3269 compared types if not a typedef then honour their main variant
3270 equivalence.
3271
3272 2010-04-20 Jakub Jelinek <jakub@redhat.com>
3273
3274 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
3275
3276 2010-04-19 Dodji Seketeli <dodji@redhat.com>
3277
3278 PR c++/43704
3279 * typeck.c (structural_comptypes): Test dependent typedefs
3280 incompatibility before testing for their main variant based
3281 equivalence.
3282
3283 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3284
3285 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
3286 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
3287
3288 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3289
3290 * decl.c (cxx_init_decl_processing): Remove second argument in call to
3291 build_common_tree_nodes.
3292
3293 2010-04-14 Jason Merrill <jason@redhat.com>
3294
3295 PR c++/36625
3296 * parser.c (cp_parser_parenthesized_expression_list): Change
3297 is_attribute_list parm to int to indicate whether or not to
3298 handle initial identifier specially.
3299 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
3300
3301 2010-04-13 Jason Merrill <jason@redhat.com>
3302
3303 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
3304 CLASS_TYPE_P.
3305 * parser.c (cp_parser_lambda_expression): Complain about lambda in
3306 unevaluated context.
3307 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
3308
3309 2010-04-12 Jason Merrill <jason@redhat.com>
3310
3311 PR c++/43641
3312 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
3313 return value directly.
3314
3315 * call.c (type_decays_to): Call cv_unqualified for non-class type.
3316
3317 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
3318
3319 PR c++/25811
3320 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
3321 * init.c (build_new_1): Check for uninitialized const members and
3322 uninitialized reference members, when using new without
3323 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
3324 (diagnose_uninitialized_cst_or_ref_member): Define, call
3325 diagnose_uninitialized_cst_or_ref_member_1.
3326 (diagnose_uninitialized_cst_or_ref_member_1): New function.
3327
3328 2010-04-12 Richard Guenther <rguenther@suse.de>
3329
3330 PR c++/43611
3331 * semantics.c (expand_or_defer_fn_1): Do not keep extern
3332 template inline functions.
3333
3334 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3335
3336 PR c++/28584
3337 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
3338 pointer type.
3339
3340 2010-04-07 Jason Merrill <jason@redhat.com>
3341
3342 PR c++/43016
3343 * decl.c (start_preparsed_function): Do defer nested functions.
3344
3345 PR c++/11094, DR 408
3346 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
3347 * decl2.c (finish_static_data_member_decl): Set it.
3348 * decl.c (duplicate_decls): Propagate it.
3349 * pt.c (tsubst_decl): Don't substitute the domain of an array
3350 VAR_DECL if it's set.
3351 (regenerate_decl_from_template): Substitute it here.
3352 (type_dependent_expression_p): Return true if it's set.
3353 * semantics.c (finish_decltype_type): Instantiate such a variable.
3354 * typeck.c (cxx_sizeof_expr): Likewise.
3355 (strip_array_domain): New.
3356
3357 PR c++/43145
3358 * name-lookup.c (current_decl_namespace): Non-static.
3359 (pop_nested_namespace): Sanity check.
3360 * cp-tree.h: Declare current_decl_namespace.
3361 * decl.c (grokvardecl): Use it instead of current_namespace.
3362 (grokfndecl): Likewise.
3363
3364 PR c++/38392
3365 * pt.c (tsubst_friend_function): Instatiate a friend that has already
3366 been used.
3367
3368 * pt.c (print_template_statistics): New.
3369 * cp-tree.h: Declare it.
3370 * tree.c (cxx_print_statistics): Call it.
3371
3372 PR c++/41970
3373 * decl.c (grokvardecl): Tweak warning message.
3374 (grokfndecl): Likewise.
3375
3376 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3377
3378 PR c++/42697
3379 *pt.c (tsubst_decl): Get the arguments of a specialization from
3380 the specialization template, not from the most general template.
3381
3382 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3383
3384 PR c++/40239
3385 * typeck2.c (process_init_constructor_record):
3386 value-initialize members that are are not explicitely
3387 initialized.
3388
3389 2010-04-07 Jie Zhang <jie@codesourcery.com>
3390
3391 PR c++/42556
3392 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
3393 when all of its elements are non-constant and have been split out.
3394
3395 2010-04-06 Taras Glek <taras@mozilla.com>
3396 Jason Merrill <jason@redhat.com>
3397
3398 * parser.c (cp_parser_class_specifier): Set class location to that
3399 of IDENTIFIER_NODE instead of '{' when possible.
3400 * semantics.c (begin_class_definition): Do not overide locations
3401 with less precise ones.
3402
3403 2010-04-06 Jason Merrill <jason@redhat.com>
3404
3405 PR c++/43648
3406 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
3407
3408 PR c++/43621
3409 * pt.c (maybe_update_decl_type): Check the return value from
3410 push_scope.
3411
3412 2010-04-01 Jason Merrill <jason@redhat.com>
3413
3414 * decl.c (next_initializable_field): No longer static.
3415 * cp-tree.h: Declare it.
3416 * call.c (build_aggr_conv): Fail if there are more initializers
3417 than initializable fields.
3418
3419 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
3420 instead of void_zero_node.
3421
3422 2010-03-31 Dodji Seketeli <dodji@redhat.com>
3423
3424 PR c++/43558
3425 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
3426 * pt.c (end_template_parm_list): Store sibling template parms of
3427 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3428 (push_template_decl_real): Don't store the containing template decl
3429 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
3430 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
3431 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3432 Simplify the logic.
3433
3434 2010-03-30 Jason Merrill <jason@redhat.com>
3435
3436 PR c++/43076
3437 * pt.c (push_template_decl_real): Deal better with running out of
3438 scopes before running out of template parms.
3439
3440 PR c++/41185
3441 PR c++/41786
3442 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3443 function parameter context. Don't print an error if parsing
3444 tentatively.
3445
3446 PR c++/43559
3447 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3448 with same_type_p.
3449
3450 2010-03-26 Jason Merrill <jason@redhat.com>
3451
3452 PR c++/43509
3453 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3454 c++0x mode, but not other type-names.
3455
3456 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3457
3458 PR c++/43327
3459 * pt.c (add_to_template_args): Support NULL ARGS;
3460 (most_specialized_class): call coerce_template_parms on
3461 template arguments passed to get_class_bindings. Use
3462 add_to_template_args.
3463 (unify): Handle VAR_DECLs.
3464
3465 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3466
3467 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3468 into int.
3469 * pt.c (get_template_parms_at_level): Adjust.
3470
3471 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3472
3473 PR c++/43206
3474 * cp-tree.h (get_template_parms_at_level): Declare ...
3475 * pt.c (get_template_parms_at_level): ... new function.
3476 * typeck.c (get_template_parms_of_dependent_type): If a template
3477 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3478 current_template_parms. Use get_template_parms_at_level. Remove
3479 useless test.
3480 (incompatible_dependent_types_p): If we get empty parms from just one
3481 of the template type parms we are comparing then the template parms are
3482 incompatible.
3483
3484 2010-03-24 Jason Merrill <jason@redhat.com>
3485
3486 PR c++/43502
3487 * parser.c (make_declarator): Initialize id_loc.
3488 (cp_parser_lambda_declarator_opt): And set it.
3489
3490 2010-03-23 Jason Merrill <jason@redhat.com>
3491
3492 Make lambda conversion op and op() non-static.
3493 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3494 Also add the thunk function returned by the conversion op.
3495 Mark the conversion deleted if the op() is variadic.
3496 * decl2.c (mark_used): Give helpful message about deleted conversion.
3497 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3498 * semantics.c (finish_this_expr): Adjust.
3499 * mangle.c (write_closure_type_name): Adjust.
3500 * decl.c (grok_op_properties): Don't allow it.
3501 * call.c (build_user_type_conversion_1): No static conversion ops.
3502 (build_op_call): Or op().
3503
3504 * decl2.c (change_return_type): Fix 'this' quals.
3505
3506 2010-03-22 Jason Merrill <jason@redhat.com>
3507
3508 PR c++/43333
3509 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3510
3511 PR c++/43281
3512 * pt.c (contains_auto_r): New fn.
3513 (do_auto_deduction): Use it.
3514 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3515
3516 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3517
3518 PR c++/43081:
3519 * decl2.c (grokfield): Handle invalid initializers for member
3520 functions.
3521
3522 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3523
3524 PR c++/43375
3525 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3526 is NULL.
3527 * decl2.c (vague_linkage_p): Likewise.
3528
3529 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3530
3531 PR c++/43418
3532 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3533 false, in the cp_parser_expression_statement call.
3534
3535 2010-03-05 Jason Merrill <jason@redhat.com>
3536
3537 * mangle.c (mangle_decl): Give name collision error even without
3538 ASM_OUTPUT_DEF.
3539
3540 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3541
3542 * pt.c (process_partial_specialization): Use error_n instead of
3543 error.
3544
3545 2010-03-03 Jason Merrill <jason@redhat.com>
3546
3547 PR c++/12909
3548 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3549
3550 2010-03-03 Jason Merrill <jason@redhat.com>
3551
3552 PR c++/12909
3553 * mangle.c: Include cgraph.h.
3554 (mangle_decl): If the mangled name will change in a later
3555 ABI version, make the later mangled name an alias.
3556 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3557 * Make-lang.in (mangle.o): Depend on cgraph.h.
3558 * method.c (make_alias_for): Handle VAR_DECL, too.
3559 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3560 * tree.c (no_linkage_check): Adjust.
3561 * decl.c (maybe_commonize_var): Adjust.
3562 * cp-tree.h: Adjust.
3563
3564 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3565
3566 * pt.c (redeclare_class_template): Use error_n and inform_n.
3567
3568 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3569
3570 PR c++/42748
3571 * cp-tree.h (push_tinst_level): Declare.
3572 (pop_tinst_level): Likewise.
3573 * pt.c (push_tinst_level): Give it external linkage.
3574 (pop_tinst_level): Likewise.
3575 * mangle.c (mangle_decl_string): Set the source location to that
3576 of the decl while mangling.
3577
3578 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3579
3580 PR c++/42054
3581 * pt.c (redeclare_class_template): Return false if there are erroneous
3582 template parameters.
3583
3584 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3585
3586 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3587 -ftemplate-depth=.
3588
3589 2010-02-24 Jason Merrill <jason@redhat.com>
3590
3591 PR c++/12909
3592 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3593
3594 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3595 in a previous ABI version.
3596
3597 2010-02-23 Jason Merrill <jason@redhat.com>
3598
3599 PR c++/43143
3600 * typeck2.c (digest_init_r): Accept value init of array.
3601
3602 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3603
3604 PR c++/43126
3605 * typeck.c (convert_arguments): Update error message.
3606
3607 2010-02-22 Mike Stump <mikestump@comcast.net>
3608
3609 PR c++/43125
3610 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3611
3612 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3613
3614 PR c++/23510
3615 * error.c (print_instantiation_partial_context_line): New.
3616 (print_instantiation_partial_context): Print at most 12 contexts,
3617 skip the rest with a message.
3618
3619 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3620
3621 PR c++/42824
3622 * pt.c (lookup_template_class): Better support of specialization
3623 of member of class template implicit instantiation.
3624
3625 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3626
3627 PR c++/35669
3628 * call.c (conversion_null_warnings): Replace -Wconversion with
3629 -Wconversion-null.
3630 * cvt.c (build_expr_type_conversion): Likewise.
3631
3632 2010-02-18 Jason Merrill <jason@redhat.com>
3633
3634 PR c++/42837
3635 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3636
3637 PR c++/43108
3638 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3639 C build_binary_op.
3640 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3641 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3642
3643 PR c++/43070
3644 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3645
3646 PR c++/26261
3647 PR c++/43101
3648 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3649 (maybe_update_decl_type): New fn.
3650 * parser.c (cp_parser_init_declarator): Use it.
3651
3652 PR c++/43109
3653 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3654
3655 2010-02-17 Jason Merrill <jason@redhat.com>
3656
3657 PR c++/43075
3658 * call.c (build_over_call): Don't create zero-sized assignments.
3659 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3660 * cp-objcp-common.c (cp_expr_size): Remove.
3661 * cp-tree.h: Remove prototype.
3662
3663 PR c++/43069
3664 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3665 decl we looked up doesn't match.
3666
3667 PR c++/43093
3668 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3669 have an INIT_EXPR anymore.
3670
3671 PR c++/43079
3672 * pt.c (convert_nontype_argument): Change assert to test.
3673
3674 2010-02-16 Jason Merrill <jason@redhat.com>
3675
3676 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3677
3678 PR c++/43031
3679 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3680 VIEW_CONVERT_EXPR for conversions between structural equality types
3681 that the back end can't tell are the same.
3682
3683 PR c++/43036
3684 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3685 cv-quals from element here.
3686 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3687
3688 2010-02-14 Jason Merrill <jason@redhat.com>
3689
3690 PR c++/41997
3691 * semantics.c (finish_compound_literal): Use
3692 cp_apply_type_quals_to_decl when creating a static variable.
3693
3694 2010-02-12 Jason Merrill <jason@redhat.com>
3695
3696 PR c++/43024
3697 * name-lookup.h (current_binding_level): Check for null
3698 cp_function_chain.
3699
3700 2010-02-12 Jason Merrill <jason@redhat.com>
3701
3702 PR c++/43054
3703 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3704
3705 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c++/43033
3708 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3709 instead of x.
3710
3711 2010-02-10 Jason Merrill <jason@redhat.com>
3712
3713 PR c++/41896
3714 * semantics.c (outer_lambda_capture_p): Revert.
3715 (add_capture): Only finish_member_declaration if
3716 we're in the lambda class.
3717 (register_capture_members): New.
3718 * cp-tree.h: Declare it.
3719 * parser.c (cp_parser_lambda_expression): Call it.
3720
3721 2010-02-10 Jason Merrill <jason@redhat.com>
3722
3723 PR c++/41896
3724 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3725 instead of current_class_type.
3726
3727 2010-02-10 Jason Merrill <jason@redhat.com>
3728
3729 PR c++/42983, core issue 906
3730 * method.c (defaultable_fn_check): Check virtualness.
3731
3732 2010-02-10 Jason Merrill <jason@redhat.com>
3733
3734 PR c++/43016
3735 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3736
3737 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3738
3739 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3740 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3741 translation.
3742 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3743 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3744 (cp_parser_parameter_declaration)
3745 (cp_parser_exception_specification_opt)
3746 (cp_parser_exception_declaration): Likewise.
3747 * pt.c (check_default_tmpl_args): Likewise.
3748 * search.c (lookup_field_r): Likewise.
3749
3750 2010-02-09 Jason Merrill <jason@redhat.com>
3751
3752 PR c++/42399
3753 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3754
3755 2010-02-09 Jason Merrill <jason@redhat.com>
3756
3757 PR c++/42370
3758 * decl2.c (change_return_type): New fn.
3759 * semantics.c (apply_lambda_return_type): Use it.
3760 * cp-tree.h: Declare it.
3761
3762 2010-02-05 Richard Guenther <rguenther@suse.de>
3763
3764 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3765 * cp-lang.c: Include gt-cp-cp-lang.h.
3766 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3767
3768 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3769
3770 PR c++/42915
3771 * typeck.c (get_template_parms_of_dependent_type): Try getting
3772 the template parameters fromt the type itself first.
3773
3774 2010-02-03 Jason Merrill <jason@redhat.com>
3775
3776 PR c++/4926
3777 PR c++/38600
3778 * mangle.c (write_unqualified_id): Split out from write_expression.
3779 (write_unqualified_name): Call it.
3780 (write_member_name): Likewise.
3781 (write_expression): Support TEMPLATE_ID_EXPR.
3782 Disambiguate operator names.
3783
3784 PR c++/12909
3785 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3786 -fabi-version=4.
3787
3788 2010-02-02 Jason Merrill <jason@redhat.com>
3789
3790 PR c++/41090
3791 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3792 * optimize.c (clone_body): Remap their initializers when making base
3793 variants.
3794 (maybe_clone_body): Complain if multiple clones aren't safe.
3795
3796 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3797
3798 PR c++/42758
3799 PR c++/42634
3800 PR c++/42336
3801 PR c++/42797
3802 PR c++/42880
3803 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3804 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3805 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3806 * pt.c (coerce_template_parms, type_unification_real,
3807 expand_template_argument_pack, coerce_template_parameter_pack):
3808 Set the non default template args count.
3809 (current_template_args): Always set non defaulted
3810 template args count when compiled with --enable-checking
3811 (tsubst_template_args, type_unification_real): Propagate the non
3812 defaulted template args count.
3813 * error.c (get_non_default_template_args_count): Renamed
3814 count_non_default_template_args into this. Don't calculate the
3815 non default template argument count anymore. Use the new
3816 accessor macros above to get it.
3817 (dump_template_argument_list, dump_type, dump_decl,
3818 dump_template_parms): Adjust.
3819 * parser.c (cp_parser_template_argument_list): Always set defaulted
3820 template args count when compiled with --enable-checking.
3821
3822 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3823
3824 * decl.c (redeclaration_error_message): Wrap the return messages into
3825 G_() for easy translation.
3826
3827 2010-01-28 Jason Merrill <jason@redhat.com>
3828
3829 PR c++/42880
3830 * semantics.c (begin_class_definition): Don't use type_as_string.
3831
3832 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3833
3834 PR c++/42713
3835 PR c++/42820
3836 * typeck.c (get_template_parms_of_dependent_type): Factorized
3837 this out of incompatible_template_type_parms_p
3838 (incompatible_dependent_types_p): Renamed
3839 incompatible_template_type_parms_p into this. Make it detect
3840 two incompatible dependent typedefs too.
3841 (structural_comptypes): Use incompatible_dependent_types_p.
3842 * pt.c (get_template_info):
3843 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3844
3845 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3846 Jason Merrill <jason@redhat.com>
3847
3848 * mangle.c (write_type): Mangle transparent record as member type.
3849 * semantics.c (begin_class_definition): Recognize decimal classes
3850 and set TYPE_TRANSPARENT_AGGR.
3851
3852 2010-01-20 Jason Merrill <jason@redhat.com>
3853
3854 PR c++/42338
3855 * mangle.c (write_expression): Handle tree codes that have extra
3856 arguments in the middle-end.
3857
3858 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3859
3860 PR c++/42038
3861 * except.c (expand_start_catch_block): Deal correctly with
3862 do_begin_catch returning error_mark_node.
3863
3864 2010-01-20 Jason Merrill <jason@redhat.com>
3865
3866 PR c++/41788
3867 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3868 non-PODs.
3869
3870 PR c++/41920
3871 * semantics.c (build_lambda_object): Call mark_used on captured
3872 variables.
3873
3874 PR c++/40750
3875 * decl.c (grokdeclarator): Clear type_quals for a member function
3876 declared using a typedef. Don't complain about adding cv-quals
3877 to a function typedef in C++0x mode.
3878
3879 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3880
3881 * decl.c (create_array_type_for_decl): Remove set but not used
3882 variable error_msg. Remove break stmts after return stmts.
3883
3884 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3885
3886 * error.c (dump_template_parms, count_non_default_template_args):
3887 Revert fix of PR c++/42634.
3888
3889 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3890
3891 PR c++/42634
3892 * error.c (dump_template_parms): Use innermost template
3893 arguments before calling count_non_default_template_args.
3894 (count_non_default_template_args): We are being called with
3895 template innermost arguments now. There is no need to ensure
3896 that again.
3897
3898 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3899
3900 PR c++/42766
3901 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3902
3903 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3904
3905 PR c++/42697
3906 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3907
3908 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3909
3910 PR c++/42697
3911 *pt.c (tsubst_decl): Get the arguments of a specialization from
3912 the specialization template, not from the most general template.
3913
3914 2010-01-16 Jason Merrill <jason@redhat.com>
3915
3916 PR c++/42761
3917 * semantics.c (finish_decltype_type): Within a template, treat
3918 unresolved CALL_EXPR as dependent.
3919
3920 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3921
3922 * error.c (dump_template_parms,count_non_default_template_args):
3923 Revert changes of PR c++/42634.
3924
3925 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3926
3927 PR middle-end/42674
3928 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3929 functions with noreturn attribute.
3930
3931 2010-01-14 Jason Merrill <jason@redhat.com>
3932
3933 PR c++/42701
3934 * call.c (build_new_method_call): Don't free the vec here.
3935
3936 PR c++/42655
3937 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3938
3939 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3940
3941 PR c++/42634
3942 * error.c (dump_template_parms): Use innermost template
3943 arguments before calling count_non_default_template_args.
3944 (count_non_default_template_args): We are being called with
3945 template innermost arguments now. There is no need to ensure
3946 that again.
3947
3948 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3949
3950 c++/40155
3951 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3952 arguments that were previously deduced.
3953
3954 2010-01-05 Jason Merrill <jason@redhat.com>
3955
3956 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3957 * call.c (build_over_call): Don't complain about it.
3958
3959 2010-01-04 Jason Merrill <jason@redhat.com>
3960
3961 PR c++/42555
3962 * pt.c (tsubst_decl): Don't apply type attributes in place.
3963
3964 PR c++/42567
3965 * semantics.c (describable_type): Remove decltype comment and
3966 semantics.
3967
3968
3969 \f
3970 Copyright (C) 2010 Free Software Foundation, Inc.
3971
3972 Copying and distribution of this file, with or without modification,
3973 are permitted in any medium without royalty provided the copyright
3974 notice and this notice are preserved.
3975