OSDN Git Service

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