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