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