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