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