OSDN Git Service

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