OSDN Git Service

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