java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt.
[gcc.git] / gcc / cp / ChangeLog
1 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
2
3 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
4 (build_modify_expr): New arg.
5 * semantics.c (finish_unary_op_expr): Pass location to
6 overflow_warning.
7 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
8 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
9 c_sizeof_or_alignof_type.
10 (build_array_ref): New argument.
11 (build_compound_expr): Same.
12 (build_const_cast): Same.
13 (build_ptrmemfunc): Pass location to build_c_cast.
14 * init.c (avoid_placement_new_aliasing): Pass location to
15 build_stmt.
16 (build_vec_delete_1): Pass location to cp_build_modify_expr,
17 build_compound_expr.
18 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
19 * decl.c (poplevel): Pass location to c_build_bind_expr.
20 (finish_case_label): Pass location to build_case_label.
21 (finish_constructor_body): Same.
22 (finish_destructor_body): Pass location to build_stmt.
23 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
24 * call.c (build_new_op): Pass location to build_array_ref.
25 (build_x_va_arg): Pass location to build_va_arg.
26 * except.c (expand_end_catch_block): Pass location to
27 build_stmt.
28 * cp-tree.h (build_array_ref): New argument.
29 (build_compound_expr): Same.
30 (build_c_cast): Same.
31 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
32 (gimplify_switch_stmt): Same.
33 * typeck2.c (split_nonconstant_init_1): Same.
34 * pt.c (tsubst_copy): Same.
35 * semantics.c (add_decl_expr): Same.
36 (do_poplevel): Same.
37 (push_cleanup): Same.
38 (finish_goto_stmt): Same.
39 (finish_expr_stmt): Same.
40 (begin_if_stmt): Same.
41 (begin_while_stmt): Same.
42 (begin_do_stmt): Same.
43 (finish_return_stmt): Same.
44 (begin_for_stmt): Same.
45 (finish_break_stmt): Same.
46 (finish_continue_stmt): Same.
47 (begin_switch_stmt): Same.
48 (begin_try_block): Same.
49 (begin_handler): Same.
50 (finish_asm_stmt): Same.
51 (finish_label_stmt): Same.
52 (finish_stmt_expr_expr): Same.
53 (finalize_nrv_r): Same.
54 (finish_omp_atomic): Same.
55 * name-lookup.c (do_using_directive): Same.
56 * decl2.c (grok_array_decl): Same.
57 * parser.c (cp_parser_cast_expression): Same.
58 (cp_parser_selection_statement): Same.
59 (cp_parser_implicitly_scoped_statement): Same.
60 (cp_parser_objc_selector_expression): Same.
61 (cp_parser_objc_synchronized_statement): Same.
62 (cp_parser_objc_throw_statement): Same.
63 (cp_parser_omp_critical): Same.
64 (cp_parser_omp_master): Same.
65 * typeck.c (build_function_call): Add location argument.
66 * init.c: Add location argument to all build_decl calls.
67 * class.c: Same.
68 * method.c: Same.
69 * rtti.c: Same.
70 * tree.c: Same.
71 * pt.c: Same.
72 * semantics.c: Same.
73 * lex.c: Same.
74 * decl2.c: Same.
75 * cp-gimplify.c: Same.
76 * decl.c: Same.
77 (cp_make_fname_decl): Add location argument. Pass location ot
78 build_decl.
79 (finish_case_label): Same.
80 * cp-tree.h (finish_case_label): Add location argument.
81 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
82 finish_case_label.
83
84 2009-06-09 Jason Merrill <jason@redhat.com>
85
86 PR c++/40381
87 * decl2.c (mark_used): Return after complaining about deleted fn.
88
89 2009-06-08 Jason Merrill <jason@redhat.com>
90
91 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
92 late-specified return type.
93
94 2009-06-08 Jakub Jelinek <jakub@redhat.com>
95
96 PR c++/40373
97 * call.c (check_dtor_name): Return false even if
98 get_type_value (name) is error_mark_node.
99
100 PR c++/40370
101 PR c++/40372
102 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
103 on error_mark_node. Check for VLAs outside of function context
104 before check whether to wrap bounds into a NOP_EXPR with
105 TREE_SIDE_EFFECTS.
106
107 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
108
109 * repo.c (get_base_filename): Use aux_base_name rather than
110 alternate temporary file during second compare debug compilation.
111 (finish_repo): Skip during -fcompare-debug-second.
112
113 2009-06-06 Ian Lance Taylor <iant@google.com>
114
115 * parser.c (cp_parser_label_for_labeled_statement): Support
116 attribute on labels if immediately followed by semicolon.
117 * semantics.c (finish_label_stmt): Return new label.
118 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
119
120 2009-06-03 Ian Lance Taylor <iant@google.com>
121
122 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
123 $(SYSTEM_H).
124
125 2009-06-02 Mark Mitchell <mark@codesourcery.com>
126
127 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
128
129 2009-06-02 Jason Merrill <jason@redhat.com>
130
131 PR c++/40308
132 PR c++/40311
133 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
134 conversion code.
135 * call.c (implicit_conversion): Allow init-list conversion to scalar
136 during direct-initialization, too. Mark the conversion bad if it
137 has too many levels of braces.
138 (convert_like_real): And give a helpful error.
139
140 PR c++/40306
141 PR c++/40307
142 * decl.c (cp_finish_decl): Handle auto deduction from ().
143 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
144 with dependent type that is known to be a pointer.
145
146 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
147
148 PR c++/38089
149 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
150 specializations in an invalid namespace.
151
152 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
153
154 * error.c (print_instantiation_partial_context): Print column
155 numbers.
156
157 2009-05-29 Ian Lance Taylor <iant@google.com>
158
159 * error.c (cp_printer): Don't use va_arg with enum type.
160
161 2009-05-28 Dodji Seketeli <dodji@redhat.com>
162
163 PR c++/39754
164 * cp-tree.h (canonical_type_variant): Remove this function declaration.
165 (strip_typedefs): New function declaration.
166 * tree.c (strip_typedefs): New function definition.
167 (canonical_type_variant): Remove function definition.
168 * cvt.c (convert_from_reference): No need to use
169 canonical_type_variant.
170 * typeck.c (cp_build_indirect_ref): Likewise.
171 * error.c (dump_template_bindings): Use strip_typedefs instead of
172 canonical_type_variant.
173 * pt.c (convert_template_argument, unify): Likewise.
174 * mangle.c (canonicalize_for_substitution): Don't use
175 canonical_type_variant.
176
177 2009-05-27 Jason Merrill <jason@redhat.com>
178
179 * call.c (implicit_conversion): Handle conversion from
180 initializer-list to scalar.
181 (convert_like_real): Likewise. Avoid crashing on list
182 initialization with bad conversions.
183 (can_convert): Use LOOKUP_EXPLICIT.
184 (can_convert_arg_bad): Add flags parm.
185 * cp-tree.h: Adjust.
186 * typeck.c (convert_for_assignment): Pass flags.
187
188 2009-05-27 Ian Lance Taylor <iant@google.com>
189
190 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
191 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
192
193 2009-05-26 Ian Lance Taylor <iant@google.com>
194
195 * Make-lang.in (g++spec.o): Use $(COMPILER).
196 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
197 (cc1plus$(exeext)): Likewise.
198
199 2009-05-26 Dodji Seketeli <dodji@redhat.com>
200
201 PR c++/40007
202 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
203 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
204 (get_types_needing_access_check): Declare new entry point.
205 * pt.c (append_type_to_template_for_access_check_1,
206 get_types_needing_access_check): New functions.
207 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
208 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
209 get_types_needing_access_check, no more
210 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
211 (instantiate_class_template): Set input_location to the source
212 location of the most specialized template definition.
213 Perform access check using the RECORD_TYPE of the template, not its
214 associated most generic TEMPLATE_DECL.
215 (append_type_to_template_for_access_check): Augment function
216 comments. Use the new get_types_needing_access_check, not
217 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
218 append_type_to_template_for_access_check_1 subroutine.
219
220 2009-05-22 Jason Merrill <jason@redhat.com>
221
222 PR c++/38064
223 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
224 arithmetic comparisons.
225 (cp_common_type): Handle scoped enums.
226
227 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
228 (add_builtin_candidate, add_builtin_candidates): Likewise.
229 (convert_like_real): Likewise.
230 * class.c (check_bitfield_decl): Likewise.
231 * decl.c (check_static_variable_definition): Likewise.
232 (compute_array_index_type): Likewise.
233 * decl2.c (grokbitfield): Likewise.
234 * init.c (build_new_1): Likewise.
235 * pt.c (convert_nontype_argument): Likewise.
236 (current_instantiation): Likewise.
237 * tree.c (pod_type_p): Likewise.
238 * typeck.c (build_static_cast_1): Likewise.
239 (build_reinterpret_cast_1): Likewise.
240
241 2009-05-22 Richard Guenther <rguenther@suse.de>
242
243 PR middle-end/38964
244 * init.c (avoid_placement_new_aliasing): Remove.
245 (build_new_1): Do not call it.
246
247 2009-05-22 Mark Mitchell <mark@codesourcery.com>
248
249 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
250 * semantics.c (expand_or_defer_fn): Similarly.
251
252 2009-05-20 Ian Lance Taylor <iant@google.com>
253
254 * parser.c (cp_parser_postfix_expression): Change args to a vec.
255 Release it when done.
256 (tree_vector): Define typedef. Define VEC functions.
257 (cp_parser_parenthesized_expression_list): Change return type to
258 vec. Change all callers.
259 (cp_parser_new_expression): Change placement and initializer to
260 vecs. Release them when done.
261 (cp_parser_new_placement): Change return type to vec. Change all
262 callers.
263 (cp_parser_new_initializer): Likewise.
264 * typeck.c (build_function_call_vec): Just call
265 cp_build_function_call_vec.
266 (cp_build_function_call): Just build a vec and call
267 cp_build_function_call_vec.
268 (cp_build_function_call_vec): New function based on old
269 cp_build_function_call.
270 (convert_arguments): Remove nargs and argarray parameters. Change
271 values to a vec. Change caller.
272 (build_x_compound_expr_from_vec): New function.
273 (cp_build_modify_expr): Build vec to pass to
274 build_special_member_call.
275 * call.c (struct z_candidate): Add first_arg field. Change args
276 field to vec.
277 (convert_class_to_reference): Handle first argument separately.
278 (add_candidate): Add first_arg parameter. Change args parameter
279 to vec. Change all callers.
280 (add_function_candidate, add_conv_candidate): Likewise.
281 (add_template_candidate_real, add_template_candidate): Likewise.
282 (add_template_conv_candidate): Likewise.
283 (build_user_type_conversion_1): Handle first argument separately.
284 (resolve_args): Change return type and parameter type to vecs.
285 Change all callers.
286 (perform_overload_resolution): Change args parameter to vec.
287 Change all callers.
288 (build_new_function_call, build_operator_new_call): Likewise.
289 (add_candidates): Likewise.
290 (build_op_call): New globally visible function, built from and
291 replacing static function build_object_call.
292 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
293 of arguments.
294 (build_op_delete_call): Build vec to pass to
295 cp_build_function_call_vec.
296 (build_temp): Build vec to pass to build_special_member_call.
297 (convert_like_real): Likewise.
298 (perform_direct_initialization_if_possible): Likewise.
299 (build_over_call): Handle first_arg field. Use build_call_array
300 rather than build_call_list.
301 (build_special_member_call): Change args parameter to vec. Change
302 all callers.
303 (build_new_method_call): Likewise.
304 * init.c (expand_default_init): Change parms to vec.
305 (build_raw_new_expr): Change placement and init to vecs. Change
306 all callers.
307 (build_new_1, build_new): Likewise.
308 * class.c (resolve_address_of_overloaded_function): Build array to
309 pass to fn_type_unification.
310 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
311 build_new. For CALL_EXPR create a vec rather than a tree_list;
312 expand a pack if necessary.
313 (fn_type_unification): Change args parameter to const tree *. Add
314 nargs parameter. Change all callers.
315 (type_unification_real): Likewise.
316 (unify): Build array to pass to type_unification_real.
317 (get_bindings): Build array to pass to fn_type_unification.
318 (any_type_dependent_arguments_p): Change args parameter to a vec.
319 Change all callers.
320 (make_args_non_dependent): Renamed from build_non_dependent_args.
321 Change return type to void. Change parameter type to vec. Change
322 all callers.
323 (do_auto_deduction): Pass an array to type_unification_real.
324 * semantics.c (perform_koenig_lookup): Change args to vec. Change
325 all callers.
326 (finish_call_expr): Change args to vec. Change all callers. Call
327 build_op_call instead of passing CALL_EXPR to build_new_op.
328 (cxx_omp_create_clause_info): Allocate vec to pass to
329 build_special_member_call.
330 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
331 to vec. Change all callers.
332 * name-lookup.c (lookup_function_nonclass): Likewise.
333 (struct arg_lookup): Change args to vec.
334 (arg_assoc_namespace): Handle args as a vec.
335 (arg_assoc_args_vec): New static function.
336 (lookup_arg_dependent): Change args parameter to vec. Change all
337 callers.
338 * method.c (do_build_assign_ref): Allocate vec to pass to
339 build_special_member_call.
340 * except.c (build_throw): Likewise.
341 * typeck2.c (build_functional_cast): Likewise.
342 * cvt.c (ocp_convert): Likewise.
343 * tree.c (build_min_non_dep_call_vec): Change last parameter to
344 vec. Change all callers.
345 * cp-tree.h: Update declarations.
346 * name-lookup.h: Update declarations.
347
348 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
349
350 * typeck.c (default_conversion): Check targetm.promoted_type.
351 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
352 (grokparms): Check targetm.invalid_parameter_type.
353 * cvt.c (ocp_convert): Check targetm.convert_to_type.
354 (build_expr_type_conversion): Check targetm.promoted_type.
355
356 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
357
358 * typeck.c (build_binary_op): Allow % on integal vectors.
359
360 2009-05-18 Jason Merrill <jason@redhat.com>
361
362 Implement explicit conversions ops as specified in N2437.
363 * decl.c (grokdeclarator): Handle explicit conversion ops.
364 (check_initializer): Pass flags to store_init_value.
365 * decl2.c (maybe_emit_vtables): Likewise.
366 * init.c (expand_aggr_init_1): Likewise.
367 * call.c (convert_class_to_reference): Take flags parm,
368 check DECL_NONCONVERTING_P.
369 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
370 (add_builtin_candidates): Simplify getting type of conversion.
371 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
372 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
373 (reference_binding): Take flags parm. Direct-initialize copy parm.
374 (add_function_candidate): Direct-initialize the copy parm.
375 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
376 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
377 (conditional_conversion): Likewise.
378 (convert_like_real): Only complain about DECL_NONCONVERTING_P
379 constructors.
380 (perform_implicit_conversion_flags): Add flags parm to
381 perform_implicit_conversion. Improve diagnostics.
382 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
383 (LOOKUP_COPY_PARM): New bit macro.
384 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
385 * typeck.c (convert_for_assignment): Take flags parm, pass it to
386 perform_implicit_conversion_flags.
387 (cp_build_modify_expr): Pass flags to convert_for_assignment.
388 (convert_for_initialization): Likewise.
389 * typeck2.c (store_init_value): Take flags parm, pass to
390 digest_init_flags.
391 (digest_init_flags): Add flags parm to digest_init.
392 (digest_init_r): Take flags parm, pass to convert_for_initialization.
393 (process_init_constructor_array): Pass it.
394 (process_init_constructor_record): Likewise.
395 (process_init_constructor_union): Likewise.
396
397 2009-05-16 Jason Merrill <jason@redhat.com>
398
399 PR c++/40139
400 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
401 with a dependent type. Actually look up the destructor.
402 * semantics.c (finish_id_expression): Fix logic.
403 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
404 a function.
405 * typeck.c (build_x_unary_op): Diagnose taking the address of a
406 constructor or destructor.
407 * tree.c (get_first_fn): Handle OFFSET_REF.
408
409 2009-05-17 Joseph Myers <joseph@codesourcery.com>
410
411 * tree.c (cxx_printable_name_internal): Allow consecutive
412 translated and untranslated cached copies of the name of the
413 current function.
414
415 2009-05-15 Ian Lance Taylor <iant@google.com>
416
417 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
418 cp_lvalue_kind. Change all uses.
419 (enum base_access_flags): Rename from enum base_access. Change
420 all uses.
421 * parser.c (enum cp_parser_flags): Remove enum tag.
422
423 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
424
425 PR 16302
426 * call.c (build_new_op): Update calls to warn_logical_operator.
427
428 2009-05-14 Ian Lance Taylor <iant@google.com>
429
430 * class.c (layout_class_type): Change itk to unsigned int.
431 * decl.c (finish_enum): Change itk to unsigned int.
432 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
433 casts.
434
435 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
436
437 * decl.c (duplicate_decls): Preserve parameter attributes.
438
439 2009-05-10 Jan Hubicka <jh@suse.cz>
440
441 * decl2.c (cxx_callgraph_analyze_expr): Use
442 cgraph_mark_address_taken.
443
444 2009-05-10 Joseph Myers <joseph@codesourcery.com>
445
446 * call.c (name_as_c_string): Call type_as_string_translate.
447 Translate identifiers to locale character set.
448 * cp-tree.h (lang_decl_name): Update prototype.
449 (type_as_string_translate, decl_as_string_translate,
450 cxx_printable_name_translate): Declare.
451 * cxx-pretty-print.c (M_): Define.
452 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
453 English fragments for conditional translation with M_.
454 * decl.c (grokdeclarator): Translate identifiers to locale
455 character set for diagnostics.
456 * error.c (M_): Define.
457 (dump_template_bindings, dump_type, dump_aggr_type,
458 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
459 dump_function_decl, dump_template_parms, dump_expr,
460 dump_binary_op, op_to_string, assop_to_string): Mark English
461 fragments for conditional translation with M_.
462 (type_as_string): Disable translation of identifiers.
463 (type_as_string_translate): New.
464 (expr_as_string): Disable translation of identifiers.
465 (decl_as_string): Disable translation of identifiers.
466 (decl_as_string_translate): New.
467 (lang_decl_name): Add parameter translate.
468 (args_to_string): Call type_as_string_translate.
469 (cp_print_error_function): Call cxx_printable_name_translate.
470 (print_instantiation_full_context,
471 print_instantiation_partial_context): Call
472 decl_as_string_translate.
473 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
474 identifier in diagnostic.
475 * tree.c (cxx_printable_name): Change to
476 cxx_printable_name_internal. Add parameter translate.
477 (cxx_printable_name, cxx_printable_name_translate): New wrappers
478 round cxx_printable_name_internal.
479
480 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
481
482 PR c/36892
483 * call.c (build_call_a): Updated warn_deprecated_use call.
484 (build_over_call): Likewise.
485 * decl.c (grokdeclarator): Likewise.
486 (grokparms): Likewise.
487 * semantics.c (finish_id_expression): Likewise.
488 * typeck.c (build_class_member_access_expr): Likewise.
489 (finish_class_member_access_expr): Likewise.
490
491 2009-05-06 Dodji Seketeli <dodji@redhat.com>
492
493 PR c++/17395
494 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
495 whole list of PARM_DECLs, just the current one.
496
497 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
498
499 * cp-tree.h:
500 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
501 mangle_compound_literal): Remove unused declarations.
502 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
503 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
504 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
505 check_for_out_of_scope_variable, print_other_binding_stack,
506 maybe_push_decl, cxx_mark_addressable, force_target_expr,
507 build_target_expr_with_type, finish_case_label,
508 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
509 check_template_keyword, cxx_omp_predetermined_sharing,
510 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
511 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
512 cxx_omp_privatize_by_reference): Rearrange the declarations line to
513 match the comment that indicates the .c file which the functions are
514 defined.
515 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
516 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
517
518 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
519
520 * typeck.c (cp_build_compound_expr): Require RHS to have a known
521 type.
522 * class.c (resolve_address_of_overloaded_function): Use
523 OVL_CURRENT for error message.
524 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
525 with them. Do not copy the node.
526
527 2009-05-05 Jakub Jelinek <jakub@redhat.com>
528
529 PR c++/40013
530 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
531 set it from its operand's type after tsubst_expr.
532
533 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
534
535 PR c++/28152
536 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
537 canonical spelling for keywords.
538 (cp_parser_attribute_list): Use the canonical spelling for
539 keywords in attributes.
540
541 2009-05-01 Joseph Myers <joseph@codesourcery.com>
542
543 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
544 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
545 pp_cxx_new_expression, pp_cxx_delete_expression,
546 pp_cxx_unary_expression, pp_cxx_assignment_operator,
547 pp_cxx_assignment_expression, pp_cxx_expression,
548 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
549 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
550 pp_cxx_exception_specification, pp_cxx_direct_declarator,
551 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
552 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
553 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
554 pp_cxx_declaration, pp_cxx_typeid_expression,
555 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
556 pp_cxx_trait_expression): Mostly use pp_string and
557 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
558 for non-identifiers. Mark English strings for translation.
559 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
560 * error.c (dump_template_parameter, dump_template_bindings,
561 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
562 dump_decl, dump_template_decl, dump_function_decl,
563 dump_parameters, dump_exception_spec, dump_template_parms,
564 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
565 assop_to_string, args_to_string, cp_print_error_function,
566 print_instantiation_full_context,
567 print_instantiation_partial_context): Mostly use pp_string and
568 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
569 for non-identifiers. Mark English strings for translation.
570 (dump_global_iord): Mark strings for translation; use longer
571 strings instead of substituting single words.
572 (function_category): Return a format string marked for
573 translation, not a single word or phrase to substitute in a longer
574 phrase.
575
576 2009-04-28 Ben Elliston <bje@au.ibm.com>
577
578 PR c++/35652
579 Revert:
580
581 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
582
583 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
584
585 2009-04-27 Ian Lance Taylor <iant@google.com>
586
587 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
588 omp_clause_code.
589
590 2009-04-27 Jakub Jelinek <jakub@redhat.com>
591
592 PR c++/39875
593 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
594 -Wunused-value if implicit.
595
596 2009-04-24 Ian Lance Taylor <iant@google.com>
597
598 * call.c (build_temp): Change 0 to enum constant.
599 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
600 type.
601 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
602 * decl2.c (constrain_visibility): Likewise.
603 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
604 (cp_parser_flags): Typedef to int rather than enum type.
605 (cp_parser_expression_stack_entry): Change prec field to enum
606 cp_parser_prec.
607
608 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
609 Change all callers.
610
611 2009-04-22 Dodji Seketeli <dodji@redhat.com>
612
613 PR c++/39639
614 * parser.c (cp_parser_template_argument_list): Display an error
615 when an ellipsis is not preceded by a parameter pack. Also, warn
616 about variadic templates usage without -std=c++0x.
617
618 2009-04-21 Taras Glek <tglek@mozilla.com>
619
620 * cp-tree.h: Update GTY annotations to new syntax.
621 * decl.c: Likewise.
622 * mangle.c: Likewise.
623 * name-lookup.c: Likewise.
624 * name-lookup.h: Likewise.
625 * parser.c: Likewise.
626 * pt.c: Likewise.
627 * rtti.c: Likewise.
628 * semantics.c: Likewise.
629 * typeck2.c: Likewise.
630
631 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
632
633 PR c++/14875
634 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
635
636 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
637
638 PR c++/35711
639 * typeck.c (check_for_casting_away_constness): We diagnose casting
640 away any qualifiers not just constness.
641 (casts_away_constness): Mention that it handles more than just
642 constness.
643
644 2009-04-21 Joseph Myers <joseph@codesourcery.com>
645
646 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
647 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
648 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
649 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
650 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
651 cfns.gperf: Add copyright and license notices.
652 * cfns.h: Regenerate.
653 * ChangeLog, ChangeLog-2004: Correct dates.
654
655 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
656
657 PR 16202
658 * tree.c (lvalue_p_1): Use const_tree.
659 Use CONST_CAST_TREE to avoid warning.
660 (lvalue_p): Returns bool, receives const_tree.
661
662 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
663
664 PR c++/13358
665 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
666 * error.c (pedwarn_cxx98): New.
667 * cp-tree.h (pedwarn_cxx98): Declare.
668
669 2009-04-20 Le-Chun Wu <lcwu@google.com>
670
671 PR c++/39803
672 * init.c (build_vec_init): Set TREE_NO_WARNING on the
673 compiler-generated INDIRECT_REF expression.
674
675 2009-04-20 Ian Lance Taylor <iant@google.com>
676
677 * typeck.c (build_function_call_vec): New function.
678 (cp_build_function_call): Only pass first parameter to
679 objc_rewrite_function_call.
680 (build_modify_expr): Add rhs_origtype parameter. Change all
681 callers.
682 * decl.c (finish_decl): Add origtype parameter. Change all
683 callers.
684 * semantics.c (finish_call_expr): Pass VEC to
685 resolve_overloaded_builtin.
686
687 2009-04-20 Ian Lance Taylor <iant@google.com>
688
689 * cp-tree.h (base_access): Change typedef to int.
690 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
691 (cp_parser_omp_threadprivate): Likewise.
692 * pt.c (unify_pack_expansion): Add casts to enum type.
693
694 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
695
696 PR c/32061
697 PR c++/36954
698 * call.c (build_new_op): Save the original codes of operands
699 before folding.
700
701 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
702
703 * cp-tree.h: Remove the prototype for insert_block.
704 * decl.c (insert_block): Remove.
705
706 2009-04-16 Ian Lance Taylor <iant@google.com>
707
708 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
709 (tsubst_flags_t): Change typedef from enum type to int.
710
711 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
712
713 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
714 instead of targetm.vector_opaque_p.
715
716 2009-04-15 Le-Chun Wu <lcwu@google.com>
717
718 PR c++/39551
719 * call.c (build_over_call): Set TREE_NO_WARNING on the
720 compiler-generated INDIRECT_REF expression.
721 * cvt.c (convert_to_void): Emit warning when stripping off
722 INDIRECT_REF.
723
724 2009-04-14 Diego Novillo <dnovillo@google.com>
725
726 * parser.c (cp_parser_type_specifier_seq): Move call to
727 invoke_plugin_callbacks ...
728 (cp_parser_type_specifier_seq): ... here.
729
730 2009-04-14 Le-Chun Wu <lcwu@google.com>
731
732 * Make-lang.in: Modify dependencies of files including plugin.h.
733 * decl.c (finish_function): Call invoke_plugin_callbacks.
734 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
735
736 2009-04-14 Jason Merrill <jason@redhat.com>
737
738 PR c++/39763
739 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
740 about shadowing by tentative parms.
741
742 2009-04-13 Jason Merrill <jason@redhat.com>
743
744 PR c++/39480
745 * call.c (build_over_call): Don't call memcpy if the target is
746 the same as the source.
747
748 2009-04-13 Jason Merrill <jason@redhat.com>
749
750 PR c++/39750
751 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
752
753 2009-04-12 Jason Merrill <jason@redhat.com>
754
755 PR c++/39742
756 * call.c (joust): Don't crash on variadic fn.
757
758 2009-04-10 Jason Merrill <jason@redhat.com>
759
760 PR c++/28301
761 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
762 if we see a close brace without an open brace.
763
764 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
765
766 * parser.c (cp_parser_class_specifier): Remove the unused
767 has_trailing_semicolon.
768
769 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
770
771 PR c++/20118
772 * parser.c (cp_parser_check_template_parameters): Take a
773 cp_declarator parameter.
774 (cp_parser_elaborated_type_specifier): Update to
775 cp_parser_check_template_parameters.
776 (cp_parser_class_head): Likewise.
777 (cp_parser_check_declarator_template_parameters): Likewise.
778 (cp_parser_check_template_parameters): Handle first the non-error
779 conditions. Give more accurate diagnostics if a declarator is
780 given.
781
782 2009-04-08 Jason Merrill <jason@redhat.com>
783
784 PR c++/25185
785 * error.c (dump_aggr_type): Chase template typedefs if
786 -fno-pretty-templates.
787
788 2009-04-08 Dodji Seketeli <dodji@redhat.com>
789
790 PR c++/39637
791 * parser.c (cp_parser_enumerator_definition): Make sure the
792 initializer of the enumerator doesn't contain any bare parameter pack.
793
794 2009-04-07 Jason Merrill <jason@redhat.com>
795
796 PR c++/34691
797 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
798 * call.c (joust): Complain about mismatched default arguments
799 in extern "C" functions.
800 * class.c (resolve_address_of_overloaded_function): Handle multiple
801 extern "C" functions.
802 * pt.c (resolve_overloaded_unification): Likewise.
803
804 2009-04-07 Jason Merrill <jason@redhat.com>
805
806 PR c++/25185
807 * error.c (dump_function_decl): Don't pretty-print templates
808 if -fno-pretty-templates.
809 (count_non_default_template_args): Print all args if
810 -fno-pretty-templates.
811
812 2009-04-06 Jason Merrill <jason@redhat.com>
813
814 PR c++/35146
815 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
816 the deduced template arguments give us the parameter types
817 we're looking for.
818
819 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
820 Jason Merrill <jason@redhat.com>
821
822 PR c++/14912
823 * error.c (count_non_default_template_args): New fn.
824 (dump_template_parms): Call it.
825 (dump_template_argument_list): Call it. Add parms parm.
826 (dump_template_argument): Adjust call to dump_template_argument_list.
827 (dump_type, dump_decl): Likewise.
828 (dump_template_bindings): Refactor logic.
829
830 2009-04-03 Jason Merrill <jason@redhat.com>
831
832 PR c++/25185
833 * error.c (dump_template_bindings): Look through typedefs in
834 typename results.
835 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
836 (find_typenames_r): Also collect typedefs.
837 * pt.c (unify): Strip typedefs.
838
839 PR c++/39608
840 * semantics.c (finish_id_expression): Don't assume a dependent
841 member of the current instantiation isn't a valid integral
842 constant expression. Check dependent_scope_p.
843 * pt.c (dependent_scope_p): Check TYPE_P.
844 (tsubst_copy): If args is null, just return.
845
846 2009-04-02 Jason Merrill <jason@redhat.com>
847
848 PR c++/25185
849 * error.c (find_typenames, find_typenames_r): New fns.
850 (dump_function_decl): Call find_typenames.
851 (dump_template_bindings): Print typenames as well.
852 * pt.c (tsubst): Non-static.
853 * cp-tree.h: Declare it.
854
855 2009-04-02 Dodji Seketeli <dodji@redhat.com>
856
857 PR c++/26693
858 * decl2.c (grokfield): when a typedef appears in a
859 class, create the typedef variant type node for it.
860 (save_template_attributes): Creating typedef variant type node
861 here is now useless.
862 * decl.c (grokdeclarator): If the typedef'ed struct/class was
863 anonymous, set the proper type name to all its type variants.
864 (xref_basetypes) : Fixup the variant types after setting
865 TYPE_BINFO on REF.
866 * name-lookup.c (pushdecl_maybe_friend): Reuse the
867 set_underlying_type function to install typedef variant types.
868 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
869 macro.
870 (append_type_to_template_for_access_check): New entry points.
871 * semantics.c (check_accessibility_of_qualified_id):
872 When a typedef that is a member of a class appears in a template,
873 add it to the template. It will be ...
874 * class.c (finish_struct_bits): Split type variant fixup into ...
875 (fixup_type_variants): A new entry point.
876 * pt.c (instantiate_class_template, instantiate_template ): ... access
877 checked at template instantiation time.
878 (resolve_type_name_type): The type name should be the name of the
879 main type variant.
880 (retrieve_specialization): Specializations of template typedefs aren't
881 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
882 (append_type_to_template_for_access_check): New entry point.
883 (tsubst_decl): For typedefs, build the variant type from the correct
884 original type.
885 (get_class_bindings): Fix function comment.
886 (perform_typedefs_access_check): New entry point.
887
888 2009-03-31 Jason Merrill <jason@redhat.com>
889
890 PR c++/34691
891 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
892 extern "C" declarations.
893
894 C++ DR 613
895 * semantics.c (finish_non_static_data_member): Allow such references
896 without an associated object in sizeof/decltype/alignof.
897
898 * ptree.c (cxx_print_decl): Pretty-print full name of
899 function/template.
900 (cxx_print_type): Pretty-print full name of class.
901
902 * decl.c (grokdeclarator): Reject pointer to qualified function
903 type.
904
905 PR c++/37806, core issue 547
906 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
907 to a typedef.
908 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
909 function type.
910 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
911 * decl.c (groktypename): Add is_template_arg parameter.
912 (grokdeclarator): Allow function cv-quals on a template type arg.
913 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
914 is_template_arg argument in calls to groktypename.
915 * cp-tree.h: Adjust prototype.
916 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
917 FUNCTION_TYPE printing.
918
919 * mangle.c (write_expression): Mangle dependent name as
920 source-name.
921
922 PR c++/38030, 38850, 39070
923 * pt.c (type_dependent_expression_p_push): New fn.
924 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
925 substitution makes the call non-dependent. Preserve koenig_p.
926 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
927 for non-dependent calls.
928 * semantics.c (finish_call_expr): Revert earlier changes.
929 * cp-tree.h: Revert change to finish_call_expr prototype.
930
931 2009-03-29 Joseph Myers <joseph@codesourcery.com>
932
933 PR preprocessor/34695
934 * cp-tree.h (cp_cpp_error): Remove.
935 * error.c (cp_cpp_error): Remove.
936 * parser.c (cp_lexer_new_main): Set done_lexing instead of
937 client_diagnostic and error callback.
938
939 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
940
941 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
942 * cp/cp-objcp-common.c (cxx_staticp): Remove.
943 * cp/cp-tree.h (cxx_staticp): Remove.
944
945 2009-03-28 Jakub Jelinek <jakub@redhat.com>
946
947 PR c++/39554
948 * parser.c (cp_parser_postfix_expression): Don't call
949 warning_if_disallowed_function_p.
950
951 2009-03-27 Jan Hubicka <jh@suse.cz>
952
953 * except.c (choose_personality_routine): Set terminate_node to abort
954 for java exceptions.
955
956 2009-03-27 Dodji Seketeli <dodji@redhat.com>
957 Jakub Jelinek <jakub@redhat.com>
958
959 PR debug/37959
960 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
961 (cp_function_decl_explicit_p): New prototype.
962 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
963
964 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
965
966 PR c++/38638
967 * parser.c (cp_parser_elaborated_type_specifier): If we have a
968 typename tag and don't have either a TYPE_DECL or a
969 TEMPLATE_ID_EXPR, set the type to NULL.
970
971 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
972
973 PR c++/37647
974 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
975 scope.
976
977 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
978
979 PR c++/29727
980 * decl.c (check_array_designated_initializer): Handle error_mark_node.
981
982 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
983
984 PR c++/35652
985 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
986
987 2009-03-26 Andrew Haley <aph@redhat.com>
988
989 PR C++/39380
990 * decl2.c (possibly_inlined_p): If java exceptions are in use
991 don't inline a decl unless it is explicitly marked inline.
992 * lex.c: (pragma_java_exceptions): New variable.
993 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
994 * cp-tree.h (pragma_java_exceptions): Declare new variable.
995
996 2009-03-24 Jason Merrill <jason@redhat.com>
997
998 PR c++/28274
999 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1000
1001 2009-03-23 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR c/39495
1004 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1005 code if iter is the second operand.
1006 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1007 argument. If it is set, don't build the toplevel expression with
1008 build_x_binary_op, but build2.
1009 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
1010 callers.
1011 (cp_parser_omp_for_cond): Don't assume the first operand of the
1012 comparison must be decl.
1013
1014 2009-03-23 Jason Merrill <jason@redhat.com>
1015
1016 PR c++/37729
1017 * pt.c (make_fnparm_pack): Split out from...
1018 (instantiate_decl): ...here.
1019 (tsubst_pack_expansion): Handle being called in a late-specified
1020 return type.
1021
1022 PR c++/39526
1023 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1024 a parm with a parm.
1025
1026 2009-03-20 Jason Merrill <jason@redhat.com>
1027
1028 PR c++/28879
1029 * parser.c (cp_parser_direct_declarator): In a template, wrap
1030 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1031 * pt.c (tsubst): Preserve it in a partial instantiation.
1032 (dependent_type_p_r): Don't check value_dependent_expression_p.
1033 * decl.c (compute_array_index_type): Don't check
1034 value_dependent_expression_p if TREE_SIDE_EFFECTS.
1035
1036 C++ core issue 703
1037 * typeck2.c (check_narrowing): Don't complain about loss of
1038 precision when converting a floating-point constant.
1039
1040 2009-03-19 Jakub Jelinek <jakub@redhat.com>
1041
1042 PR c/39495
1043 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1044 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1045
1046 2009-03-18 Jakub Jelinek <jakub@redhat.com>
1047
1048 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1049 (eof_token): Adjust.
1050
1051 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
1052
1053 PR c++/39425
1054 * parser.c (cp_parser_explicit_specialization): Don't skip the
1055 rest of the specialization when begin_specialization returns
1056 false.
1057
1058 2009-03-17 Jason Merrill <jason@redhat.com>
1059
1060 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1061 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1062 * pt.c (check_explicit_specialization): Likewise.
1063 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1064 local specialization.
1065 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1066 * decl2.c (parm_index): New fn.
1067 * semantics.c (finish_decltype_type): Don't use describable_type.
1068 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
1069 Give a sorry for unsupported codes rather than crash. Mangle
1070 conversions with other than 1 operand. New mangling for PARM_DECL.
1071 * operators.def (ALIGNOF_EXPR): Mangle as "az".
1072
1073 2009-03-17 Jing Yu <jingyu@google.com>
1074
1075 PR middle-end/39378
1076 * method.c (use_thunk): Change is_thunk from crtl to cfun.
1077
1078 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1079
1080 PR c++/39475
1081 * semantics.c (check_trait_type): New.
1082 (finish_trait_expr): Use it.
1083
1084 2009-03-17 Jakub Jelinek <jakub@redhat.com>
1085
1086 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1087 instead of calling imported_module_or_decl debug hook if
1088 building_stmt_tree ().
1089 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1090 is a NAMESPACE_DECL.
1091
1092 PR debug/37890
1093 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1094 hook at function scope.
1095
1096 PR debug/39471
1097 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1098 on IMPORTED_DECL.
1099
1100 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1101
1102 PR c++/39371
1103 * semantics.c (finish_switch_cond): Don't call get_unwidened.
1104 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1105 instead of TREE_TYPE (cond).
1106
1107 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1108
1109 PR c++/39060
1110 * parser.c (cp_parser_late_parsing_default_args): Continue
1111 the loop when cp_parser_assignment_expression returns
1112 error_mark_node.
1113
1114 2009-03-07 Jason Merrill <jason@redhat.com>
1115
1116 PR c++/39367
1117 * init.c (build_new_1): Don't use a VLA type.
1118 (build_vec_init): Handle getting a pointer for BASE.
1119
1120 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1121
1122 PR c++/37520
1123 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1124 when mangling symbols.
1125
1126 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1127
1128 PR c++/33492
1129 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1130
1131 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1132
1133 * decl.c (record_builtin_java_type): Use canonicalized integer
1134 types.
1135
1136 2009-03-04 Jason Merrill <jason@redhat.com>
1137
1138 PR c++/38908
1139 * class.c (is_really_empty_class): New fn.
1140 * cp-tree.h: Declare it.
1141 * cp-objcp-common.c (cp_expr_size): Use it.
1142
1143 PR c++/13549
1144 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1145 * parser.c (cp_parser_postfix_expression): Call it for
1146 TEMPLATE_ID_EXPR.
1147 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1148 (get_first_fn): Likewise.
1149
1150 PR c++/9634
1151 PR c++/29469
1152 PR c++/29607
1153 Implement DR 224.
1154 * decl.c (make_typename_type): Do look inside currently open classes.
1155 * parser.c (cp_parser_lookup_name): Likewise.
1156 (cp_parser_template_name): Likewise.
1157 * pt.c (dependent_scope_p): New function.
1158 * cp-tree.h: Declare it.
1159 * class.c (currently_open_class): Return fast if T isn't a class.
1160
1161 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 PR c++/37789
1164 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1165 if cp_parser_mem_initializer_id returns error_mark_node.
1166
1167 2009-02-24 Richard Guenther <rguenther@suse.de>
1168
1169 PR c++/39242
1170 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1171 declared functions.
1172
1173 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1174
1175 PR c++/36411
1176 * pt.c (coerce_template_template_parms): Return 0 if parameter
1177 is error_mark_node.
1178
1179 2009-02-23 Jason Merrill <jason@redhat.com>
1180
1181 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1182 deducing from an initializer list.
1183
1184 2009-02-20 Jason Merrill <jason@redhat.com>
1185
1186 PR c++/39225
1187 * decl.c (grokdeclarator): Handle ~identifier.
1188
1189 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1190
1191 PR target/39175
1192 * decl2.c (determine_visibility): If visibility changed and
1193 DECL_RTL has been already set, call make_decl_rtl to update symbol
1194 flags.
1195
1196 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1197
1198 PR c++/39188
1199 * cp-tree.h (maybe_commonize_var): New.
1200
1201 * decl.c (maybe_commonize_var): Make it extern.
1202
1203 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1204
1205 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1206
1207 PR c++/39219
1208 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1209
1210 2009-02-18 Jason Merrill <jason@redhat.com>
1211
1212 * cfns.h: Tweak pathname for cfns.gperf.
1213
1214 2009-02-13 Jason Merrill <jason@redhat.com>
1215
1216 PR c++/39070
1217 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1218 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1219 * cp-tree.h: Adjust prototype.
1220 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1221
1222 2009-02-12 Jason Merrill <jason@redhat.com>
1223
1224 PR c++/38950
1225 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1226
1227 2009-02-11 Jason Merrill <jason@redhat.com>
1228
1229 PR c++/39153
1230 * decl2.c (cp_write_global_declarations):
1231 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1232
1233 PR c++/30111
1234 * init.c (build_value_init_noctor): Split out from...
1235 (build_value_init): ...here.
1236 (expand_aggr_init_1): Handle value-initialization.
1237 * cp-tree.h: Add declaration.
1238 * class.c (type_has_user_provided_constructor):
1239 Handle non-class arguments.
1240
1241 2009-02-10 Jason Merrill <jason@redhat.com>
1242
1243 PR c++/38649
1244 * class.c (defaultable_fn_p): Handle ... properly.
1245
1246 PR c++/36744
1247 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1248 treat_class_rvalues_as_lvalues, too.
1249
1250 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1251
1252 PR c++/34397
1253 * typeck.c (build_x_array_ref): New.
1254 * cp-tree.h: Declare it.
1255 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1256
1257 2009-02-09 Jason Merrill <jason@redhat.com>
1258
1259 PR c++/39109
1260 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1261 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1262 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1263 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1264 for build_value_init TARGET_EXPR.
1265 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1266
1267 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1268
1269 PR c++/35147
1270 PR c++/37737
1271 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1272
1273 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c++/39095
1276 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1277 remove ./dt operator.
1278 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1279 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1280 write_string ("dt") instead of using operators.def.
1281
1282 2009-02-03 Jason Merrill <jason@redhat.com>
1283
1284 * typeck.c (cp_build_unary_op): Only complain about taking address
1285 of main if pedantic.
1286
1287 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR inline-asm/39059
1290 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1291
1292 PR c++/39056
1293 * typeck2.c (digest_init_r): Don't call process_init_constructor
1294 for COMPLEX_TYPE.
1295
1296 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1297
1298 PR c++/36897
1299 * pt.c (convert_nontype_argument_function): Expect expr to be an
1300 ADDR_EXPR.
1301
1302 PR c++/37314
1303 * typeck.c (merge_types): Call resolve_typename_type if only
1304 one type is a typename.
1305
1306 2009-02-02 Jason Merrill <jason@redhat.com>
1307
1308 PR c++/39054
1309 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1310 in BIT_NOT_EXPR.
1311
1312 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1313
1314 PR c++/39053
1315 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1316 do not call cp_lexer_consume_token.
1317
1318 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1319
1320 PR c++/39028
1321 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1322 declarations.
1323
1324 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1325
1326 PR c++/33465
1327 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1328
1329 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1330
1331 PR c++/38655
1332 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1333
1334 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1335
1336 * typeck.c (invalid_nonstatic_memfn_p): Use
1337 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1338
1339 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1340
1341 PR c++/37554
1342 * call.c (build_over_call): If convert_for_arg_passing returns
1343 error_mark_node unconditionally return it.
1344
1345 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1346
1347 * class.c (check_field_decls): Also inherit packed for bitfields
1348 regardless of their type.
1349
1350 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1351
1352 PR c++/38930
1353 * decl2.c (grokfield): Reverting changes of PR c++/26693
1354 (save_template_attributes): Likewise.
1355 * decl.c (grokdeclarator): Likewise.
1356 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1357 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1358 (append_type_to_template_for_access_check): Likewise.
1359 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1360 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1361 (tsubst): Likewise.
1362 (resolve_type_name_type): Likewise.
1363 (append_type_to_template_for_access_check): Likewise.
1364
1365 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1366
1367 PR c++/26693
1368 * decl2.c (grokfield): when a typedef appears in a
1369 class, create the typedef variant type node for it.
1370 (save_template_attributes): Creating typedef variant type node
1371 here is now useless.
1372 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1373 anonymous, set the proper type name to all its type variants.
1374 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1375 set_underlying_type function to install typedef variant types.
1376 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1377 macro.
1378 (append_type_to_template_for_access_check): New entry points.
1379 * semantics.c (check_accessibility_of_qualified_id):
1380 When a typedef that is a member of a class appears in a template,
1381 add it to the template. It will be ...
1382 * pt.c (instantiate_class_template, instantiate_template ): ... access
1383 checked at template instantiation time.
1384 (tsubst): Handle the case of being called with NULL args.
1385 (resolve_type_name_type): The type name should be the name of the
1386 main type variant.
1387 (append_type_to_template_for_access_check): New entry point.
1388
1389 2009-01-19 Jason Merrill <jason@redhat.com>
1390
1391 PR c++/23287
1392 * parser.c (cp_parser_unqualified_id): In a template,
1393 accept ~identifier.
1394 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1395
1396 2009-01-16 Jason Merrill <jason@redhat.com>
1397
1398 PR c++/38877
1399 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1400 * init.c (build_new): Don't call describable_type unless we
1401 have an auto.
1402
1403 PR c++/29470
1404 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1405
1406 PR c++/38579
1407 * search.c (protected_accessible_p): N doesn't vary.
1408
1409 2009-01-15 Jason Merrill <jason@redhat.com>
1410
1411 PR c++/38850
1412 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1413 accept hidden friends.
1414
1415 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1416
1417 PR C++/29388
1418 * decl.c (grokdeclarator): Check for a non namespace/class context.
1419
1420 2009-01-15 Jason Merrill <jason@redhat.com>
1421
1422 PR c++/36334
1423 PR c++/37646
1424 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1425 a function isn't necessarily an lvalue. Take tree, not const_tree.
1426 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1427 * typeck.c (lvalue_or_else): Likewise.
1428 * cp-tree.h: Adjust prototypes.
1429
1430 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1431
1432 PR c++/38357
1433 * pt.c (tsubst): Check for NULL args.
1434
1435 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1436
1437 PR c++/38636
1438 * name-lookup.c (pushtag): Don't create members to types that are not
1439 being created.
1440
1441 2009-01-14 Nick Clifton <nickc@redhat.com>
1442
1443 PR c++/37862
1444 * parser.c: Pass cp_id_kind computed in
1445 cp_parser_postfix_dot_deref_expression to
1446 cp_parser_primary_expression.
1447
1448 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR c++/38795
1451 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1452 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1453 as CAST_EXPR.
1454
1455 2009-01-12 Jason Merrill <jason@redhat.com>
1456 Steve Ellcey <sje@cup.hp.com>
1457
1458 PR c++/35109
1459 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1460 binding.
1461
1462 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1463
1464 PR c++/36019
1465 * pt.c (parameter_of_template_p): New function.
1466 * cp-tree.h: Declare it.
1467 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1468 function.
1469 (outer_binding): Take template parameters in account when looking for
1470 a name binding.
1471
1472 2009-01-12 Jason Merrill <jason@redhat.com>
1473
1474 PR c++/31488
1475 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1476
1477 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c/32041
1480 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1481 offsetof member-designator, handle it as `[0].'.
1482
1483 PR c++/38794
1484 * decl.c (start_function): If grokdeclarator hasn't returned
1485 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1486
1487 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1488
1489 PR c++/36254
1490 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1491 (gimplify_if_stmt): ... this.
1492 (cp_gimplify_expr): Don't handle IF_STMT here.
1493 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1494
1495 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1496
1497 PR c++/38648
1498 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1499
1500 PR c++/36695
1501 * typeck2.c (build_functional_cast): Check for reference type and NULL
1502 PARMS.
1503
1504 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1505
1506 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1507
1508 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1509
1510 PR c++/35335
1511 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1512
1513 2009-01-09 John F. Carr <jfc@mit.edu>
1514
1515 PR c++/37877
1516 * parser.c (cp_parser_class_specifier): Clear
1517 parser->in_unbraced_linkage_specification_p while parsing class
1518 specifiers.
1519
1520 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c++/38725
1523 * semantics.c (finish_goto_stmt): Convert destination to
1524 void *.
1525
1526 2009-01-06 Jason Merrill <jason@redhat.com>
1527
1528 PR c++/35297
1529 PR c++/35477
1530 PR c++/35784
1531 PR c++/36846
1532 PR c++/38276
1533 * pt.c (check_default_tmpl_args): Don't complain about
1534 out-of-order parameter packs in the enclosing class
1535 or parameter packs after default args.
1536 (coerce_template_parms): If we have more than one
1537 parameter pack, don't flatten argument packs.
1538 (template_args_equal): Handle argument packs.
1539 (comp_template_args): Don't flatten argument packs.
1540 (check_instantiated_arg): Split out from...
1541 (check_instantiated_args): Here. Handle arg packs.
1542 (convert_template_argument): Just check that nontype argument
1543 packs have the right type.
1544
1545 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1546
1547 PR c++/38472
1548 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1549
1550 2009-01-05 Jason Merrill <jason@redhat.com>
1551
1552 PR c++/38698
1553 * typeck2.c (process_init_constructor_union): Handle union with
1554 no fields.
1555
1556 * mangle.c (write_expression): Remove mangling for zero-operand
1557 casts.
1558
1559 PR c++/38701
1560 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1561 defaulting.
1562
1563 PR c++/38702
1564 * class.c (defaultable_fn_p): Only operator== can be a copy
1565 assignment operator.
1566
1567 2009-01-02 Jason Merrill <jason@redhat.com>
1568
1569 PR c++/38698
1570 * typeck2.c (process_init_constructor_union): Handle excess
1571 initializers.
1572 (process_init_constructor_record): Likewise.
1573
1574 PR c++/38684
1575 * typeck2.c (digest_init_r): Don't use process_init_constructor
1576 for non-aggregate classes.
1577
1578 \f
1579 Copyright (C) 2009 Free Software Foundation, Inc.
1580
1581 Copying and distribution of this file, with or without modification,
1582 are permitted in any medium without royalty provided the copyright
1583 notice and this notice are preserved.