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