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