OSDN Git Service

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