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