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