OSDN Git Service

Implement explicit conversions ops as specified in N2437.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2009-05-18  Jason Merrill  <jason@redhat.com>
2
3         Implement explicit conversions ops as specified in N2437.
4         * decl.c (grokdeclarator): Handle explicit conversion ops.
5         (check_initializer): Pass flags to store_init_value.
6         * decl2.c (maybe_emit_vtables): Likewise.
7         * init.c (expand_aggr_init_1): Likewise.
8         * call.c (convert_class_to_reference): Take flags parm,
9         check DECL_NONCONVERTING_P.
10         (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
11         (add_builtin_candidates): Simplify getting type of conversion.
12         (build_object_call): Likewise.  Check DECL_NONCONVERTING_P.
13         (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
14         (reference_binding): Take flags parm.  Direct-initialize copy parm.
15         (add_function_candidate): Direct-initialize the copy parm.
16         (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
17         (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
18         (conditional_conversion): Likewise.
19         (convert_like_real): Only complain about DECL_NONCONVERTING_P
20         constructors.
21         (perform_implicit_conversion_flags): Add flags parm to
22         perform_implicit_conversion.  Improve diagnostics.
23         * cp-tree.h (LOOKUP_IMPLICIT): New macro.
24         (LOOKUP_COPY_PARM): New bit macro.
25         * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
26         * typeck.c (convert_for_assignment): Take flags parm, pass it to
27         perform_implicit_conversion_flags.
28         (cp_build_modify_expr): Pass flags to convert_for_assignment.
29         (convert_for_initialization): Likewise.
30         * typeck2.c (store_init_value): Take flags parm, pass to
31         digest_init_flags.
32         (digest_init_flags): Add flags parm to digest_init.
33         (digest_init_r): Take flags parm, pass to convert_for_initialization.
34         (process_init_constructor_array): Pass it.
35         (process_init_constructor_record): Likewise.
36         (process_init_constructor_union): Likewise.
37
38 2009-05-16  Jason Merrill  <jason@redhat.com>
39
40         PR c++/40139
41         * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
42         with a dependent type.  Actually look up the destructor.
43         * semantics.c (finish_id_expression): Fix logic.
44         (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
45         a function.
46         * typeck.c (build_x_unary_op): Diagnose taking the address of a
47         constructor or destructor.
48         * tree.c (get_first_fn): Handle OFFSET_REF.
49
50 2009-05-17  Joseph Myers  <joseph@codesourcery.com>
51
52         * tree.c (cxx_printable_name_internal): Allow consecutive
53         translated and untranslated cached copies of the name of the
54         current function.
55
56 2009-05-15  Ian Lance Taylor  <iant@google.com>
57
58         * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
59         cp_lvalue_kind.  Change all uses.
60         (enum base_access_flags): Rename from enum base_access.  Change
61         all uses.
62         * parser.c (enum cp_parser_flags): Remove enum tag.
63
64 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
65
66         PR 16302
67         * call.c (build_new_op): Update calls to warn_logical_operator.
68
69 2009-05-14  Ian Lance Taylor  <iant@google.com>
70
71         * class.c (layout_class_type): Change itk to unsigned int.
72         * decl.c (finish_enum): Change itk to unsigned int.
73         * parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
74         casts.
75
76 2009-05-13  David Mandelin <dmandelin@mozilla.com>:
77
78         * decl.c (duplicate_decls): Preserve parameter attributes.
79
80 2009-05-10  Jan Hubicka  <jh@suse.cz>
81
82         * decl2.c (cxx_callgraph_analyze_expr): Use
83         cgraph_mark_address_taken.
84
85 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
86
87         * call.c (name_as_c_string): Call type_as_string_translate.
88         Translate identifiers to locale character set.
89         * cp-tree.h (lang_decl_name): Update prototype.
90         (type_as_string_translate, decl_as_string_translate,
91         cxx_printable_name_translate): Declare.
92         * cxx-pretty-print.c (M_): Define.
93         (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
94         English fragments for conditional translation with M_.
95         * decl.c (grokdeclarator): Translate identifiers to locale
96         character set for diagnostics.
97         * error.c (M_): Define.
98         (dump_template_bindings, dump_type, dump_aggr_type,
99         dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
100         dump_function_decl, dump_template_parms, dump_expr,
101         dump_binary_op, op_to_string, assop_to_string): Mark English
102         fragments for conditional translation with M_.
103         (type_as_string): Disable translation of identifiers.
104         (type_as_string_translate): New.
105         (expr_as_string): Disable translation of identifiers.
106         (decl_as_string): Disable translation of identifiers.
107         (decl_as_string_translate): New.
108         (lang_decl_name): Add parameter translate.
109         (args_to_string): Call type_as_string_translate.
110         (cp_print_error_function): Call cxx_printable_name_translate.
111         (print_instantiation_full_context,
112         print_instantiation_partial_context): Call
113         decl_as_string_translate.
114         * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
115         identifier in diagnostic.
116         * tree.c (cxx_printable_name): Change to
117         cxx_printable_name_internal.  Add parameter translate.
118         (cxx_printable_name, cxx_printable_name_translate): New wrappers
119         round cxx_printable_name_internal.
120
121 2009-05-08  H.J. Lu  <hongjiu.lu@intel.com>
122
123         PR c/36892
124         * call.c (build_call_a): Updated warn_deprecated_use call.
125         (build_over_call): Likewise.
126         * decl.c (grokdeclarator): Likewise.
127         (grokparms): Likewise.
128         * semantics.c (finish_id_expression): Likewise.
129         * typeck.c (build_class_member_access_expr): Likewise.
130         (finish_class_member_access_expr): Likewise.
131
132 2009-05-06  Dodji Seketeli  <dodji@redhat.com>
133
134         PR c++/17395
135         * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
136         whole list of PARM_DECLs, just the current one.
137
138 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
139
140         * cp-tree.h:
141         (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
142         mangle_compound_literal): Remove unused declarations.
143         (build_vfield_ref, cxx_print_statistics, clone_function_decl,
144         adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
145         pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
146         check_for_out_of_scope_variable, print_other_binding_stack,
147         maybe_push_decl, cxx_mark_addressable, force_target_expr,
148         build_target_expr_with_type, finish_case_label,
149         cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
150         check_template_keyword, cxx_omp_predetermined_sharing,
151         cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
152         cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
153         cxx_omp_privatize_by_reference): Rearrange the declarations line to
154         match the comment that indicates the .c file which the functions are
155         defined.
156         (cxx_print_xnode, cxx_print_decl, cxx_print_type,
157         cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
158
159 2009-05-05  Nathan Sidwell  <nathan@codesourcery.com>
160
161         * typeck.c (cp_build_compound_expr): Require RHS to have a known
162         type.
163         * class.c (resolve_address_of_overloaded_function): Use
164         OVL_CURRENT for error message.
165         (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
166         with them.  Do not copy the node.
167
168 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
169
170         PR c++/40013
171         * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
172         set it from its operand's type after tsubst_expr.
173
174 2009-05-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
175
176         PR c++/28152
177         * parser.c (cp_lexer_get_preprocessor_token):  Do not store the
178         canonical spelling for keywords.
179         (cp_parser_attribute_list): Use the canonical spelling for
180         keywords in attributes.
181
182 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
183
184         * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
185         pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
186         pp_cxx_new_expression, pp_cxx_delete_expression,
187         pp_cxx_unary_expression, pp_cxx_assignment_operator,
188         pp_cxx_assignment_expression, pp_cxx_expression,
189         pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
190         pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
191         pp_cxx_exception_specification, pp_cxx_direct_declarator,
192         pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
193         pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
194         pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
195         pp_cxx_declaration, pp_cxx_typeid_expression,
196         pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
197         pp_cxx_trait_expression): Mostly use pp_string and
198         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
199         for non-identifiers.  Mark English strings for translation.
200         * cxx-pretty-print.h (pp_cxx_ws_string): Define.
201         * error.c (dump_template_parameter, dump_template_bindings,
202         dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
203         dump_decl, dump_template_decl, dump_function_decl,
204         dump_parameters, dump_exception_spec, dump_template_parms,
205         dump_expr, dump_binary_op, dump_unary_op, op_to_string,
206         assop_to_string, args_to_string, cp_print_error_function,
207         print_instantiation_full_context,
208         print_instantiation_partial_context): Mostly use pp_string and
209         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
210         for non-identifiers.  Mark English strings for translation.
211         (dump_global_iord): Mark strings for translation; use longer
212         strings instead of substituting single words.
213         (function_category): Return a format string marked for
214         translation, not a single word or phrase to substitute in a longer
215         phrase.
216
217 2009-04-28  Ben Elliston  <bje@au.ibm.com>
218
219         PR c++/35652
220         Revert:
221
222         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
223
224         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
225
226 2009-04-27  Ian Lance Taylor  <iant@google.com>
227
228         * semantics.c (finish_omp_clauses): Change type of c_kind to enum
229         omp_clause_code.
230
231 2009-04-27  Jakub Jelinek  <jakub@redhat.com>
232
233         PR c++/39875
234         * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
235         -Wunused-value if implicit.
236
237 2009-04-24  Ian Lance Taylor  <iant@google.com>
238
239         * call.c (build_temp): Change 0 to enum constant.
240         * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
241         type.
242         * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
243         * decl2.c (constrain_visibility): Likewise.
244         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
245         (cp_parser_flags): Typedef to int rather than enum type.
246         (cp_parser_expression_stack_entry): Change prec field to enum
247         cp_parser_prec.
248
249         * typeck.c (build_modify_expr): Add lhs_origtype parameter.
250         Change all callers.
251
252 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
253
254         PR c++/39639
255         * parser.c (cp_parser_template_argument_list): Display an error
256         when an ellipsis is not preceded by a parameter pack. Also, warn
257         about variadic templates usage without -std=c++0x.
258
259 2009-04-21  Taras Glek <tglek@mozilla.com>
260
261         * cp-tree.h: Update GTY annotations to new syntax.
262         * decl.c: Likewise.
263         * mangle.c: Likewise.
264         * name-lookup.c: Likewise.
265         * name-lookup.h: Likewise.
266         * parser.c: Likewise.
267         * pt.c: Likewise.
268         * rtti.c: Likewise.
269         * semantics.c: Likewise.
270         * typeck2.c: Likewise.
271
272 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
273
274         PR c++/14875
275         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
276
277 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
278
279         PR c++/35711
280         * typeck.c (check_for_casting_away_constness): We diagnose casting
281         away any qualifiers not just constness.
282         (casts_away_constness): Mention that it handles more than just
283         constness.
284         
285 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
286
287         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
288         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
289         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
290         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
291         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
292         cfns.gperf: Add copyright and license notices.
293         * cfns.h: Regenerate.
294         * ChangeLog, ChangeLog-2004: Correct dates.
295
296 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
297
298         PR 16202
299         * tree.c (lvalue_p_1): Use const_tree.
300         Use CONST_CAST_TREE to avoid warning.
301         (lvalue_p): Returns bool, receives const_tree.
302
303 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
304
305         PR c++/13358
306         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
307         * error.c (pedwarn_cxx98): New.
308         * cp-tree.h (pedwarn_cxx98): Declare.
309
310 2009-04-20  Le-Chun Wu  <lcwu@google.com>
311
312         PR c++/39803
313         * init.c (build_vec_init): Set TREE_NO_WARNING on the
314         compiler-generated INDIRECT_REF expression.
315
316 2009-04-20  Ian Lance Taylor  <iant@google.com>
317
318         * typeck.c (build_function_call_vec): New function.
319         (cp_build_function_call): Only pass first parameter to
320         objc_rewrite_function_call.
321         (build_modify_expr): Add rhs_origtype parameter.  Change all
322         callers.
323         * decl.c (finish_decl): Add origtype parameter.  Change all
324         callers.
325         * semantics.c (finish_call_expr): Pass VEC to
326         resolve_overloaded_builtin.
327
328 2009-04-20  Ian Lance Taylor  <iant@google.com>
329
330         * cp-tree.h (base_access): Change typedef to int.
331         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
332         (cp_parser_omp_threadprivate): Likewise.
333         * pt.c (unify_pack_expansion): Add casts to enum type.
334
335 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
336
337         PR c/32061
338         PR c++/36954
339         * call.c (build_new_op): Save the original codes of operands
340         before folding.
341
342 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
343
344         * cp-tree.h: Remove the prototype for insert_block.
345         * decl.c (insert_block): Remove.
346
347 2009-04-16  Ian Lance Taylor  <iant@google.com>
348
349         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
350         (tsubst_flags_t): Change typedef from enum type to int.
351
352 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
353
354         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
355         instead of targetm.vector_opaque_p.
356
357 2009-04-15  Le-Chun Wu  <lcwu@google.com>
358
359         PR c++/39551
360         * call.c (build_over_call): Set TREE_NO_WARNING on the
361         compiler-generated INDIRECT_REF expression.
362         * cvt.c (convert_to_void): Emit warning when stripping off
363         INDIRECT_REF.
364
365 2009-04-14  Diego Novillo  <dnovillo@google.com>
366
367         * parser.c (cp_parser_type_specifier_seq): Move call to
368         invoke_plugin_callbacks ...
369         (cp_parser_type_specifier_seq): ... here.
370
371 2009-04-14  Le-Chun Wu  <lcwu@google.com>
372
373         * Make-lang.in: Modify dependencies of files including plugin.h.
374         * decl.c (finish_function): Call invoke_plugin_callbacks.
375         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
376
377 2009-04-14  Jason Merrill  <jason@redhat.com>
378
379         PR c++/39763
380         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
381         about shadowing by tentative parms.
382
383 2009-04-13  Jason Merrill  <jason@redhat.com>
384
385         PR c++/39480
386         * call.c (build_over_call): Don't call memcpy if the target is
387         the same as the source.
388
389 2009-04-13  Jason Merrill  <jason@redhat.com>
390
391         PR c++/39750
392         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
393
394 2009-04-12  Jason Merrill  <jason@redhat.com>
395
396         PR c++/39742
397         * call.c (joust): Don't crash on variadic fn.
398
399 2009-04-10  Jason Merrill  <jason@redhat.com>
400
401         PR c++/28301
402         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
403         if we see a close brace without an open brace.
404
405 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
406
407         * parser.c (cp_parser_class_specifier): Remove the unused
408         has_trailing_semicolon.
409
410 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
411
412         PR  c++/20118
413         * parser.c (cp_parser_check_template_parameters): Take a
414         cp_declarator parameter.
415         (cp_parser_elaborated_type_specifier): Update to
416         cp_parser_check_template_parameters.
417         (cp_parser_class_head): Likewise.
418         (cp_parser_check_declarator_template_parameters): Likewise.
419         (cp_parser_check_template_parameters): Handle first the non-error
420         conditions. Give more accurate diagnostics if a declarator is
421         given. 
422
423 2009-04-08  Jason Merrill  <jason@redhat.com>
424
425         PR c++/25185
426         * error.c (dump_aggr_type): Chase template typedefs if
427         -fno-pretty-templates.
428
429 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
430
431         PR c++/39637
432         * parser.c (cp_parser_enumerator_definition): Make sure the
433         initializer of the enumerator doesn't contain any bare parameter pack.
434
435 2009-04-07  Jason Merrill  <jason@redhat.com>
436
437         PR c++/34691
438         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
439         * call.c (joust): Complain about mismatched default arguments
440         in extern "C" functions.
441         * class.c (resolve_address_of_overloaded_function): Handle multiple
442         extern "C" functions.
443         * pt.c (resolve_overloaded_unification): Likewise.
444
445 2009-04-07  Jason Merrill  <jason@redhat.com>
446
447         PR c++/25185
448         * error.c (dump_function_decl): Don't pretty-print templates
449         if -fno-pretty-templates.
450         (count_non_default_template_args): Print all args if
451         -fno-pretty-templates.
452
453 2009-04-06  Jason Merrill  <jason@redhat.com>
454
455         PR c++/35146
456         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
457         the deduced template arguments give us the parameter types
458         we're looking for.
459
460 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
461             Jason Merrill  <jason@redhat.com>
462
463         PR c++/14912
464         * error.c (count_non_default_template_args): New fn.
465         (dump_template_parms): Call it.
466         (dump_template_argument_list): Call it.  Add parms parm.
467         (dump_template_argument): Adjust call to dump_template_argument_list.
468         (dump_type, dump_decl): Likewise.
469         (dump_template_bindings): Refactor logic.
470
471 2009-04-03  Jason Merrill  <jason@redhat.com>
472
473         PR c++/25185
474         * error.c (dump_template_bindings): Look through typedefs in
475         typename results.
476         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
477         (find_typenames_r): Also collect typedefs.
478         * pt.c (unify): Strip typedefs.
479
480         PR c++/39608
481         * semantics.c (finish_id_expression): Don't assume a dependent
482         member of the current instantiation isn't a valid integral
483         constant expression.  Check dependent_scope_p.
484         * pt.c (dependent_scope_p): Check TYPE_P.
485         (tsubst_copy): If args is null, just return.
486
487 2009-04-02  Jason Merrill  <jason@redhat.com>
488
489         PR c++/25185
490         * error.c (find_typenames, find_typenames_r): New fns.
491         (dump_function_decl): Call find_typenames.
492         (dump_template_bindings): Print typenames as well.
493         * pt.c (tsubst): Non-static.
494         * cp-tree.h: Declare it.
495
496 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
497
498         PR c++/26693
499         * decl2.c (grokfield): when a typedef appears in a
500         class, create the typedef variant type node for it.
501         (save_template_attributes): Creating typedef variant type node
502          here is now useless.
503         * decl.c (grokdeclarator): If the typedef'ed struct/class was
504         anonymous, set the proper type name to all its type variants.
505         (xref_basetypes) : Fixup the variant types after setting
506         TYPE_BINFO on REF.
507         * name-lookup.c (pushdecl_maybe_friend): Reuse the
508         set_underlying_type function to install typedef variant types.
509         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
510         macro.
511         (append_type_to_template_for_access_check): New entry points.
512         * semantics.c (check_accessibility_of_qualified_id):
513         When a typedef that is a member of a class appears in a template,
514         add it to the template. It will be ...
515         * class.c (finish_struct_bits): Split type variant fixup into ...
516         (fixup_type_variants): A new entry point.
517         * pt.c (instantiate_class_template, instantiate_template ): ... access
518         checked at template instantiation time.
519         (resolve_type_name_type): The type name should be the name of the
520         main type variant.
521         (retrieve_specialization): Specializations of template typedefs aren't
522         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
523         (append_type_to_template_for_access_check): New entry point.
524         (tsubst_decl): For typedefs, build the variant type from the correct
525         original type.
526         (get_class_bindings): Fix function comment.
527         (perform_typedefs_access_check): New entry point.
528
529 2009-03-31  Jason Merrill  <jason@redhat.com>
530
531         PR c++/34691
532         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
533         extern "C" declarations.
534
535         C++ DR 613
536         * semantics.c (finish_non_static_data_member): Allow such references
537         without an associated object in sizeof/decltype/alignof.
538
539         * ptree.c (cxx_print_decl): Pretty-print full name of
540         function/template.
541         (cxx_print_type): Pretty-print full name of class.
542
543         * decl.c (grokdeclarator): Reject pointer to qualified function
544         type.
545
546         PR c++/37806, core issue 547
547         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
548         to a typedef.
549         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
550         function type.
551         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
552         * decl.c (groktypename): Add is_template_arg parameter.
553         (grokdeclarator): Allow function cv-quals on a template type arg.
554         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
555         is_template_arg argument in calls to groktypename.
556         * cp-tree.h: Adjust prototype.
557         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
558         FUNCTION_TYPE printing.
559         
560         * mangle.c (write_expression): Mangle dependent name as
561         source-name.
562
563         PR c++/38030, 38850, 39070
564         * pt.c (type_dependent_expression_p_push): New fn.
565         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
566         substitution makes the call non-dependent.  Preserve koenig_p.
567         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
568         for non-dependent calls.
569         * semantics.c (finish_call_expr): Revert earlier changes.
570         * cp-tree.h: Revert change to finish_call_expr prototype.
571
572 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
573
574         PR preprocessor/34695
575         * cp-tree.h (cp_cpp_error): Remove.
576         * error.c (cp_cpp_error): Remove.
577         * parser.c (cp_lexer_new_main): Set done_lexing instead of
578         client_diagnostic and error callback.
579
580 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
581
582         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
583         * cp/cp-objcp-common.c (cxx_staticp): Remove.
584         * cp/cp-tree.h (cxx_staticp): Remove.
585
586 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
587
588         PR c++/39554
589         * parser.c (cp_parser_postfix_expression): Don't call
590         warning_if_disallowed_function_p.
591
592 2009-03-27  Jan Hubicka  <jh@suse.cz>
593
594         * except.c (choose_personality_routine): Set terminate_node to abort
595         for java exceptions.
596
597 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
598             Jakub Jelinek  <jakub@redhat.com>
599
600         PR debug/37959
601         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
602         (cp_function_decl_explicit_p): New prototype.
603         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
604
605 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
606
607         PR c++/38638
608         * parser.c (cp_parser_elaborated_type_specifier): If we have a
609         typename tag and don't have either a TYPE_DECL or a
610         TEMPLATE_ID_EXPR, set the type to NULL.
611
612 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
613
614         PR c++/37647
615         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
616         scope.
617
618 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
619
620         PR c++/29727
621         * decl.c (check_array_designated_initializer): Handle error_mark_node.
622
623 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
624
625         PR c++/35652
626         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
627
628 2009-03-26  Andrew Haley  <aph@redhat.com>
629
630         PR C++/39380
631         * decl2.c (possibly_inlined_p): If java exceptions are in use
632         don't inline a decl unless it is explicitly marked inline.
633         * lex.c: (pragma_java_exceptions): New variable.
634         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
635         * cp-tree.h (pragma_java_exceptions): Declare new variable.
636
637 2009-03-24  Jason Merrill  <jason@redhat.com>
638
639         PR c++/28274
640         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
641
642 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
643
644         PR c/39495
645         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
646         code if iter is the second operand.
647         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
648         argument.  If it is set, don't build the toplevel expression with
649         build_x_binary_op, but build2.
650         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
651         callers.
652         (cp_parser_omp_for_cond): Don't assume the first operand of the
653         comparison must be decl.
654
655 2009-03-23  Jason Merrill  <jason@redhat.com>
656
657         PR c++/37729
658         * pt.c (make_fnparm_pack): Split out from...
659         (instantiate_decl): ...here.
660         (tsubst_pack_expansion): Handle being called in a late-specified
661         return type.
662
663         PR c++/39526
664         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
665         a parm with a parm.
666
667 2009-03-20  Jason Merrill  <jason@redhat.com>
668
669         PR c++/28879
670         * parser.c (cp_parser_direct_declarator): In a template, wrap 
671         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
672         * pt.c (tsubst): Preserve it in a partial instantiation.
673         (dependent_type_p_r): Don't check value_dependent_expression_p.
674         * decl.c (compute_array_index_type): Don't check
675         value_dependent_expression_p if TREE_SIDE_EFFECTS.
676
677         C++ core issue 703
678         * typeck2.c (check_narrowing): Don't complain about loss of 
679         precision when converting a floating-point constant.
680
681 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
682
683         PR c/39495
684         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
685         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
686
687 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
688
689         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
690         (eof_token): Adjust.
691
692 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
693
694         PR c++/39425
695         * parser.c (cp_parser_explicit_specialization): Don't skip the
696         rest of the specialization when begin_specialization returns
697         false.
698
699 2009-03-17  Jason Merrill  <jason@redhat.com>
700
701         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
702         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
703         * pt.c (check_explicit_specialization): Likewise.
704         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
705         local specialization.
706         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
707         * decl2.c (parm_index): New fn.
708         * semantics.c (finish_decltype_type): Don't use describable_type.
709         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
710         Give a sorry for unsupported codes rather than crash.  Mangle
711         conversions with other than 1 operand.  New mangling for PARM_DECL.
712         * operators.def (ALIGNOF_EXPR): Mangle as "az".
713
714 2009-03-17  Jing Yu  <jingyu@google.com>
715
716         PR middle-end/39378
717         * method.c (use_thunk): Change is_thunk from crtl to cfun.
718
719 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
720
721         PR c++/39475
722         * semantics.c (check_trait_type): New.
723         (finish_trait_expr): Use it.
724
725 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
726
727         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
728         instead of calling imported_module_or_decl debug hook if
729         building_stmt_tree ().
730         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
731         is a NAMESPACE_DECL.
732
733         PR debug/37890
734         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
735         hook at function scope.
736
737         PR debug/39471
738         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
739         on IMPORTED_DECL.
740
741 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
742
743         PR c++/39371
744         * semantics.c (finish_switch_cond): Don't call get_unwidened.
745         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
746         instead of TREE_TYPE (cond).
747
748 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
749
750         PR c++/39060
751         * parser.c (cp_parser_late_parsing_default_args): Continue
752         the loop when cp_parser_assignment_expression returns
753         error_mark_node.
754
755 2009-03-07  Jason Merrill  <jason@redhat.com>
756
757         PR c++/39367
758         * init.c (build_new_1): Don't use a VLA type.
759         (build_vec_init): Handle getting a pointer for BASE.
760
761 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
762
763         PR c++/37520
764         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
765         when mangling symbols.
766
767 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
768
769         PR c++/33492
770         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
771
772 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
773
774         * decl.c (record_builtin_java_type): Use canonicalized integer
775         types.
776
777 2009-03-04  Jason Merrill  <jason@redhat.com>
778
779         PR c++/38908
780         * class.c (is_really_empty_class): New fn.
781         * cp-tree.h: Declare it.
782         * cp-objcp-common.c (cp_expr_size): Use it.
783
784         PR c++/13549
785         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
786         * parser.c (cp_parser_postfix_expression): Call it for 
787         TEMPLATE_ID_EXPR.
788         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
789         (get_first_fn): Likewise.
790
791         PR c++/9634
792         PR c++/29469
793         PR c++/29607
794         Implement DR 224.
795         * decl.c (make_typename_type): Do look inside currently open classes.
796         * parser.c (cp_parser_lookup_name): Likewise.
797         (cp_parser_template_name): Likewise.
798         * pt.c (dependent_scope_p): New function.
799         * cp-tree.h: Declare it.
800         * class.c (currently_open_class): Return fast if T isn't a class.
801
802 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
803
804         PR c++/37789
805         * parser.c (cp_parser_mem_initializer): Return error_mark_node
806         if cp_parser_mem_initializer_id returns error_mark_node.
807
808 2009-02-24  Richard Guenther  <rguenther@suse.de>
809
810         PR c++/39242
811         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
812         declared functions.
813
814 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
815
816         PR c++/36411
817         * pt.c (coerce_template_template_parms): Return 0 if parameter
818         is error_mark_node.
819
820 2009-02-23  Jason Merrill  <jason@redhat.com>
821
822         * pt.c (unify): Call maybe_adjust_types_for_deduction when
823         deducing from an initializer list.
824
825 2009-02-20  Jason Merrill  <jason@redhat.com>
826
827         PR c++/39225
828         * decl.c (grokdeclarator): Handle ~identifier.
829
830 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
831
832         PR target/39175
833         * decl2.c (determine_visibility): If visibility changed and
834         DECL_RTL has been already set, call make_decl_rtl to update symbol
835         flags.
836
837 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
838
839         PR c++/39188
840         * cp-tree.h (maybe_commonize_var): New.
841
842         * decl.c (maybe_commonize_var): Make it extern.
843
844         * decl2.c (finish_anon_union): Call maybe_commonize_var.
845
846 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
847
848         PR c++/39219
849         * parser.c (cp_parser_enum_specifier): Apply all attributes.
850
851 2009-02-18  Jason Merrill  <jason@redhat.com>
852
853         * cfns.h: Tweak pathname for cfns.gperf.
854
855 2009-02-13  Jason Merrill  <jason@redhat.com>
856
857         PR c++/39070
858         * semantics.c (finish_call_expr): Change koenig_p parm to int.
859         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
860         * cp-tree.h: Adjust prototype.
861         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
862
863 2009-02-12  Jason Merrill  <jason@redhat.com>
864
865         PR c++/38950
866         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
867
868 2009-02-11  Jason Merrill  <jason@redhat.com>
869
870         PR c++/39153
871         * decl2.c (cp_write_global_declarations): 
872         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
873
874         PR c++/30111
875         * init.c (build_value_init_noctor): Split out from...
876         (build_value_init): ...here.
877         (expand_aggr_init_1): Handle value-initialization.
878         * cp-tree.h: Add declaration.
879         * class.c (type_has_user_provided_constructor): 
880         Handle non-class arguments.
881
882 2009-02-10  Jason Merrill  <jason@redhat.com>
883
884         PR c++/38649
885         * class.c (defaultable_fn_p): Handle ... properly.
886
887         PR c++/36744
888         * tree.c (lvalue_p_1): Condition rvalue ref handling on
889         treat_class_rvalues_as_lvalues, too.
890
891 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
892
893         PR c++/34397
894         * typeck.c (build_x_array_ref): New.
895         * cp-tree.h: Declare it.
896         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
897
898 2009-02-09  Jason Merrill  <jason@redhat.com>
899
900         PR c++/39109
901         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
902         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
903         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
904         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
905         for build_value_init TARGET_EXPR.
906         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
907
908 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
909
910         PR c++/35147
911         PR c++/37737
912         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
913
914 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
915
916         PR c++/39095
917         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
918         remove ./dt operator.
919         * mangle.c (write_expression): Handle COMPONENT_REF after handling
920         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
921         write_string ("dt") instead of using operators.def.
922
923 2009-02-03  Jason Merrill  <jason@redhat.com>
924
925         * typeck.c (cp_build_unary_op): Only complain about taking address
926         of main if pedantic.
927
928 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
929
930         PR inline-asm/39059
931         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
932
933         PR c++/39056
934         * typeck2.c (digest_init_r): Don't call process_init_constructor
935         for COMPLEX_TYPE.
936
937 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
938
939         PR c++/36897
940         * pt.c (convert_nontype_argument_function): Expect expr to be an
941         ADDR_EXPR.
942
943         PR c++/37314
944         * typeck.c (merge_types): Call resolve_typename_type if only
945         one type is a typename.
946
947 2009-02-02  Jason Merrill  <jason@redhat.com>
948
949         PR c++/39054
950         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
951         in BIT_NOT_EXPR.
952
953 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
954
955         PR c++/39053
956         * parser.c (cp_parser_pure_specifier): If there are no tokens left
957         do not call cp_lexer_consume_token.
958
959 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
960
961         PR c++/39028
962         * parser.c (cp_parser_already_scoped_statement): Handle __label__
963         declarations.
964
965 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
966
967         PR c++/33465
968         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
969
970 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
971
972         PR c++/38655
973         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
974
975 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
976
977         * typeck.c (invalid_nonstatic_memfn_p): Use
978         DECL_NONSTATIC_MEMBER_FUNCTION_P.
979
980 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
981
982         PR c++/37554
983         * call.c (build_over_call): If convert_for_arg_passing returns
984         error_mark_node unconditionally return it.
985
986 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
987
988         * class.c (check_field_decls): Also inherit packed for bitfields
989         regardless of their type.
990
991 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
992
993         PR c++/38930
994         * decl2.c (grokfield): Reverting changes of PR c++/26693
995         (save_template_attributes): Likewise.
996         * decl.c (grokdeclarator): Likewise.
997         * name-lookup.c (pushdecl_maybe_friend): Likewise.
998         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
999         (append_type_to_template_for_access_check): Likewise.
1000         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1001         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1002         (tsubst): Likewise.
1003         (resolve_type_name_type): Likewise.
1004         (append_type_to_template_for_access_check): Likewise.
1005
1006 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
1007
1008         PR c++/26693
1009         * decl2.c (grokfield): when a typedef appears in a
1010         class, create the typedef variant type node for it.
1011         (save_template_attributes): Creating typedef variant type node
1012          here is now useless.
1013         * decl.c (grokdeclarator): If the typedef'ed struct/class was
1014         anonymous, set the proper type name to all its type variants.
1015         * name-lookup.c (pushdecl_maybe_friend): Reuse the
1016         set_underlying_type function to install typedef variant types.
1017         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1018         macro.
1019         (append_type_to_template_for_access_check): New entry points.
1020         * semantics.c (check_accessibility_of_qualified_id):
1021         When a typedef that is a member of a class appears in a template,
1022         add it to the template. It will be ...
1023         * pt.c (instantiate_class_template, instantiate_template ): ... access
1024         checked at template instantiation time.
1025         (tsubst): Handle the case of being called with NULL args.
1026         (resolve_type_name_type): The type name should be the name of the
1027         main type variant.
1028         (append_type_to_template_for_access_check): New entry point.
1029
1030 2009-01-19  Jason Merrill  <jason@redhat.com>
1031
1032         PR c++/23287
1033         * parser.c (cp_parser_unqualified_id): In a template,
1034         accept ~identifier.
1035         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1036
1037 2009-01-16  Jason Merrill  <jason@redhat.com>
1038
1039         PR c++/38877
1040         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1041         * init.c (build_new): Don't call describable_type unless we
1042         have an auto.
1043
1044         PR c++/29470
1045         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1046
1047         PR c++/38579
1048         * search.c (protected_accessible_p): N doesn't vary.
1049
1050 2009-01-15  Jason Merrill  <jason@redhat.com>
1051
1052         PR c++/38850
1053         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1054         accept hidden friends.
1055
1056 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1057
1058         PR C++/29388
1059         * decl.c (grokdeclarator): Check for a non namespace/class context.
1060
1061 2009-01-15  Jason Merrill  <jason@redhat.com>
1062
1063         PR c++/36334
1064         PR c++/37646
1065         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
1066         a function isn't necessarily an lvalue. Take tree, not const_tree.
1067         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1068         * typeck.c (lvalue_or_else): Likewise.
1069         * cp-tree.h: Adjust prototypes.
1070
1071 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
1072
1073         PR c++/38357
1074         * pt.c (tsubst): Check for NULL args.
1075
1076 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
1077
1078         PR c++/38636
1079         * name-lookup.c (pushtag): Don't create members to types that are not
1080         being created.
1081
1082 2009-01-14  Nick Clifton  <nickc@redhat.com>
1083
1084         PR c++/37862
1085         * parser.c: Pass cp_id_kind computed in
1086         cp_parser_postfix_dot_deref_expression to
1087         cp_parser_primary_expression.
1088
1089 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
1090
1091         PR c++/38795
1092         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1093         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1094         as CAST_EXPR.
1095
1096 2009-01-12  Jason Merrill  <jason@redhat.com>
1097             Steve Ellcey  <sje@cup.hp.com>
1098
1099         PR c++/35109
1100         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
1101         binding.
1102
1103 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
1104
1105         PR c++/36019
1106         * pt.c (parameter_of_template_p): New function.
1107         * cp-tree.h: Declare it.
1108         * name-lookup.c (binding_to_template_parms_of_scope_p): New
1109         function.
1110         (outer_binding): Take template parameters in account when looking for
1111         a name binding.
1112
1113 2009-01-12  Jason Merrill  <jason@redhat.com>
1114
1115         PR c++/31488
1116         * tree.c (pod_type_p): Return 1 for structs created by the back end.
1117
1118 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
1119
1120         PR c/32041
1121         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1122         offsetof member-designator, handle it as `[0].'.
1123
1124         PR c++/38794
1125         * decl.c (start_function): If grokdeclarator hasn't returned
1126         FUNCTION_DECL nor error_mark_node, issue diagnostics.
1127
1128 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
1129
1130         PR c++/36254
1131         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1132         (gimplify_if_stmt): ... this.
1133         (cp_gimplify_expr): Don't handle IF_STMT here.
1134         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1135
1136 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
1137
1138         PR c++/38648
1139         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1140
1141         PR c++/36695
1142         * typeck2.c (build_functional_cast): Check for reference type and NULL
1143         PARMS.
1144
1145 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
1146
1147         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1148
1149 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
1150
1151         PR c++/35335
1152         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1153
1154 2009-01-09  John F. Carr  <jfc@mit.edu>
1155
1156         PR c++/37877
1157         * parser.c (cp_parser_class_specifier): Clear
1158         parser->in_unbraced_linkage_specification_p while parsing class
1159         specifiers.
1160
1161 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
1162
1163         PR c++/38725
1164         * semantics.c (finish_goto_stmt): Convert destination to
1165         void *.
1166
1167 2009-01-06  Jason Merrill  <jason@redhat.com>
1168
1169         PR c++/35297
1170         PR c++/35477
1171         PR c++/35784
1172         PR c++/36846
1173         PR c++/38276
1174         * pt.c (check_default_tmpl_args): Don't complain about
1175         out-of-order parameter packs in the enclosing class
1176         or parameter packs after default args.
1177         (coerce_template_parms): If we have more than one
1178         parameter pack, don't flatten argument packs.
1179         (template_args_equal): Handle argument packs.
1180         (comp_template_args): Don't flatten argument packs.
1181         (check_instantiated_arg): Split out from...
1182         (check_instantiated_args): Here.  Handle arg packs.
1183         (convert_template_argument): Just check that nontype argument
1184         packs have the right type.
1185
1186 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
1187
1188         PR c++/38472
1189         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1190
1191 2009-01-05  Jason Merrill  <jason@redhat.com>
1192
1193         PR c++/38698
1194         * typeck2.c (process_init_constructor_union): Handle union with
1195         no fields.
1196
1197         * mangle.c (write_expression): Remove mangling for zero-operand
1198         casts.
1199
1200         PR c++/38701
1201         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1202         defaulting.
1203
1204         PR c++/38702
1205         * class.c (defaultable_fn_p): Only operator== can be a copy
1206         assignment operator.
1207
1208 2009-01-02  Jason Merrill  <jason@redhat.com>
1209
1210         PR c++/38698
1211         * typeck2.c (process_init_constructor_union): Handle excess
1212         initializers.
1213         (process_init_constructor_record): Likewise.
1214
1215         PR c++/38684
1216         * typeck2.c (digest_init_r): Don't use process_init_constructor
1217         for non-aggregate classes.
1218
1219 \f
1220 Copyright (C) 2009 Free Software Foundation, Inc.
1221
1222 Copying and distribution of this file, with or without modification,
1223 are permitted in any medium without royalty provided the copyright
1224 notice and this notice are preserved.