gcc/:
[official-gcc.git] / gcc / cp / ChangeLog
blob0d014f57a17883bd9126353641f23f3c3e0a0eaf
1 2009-04-20  Ian Lance Taylor  <iant@google.com>
3         * typeck.c (build_function_call_vec): New function.
4         (cp_build_function_call): Only pass first parameter to
5         objc_rewrite_function_call.
6         (build_modify_expr): Add rhs_origtype parameter.  Change all
7         callers.
8         * decl.c (finish_decl): Add origtype parameter.  Change all
9         callers.
10         * semantics.c (finish_call_expr): Pass VEC to
11         resolve_overloaded_builtin.
13 2009-04-20  Ian Lance Taylor  <iant@google.com>
15         * cp-tree.h (base_access): Change typedef to int.
16         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
17         (cp_parser_omp_threadprivate): Likewise.
18         * pt.c (unify_pack_expansion): Add casts to enum type.
20 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
22         PR c/32061
23         PR c++/36954
24         * call.c (build_new_op): Save the original codes of operands
25         before folding.
27 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
29         * cp-tree.h: Remove the prototype for insert_block.
30         * decl.c (insert_block): Remove.
32 2009-04-16  Ian Lance Taylor  <iant@google.com>
34         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
35         (tsubst_flags_t): Change typedef from enum type to int.
37 2009-04-16  Le-Chun Wu  <lcwu@google.com>
39         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
40         instead of targetm.vector_opaque_p.
42 2009-04-15  Le-Chun Wu  <lcwu@google.com>
44         PR c++/39551
45         * call.c (build_over_call): Set TREE_NO_WARNING on the
46         compiler-generated INDIRECT_REF expression.
47         * cvt.c (convert_to_void): Emit warning when stripping off
48         INDIRECT_REF.
50 2009-04-14  Diego Novillo  <dnovillo@google.com>
52         * parser.c (cp_parser_type_specifier_seq): Move call to
53         invoke_plugin_callbacks ...
54         (cp_parser_type_specifier_seq): ... here.
56 2009-04-14  Le-Chun Wu  <lcwu@google.com>
58         * Make-lang.in: Modify dependencies of files including plugin.h.
59         * decl.c (finish_function): Call invoke_plugin_callbacks.
60         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
62 2009-04-14  Jason Merrill  <jason@redhat.com>
64         PR c++/39763
65         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
66         about shadowing by tentative parms.
68 2009-04-13  Jason Merrill  <jason@redhat.com>
70         PR c++/39480
71         * call.c (build_over_call): Don't call memcpy if the target is
72         the same as the source.
74 2009-04-13  Jason Merrill  <jason@redhat.com>
76         PR c++/39750
77         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
79 2009-04-12  Jason Merrill  <jason@redhat.com>
81         PR c++/39742
82         * call.c (joust): Don't crash on variadic fn.
84 2009-04-10  Jason Merrill  <jason@redhat.com>
86         PR c++/28301
87         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
88         if we see a close brace without an open brace.
90 2008-04-10  H.J. Lu  <hongjiu.lu@intel.com>
92         * parser.c (cp_parser_class_specifier): Remove the unused
93         has_trailing_semicolon.
95 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
97         PR  c++/20118
98         * parser.c (cp_parser_check_template_parameters): Take a
99         cp_declarator parameter.
100         (cp_parser_elaborated_type_specifier): Update to
101         cp_parser_check_template_parameters.
102         (cp_parser_class_head): Likewise.
103         (cp_parser_check_declarator_template_parameters): Likewise.
104         (cp_parser_check_template_parameters): Handle first the non-error
105         conditions. Give more accurate diagnostics if a declarator is
106         given. 
108 2009-04-08  Jason Merrill  <jason@redhat.com>
110         PR c++/25185
111         * error.c (dump_aggr_type): Chase template typedefs if
112         -fno-pretty-templates.
114 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
116         PR c++/39637
117         * parser.c (cp_parser_enumerator_definition): Make sure the
118         initializer of the enumerator doesn't contain any bare parameter pack.
120 2009-04-07  Jason Merrill  <jason@redhat.com>
122         PR c++/34691
123         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
124         * call.c (joust): Complain about mismatched default arguments
125         in extern "C" functions.
126         * class.c (resolve_address_of_overloaded_function): Handle multiple
127         extern "C" functions.
128         * pt.c (resolve_overloaded_unification): Likewise.
130 2009-04-07  Jason Merrill  <jason@redhat.com>
132         PR c++/25185
133         * error.c (dump_function_decl): Don't pretty-print templates
134         if -fno-pretty-templates.
135         (count_non_default_template_args): Print all args if
136         -fno-pretty-templates.
138 2009-04-06  Jason Merrill  <jason@redhat.com>
140         PR c++/35146
141         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
142         the deduced template arguments give us the parameter types
143         we're looking for.
145 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
146             Jason Merrill  <jason@redhat.com>
148         PR c++/14912
149         * error.c (count_non_default_template_args): New fn.
150         (dump_template_parms): Call it.
151         (dump_template_argument_list): Call it.  Add parms parm.
152         (dump_template_argument): Adjust call to dump_template_argument_list.
153         (dump_type, dump_decl): Likewise.
154         (dump_template_bindings): Refactor logic.
156 2009-04-03  Jason Merrill  <jason@redhat.com>
158         PR c++/25185
159         * error.c (dump_template_bindings): Look through typedefs in
160         typename results.
161         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
162         (find_typenames_r): Also collect typedefs.
163         * pt.c (unify): Strip typedefs.
165         PR c++/39608
166         * semantics.c (finish_id_expression): Don't assume a dependent
167         member of the current instantiation isn't a valid integral
168         constant expression.  Check dependent_scope_p.
169         * pt.c (dependent_scope_p): Check TYPE_P.
170         (tsubst_copy): If args is null, just return.
172 2009-04-02  Jason Merrill  <jason@redhat.com>
174         PR c++/25185
175         * error.c (find_typenames, find_typenames_r): New fns.
176         (dump_function_decl): Call find_typenames.
177         (dump_template_bindings): Print typenames as well.
178         * pt.c (tsubst): Non-static.
179         * cp-tree.h: Declare it.
181 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
183         PR c++/26693
184         * decl2.c (grokfield): when a typedef appears in a
185         class, create the typedef variant type node for it.
186         (save_template_attributes): Creating typedef variant type node
187          here is now useless.
188         * decl.c (grokdeclarator): If the typedef'ed struct/class was
189         anonymous, set the proper type name to all its type variants.
190         (xref_basetypes) : Fixup the variant types after setting
191         TYPE_BINFO on REF.
192         * name-lookup.c (pushdecl_maybe_friend): Reuse the
193         set_underlying_type function to install typedef variant types.
194         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
195         macro.
196         (append_type_to_template_for_access_check): New entry points.
197         * semantics.c (check_accessibility_of_qualified_id):
198         When a typedef that is a member of a class appears in a template,
199         add it to the template. It will be ...
200         * class.c (finish_struct_bits): Split type variant fixup into ...
201         (fixup_type_variants): A new entry point.
202         * pt.c (instantiate_class_template, instantiate_template ): ... access
203         checked at template instantiation time.
204         (resolve_type_name_type): The type name should be the name of the
205         main type variant.
206         (retrieve_specialization): Specializations of template typedefs aren't
207         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
208         (append_type_to_template_for_access_check): New entry point.
209         (tsubst_decl): For typedefs, build the variant type from the correct
210         original type.
211         (get_class_bindings): Fix function comment.
212         (perform_typedefs_access_check): New entry point.
214 2009-03-31  Jason Merrill  <jason@redhat.com>
216         PR c++/34691
217         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
218         extern "C" declarations.
220         C++ DR 613
221         * semantics.c (finish_non_static_data_member): Allow such references
222         without an associated object in sizeof/decltype/alignof.
224         * ptree.c (cxx_print_decl): Pretty-print full name of
225         function/template.
226         (cxx_print_type): Pretty-print full name of class.
228         * decl.c (grokdeclarator): Reject pointer to qualified function
229         type.
231         PR c++/37806, core issue 547
232         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
233         to a typedef.
234         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
235         function type.
236         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
237         * decl.c (groktypename): Add is_template_arg parameter.
238         (grokdeclarator): Allow function cv-quals on a template type arg.
239         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
240         is_template_arg argument in calls to groktypename.
241         * cp-tree.h: Adjust prototype.
242         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
243         FUNCTION_TYPE printing.
244         
245         * mangle.c (write_expression): Mangle dependent name as
246         source-name.
248         PR c++/38030, 38850, 39070
249         * pt.c (type_dependent_expression_p_push): New fn.
250         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
251         substitution makes the call non-dependent.  Preserve koenig_p.
252         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
253         for non-dependent calls.
254         * semantics.c (finish_call_expr): Revert earlier changes.
255         * cp-tree.h: Revert change to finish_call_expr prototype.
257 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
259         PR preprocessor/34695
260         * cp-tree.h (cp_cpp_error): Remove.
261         * error.c (cp_cpp_error): Remove.
262         * parser.c (cp_lexer_new_main): Set done_lexing instead of
263         client_diagnostic and error callback.
265 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
267         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
268         * cp/cp-objcp-common.c (cxx_staticp): Remove.
269         * cp/cp-tree.h (cxx_staticp): Remove.
271 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
273         PR c++/39554
274         * parser.c (cp_parser_postfix_expression): Don't call
275         warning_if_disallowed_function_p.
277 2009-03-27  Jan Hubicka  <jh@suse.cz>
279         * except.c (choose_personality_routine): Set terminate_node to abort
280         for java exceptions.
282 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
283             Jakub Jelinek  <jakub@redhat.com>
285         PR debug/37959
286         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
287         (cp_function_decl_explicit_p): New prototype.
288         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
290 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
292         PR c++/38638
293         * parser.c (cp_parser_elaborated_type_specifier): If we have a
294         typename tag and don't have either a TYPE_DECL or a
295         TEMPLATE_ID_EXPR, set the type to NULL.
297 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
299         PR c++/37647
300         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
301         scope.
303 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
305         PR c++/29727
306         * decl.c (check_array_designated_initializer): Handle error_mark_node.
308 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
310         PR c++/35652
311         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
313 2009-03-26  Andrew Haley  <aph@redhat.com>
315         PR C++/39380
316         * decl2.c (possibly_inlined_p): If java exceptions are in use
317         don't inline a decl unless it is explicitly marked inline.
318         * lex.c: (pragma_java_exceptions): New variable.
319         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
320         * cp-tree.h (pragma_java_exceptions): Declare new variable.
322 2009-03-24  Jason Merrill  <jason@redhat.com>
324         PR c++/28274
325         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
327 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
329         PR c/39495
330         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
331         code if iter is the second operand.
332         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
333         argument.  If it is set, don't build the toplevel expression with
334         build_x_binary_op, but build2.
335         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
336         callers.
337         (cp_parser_omp_for_cond): Don't assume the first operand of the
338         comparison must be decl.
340 2009-03-23  Jason Merrill  <jason@redhat.com>
342         PR c++/37729
343         * pt.c (make_fnparm_pack): Split out from...
344         (instantiate_decl): ...here.
345         (tsubst_pack_expansion): Handle being called in a late-specified
346         return type.
348         PR c++/39526
349         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
350         a parm with a parm.
352 2009-03-20  Jason Merrill  <jason@redhat.com>
354         PR c++/28879
355         * parser.c (cp_parser_direct_declarator): In a template, wrap 
356         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
357         * pt.c (tsubst): Preserve it in a partial instantiation.
358         (dependent_type_p_r): Don't check value_dependent_expression_p.
359         * decl.c (compute_array_index_type): Don't check
360         value_dependent_expression_p if TREE_SIDE_EFFECTS.
362         C++ core issue 703
363         * typeck2.c (check_narrowing): Don't complain about loss of 
364         precision when converting a floating-point constant.
366 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
368         PR c/39495
369         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
370         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
372 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
374         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
375         (eof_token): Adjust.
377 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
379         PR c++/39425
380         * parser.c (cp_parser_explicit_specialization): Don't skip the
381         rest of the specialization when begin_specialization returns
382         false.
384 2009-03-17  Jason Merrill  <jason@redhat.com>
386         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
387         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
388         * pt.c (check_explicit_specialization): Likewise.
389         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
390         local specialization.
391         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
392         * decl2.c (parm_index): New fn.
393         * semantics.c (finish_decltype_type): Don't use describable_type.
394         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
395         Give a sorry for unsupported codes rather than crash.  Mangle
396         conversions with other than 1 operand.  New mangling for PARM_DECL.
397         * operators.def (ALIGNOF_EXPR): Mangle as "az".
399 2009-03-17  Jing Yu  <jingyu@google.com>
401         PR middle-end/39378
402         * method.c (use_thunk): Change is_thunk from crtl to cfun.
404 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
406         PR c++/39475
407         * semantics.c (check_trait_type): New.
408         (finish_trait_expr): Use it.
410 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
412         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
413         instead of calling imported_module_or_decl debug hook if
414         building_stmt_tree ().
415         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
416         is a NAMESPACE_DECL.
418         PR debug/37890
419         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
420         hook at function scope.
422         PR debug/39471
423         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
424         on IMPORTED_DECL.
426 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
428         PR c++/39371
429         * semantics.c (finish_switch_cond): Don't call get_unwidened.
430         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
431         instead of TREE_TYPE (cond).
433 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
435         PR c++/39060
436         * parser.c (cp_parser_late_parsing_default_args): Continue
437         the loop when cp_parser_assignment_expression returns
438         error_mark_node.
440 2009-03-07  Jason Merrill  <jason@redhat.com>
442         PR c++/39367
443         * init.c (build_new_1): Don't use a VLA type.
444         (build_vec_init): Handle getting a pointer for BASE.
446 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
448         PR c++/37520
449         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
450         when mangling symbols.
452 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
454         PR c++/33492
455         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
457 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
459         * decl.c (record_builtin_java_type): Use canonicalized integer
460         types.
462 2009-03-04  Jason Merrill  <jason@redhat.com>
464         PR c++/38908
465         * class.c (is_really_empty_class): New fn.
466         * cp-tree.h: Declare it.
467         * cp-objcp-common.c (cp_expr_size): Use it.
469         PR c++/13549
470         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
471         * parser.c (cp_parser_postfix_expression): Call it for 
472         TEMPLATE_ID_EXPR.
473         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
474         (get_first_fn): Likewise.
476         PR c++/9634
477         PR c++/29469
478         PR c++/29607
479         Implement DR 224.
480         * decl.c (make_typename_type): Do look inside currently open classes.
481         * parser.c (cp_parser_lookup_name): Likewise.
482         (cp_parser_template_name): Likewise.
483         * pt.c (dependent_scope_p): New function.
484         * cp-tree.h: Declare it.
485         * class.c (currently_open_class): Return fast if T isn't a class.
487 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
489         PR c++/37789
490         * parser.c (cp_parser_mem_initializer): Return error_mark_node
491         if cp_parser_mem_initializer_id returns error_mark_node.
493 2009-02-24  Richard Guenther  <rguenther@suse.de>
495         PR c++/39242
496         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
497         declared functions.
499 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
501         PR c++/36411
502         * pt.c (coerce_template_template_parms): Return 0 if parameter
503         is error_mark_node.
505 2009-02-23  Jason Merrill  <jason@redhat.com>
507         * pt.c (unify): Call maybe_adjust_types_for_deduction when
508         deducing from an initializer list.
510 2009-02-20  Jason Merrill  <jason@redhat.com>
512         PR c++/39225
513         * decl.c (grokdeclarator): Handle ~identifier.
515 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
517         PR target/39175
518         * decl2.c (determine_visibility): If visibility changed and
519         DECL_RTL has been already set, call make_decl_rtl to update symbol
520         flags.
522 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
524         PR c++/39188
525         * cp-tree.h (maybe_commonize_var): New.
527         * decl.c (maybe_commonize_var): Make it extern.
529         * decl2.c (finish_anon_union): Call maybe_commonize_var.
531 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
533         PR c++/39219
534         * parser.c (cp_parser_enum_specifier): Apply all attributes.
536 2009-02-18  Jason Merrill  <jason@redhat.com>
538         * cfns.h: Tweak pathname for cfns.gperf.
540 2009-02-13  Jason Merrill  <jason@redhat.com>
542         PR c++/39070
543         * semantics.c (finish_call_expr): Change koenig_p parm to int.
544         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
545         * cp-tree.h: Adjust prototype.
546         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
548 2009-02-12  Jason Merrill  <jason@redhat.com>
550         PR c++/38950
551         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
553 2009-02-11  Jason Merrill  <jason@redhat.com>
555         PR c++/39153
556         * decl2.c (cp_write_global_declarations): 
557         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
559         PR c++/30111
560         * init.c (build_value_init_noctor): Split out from...
561         (build_value_init): ...here.
562         (expand_aggr_init_1): Handle value-initialization.
563         * cp-tree.h: Add declaration.
564         * class.c (type_has_user_provided_constructor): 
565         Handle non-class arguments.
567 2009-02-10  Jason Merrill  <jason@redhat.com>
569         PR c++/38649
570         * class.c (defaultable_fn_p): Handle ... properly.
572         PR c++/36744
573         * tree.c (lvalue_p_1): Condition rvalue ref handling on
574         treat_class_rvalues_as_lvalues, too.
576 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
578         PR c++/34397
579         * typeck.c (build_x_array_ref): New.
580         * cp-tree.h: Declare it.
581         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
583 2009-02-09  Jason Merrill  <jason@redhat.com>
585         PR c++/39109
586         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
587         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
588         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
589         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
590         for build_value_init TARGET_EXPR.
591         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
593 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
595         PR c++/35147
596         PR c++/37737
597         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
599 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
601         PR c++/39095
602         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
603         remove ./dt operator.
604         * mangle.c (write_expression): Handle COMPONENT_REF after handling
605         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
606         write_string ("dt") instead of using operators.def.
608 2009-02-03  Jason Merrill  <jason@redhat.com>
610         * typeck.c (cp_build_unary_op): Only complain about taking address
611         of main if pedantic.
613 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
615         PR inline-asm/39059
616         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
618         PR c++/39056
619         * typeck2.c (digest_init_r): Don't call process_init_constructor
620         for COMPLEX_TYPE.
622 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
624         PR c++/36897
625         * pt.c (convert_nontype_argument_function): Expect expr to be an
626         ADDR_EXPR.
628         PR c++/37314
629         * typeck.c (merge_types): Call resolve_typename_type if only
630         one type is a typename.
632 2009-02-02  Jason Merrill  <jason@redhat.com>
634         PR c++/39054
635         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
636         in BIT_NOT_EXPR.
638 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
640         PR c++/39053
641         * parser.c (cp_parser_pure_specifier): If there are no tokens left
642         do not call cp_lexer_consume_token.
644 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
646         PR c++/39028
647         * parser.c (cp_parser_already_scoped_statement): Handle __label__
648         declarations.
650 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
652         PR c++/33465
653         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
655 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
657         PR c++/38655
658         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
660 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
662         * typeck.c (invalid_nonstatic_memfn_p): Use
663         DECL_NONSTATIC_MEMBER_FUNCTION_P.
665 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
667         PR c++/37554
668         * call.c (build_over_call): If convert_for_arg_passing returns
669         error_mark_node unconditionally return it.
671 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
673         * class.c (check_field_decls): Also inherit packed for bitfields
674         regardless of their type.
676 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
678         PR c++/38930
679         * decl2.c (grokfield): Reverting changes of PR c++/26693
680         (save_template_attributes): Likewise.
681         * decl.c (grokdeclarator): Likewise.
682         * name-lookup.c (pushdecl_maybe_friend): Likewise.
683         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
684         (append_type_to_template_for_access_check): Likewise.
685         * semantics.c (check_accessibility_of_qualified_id): Likewise.
686         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
687         (tsubst): Likewise.
688         (resolve_type_name_type): Likewise.
689         (append_type_to_template_for_access_check): Likewise.
691 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
693         PR c++/26693
694         * decl2.c (grokfield): when a typedef appears in a
695         class, create the typedef variant type node for it.
696         (save_template_attributes): Creating typedef variant type node
697          here is now useless.
698         * decl.c (grokdeclarator): If the typedef'ed struct/class was
699         anonymous, set the proper type name to all its type variants.
700         * name-lookup.c (pushdecl_maybe_friend): Reuse the
701         set_underlying_type function to install typedef variant types.
702         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
703         macro.
704         (append_type_to_template_for_access_check): New entry points.
705         * semantics.c (check_accessibility_of_qualified_id):
706         When a typedef that is a member of a class appears in a template,
707         add it to the template. It will be ...
708         * pt.c (instantiate_class_template, instantiate_template ): ... access
709         checked at template instantiation time.
710         (tsubst): Handle the case of being called with NULL args.
711         (resolve_type_name_type): The type name should be the name of the
712         main type variant.
713         (append_type_to_template_for_access_check): New entry point.
715 2009-01-19  Jason Merrill  <jason@redhat.com>
717         PR c++/23287
718         * parser.c (cp_parser_unqualified_id): In a template,
719         accept ~identifier.
720         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
722 2009-01-16  Jason Merrill  <jason@redhat.com>
724         PR c++/38877
725         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
726         * init.c (build_new): Don't call describable_type unless we
727         have an auto.
729         PR c++/29470
730         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
732         PR c++/38579
733         * search.c (protected_accessible_p): N doesn't vary.
735 2009-01-15  Jason Merrill  <jason@redhat.com>
737         PR c++/38850
738         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
739         accept hidden friends.
741 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
743         PR C++/29388
744         * decl.c (grokdeclarator): Check for a non namespace/class context.
746 2009-01-15  Jason Merrill  <jason@redhat.com>
748         PR c++/36334
749         PR c++/37646
750         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
751         a function isn't necessarily an lvalue. Take tree, not const_tree.
752         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
753         * typeck.c (lvalue_or_else): Likewise.
754         * cp-tree.h: Adjust prototypes.
756 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
758         PR c++/38357
759         * pt.c (tsubst): Check for NULL args.
761 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
763         PR c++/38636
764         * name-lookup.c (pushtag): Don't create members to types that are not
765         being created.
767 2009-01-14  Nick Clifton  <nickc@redhat.com>
769         PR c++/37862
770         * parser.c: Pass cp_id_kind computed in
771         cp_parser_postfix_dot_deref_expression to
772         cp_parser_primary_expression.
774 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
776         PR c++/38795
777         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
778         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
779         as CAST_EXPR.
781 2009-01-12  Jason Merrill  <jason@redhat.com>
782             Steve Ellcey  <sje@cup.hp.com>
784         PR c++/35109
785         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
786         binding.
788 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
790         PR c++/36019
791         * pt.c (parameter_of_template_p): New function.
792         * cp-tree.h: Declare it.
793         * name-lookup.c (binding_to_template_parms_of_scope_p): New
794         function.
795         (outer_binding): Take template parameters in account when looking for
796         a name binding.
798 2009-01-12  Jason Merrill  <jason@redhat.com>
800         PR c++/31488
801         * tree.c (pod_type_p): Return 1 for structs created by the back end.
803 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
805         PR c/32041
806         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
807         offsetof member-designator, handle it as `[0].'.
809         PR c++/38794
810         * decl.c (start_function): If grokdeclarator hasn't returned
811         FUNCTION_DECL nor error_mark_node, issue diagnostics.
813 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
815         PR c++/36254
816         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
817         (gimplify_if_stmt): ... this.
818         (cp_gimplify_expr): Don't handle IF_STMT here.
819         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
821 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
823         PR c++/38648
824         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
826         PR c++/36695
827         * typeck2.c (build_functional_cast): Check for reference type and NULL
828         PARMS.
830 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
832         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
834 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
836         PR c++/35335
837         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
839 2009-01-09  John F. Carr  <jfc@mit.edu>
841         PR c++/37877
842         * parser.c (cp_parser_class_specifier): Clear
843         parser->in_unbraced_linkage_specification_p while parsing class
844         specifiers.
846 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
848         PR c++/38725
849         * semantics.c (finish_goto_stmt): Convert destination to
850         void *.
852 2009-01-06  Jason Merrill  <jason@redhat.com>
854         PR c++/35297
855         PR c++/35477
856         PR c++/35784
857         PR c++/36846
858         PR c++/38276
859         * pt.c (check_default_tmpl_args): Don't complain about
860         out-of-order parameter packs in the enclosing class
861         or parameter packs after default args.
862         (coerce_template_parms): If we have more than one
863         parameter pack, don't flatten argument packs.
864         (template_args_equal): Handle argument packs.
865         (comp_template_args): Don't flatten argument packs.
866         (check_instantiated_arg): Split out from...
867         (check_instantiated_args): Here.  Handle arg packs.
868         (convert_template_argument): Just check that nontype argument
869         packs have the right type.
871 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
873         PR c++/38472
874         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
876 2009-01-05  Jason Merrill  <jason@redhat.com>
878         PR c++/38698
879         * typeck2.c (process_init_constructor_union): Handle union with
880         no fields.
882         * mangle.c (write_expression): Remove mangling for zero-operand
883         casts.
885         PR c++/38701
886         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
887         defaulting.
889         PR c++/38702
890         * class.c (defaultable_fn_p): Only operator== can be a copy
891         assignment operator.
893 2009-01-02  Jason Merrill  <jason@redhat.com>
895         PR c++/38698
896         * typeck2.c (process_init_constructor_union): Handle excess
897         initializers.
898         (process_init_constructor_record): Likewise.
900         PR c++/38684
901         * typeck2.c (digest_init_r): Don't use process_init_constructor
902         for non-aggregate classes.