2009-04-21 Taras Glek <tglek@mozilla.com>
[official-gcc.git] / gcc / cp / ChangeLog
blobb560aa871f0feaf61e3ea6fd336bc1059bc5ec14
1 2009-04-21  Taras Glek <tglek@mozilla.com>
3         * cp-tree.h: Update GTY annotations to new syntax.
4         * decl.c: Likewise.
5         * mangle.c: Likewise.
6         * name-lookup.c: Likewise.
7         * name-lookup.h: Likewise.
8         * parser.c: Likewise.
9         * pt.c: Likewise.
10         * rtti.c: Likewise.
11         * semantics.c: Likewise.
12         * typeck2.c: Likewise.
14 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
16         PR c++/14875
17         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
19 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
21         PR c++/35711
22         * typeck.c (check_for_casting_away_constness): We diagnose casting
23         away any qualifiers not just constness.
24         (casts_away_constness): Mention that it handles more than just
25         constness.
26         
27 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
29         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
30         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
31         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
32         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
33         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
34         cfns.gperf: Add copyright and license notices.
35         * cfns.h: Regenerate.
36         * ChangeLog, ChangeLog-2004: Correct dates.
38 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
40         PR 16202
41         * tree.c (lvalue_p_1): Use const_tree.
42         Use CONST_CAST_TREE to avoid warning.
43         (lvalue_p): Returns bool, receives const_tree.
45 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
47         PR c++/13358
48         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
49         * error.c (pedwarn_cxx98): New.
50         * cp-tree.h (pedwarn_cxx98): Declare.
52 2009-04-20  Le-Chun Wu  <lcwu@google.com>
54         PR c++/39803
55         * init.c (build_vec_init): Set TREE_NO_WARNING on the
56         compiler-generated INDIRECT_REF expression.
58 2009-04-20  Ian Lance Taylor  <iant@google.com>
60         * typeck.c (build_function_call_vec): New function.
61         (cp_build_function_call): Only pass first parameter to
62         objc_rewrite_function_call.
63         (build_modify_expr): Add rhs_origtype parameter.  Change all
64         callers.
65         * decl.c (finish_decl): Add origtype parameter.  Change all
66         callers.
67         * semantics.c (finish_call_expr): Pass VEC to
68         resolve_overloaded_builtin.
70 2009-04-20  Ian Lance Taylor  <iant@google.com>
72         * cp-tree.h (base_access): Change typedef to int.
73         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
74         (cp_parser_omp_threadprivate): Likewise.
75         * pt.c (unify_pack_expansion): Add casts to enum type.
77 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
79         PR c/32061
80         PR c++/36954
81         * call.c (build_new_op): Save the original codes of operands
82         before folding.
84 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
86         * cp-tree.h: Remove the prototype for insert_block.
87         * decl.c (insert_block): Remove.
89 2009-04-16  Ian Lance Taylor  <iant@google.com>
91         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
92         (tsubst_flags_t): Change typedef from enum type to int.
94 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
96         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
97         instead of targetm.vector_opaque_p.
99 2009-04-15  Le-Chun Wu  <lcwu@google.com>
101         PR c++/39551
102         * call.c (build_over_call): Set TREE_NO_WARNING on the
103         compiler-generated INDIRECT_REF expression.
104         * cvt.c (convert_to_void): Emit warning when stripping off
105         INDIRECT_REF.
107 2009-04-14  Diego Novillo  <dnovillo@google.com>
109         * parser.c (cp_parser_type_specifier_seq): Move call to
110         invoke_plugin_callbacks ...
111         (cp_parser_type_specifier_seq): ... here.
113 2009-04-14  Le-Chun Wu  <lcwu@google.com>
115         * Make-lang.in: Modify dependencies of files including plugin.h.
116         * decl.c (finish_function): Call invoke_plugin_callbacks.
117         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
119 2009-04-14  Jason Merrill  <jason@redhat.com>
121         PR c++/39763
122         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
123         about shadowing by tentative parms.
125 2009-04-13  Jason Merrill  <jason@redhat.com>
127         PR c++/39480
128         * call.c (build_over_call): Don't call memcpy if the target is
129         the same as the source.
131 2009-04-13  Jason Merrill  <jason@redhat.com>
133         PR c++/39750
134         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
136 2009-04-12  Jason Merrill  <jason@redhat.com>
138         PR c++/39742
139         * call.c (joust): Don't crash on variadic fn.
141 2009-04-10  Jason Merrill  <jason@redhat.com>
143         PR c++/28301
144         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
145         if we see a close brace without an open brace.
147 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
149         * parser.c (cp_parser_class_specifier): Remove the unused
150         has_trailing_semicolon.
152 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
154         PR  c++/20118
155         * parser.c (cp_parser_check_template_parameters): Take a
156         cp_declarator parameter.
157         (cp_parser_elaborated_type_specifier): Update to
158         cp_parser_check_template_parameters.
159         (cp_parser_class_head): Likewise.
160         (cp_parser_check_declarator_template_parameters): Likewise.
161         (cp_parser_check_template_parameters): Handle first the non-error
162         conditions. Give more accurate diagnostics if a declarator is
163         given. 
165 2009-04-08  Jason Merrill  <jason@redhat.com>
167         PR c++/25185
168         * error.c (dump_aggr_type): Chase template typedefs if
169         -fno-pretty-templates.
171 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
173         PR c++/39637
174         * parser.c (cp_parser_enumerator_definition): Make sure the
175         initializer of the enumerator doesn't contain any bare parameter pack.
177 2009-04-07  Jason Merrill  <jason@redhat.com>
179         PR c++/34691
180         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
181         * call.c (joust): Complain about mismatched default arguments
182         in extern "C" functions.
183         * class.c (resolve_address_of_overloaded_function): Handle multiple
184         extern "C" functions.
185         * pt.c (resolve_overloaded_unification): Likewise.
187 2009-04-07  Jason Merrill  <jason@redhat.com>
189         PR c++/25185
190         * error.c (dump_function_decl): Don't pretty-print templates
191         if -fno-pretty-templates.
192         (count_non_default_template_args): Print all args if
193         -fno-pretty-templates.
195 2009-04-06  Jason Merrill  <jason@redhat.com>
197         PR c++/35146
198         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
199         the deduced template arguments give us the parameter types
200         we're looking for.
202 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
203             Jason Merrill  <jason@redhat.com>
205         PR c++/14912
206         * error.c (count_non_default_template_args): New fn.
207         (dump_template_parms): Call it.
208         (dump_template_argument_list): Call it.  Add parms parm.
209         (dump_template_argument): Adjust call to dump_template_argument_list.
210         (dump_type, dump_decl): Likewise.
211         (dump_template_bindings): Refactor logic.
213 2009-04-03  Jason Merrill  <jason@redhat.com>
215         PR c++/25185
216         * error.c (dump_template_bindings): Look through typedefs in
217         typename results.
218         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
219         (find_typenames_r): Also collect typedefs.
220         * pt.c (unify): Strip typedefs.
222         PR c++/39608
223         * semantics.c (finish_id_expression): Don't assume a dependent
224         member of the current instantiation isn't a valid integral
225         constant expression.  Check dependent_scope_p.
226         * pt.c (dependent_scope_p): Check TYPE_P.
227         (tsubst_copy): If args is null, just return.
229 2009-04-02  Jason Merrill  <jason@redhat.com>
231         PR c++/25185
232         * error.c (find_typenames, find_typenames_r): New fns.
233         (dump_function_decl): Call find_typenames.
234         (dump_template_bindings): Print typenames as well.
235         * pt.c (tsubst): Non-static.
236         * cp-tree.h: Declare it.
238 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
240         PR c++/26693
241         * decl2.c (grokfield): when a typedef appears in a
242         class, create the typedef variant type node for it.
243         (save_template_attributes): Creating typedef variant type node
244          here is now useless.
245         * decl.c (grokdeclarator): If the typedef'ed struct/class was
246         anonymous, set the proper type name to all its type variants.
247         (xref_basetypes) : Fixup the variant types after setting
248         TYPE_BINFO on REF.
249         * name-lookup.c (pushdecl_maybe_friend): Reuse the
250         set_underlying_type function to install typedef variant types.
251         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
252         macro.
253         (append_type_to_template_for_access_check): New entry points.
254         * semantics.c (check_accessibility_of_qualified_id):
255         When a typedef that is a member of a class appears in a template,
256         add it to the template. It will be ...
257         * class.c (finish_struct_bits): Split type variant fixup into ...
258         (fixup_type_variants): A new entry point.
259         * pt.c (instantiate_class_template, instantiate_template ): ... access
260         checked at template instantiation time.
261         (resolve_type_name_type): The type name should be the name of the
262         main type variant.
263         (retrieve_specialization): Specializations of template typedefs aren't
264         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
265         (append_type_to_template_for_access_check): New entry point.
266         (tsubst_decl): For typedefs, build the variant type from the correct
267         original type.
268         (get_class_bindings): Fix function comment.
269         (perform_typedefs_access_check): New entry point.
271 2009-03-31  Jason Merrill  <jason@redhat.com>
273         PR c++/34691
274         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
275         extern "C" declarations.
277         C++ DR 613
278         * semantics.c (finish_non_static_data_member): Allow such references
279         without an associated object in sizeof/decltype/alignof.
281         * ptree.c (cxx_print_decl): Pretty-print full name of
282         function/template.
283         (cxx_print_type): Pretty-print full name of class.
285         * decl.c (grokdeclarator): Reject pointer to qualified function
286         type.
288         PR c++/37806, core issue 547
289         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
290         to a typedef.
291         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
292         function type.
293         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
294         * decl.c (groktypename): Add is_template_arg parameter.
295         (grokdeclarator): Allow function cv-quals on a template type arg.
296         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
297         is_template_arg argument in calls to groktypename.
298         * cp-tree.h: Adjust prototype.
299         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
300         FUNCTION_TYPE printing.
301         
302         * mangle.c (write_expression): Mangle dependent name as
303         source-name.
305         PR c++/38030, 38850, 39070
306         * pt.c (type_dependent_expression_p_push): New fn.
307         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
308         substitution makes the call non-dependent.  Preserve koenig_p.
309         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
310         for non-dependent calls.
311         * semantics.c (finish_call_expr): Revert earlier changes.
312         * cp-tree.h: Revert change to finish_call_expr prototype.
314 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
316         PR preprocessor/34695
317         * cp-tree.h (cp_cpp_error): Remove.
318         * error.c (cp_cpp_error): Remove.
319         * parser.c (cp_lexer_new_main): Set done_lexing instead of
320         client_diagnostic and error callback.
322 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
324         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
325         * cp/cp-objcp-common.c (cxx_staticp): Remove.
326         * cp/cp-tree.h (cxx_staticp): Remove.
328 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
330         PR c++/39554
331         * parser.c (cp_parser_postfix_expression): Don't call
332         warning_if_disallowed_function_p.
334 2009-03-27  Jan Hubicka  <jh@suse.cz>
336         * except.c (choose_personality_routine): Set terminate_node to abort
337         for java exceptions.
339 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
340             Jakub Jelinek  <jakub@redhat.com>
342         PR debug/37959
343         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
344         (cp_function_decl_explicit_p): New prototype.
345         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
347 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
349         PR c++/38638
350         * parser.c (cp_parser_elaborated_type_specifier): If we have a
351         typename tag and don't have either a TYPE_DECL or a
352         TEMPLATE_ID_EXPR, set the type to NULL.
354 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
356         PR c++/37647
357         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
358         scope.
360 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
362         PR c++/29727
363         * decl.c (check_array_designated_initializer): Handle error_mark_node.
365 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
367         PR c++/35652
368         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
370 2009-03-26  Andrew Haley  <aph@redhat.com>
372         PR C++/39380
373         * decl2.c (possibly_inlined_p): If java exceptions are in use
374         don't inline a decl unless it is explicitly marked inline.
375         * lex.c: (pragma_java_exceptions): New variable.
376         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
377         * cp-tree.h (pragma_java_exceptions): Declare new variable.
379 2009-03-24  Jason Merrill  <jason@redhat.com>
381         PR c++/28274
382         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
384 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
386         PR c/39495
387         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
388         code if iter is the second operand.
389         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
390         argument.  If it is set, don't build the toplevel expression with
391         build_x_binary_op, but build2.
392         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
393         callers.
394         (cp_parser_omp_for_cond): Don't assume the first operand of the
395         comparison must be decl.
397 2009-03-23  Jason Merrill  <jason@redhat.com>
399         PR c++/37729
400         * pt.c (make_fnparm_pack): Split out from...
401         (instantiate_decl): ...here.
402         (tsubst_pack_expansion): Handle being called in a late-specified
403         return type.
405         PR c++/39526
406         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
407         a parm with a parm.
409 2009-03-20  Jason Merrill  <jason@redhat.com>
411         PR c++/28879
412         * parser.c (cp_parser_direct_declarator): In a template, wrap 
413         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
414         * pt.c (tsubst): Preserve it in a partial instantiation.
415         (dependent_type_p_r): Don't check value_dependent_expression_p.
416         * decl.c (compute_array_index_type): Don't check
417         value_dependent_expression_p if TREE_SIDE_EFFECTS.
419         C++ core issue 703
420         * typeck2.c (check_narrowing): Don't complain about loss of 
421         precision when converting a floating-point constant.
423 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
425         PR c/39495
426         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
427         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
429 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
431         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
432         (eof_token): Adjust.
434 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
436         PR c++/39425
437         * parser.c (cp_parser_explicit_specialization): Don't skip the
438         rest of the specialization when begin_specialization returns
439         false.
441 2009-03-17  Jason Merrill  <jason@redhat.com>
443         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
444         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
445         * pt.c (check_explicit_specialization): Likewise.
446         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
447         local specialization.
448         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
449         * decl2.c (parm_index): New fn.
450         * semantics.c (finish_decltype_type): Don't use describable_type.
451         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
452         Give a sorry for unsupported codes rather than crash.  Mangle
453         conversions with other than 1 operand.  New mangling for PARM_DECL.
454         * operators.def (ALIGNOF_EXPR): Mangle as "az".
456 2009-03-17  Jing Yu  <jingyu@google.com>
458         PR middle-end/39378
459         * method.c (use_thunk): Change is_thunk from crtl to cfun.
461 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
463         PR c++/39475
464         * semantics.c (check_trait_type): New.
465         (finish_trait_expr): Use it.
467 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
469         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
470         instead of calling imported_module_or_decl debug hook if
471         building_stmt_tree ().
472         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
473         is a NAMESPACE_DECL.
475         PR debug/37890
476         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
477         hook at function scope.
479         PR debug/39471
480         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
481         on IMPORTED_DECL.
483 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
485         PR c++/39371
486         * semantics.c (finish_switch_cond): Don't call get_unwidened.
487         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
488         instead of TREE_TYPE (cond).
490 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
492         PR c++/39060
493         * parser.c (cp_parser_late_parsing_default_args): Continue
494         the loop when cp_parser_assignment_expression returns
495         error_mark_node.
497 2009-03-07  Jason Merrill  <jason@redhat.com>
499         PR c++/39367
500         * init.c (build_new_1): Don't use a VLA type.
501         (build_vec_init): Handle getting a pointer for BASE.
503 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
505         PR c++/37520
506         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
507         when mangling symbols.
509 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
511         PR c++/33492
512         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
514 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
516         * decl.c (record_builtin_java_type): Use canonicalized integer
517         types.
519 2009-03-04  Jason Merrill  <jason@redhat.com>
521         PR c++/38908
522         * class.c (is_really_empty_class): New fn.
523         * cp-tree.h: Declare it.
524         * cp-objcp-common.c (cp_expr_size): Use it.
526         PR c++/13549
527         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
528         * parser.c (cp_parser_postfix_expression): Call it for 
529         TEMPLATE_ID_EXPR.
530         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
531         (get_first_fn): Likewise.
533         PR c++/9634
534         PR c++/29469
535         PR c++/29607
536         Implement DR 224.
537         * decl.c (make_typename_type): Do look inside currently open classes.
538         * parser.c (cp_parser_lookup_name): Likewise.
539         (cp_parser_template_name): Likewise.
540         * pt.c (dependent_scope_p): New function.
541         * cp-tree.h: Declare it.
542         * class.c (currently_open_class): Return fast if T isn't a class.
544 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
546         PR c++/37789
547         * parser.c (cp_parser_mem_initializer): Return error_mark_node
548         if cp_parser_mem_initializer_id returns error_mark_node.
550 2009-02-24  Richard Guenther  <rguenther@suse.de>
552         PR c++/39242
553         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
554         declared functions.
556 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
558         PR c++/36411
559         * pt.c (coerce_template_template_parms): Return 0 if parameter
560         is error_mark_node.
562 2009-02-23  Jason Merrill  <jason@redhat.com>
564         * pt.c (unify): Call maybe_adjust_types_for_deduction when
565         deducing from an initializer list.
567 2009-02-20  Jason Merrill  <jason@redhat.com>
569         PR c++/39225
570         * decl.c (grokdeclarator): Handle ~identifier.
572 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
574         PR target/39175
575         * decl2.c (determine_visibility): If visibility changed and
576         DECL_RTL has been already set, call make_decl_rtl to update symbol
577         flags.
579 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
581         PR c++/39188
582         * cp-tree.h (maybe_commonize_var): New.
584         * decl.c (maybe_commonize_var): Make it extern.
586         * decl2.c (finish_anon_union): Call maybe_commonize_var.
588 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
590         PR c++/39219
591         * parser.c (cp_parser_enum_specifier): Apply all attributes.
593 2009-02-18  Jason Merrill  <jason@redhat.com>
595         * cfns.h: Tweak pathname for cfns.gperf.
597 2009-02-13  Jason Merrill  <jason@redhat.com>
599         PR c++/39070
600         * semantics.c (finish_call_expr): Change koenig_p parm to int.
601         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
602         * cp-tree.h: Adjust prototype.
603         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
605 2009-02-12  Jason Merrill  <jason@redhat.com>
607         PR c++/38950
608         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
610 2009-02-11  Jason Merrill  <jason@redhat.com>
612         PR c++/39153
613         * decl2.c (cp_write_global_declarations): 
614         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
616         PR c++/30111
617         * init.c (build_value_init_noctor): Split out from...
618         (build_value_init): ...here.
619         (expand_aggr_init_1): Handle value-initialization.
620         * cp-tree.h: Add declaration.
621         * class.c (type_has_user_provided_constructor): 
622         Handle non-class arguments.
624 2009-02-10  Jason Merrill  <jason@redhat.com>
626         PR c++/38649
627         * class.c (defaultable_fn_p): Handle ... properly.
629         PR c++/36744
630         * tree.c (lvalue_p_1): Condition rvalue ref handling on
631         treat_class_rvalues_as_lvalues, too.
633 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
635         PR c++/34397
636         * typeck.c (build_x_array_ref): New.
637         * cp-tree.h: Declare it.
638         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
640 2009-02-09  Jason Merrill  <jason@redhat.com>
642         PR c++/39109
643         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
644         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
645         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
646         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
647         for build_value_init TARGET_EXPR.
648         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
650 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
652         PR c++/35147
653         PR c++/37737
654         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
656 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
658         PR c++/39095
659         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
660         remove ./dt operator.
661         * mangle.c (write_expression): Handle COMPONENT_REF after handling
662         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
663         write_string ("dt") instead of using operators.def.
665 2009-02-03  Jason Merrill  <jason@redhat.com>
667         * typeck.c (cp_build_unary_op): Only complain about taking address
668         of main if pedantic.
670 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
672         PR inline-asm/39059
673         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
675         PR c++/39056
676         * typeck2.c (digest_init_r): Don't call process_init_constructor
677         for COMPLEX_TYPE.
679 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
681         PR c++/36897
682         * pt.c (convert_nontype_argument_function): Expect expr to be an
683         ADDR_EXPR.
685         PR c++/37314
686         * typeck.c (merge_types): Call resolve_typename_type if only
687         one type is a typename.
689 2009-02-02  Jason Merrill  <jason@redhat.com>
691         PR c++/39054
692         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
693         in BIT_NOT_EXPR.
695 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
697         PR c++/39053
698         * parser.c (cp_parser_pure_specifier): If there are no tokens left
699         do not call cp_lexer_consume_token.
701 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
703         PR c++/39028
704         * parser.c (cp_parser_already_scoped_statement): Handle __label__
705         declarations.
707 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
709         PR c++/33465
710         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
712 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
714         PR c++/38655
715         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
717 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
719         * typeck.c (invalid_nonstatic_memfn_p): Use
720         DECL_NONSTATIC_MEMBER_FUNCTION_P.
722 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
724         PR c++/37554
725         * call.c (build_over_call): If convert_for_arg_passing returns
726         error_mark_node unconditionally return it.
728 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
730         * class.c (check_field_decls): Also inherit packed for bitfields
731         regardless of their type.
733 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
735         PR c++/38930
736         * decl2.c (grokfield): Reverting changes of PR c++/26693
737         (save_template_attributes): Likewise.
738         * decl.c (grokdeclarator): Likewise.
739         * name-lookup.c (pushdecl_maybe_friend): Likewise.
740         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
741         (append_type_to_template_for_access_check): Likewise.
742         * semantics.c (check_accessibility_of_qualified_id): Likewise.
743         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
744         (tsubst): Likewise.
745         (resolve_type_name_type): Likewise.
746         (append_type_to_template_for_access_check): Likewise.
748 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
750         PR c++/26693
751         * decl2.c (grokfield): when a typedef appears in a
752         class, create the typedef variant type node for it.
753         (save_template_attributes): Creating typedef variant type node
754          here is now useless.
755         * decl.c (grokdeclarator): If the typedef'ed struct/class was
756         anonymous, set the proper type name to all its type variants.
757         * name-lookup.c (pushdecl_maybe_friend): Reuse the
758         set_underlying_type function to install typedef variant types.
759         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
760         macro.
761         (append_type_to_template_for_access_check): New entry points.
762         * semantics.c (check_accessibility_of_qualified_id):
763         When a typedef that is a member of a class appears in a template,
764         add it to the template. It will be ...
765         * pt.c (instantiate_class_template, instantiate_template ): ... access
766         checked at template instantiation time.
767         (tsubst): Handle the case of being called with NULL args.
768         (resolve_type_name_type): The type name should be the name of the
769         main type variant.
770         (append_type_to_template_for_access_check): New entry point.
772 2009-01-19  Jason Merrill  <jason@redhat.com>
774         PR c++/23287
775         * parser.c (cp_parser_unqualified_id): In a template,
776         accept ~identifier.
777         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
779 2009-01-16  Jason Merrill  <jason@redhat.com>
781         PR c++/38877
782         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
783         * init.c (build_new): Don't call describable_type unless we
784         have an auto.
786         PR c++/29470
787         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
789         PR c++/38579
790         * search.c (protected_accessible_p): N doesn't vary.
792 2009-01-15  Jason Merrill  <jason@redhat.com>
794         PR c++/38850
795         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
796         accept hidden friends.
798 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
800         PR C++/29388
801         * decl.c (grokdeclarator): Check for a non namespace/class context.
803 2009-01-15  Jason Merrill  <jason@redhat.com>
805         PR c++/36334
806         PR c++/37646
807         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
808         a function isn't necessarily an lvalue. Take tree, not const_tree.
809         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
810         * typeck.c (lvalue_or_else): Likewise.
811         * cp-tree.h: Adjust prototypes.
813 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
815         PR c++/38357
816         * pt.c (tsubst): Check for NULL args.
818 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
820         PR c++/38636
821         * name-lookup.c (pushtag): Don't create members to types that are not
822         being created.
824 2009-01-14  Nick Clifton  <nickc@redhat.com>
826         PR c++/37862
827         * parser.c: Pass cp_id_kind computed in
828         cp_parser_postfix_dot_deref_expression to
829         cp_parser_primary_expression.
831 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
833         PR c++/38795
834         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
835         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
836         as CAST_EXPR.
838 2009-01-12  Jason Merrill  <jason@redhat.com>
839             Steve Ellcey  <sje@cup.hp.com>
841         PR c++/35109
842         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
843         binding.
845 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
847         PR c++/36019
848         * pt.c (parameter_of_template_p): New function.
849         * cp-tree.h: Declare it.
850         * name-lookup.c (binding_to_template_parms_of_scope_p): New
851         function.
852         (outer_binding): Take template parameters in account when looking for
853         a name binding.
855 2009-01-12  Jason Merrill  <jason@redhat.com>
857         PR c++/31488
858         * tree.c (pod_type_p): Return 1 for structs created by the back end.
860 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
862         PR c/32041
863         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
864         offsetof member-designator, handle it as `[0].'.
866         PR c++/38794
867         * decl.c (start_function): If grokdeclarator hasn't returned
868         FUNCTION_DECL nor error_mark_node, issue diagnostics.
870 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
872         PR c++/36254
873         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
874         (gimplify_if_stmt): ... this.
875         (cp_gimplify_expr): Don't handle IF_STMT here.
876         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
878 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
880         PR c++/38648
881         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
883         PR c++/36695
884         * typeck2.c (build_functional_cast): Check for reference type and NULL
885         PARMS.
887 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
889         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
891 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
893         PR c++/35335
894         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
896 2009-01-09  John F. Carr  <jfc@mit.edu>
898         PR c++/37877
899         * parser.c (cp_parser_class_specifier): Clear
900         parser->in_unbraced_linkage_specification_p while parsing class
901         specifiers.
903 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
905         PR c++/38725
906         * semantics.c (finish_goto_stmt): Convert destination to
907         void *.
909 2009-01-06  Jason Merrill  <jason@redhat.com>
911         PR c++/35297
912         PR c++/35477
913         PR c++/35784
914         PR c++/36846
915         PR c++/38276
916         * pt.c (check_default_tmpl_args): Don't complain about
917         out-of-order parameter packs in the enclosing class
918         or parameter packs after default args.
919         (coerce_template_parms): If we have more than one
920         parameter pack, don't flatten argument packs.
921         (template_args_equal): Handle argument packs.
922         (comp_template_args): Don't flatten argument packs.
923         (check_instantiated_arg): Split out from...
924         (check_instantiated_args): Here.  Handle arg packs.
925         (convert_template_argument): Just check that nontype argument
926         packs have the right type.
928 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
930         PR c++/38472
931         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
933 2009-01-05  Jason Merrill  <jason@redhat.com>
935         PR c++/38698
936         * typeck2.c (process_init_constructor_union): Handle union with
937         no fields.
939         * mangle.c (write_expression): Remove mangling for zero-operand
940         casts.
942         PR c++/38701
943         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
944         defaulting.
946         PR c++/38702
947         * class.c (defaultable_fn_p): Only operator== can be a copy
948         assignment operator.
950 2009-01-02  Jason Merrill  <jason@redhat.com>
952         PR c++/38698
953         * typeck2.c (process_init_constructor_union): Handle excess
954         initializers.
955         (process_init_constructor_record): Likewise.
957         PR c++/38684
958         * typeck2.c (digest_init_r): Don't use process_init_constructor
959         for non-aggregate classes.
962 Copyright (C) 2009 Free Software Foundation, Inc.
964 Copying and distribution of this file, with or without modification,
965 are permitted in any medium without royalty provided the copyright
966 notice and this notice are preserved.