c-common.c (vector_targets_convertible_p, [...]): Use TYPE_VECTOR_OPAQUE instead...
[official-gcc.git] / gcc / cp / ChangeLog
blobc0fa5ba4995344c5de243c384c2bb788d1ba5d0b
1 2009-04-16  Le-Chun Wu  <lcwu@google.com>
3         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
4         instead of targetm.vector_opaque_p.
6 2009-04-15  Le-Chun Wu  <lcwu@google.com>
8         PR c++/39551
9         * call.c (build_over_call): Set TREE_NO_WARNING on the
10         compiler-generated INDIRECT_REF expression.
11         * cvt.c (convert_to_void): Emit warning when stripping off
12         INDIRECT_REF.
14 2009-04-14  Diego Novillo  <dnovillo@google.com>
16         * parser.c (cp_parser_type_specifier_seq): Move call to
17         invoke_plugin_callbacks ...
18         (cp_parser_type_specifier_seq): ... here.
20 2009-04-14  Le-Chun Wu  <lcwu@google.com>
22         * Make-lang.in: Modify dependencies of files including plugin.h.
23         * decl.c (finish_function): Call invoke_plugin_callbacks.
24         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
26 2009-04-14  Jason Merrill  <jason@redhat.com>
28         PR c++/39763
29         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
30         about shadowing by tentative parms.
32 2009-04-13  Jason Merrill  <jason@redhat.com>
34         PR c++/39480
35         * call.c (build_over_call): Don't call memcpy if the target is
36         the same as the source.
38 2009-04-13  Jason Merrill  <jason@redhat.com>
40         PR c++/39750
41         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
43 2009-04-12  Jason Merrill  <jason@redhat.com>
45         PR c++/39742
46         * call.c (joust): Don't crash on variadic fn.
48 2009-04-10  Jason Merrill  <jason@redhat.com>
50         PR c++/28301
51         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
52         if we see a close brace without an open brace.
54 2008-04-10  H.J. Lu  <hongjiu.lu@intel.com>
56         * parser.c (cp_parser_class_specifier): Remove the unused
57         has_trailing_semicolon.
59 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
61         PR  c++/20118
62         * parser.c (cp_parser_check_template_parameters): Take a
63         cp_declarator parameter.
64         (cp_parser_elaborated_type_specifier): Update to
65         cp_parser_check_template_parameters.
66         (cp_parser_class_head): Likewise.
67         (cp_parser_check_declarator_template_parameters): Likewise.
68         (cp_parser_check_template_parameters): Handle first the non-error
69         conditions. Give more accurate diagnostics if a declarator is
70         given. 
72 2009-04-08  Jason Merrill  <jason@redhat.com>
74         PR c++/25185
75         * error.c (dump_aggr_type): Chase template typedefs if
76         -fno-pretty-templates.
78 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
80         PR c++/39637
81         * parser.c (cp_parser_enumerator_definition): Make sure the
82         initializer of the enumerator doesn't contain any bare parameter pack.
84 2009-04-07  Jason Merrill  <jason@redhat.com>
86         PR c++/34691
87         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
88         * call.c (joust): Complain about mismatched default arguments
89         in extern "C" functions.
90         * class.c (resolve_address_of_overloaded_function): Handle multiple
91         extern "C" functions.
92         * pt.c (resolve_overloaded_unification): Likewise.
94 2009-04-07  Jason Merrill  <jason@redhat.com>
96         PR c++/25185
97         * error.c (dump_function_decl): Don't pretty-print templates
98         if -fno-pretty-templates.
99         (count_non_default_template_args): Print all args if
100         -fno-pretty-templates.
102 2009-04-06  Jason Merrill  <jason@redhat.com>
104         PR c++/35146
105         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
106         the deduced template arguments give us the parameter types
107         we're looking for.
109 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
110             Jason Merrill  <jason@redhat.com>
112         PR c++/14912
113         * error.c (count_non_default_template_args): New fn.
114         (dump_template_parms): Call it.
115         (dump_template_argument_list): Call it.  Add parms parm.
116         (dump_template_argument): Adjust call to dump_template_argument_list.
117         (dump_type, dump_decl): Likewise.
118         (dump_template_bindings): Refactor logic.
120 2009-04-03  Jason Merrill  <jason@redhat.com>
122         PR c++/25185
123         * error.c (dump_template_bindings): Look through typedefs in
124         typename results.
125         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
126         (find_typenames_r): Also collect typedefs.
127         * pt.c (unify): Strip typedefs.
129         PR c++/39608
130         * semantics.c (finish_id_expression): Don't assume a dependent
131         member of the current instantiation isn't a valid integral
132         constant expression.  Check dependent_scope_p.
133         * pt.c (dependent_scope_p): Check TYPE_P.
134         (tsubst_copy): If args is null, just return.
136 2009-04-02  Jason Merrill  <jason@redhat.com>
138         PR c++/25185
139         * error.c (find_typenames, find_typenames_r): New fns.
140         (dump_function_decl): Call find_typenames.
141         (dump_template_bindings): Print typenames as well.
142         * pt.c (tsubst): Non-static.
143         * cp-tree.h: Declare it.
145 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
147         PR c++/26693
148         * decl2.c (grokfield): when a typedef appears in a
149         class, create the typedef variant type node for it.
150         (save_template_attributes): Creating typedef variant type node
151          here is now useless.
152         * decl.c (grokdeclarator): If the typedef'ed struct/class was
153         anonymous, set the proper type name to all its type variants.
154         (xref_basetypes) : Fixup the variant types after setting
155         TYPE_BINFO on REF.
156         * name-lookup.c (pushdecl_maybe_friend): Reuse the
157         set_underlying_type function to install typedef variant types.
158         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
159         macro.
160         (append_type_to_template_for_access_check): New entry points.
161         * semantics.c (check_accessibility_of_qualified_id):
162         When a typedef that is a member of a class appears in a template,
163         add it to the template. It will be ...
164         * class.c (finish_struct_bits): Split type variant fixup into ...
165         (fixup_type_variants): A new entry point.
166         * pt.c (instantiate_class_template, instantiate_template ): ... access
167         checked at template instantiation time.
168         (resolve_type_name_type): The type name should be the name of the
169         main type variant.
170         (retrieve_specialization): Specializations of template typedefs aren't
171         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
172         (append_type_to_template_for_access_check): New entry point.
173         (tsubst_decl): For typedefs, build the variant type from the correct
174         original type.
175         (get_class_bindings): Fix function comment.
176         (perform_typedefs_access_check): New entry point.
178 2009-03-31  Jason Merrill  <jason@redhat.com>
180         PR c++/34691
181         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
182         extern "C" declarations.
184         C++ DR 613
185         * semantics.c (finish_non_static_data_member): Allow such references
186         without an associated object in sizeof/decltype/alignof.
188         * ptree.c (cxx_print_decl): Pretty-print full name of
189         function/template.
190         (cxx_print_type): Pretty-print full name of class.
192         * decl.c (grokdeclarator): Reject pointer to qualified function
193         type.
195         PR c++/37806, core issue 547
196         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
197         to a typedef.
198         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
199         function type.
200         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
201         * decl.c (groktypename): Add is_template_arg parameter.
202         (grokdeclarator): Allow function cv-quals on a template type arg.
203         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
204         is_template_arg argument in calls to groktypename.
205         * cp-tree.h: Adjust prototype.
206         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
207         FUNCTION_TYPE printing.
208         
209         * mangle.c (write_expression): Mangle dependent name as
210         source-name.
212         PR c++/38030, 38850, 39070
213         * pt.c (type_dependent_expression_p_push): New fn.
214         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
215         substitution makes the call non-dependent.  Preserve koenig_p.
216         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
217         for non-dependent calls.
218         * semantics.c (finish_call_expr): Revert earlier changes.
219         * cp-tree.h: Revert change to finish_call_expr prototype.
221 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
223         PR preprocessor/34695
224         * cp-tree.h (cp_cpp_error): Remove.
225         * error.c (cp_cpp_error): Remove.
226         * parser.c (cp_lexer_new_main): Set done_lexing instead of
227         client_diagnostic and error callback.
229 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
231         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
232         * cp/cp-objcp-common.c (cxx_staticp): Remove.
233         * cp/cp-tree.h (cxx_staticp): Remove.
235 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
237         PR c++/39554
238         * parser.c (cp_parser_postfix_expression): Don't call
239         warning_if_disallowed_function_p.
241 2009-03-27  Jan Hubicka  <jh@suse.cz>
243         * except.c (choose_personality_routine): Set terminate_node to abort
244         for java exceptions.
246 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
247             Jakub Jelinek  <jakub@redhat.com>
249         PR debug/37959
250         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
251         (cp_function_decl_explicit_p): New prototype.
252         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
254 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
256         PR c++/38638
257         * parser.c (cp_parser_elaborated_type_specifier): If we have a
258         typename tag and don't have either a TYPE_DECL or a
259         TEMPLATE_ID_EXPR, set the type to NULL.
261 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
263         PR c++/37647
264         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
265         scope.
267 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
269         PR c++/29727
270         * decl.c (check_array_designated_initializer): Handle error_mark_node.
272 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
274         PR c++/35652
275         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
277 2009-03-26  Andrew Haley  <aph@redhat.com>
279         PR C++/39380
280         * decl2.c (possibly_inlined_p): If java exceptions are in use
281         don't inline a decl unless it is explicitly marked inline.
282         * lex.c: (pragma_java_exceptions): New variable.
283         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
284         * cp-tree.h (pragma_java_exceptions): Declare new variable.
286 2009-03-24  Jason Merrill  <jason@redhat.com>
288         PR c++/28274
289         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
291 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
293         PR c/39495
294         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
295         code if iter is the second operand.
296         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
297         argument.  If it is set, don't build the toplevel expression with
298         build_x_binary_op, but build2.
299         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
300         callers.
301         (cp_parser_omp_for_cond): Don't assume the first operand of the
302         comparison must be decl.
304 2009-03-23  Jason Merrill  <jason@redhat.com>
306         PR c++/37729
307         * pt.c (make_fnparm_pack): Split out from...
308         (instantiate_decl): ...here.
309         (tsubst_pack_expansion): Handle being called in a late-specified
310         return type.
312         PR c++/39526
313         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
314         a parm with a parm.
316 2009-03-20  Jason Merrill  <jason@redhat.com>
318         PR c++/28879
319         * parser.c (cp_parser_direct_declarator): In a template, wrap 
320         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
321         * pt.c (tsubst): Preserve it in a partial instantiation.
322         (dependent_type_p_r): Don't check value_dependent_expression_p.
323         * decl.c (compute_array_index_type): Don't check
324         value_dependent_expression_p if TREE_SIDE_EFFECTS.
326         C++ core issue 703
327         * typeck2.c (check_narrowing): Don't complain about loss of 
328         precision when converting a floating-point constant.
330 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
332         PR c/39495
333         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
334         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
336 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
338         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
339         (eof_token): Adjust.
341 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
343         PR c++/39425
344         * parser.c (cp_parser_explicit_specialization): Don't skip the
345         rest of the specialization when begin_specialization returns
346         false.
348 2009-03-17  Jason Merrill  <jason@redhat.com>
350         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
351         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
352         * pt.c (check_explicit_specialization): Likewise.
353         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
354         local specialization.
355         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
356         * decl2.c (parm_index): New fn.
357         * semantics.c (finish_decltype_type): Don't use describable_type.
358         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
359         Give a sorry for unsupported codes rather than crash.  Mangle
360         conversions with other than 1 operand.  New mangling for PARM_DECL.
361         * operators.def (ALIGNOF_EXPR): Mangle as "az".
363 2009-03-17  Jing Yu  <jingyu@google.com>
365         PR middle-end/39378
366         * method.c (use_thunk): Change is_thunk from crtl to cfun.
368 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
370         PR c++/39475
371         * semantics.c (check_trait_type): New.
372         (finish_trait_expr): Use it.
374 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
376         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
377         instead of calling imported_module_or_decl debug hook if
378         building_stmt_tree ().
379         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
380         is a NAMESPACE_DECL.
382         PR debug/37890
383         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
384         hook at function scope.
386         PR debug/39471
387         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
388         on IMPORTED_DECL.
390 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
392         PR c++/39371
393         * semantics.c (finish_switch_cond): Don't call get_unwidened.
394         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
395         instead of TREE_TYPE (cond).
397 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
399         PR c++/39060
400         * parser.c (cp_parser_late_parsing_default_args): Continue
401         the loop when cp_parser_assignment_expression returns
402         error_mark_node.
404 2009-03-07  Jason Merrill  <jason@redhat.com>
406         PR c++/39367
407         * init.c (build_new_1): Don't use a VLA type.
408         (build_vec_init): Handle getting a pointer for BASE.
410 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
412         PR c++/37520
413         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
414         when mangling symbols.
416 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
418         PR c++/33492
419         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
421 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
423         * decl.c (record_builtin_java_type): Use canonicalized integer
424         types.
426 2009-03-04  Jason Merrill  <jason@redhat.com>
428         PR c++/38908
429         * class.c (is_really_empty_class): New fn.
430         * cp-tree.h: Declare it.
431         * cp-objcp-common.c (cp_expr_size): Use it.
433         PR c++/13549
434         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
435         * parser.c (cp_parser_postfix_expression): Call it for 
436         TEMPLATE_ID_EXPR.
437         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
438         (get_first_fn): Likewise.
440         PR c++/9634
441         PR c++/29469
442         PR c++/29607
443         Implement DR 224.
444         * decl.c (make_typename_type): Do look inside currently open classes.
445         * parser.c (cp_parser_lookup_name): Likewise.
446         (cp_parser_template_name): Likewise.
447         * pt.c (dependent_scope_p): New function.
448         * cp-tree.h: Declare it.
449         * class.c (currently_open_class): Return fast if T isn't a class.
451 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
453         PR c++/37789
454         * parser.c (cp_parser_mem_initializer): Return error_mark_node
455         if cp_parser_mem_initializer_id returns error_mark_node.
457 2009-02-24  Richard Guenther  <rguenther@suse.de>
459         PR c++/39242
460         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
461         declared functions.
463 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
465         PR c++/36411
466         * pt.c (coerce_template_template_parms): Return 0 if parameter
467         is error_mark_node.
469 2009-02-23  Jason Merrill  <jason@redhat.com>
471         * pt.c (unify): Call maybe_adjust_types_for_deduction when
472         deducing from an initializer list.
474 2009-02-20  Jason Merrill  <jason@redhat.com>
476         PR c++/39225
477         * decl.c (grokdeclarator): Handle ~identifier.
479 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
481         PR target/39175
482         * decl2.c (determine_visibility): If visibility changed and
483         DECL_RTL has been already set, call make_decl_rtl to update symbol
484         flags.
486 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
488         PR c++/39188
489         * cp-tree.h (maybe_commonize_var): New.
491         * decl.c (maybe_commonize_var): Make it extern.
493         * decl2.c (finish_anon_union): Call maybe_commonize_var.
495 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
497         PR c++/39219
498         * parser.c (cp_parser_enum_specifier): Apply all attributes.
500 2009-02-18  Jason Merrill  <jason@redhat.com>
502         * cfns.h: Tweak pathname for cfns.gperf.
504 2009-02-13  Jason Merrill  <jason@redhat.com>
506         PR c++/39070
507         * semantics.c (finish_call_expr): Change koenig_p parm to int.
508         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
509         * cp-tree.h: Adjust prototype.
510         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
512 2009-02-12  Jason Merrill  <jason@redhat.com>
514         PR c++/38950
515         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
517 2009-02-11  Jason Merrill  <jason@redhat.com>
519         PR c++/39153
520         * decl2.c (cp_write_global_declarations): 
521         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
523         PR c++/30111
524         * init.c (build_value_init_noctor): Split out from...
525         (build_value_init): ...here.
526         (expand_aggr_init_1): Handle value-initialization.
527         * cp-tree.h: Add declaration.
528         * class.c (type_has_user_provided_constructor): 
529         Handle non-class arguments.
531 2009-02-10  Jason Merrill  <jason@redhat.com>
533         PR c++/38649
534         * class.c (defaultable_fn_p): Handle ... properly.
536         PR c++/36744
537         * tree.c (lvalue_p_1): Condition rvalue ref handling on
538         treat_class_rvalues_as_lvalues, too.
540 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
542         PR c++/34397
543         * typeck.c (build_x_array_ref): New.
544         * cp-tree.h: Declare it.
545         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
547 2009-02-09  Jason Merrill  <jason@redhat.com>
549         PR c++/39109
550         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
551         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
552         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
553         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
554         for build_value_init TARGET_EXPR.
555         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
557 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
559         PR c++/35147
560         PR c++/37737
561         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
563 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
565         PR c++/39095
566         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
567         remove ./dt operator.
568         * mangle.c (write_expression): Handle COMPONENT_REF after handling
569         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
570         write_string ("dt") instead of using operators.def.
572 2009-02-03  Jason Merrill  <jason@redhat.com>
574         * typeck.c (cp_build_unary_op): Only complain about taking address
575         of main if pedantic.
577 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
579         PR inline-asm/39059
580         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
582         PR c++/39056
583         * typeck2.c (digest_init_r): Don't call process_init_constructor
584         for COMPLEX_TYPE.
586 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
588         PR c++/36897
589         * pt.c (convert_nontype_argument_function): Expect expr to be an
590         ADDR_EXPR.
592         PR c++/37314
593         * typeck.c (merge_types): Call resolve_typename_type if only
594         one type is a typename.
596 2009-02-02  Jason Merrill  <jason@redhat.com>
598         PR c++/39054
599         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
600         in BIT_NOT_EXPR.
602 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
604         PR c++/39053
605         * parser.c (cp_parser_pure_specifier): If there are no tokens left
606         do not call cp_lexer_consume_token.
608 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
610         PR c++/39028
611         * parser.c (cp_parser_already_scoped_statement): Handle __label__
612         declarations.
614 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
616         PR c++/33465
617         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
619 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
621         PR c++/38655
622         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
624 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
626         * typeck.c (invalid_nonstatic_memfn_p): Use
627         DECL_NONSTATIC_MEMBER_FUNCTION_P.
629 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
631         PR c++/37554
632         * call.c (build_over_call): If convert_for_arg_passing returns
633         error_mark_node unconditionally return it.
635 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
637         * class.c (check_field_decls): Also inherit packed for bitfields
638         regardless of their type.
640 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
642         PR c++/38930
643         * decl2.c (grokfield): Reverting changes of PR c++/26693
644         (save_template_attributes): Likewise.
645         * decl.c (grokdeclarator): Likewise.
646         * name-lookup.c (pushdecl_maybe_friend): Likewise.
647         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
648         (append_type_to_template_for_access_check): Likewise.
649         * semantics.c (check_accessibility_of_qualified_id): Likewise.
650         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
651         (tsubst): Likewise.
652         (resolve_type_name_type): Likewise.
653         (append_type_to_template_for_access_check): Likewise.
655 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
657         PR c++/26693
658         * decl2.c (grokfield): when a typedef appears in a
659         class, create the typedef variant type node for it.
660         (save_template_attributes): Creating typedef variant type node
661          here is now useless.
662         * decl.c (grokdeclarator): If the typedef'ed struct/class was
663         anonymous, set the proper type name to all its type variants.
664         * name-lookup.c (pushdecl_maybe_friend): Reuse the
665         set_underlying_type function to install typedef variant types.
666         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
667         macro.
668         (append_type_to_template_for_access_check): New entry points.
669         * semantics.c (check_accessibility_of_qualified_id):
670         When a typedef that is a member of a class appears in a template,
671         add it to the template. It will be ...
672         * pt.c (instantiate_class_template, instantiate_template ): ... access
673         checked at template instantiation time.
674         (tsubst): Handle the case of being called with NULL args.
675         (resolve_type_name_type): The type name should be the name of the
676         main type variant.
677         (append_type_to_template_for_access_check): New entry point.
679 2009-01-19  Jason Merrill  <jason@redhat.com>
681         PR c++/23287
682         * parser.c (cp_parser_unqualified_id): In a template,
683         accept ~identifier.
684         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
686 2009-01-16  Jason Merrill  <jason@redhat.com>
688         PR c++/38877
689         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
690         * init.c (build_new): Don't call describable_type unless we
691         have an auto.
693         PR c++/29470
694         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
696         PR c++/38579
697         * search.c (protected_accessible_p): N doesn't vary.
699 2009-01-15  Jason Merrill  <jason@redhat.com>
701         PR c++/38850
702         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
703         accept hidden friends.
705 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
707         PR C++/29388
708         * decl.c (grokdeclarator): Check for a non namespace/class context.
710 2009-01-15  Jason Merrill  <jason@redhat.com>
712         PR c++/36334
713         PR c++/37646
714         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
715         a function isn't necessarily an lvalue. Take tree, not const_tree.
716         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
717         * typeck.c (lvalue_or_else): Likewise.
718         * cp-tree.h: Adjust prototypes.
720 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
722         PR c++/38357
723         * pt.c (tsubst): Check for NULL args.
725 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
727         PR c++/38636
728         * name-lookup.c (pushtag): Don't create members to types that are not
729         being created.
731 2009-01-14  Nick Clifton  <nickc@redhat.com>
733         PR c++/37862
734         * parser.c: Pass cp_id_kind computed in
735         cp_parser_postfix_dot_deref_expression to
736         cp_parser_primary_expression.
738 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
740         PR c++/38795
741         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
742         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
743         as CAST_EXPR.
745 2009-01-12  Jason Merrill  <jason@redhat.com>
746             Steve Ellcey  <sje@cup.hp.com>
748         PR c++/35109
749         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
750         binding.
752 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
754         PR c++/36019
755         * pt.c (parameter_of_template_p): New function.
756         * cp-tree.h: Declare it.
757         * name-lookup.c (binding_to_template_parms_of_scope_p): New
758         function.
759         (outer_binding): Take template parameters in account when looking for
760         a name binding.
762 2009-01-12  Jason Merrill  <jason@redhat.com>
764         PR c++/31488
765         * tree.c (pod_type_p): Return 1 for structs created by the back end.
767 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
769         PR c/32041
770         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
771         offsetof member-designator, handle it as `[0].'.
773         PR c++/38794
774         * decl.c (start_function): If grokdeclarator hasn't returned
775         FUNCTION_DECL nor error_mark_node, issue diagnostics.
777 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
779         PR c++/36254
780         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
781         (gimplify_if_stmt): ... this.
782         (cp_gimplify_expr): Don't handle IF_STMT here.
783         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
785 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
787         PR c++/38648
788         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
790         PR c++/36695
791         * typeck2.c (build_functional_cast): Check for reference type and NULL
792         PARMS.
794 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
796         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
798 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
800         PR c++/35335
801         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
803 2009-01-09  John F. Carr  <jfc@mit.edu>
805         PR c++/37877
806         * parser.c (cp_parser_class_specifier): Clear
807         parser->in_unbraced_linkage_specification_p while parsing class
808         specifiers.
810 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
812         PR c++/38725
813         * semantics.c (finish_goto_stmt): Convert destination to
814         void *.
816 2009-01-06  Jason Merrill  <jason@redhat.com>
818         PR c++/35297
819         PR c++/35477
820         PR c++/35784
821         PR c++/36846
822         PR c++/38276
823         * pt.c (check_default_tmpl_args): Don't complain about
824         out-of-order parameter packs in the enclosing class
825         or parameter packs after default args.
826         (coerce_template_parms): If we have more than one
827         parameter pack, don't flatten argument packs.
828         (template_args_equal): Handle argument packs.
829         (comp_template_args): Don't flatten argument packs.
830         (check_instantiated_arg): Split out from...
831         (check_instantiated_args): Here.  Handle arg packs.
832         (convert_template_argument): Just check that nontype argument
833         packs have the right type.
835 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
837         PR c++/38472
838         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
840 2009-01-05  Jason Merrill  <jason@redhat.com>
842         PR c++/38698
843         * typeck2.c (process_init_constructor_union): Handle union with
844         no fields.
846         * mangle.c (write_expression): Remove mangling for zero-operand
847         casts.
849         PR c++/38701
850         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
851         defaulting.
853         PR c++/38702
854         * class.c (defaultable_fn_p): Only operator== can be a copy
855         assignment operator.
857 2009-01-02  Jason Merrill  <jason@redhat.com>
859         PR c++/38698
860         * typeck2.c (process_init_constructor_union): Handle excess
861         initializers.
862         (process_init_constructor_record): Likewise.
864         PR c++/38684
865         * typeck2.c (digest_init_r): Don't use process_init_constructor
866         for non-aggregate classes.