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