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