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