optimize.c (build_delete_destructor_body): New function.
[gcc.git] / gcc / cp / ChangeLog
1 2009-09-13 Wei Guozhi <carrot@google.com>
2
3 PR c++/3187
4 * cp/optimize.c (build_delete_destructor_body): New function.
5 (maybe_clone_body): Call build_delete_destructor_body for
6 deleting destructor.
7
8 2009-09-10 Jason Merrill <jason@redhat.com>
9
10 * repo.c (extract_string, get_base_filename, init_repo): constify.
11
12 2009-09-09 Jason Merrill <jason@redhat.com>
13
14 * error.c (find_typenames_r): Also add decltypes.
15
16 2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
17
18 PR c++/28293
19 * decl2.c (grokfield): Check for explicit template argument lists.
20
21 2009-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
22
23 PR bootstrap/41180
24 * Make-lang.in: Remove redundant code from linkage for darwin10.
25
26 2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
27
28 PR c++/39923
29 * decl.c (build_init_list_var_init): Check return value of
30 perform_implicit_conversion.
31
32 2009-09-03 Jason Merrill <jason@redhat.com>
33
34 * class.c (currently_open_class): Make sure we're dealing with the
35 main variant.
36
37 * cp-tree.h (enum overload_flags): Remove OP_FLAG.
38 * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
39
40 * name-lookup.c (is_class_level): Remove.
41 (push_binding_level, leave_scope, resume_scope): Adjust.
42 (pushlevel_class): Adjust.
43 (poplevel_class): Make sure we're on class_binding_level.
44
45 * decl.c (grokmethod): Rename from start_method.
46 (finish_method): Remove.
47 * cp-tree.h: Adjust.
48 * parser.c (cp_parser_save_member_function_body): Adjust.
49
50 2009-09-03 Doug Kwan <dougkwan@google.com>
51
52 * tree.c (cp_fix_function_decl_p): New.
53 (cp_free_lang_data): New.
54
55 2009-09-03 Diego Novillo <dnovillo@google.com>
56
57 * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
58 * decl2.c: Include pointer-set.h.
59 (collect_candidates_for_java_method_aliases): New.
60 (cp_write_global_declarations): Call it.
61 Add local variable CANDIDATES. If set, call
62 build_java_method_aliases.
63 (build_java_method_aliases): Add argument CANDIDATES.
64 Use it to determine if FNDECL should get a hidden alias.
65 * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
66 * cp-tree.h (cp_free_lang_data): Declare.
67
68 2009-09-03 Richard Guenther <rguenther@suse.de>
69
70 * method.c (use_thunk): Use cgraph_finalize_function to hand
71 off thunks to the cgraph.
72 * semantics.c (emit_associated_thunks): Do not emit thunks
73 for really extern functions.
74
75 2009-09-03 Diego Novillo <dnovillo@google.com>
76
77 * cp-lang.c (lang_hooks): Remove const qualifier.
78
79 2009-09-02 Jason Merrill <jason@redhat.com>
80
81 * semantics.c (describable_type): Don't pretend to be in a template.
82
83 * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
84
85 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
86
87 * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
88 * cp-lang.c (cxx_dwarf_name): Pass it.
89 * error.c (count_non_default_template_args): Take flags as
90 argument. Adjust all callers. Skip counting of default
91 arguments if the new flag is given.
92
93 2009-09-01 Dodji Seketeli <dodji@redhat.com>
94
95 PR bootstrap/41205
96 * pt.c (make_ith_pack_parameter_name): Don't use strnlen that is a
97 GNU extension.
98
99 2009-09-01 Richard Guenther <rguenther@suse.de>
100
101 * cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
102 * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
103
104 2009-09-01 Richard Guenther <rguenther@suse.de>
105
106 * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
107
108 2009-08-31 Dodji Seketeli <dodji@redhat.com>
109
110 PR debug/30161
111 * cp-tree.h (get_template_info): Parameter should be const.
112 (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
113 (get_template_argument_pack_elems,
114 get_primary_template_innermost_parameters,
115 get_template_innermost_arguments, template_template_parameter_p):
116 Declare ...
117 * pt.c (get_template_argument_pack_elems,
118 get_template_innermost_parameters, get_template_innermost_arguments,
119 template_template_parameter_p):
120 ... New C++ front end implementation of new language hooks.
121 (primary_template_instantiation_p): New private helper.
122 (make_ith_pack_parameter_name): Use snprintf and strnlen instead of
123 printf and strlen.
124 (get_template_info): Const-ify parameter.
125 * cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
126 LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
127 LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
128 LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
129 interfaces for the C++ front-end.
130
131 2009-08-31 Jason Merrill <jason@redhat.com>
132
133 PR c++/41127
134 * parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
135 type-specifier-seq before we commit.
136
137 2009-08-28 Richard Guenther <rguenther@suse.de>
138
139 PR lto/41058
140 * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores
141 into the generic IL.
142
143 2009-08-27 Richard Guenther <rguenther@suse.de>
144
145 * class.c (build_vtbl_ref_1): Remove excess vertical space.
146 * Make-lang.in (CXX_TREE_H): Remove c-common.def dependency
147 tracked by $(TREE_H).
148 * semantics.c (expand_or_defer_fn): Zero DECL_SAVED_TREE.
149
150 2009-08-26 Jason Merrill <jason@redhat.com>
151
152 * call.c (build_builtin_candidate): Don't set LOOKUP_ONLYCONVERTING
153 if we're contextually converting to bool.
154 (build_conditional_expr): Likewise.
155 * typeck.c (condition_conversion): Likewise.
156
157 * call.c (build_conditional_expr): Fix logic errors.
158 (build_new_op): Remove dead COND_EXPR handling.
159
160 2009-08-24 Jason Merrill <jason@redhat.com>
161
162 * cp-tree.h (DECL_DEFERRED_FN): Remove.
163 (struct lang_decl_fn): Remove deferred flag.
164 * class.c (build_clone): Don't set it.
165 * decl2.c (note_vague_linkage_fn): Don't check or set it.
166 (mark_used): Don't check it.
167 * method.c (make_thunk, make_alias_for): Don't set it.
168
169 * decl2.c (mark_used): Streamline logic.
170
171 PR c++/41109
172 PR c++/41110
173 PR c++/41134
174 * cp-tree.h (DECL_ODR_USED): New macro.
175 (struct lang_decl_base): Add odr_used flag.
176 * decl.c (duplicate_decls): Propagate it. Use it for error.
177 * pt.c (register_specialization): Use it for error.
178 * decl2.c (mark_used): Use it as gating flag rather than TREE_USED.
179 (cp_write_global_declarations): Use it for error.
180 (tree_used_ok): Remove.
181 * cp-tree.h: Remove tree_used_ok.
182 * call.c (build_call_a): Don't call it.
183 * init.c (build_offset_ref): Likewise.
184
185 2009-08-21 Jakub Jelinek <jakub@redhat.com>
186
187 PR c++/41131
188 * tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
189 not TREE_STATIC.
190
191 2009-08-19 Jason Merrill <jason@redhat.com>
192
193 PR c++/41119
194 PR c++/41120
195 * decl2.c (mark_used): Increment function_depth during synthesis.
196 * parser.c (cp_parser_default_argument): Not here.
197
198 2009-08-19 Jakub Jelinek <jakub@redhat.com>
199
200 * method.c (use_thunk): Call free_after_compilation after
201 assemble_end_function.
202
203 2009-08-17 Richard Guenther <rguenther@suse.de>
204
205 * decl.c (build_ptrmemfunc_type): Keep variant chain intact.
206 Avoid useless copy.
207 (finish_enum): Keep variant chain intact.
208 * tree.c (cp_build_reference_type): Likewise.
209
210 2009-08-16 Jason Merrill <jason@redhat.com>
211
212 Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
213 and VAR_DECL, so mark_used only has effect the first time.
214 * decl2.c (mark_used): Just return if TREE_USED is already set.
215 Don't set TREE_USED if cp_unevaluated_operand is set.
216 (tree_used_ok): New fn.
217 * init.c (build_offset_ref): Check it instead of TREE_USED.
218 * call.c (build_call_a): Likewise.
219 * cp-tree.h: Declare it.
220 (DECL_NO_LINKAGE_CHECKED): No longer needed.
221 (struct lang_decl_base): Remove no_linkage_checked bitfield.
222
223 * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
224
225 * decl2.c (mark_used): It's ok to synthesize for default args now.
226
227 2009-08-10 Jason Merrill <jason@redhat.com>
228
229 Implement DR 757: It's OK for a decl to use a type without linkage
230 so long as the decl is defined in the current translation unit.
231 * decl2.c (no_linkage_decls): New vector.
232 (mark_used): Add decls that use types with no linkage.
233 (cp_write_global_declarations): Check that they are defined.
234 (decl_defined_p, no_linkage_error): New fns.
235 * cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
236 (struct lang_decl_base): Add flag.
237 * decl.c (grokfndecl): Don't check type linkage.
238 (grokvardecl): If the type has no linkage, just make sure
239 DECL_LANG_SPECIFIC is set.
240 * pt.c (check_instantiated_arg): Don't check type linkage.
241 * name-lookup.c (is_local_extern): New fn.
242 * name-lookup.h: Declare it.
243
244 2009-08-05 Jason Merrill <jason@redhat.com>
245
246 PR c++/40948
247 * init.c (build_vec_init): Evaluate the initializer before
248 starting the initialization try block.
249
250 2009-08-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
251
252 PR c++/36069
253 * typeck.c (convert_for_assignment): Do not warn for any boolean
254 variant. Use explicit location.
255
256 2009-08-04 Dodji Seketeli <dodji@redhat.com>
257
258 PR c++/39987
259 * pt.c (tsubst_default_argument): Let access checks of the
260 default argument happen in the context of the current function.
261
262 2009-08-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
263
264 PR c++/16696
265 * call.c (build_new_op): Only try prefix operator if -fpermissive,
266 otherwise just error.
267
268 2009-08-04 Dodji Seketeli <dodji@redhat.com>
269
270 PR debug/39706
271 * error.c (lang_decl_name): Print qualified names for decls
272 in namespace scope.
273
274 2009-08-03 Jason Merrill <jason@redhat.com>
275 Jakub Jelinek <jakub@redhat.com>
276
277 PR c++/40948
278 * init.c (build_vec_init): Look through a TARGET_EXPR around a
279 CONSTRUCTOR.
280
281 2009-07-31 Jason Merrill <jason@redhat.com>
282 Douglas Gregor <doug.gregor@gmail.com>
283
284 Remove implicit binding of lvalues to rvalue references (N2831)
285 * call.c (convert_class_to_reference): Binding an lvalue to an
286 rvalue reference is bad. If the user-defined conversion is bad,
287 set bad_p before merging conversions.
288 (maybe_handle_ref_bind): Don't push down bad_p.
289 (reference_binding): Binding an lvalue to an rvalue reference is bad.
290 (convert_like_real): Give a helpful error about binding lvalue
291 to rvalue reference.
292 (reference_related_p): No longer static.
293 * typeck.c (build_typed_address): New.
294 (build_static_cast_1): Add static_cast from lvalue to &&.
295 * cp-tree.h: Adjust.
296
297 2009-07-31 Jason Merrill <jason@redhat.com>
298
299 * call.c (reference_binding): Rename lvalue_p to is_lvalue.
300 Do direct binding of "rvalues" in memory to rvalue references.
301 * tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
302 "rvalue" in memory.
303 * typeck.c (build_static_cast_1): Do direct binding of memory
304 "rvalues" to rvalue references.
305 * cvt.c (cp_fold_convert): New.
306 * cp-tree.h: Declare it.
307
308 2009-07-31 Jason Merrill <jason@redhat.com>
309
310 * typeck.c (build_address): Do fold away ADDR_EXPR of INDIRECT_REF.
311 * tree.c (rvalue): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT.
312
313 2009-07-29 Jason Merrill <jason@redhat.com>
314
315 PR c++/14912
316 * cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
317 * error.c (count_non_default_template_args): Pass it.
318 * pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
319
320 2009-07-29 Richard Guenther <rguenther@suse.de>
321
322 PR c++/40834
323 * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
324 vars.
325
326 2009-07-26 Simon Martin <simartin@users.sourceforge.net>
327
328 PR c++/40749
329 * decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
330 with a qualified return type.
331
332 2009-07-24 Jason Merrill <jason@redhat.com>
333
334 Core issue 901
335 * call.c (build_op_delete_call): If this is for a new-expression
336 and the op delete is deleted, do nothing.
337
338 Core issue 702
339 * call.c (compare_ics): Give list-initialization of std::init_list
340 priority over conversion to scalar, too.
341
342 2009-07-22 Jason Merrill <jason@redhat.com>
343
344 * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
345 (needs_fake_anon): New.
346 (write_name): Check it.
347 (write_nested_name): Add a fake anonymous namespace scope if true.
348 * name-lookup.c (get_anonymous_namespace_name): No longer static.
349 * rtti.c, cp-tree.h: Adjust.
350
351 2009-07-22 Richard Guenther <rguenther@suse.de>
352
353 PR c++/40799
354 * cp-gimplify.c (cp_gimplify_expr): Move handling of using
355 related exprs to ...
356 (cp_genericize_r): ... genericization stage.
357 (cp_genericize): Adjust.
358
359 2009-07-21 Jason Merrill <jason@redhat.com>
360
361 Core issue 934
362 * call.c (reference_binding): Implement binding to { }.
363 (initialize_reference): Binding temporary to non-const && is fine.
364 * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
365
366 * decl.c (reshape_init_r): { T } is not an aggregate initializer
367 for class T.
368
369 2009-07-17 Richard Guenther <rguenther@suse.de>
370
371 PR c/40401
372 * decl.c (finish_function): Do not emit unused result warnings
373 from here.
374 * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
375 c_warn_unused_result_pass.
376 * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
377 * optimize.c (clone_body): Clone in GENERIC.
378 (maybe_clone_body): Do not clear DECL_SAVED_TREE.
379 * decl2.c (cp_write_global_declarations): Fix body test.
380 Do not call cgraph_optimize.
381 * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
382 * method.c (use_thunk): Register thunk with
383 cgraph_finalize_function.
384 * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
385
386 2009-07-17 Richard Guenther <rguenther@suse.de>
387
388 * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
389 temporary pointer.
390
391 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
392 Manuel López-Ibáñez <manu@gcc.gnu.org>
393
394 PR 40435
395 * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
396 tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
397 call.c, cvt.c, mangle.c: Add location argument to
398 fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
399 build_size_arg, build_fold_addr_expr, build_call_array,
400 non_lvalue, size_diffop, fold_build1_initializer,
401 fold_build2_initializer, fold_build3_initializer,
402 fold_build_call_array, fold_build_call_array_initializer,
403 fold_single_bit_test, omit_one_operand, omit_two_operands,
404 invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
405 fold_indirect_ref, combine_comparisons, fold_builtin_*,
406 fold_call_expr, build_range_check, maybe_fold_offset_to_address,
407 round_up, round_down.
408
409 2009-07-16 Jason Merrill <jason@redhat.com>
410
411 PR libstdc++/37907
412 Split POD into "standard-layout" and "trivial" as per N2230,
413 Support std::is_standard_layout and std::is_trivial traits.
414 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
415 CPTK_IS_TRIVIAL.
416 (struct lang_type_class): Add non_std_layout.
417 (CLASSTYPE_NON_STD_LAYOUT): New.
418 * class.c (check_bases): Set it.
419 (check_field_decls): Likewise.
420 (check_bases_and_members): Likewise.
421 * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
422 RID_IS_TRIVIAL.
423 (cp_parser_trait_expr): Likewise.
424 * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
425 CPTK_IS_TRIVIAL.
426 (finish_trait_expr): Likewise.
427 * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
428 (pod_type_p): Use them.
429 (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
430
431 Adjust bits of the language that no longer refer to POD types.
432 * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
433 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
434 (build_x_va_arg): Likewise.
435 (call_builtin_trap): Remove.
436 * decl.c (declare_local_label): Use type_has_nontrivial_default_init
437 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
438 (cp_finish_decl): Likewise.
439 (check_previous_goto_1, check_goto): Adjust error.
440 * typeck.c (build_class_member_access_expr): Check
441 CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
442
443 2009-07-14 Taras Glek <tglek@mozilla.com>
444 Rafael Espindola <espindola@google.com>
445
446 * Make-lang.in: Added CP_PLUGIN_HEADERS and
447 c.install-target to export cp-tree.h cxx-pretty-print.h
448 name-lookup.h headers for plugins.
449
450 2009-07-14 Jason Merrill <jason@redhat.com>
451
452 PR c++/37276
453 * decl.c (decls_match): A non-extern-C declaration doesn't match
454 a builtin extern-C declaration.
455
456 PR c++/40746
457 * name-lookup.c (qualified_lookup_using_namespace): Don't stop
458 looking in used namespaces just because we found something on
459 another branch.
460
461 PR c++/40740
462 * semantics.c (perform_koenig_lookup): Handle empty template args.
463
464 * call.c (build_over_call): Use can_trust_pointer_alignment.
465
466 2009-07-14 Dodji Seketeli <dodji@redhat.com>
467
468 PR debug/40705
469 PR c++/403057
470 * decl2.c (grokfield): Don't call set_underlying_type on typedef
471 decls that are type names.
472
473 2009-07-13 Andrew Pinski <andrew_pinski@playstation.sony.com>
474
475 PR C++/22154
476 * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
477 front of qualified names.
478
479 2009-07-12 Jason Merrill <jason@redhat.com>
480
481 PR c++/36628
482 * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
483
484 PR c++/37206
485 * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
486 * tree.c (lvalue_p_1): Return it. Remove
487 treat_class_rvalues_as_lvalues parm.
488 (real_lvalue_p): Disallow pseudo-lvalues here.
489 (lvalue_or_rvalue_with_address_p): New fn.
490 * call.c (initialize_reference): Use it instead of real_lvalue_p.
491
492 PR c++/40689
493 * init.c (build_new_1): Handle initializer list as array initializer.
494 (build_vec_init): Likewise.
495 * typeck.c (cp_build_modify_expr): Likewise.
496 * typeck2.c (process_init_constructor_array): Error rather than abort
497 if too many initializers.
498
499 2009-07-10 Jakub Jelinek <jakub@redhat.com>
500
501 PR c++/40502
502 * error.c (cp_print_error_function): Check for NULL block.
503
504 2008-07-09 Simon Martin <simartin@users.sourceforge.net>
505 Jason Merrill <jason@redhat.com>
506
507 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
508 append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
509
510 2009-07-09 Dodji Seketeli <dodji@redhat.com>
511
512 PR c++/40684
513 * pt.c (type_unification_real): Use tsubst_template_arg instead
514 of tsubst to substitute default template arguments.
515
516 2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
517
518 PR c++/31246
519 * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
520 code.
521 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
522
523
524 2009-07-07 Jason Merrill <jason@redhat.com>
525
526 PR c++/35828
527 * pt.c (tsubst_decl): Don't abort if we didn't change anything
528 in a TEMPLATE_DECL's args.
529
530 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
531
532 * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
533 EXPR_LOCATION.
534
535 2009-07-07 Jason Merrill <jason@redhat.com>
536
537 PR c++/37816
538 * decl.c (build_enumerator): Don't add enumerators for a
539 scoped enum to the enclosing class.
540
541 PR c++/40639
542 * decl.c (start_enum): Allow dependent underlying type.
543
544 PR c++/40633
545 * decl.c (finish_enum): Finish scope even in a template.
546
547 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
548
549 * init.c: Replace %J by an explicit location. Update all calls.
550 * decl.c: Likewise.
551 * typeck2.c: Likewise.
552 * pt.c: Likewise.
553 * name-lookup.c: Likewise.
554
555 2009-07-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
556
557 * decl.c: Replace %H by an explicit location. Update all calls.
558 * except.c: Likewise.
559 * semantics.c: Likewise.
560 * parser.c: Likewise.
561
562 2009-07-06 Simon Martin <simartin@users.sourceforge.net>
563
564 PR c++/40557
565 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
566 append_type_to_template_for_access_check_1): Use
567 RECORD_OR_UNION_CODE_P.
568
569 2009-07-04 Jason Merrill <jason@redhat.com>
570
571 * pt.c (retrieve_specialization): Don't get confused by a
572 using-declaration that brings in another instance of this template
573 from a base class.
574
575 * ptree.c (cxx_print_type): Fix logic.
576
577 * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
578
579 PR c++/40619
580 * cp-tree.h (struct lang_decl_parm): New.
581 (struct lang_decl): Add it.
582 (LANG_DECL_PARM_CHECK): New.
583 (DECL_PARM_INDEX): New.
584 * decl2.c (parm_index): Remove.
585 * lex.c (retrofit_lang_decl): Handle parms.
586 (cxx_dup_lang_specific_decl): Likewise.
587 * mangle.c (write_expression): Adjust.
588 * tree.c (cp_tree_equal): Adjust.
589 (decl_linkage): Only check DECL_COMDAT for functions and variables.
590 * parser.c (cp_parser_parameter_declaration_list): Set
591 DECL_PARM_INDEX.
592 * pt.c (iterative_hash_template_arg): Hash it.
593
594 2009-07-03 Jason Merrill <jason@redhat.com>
595
596 * cp-tree.h (struct lang_decl): Overhaul.
597 (struct lang_decl_flags): Remove.
598 (struct lang_decl_base): New.
599 (struct lang_decl_min): New.
600 (struct lang_decl_fn): New.
601 (struct lang_decl_ns): New.
602 (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
603 (LANG_DECL_MIN_CHECK): New.
604 (LANG_DECL_FN_CHECK): New.
605 (LANG_DECL_NS_CHECK): New.
606 (STRIP_TEMPLATE): New.
607 (NON_THUNK_FUNCTION_CHECK): Remove.
608 (DECL_DECLARES_FUNCTION_P): New.
609 (lots): Adjust.
610 * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
611 * decl.c (push_local_name, duplicate_decls): Adjust.
612 * decl2.c (start_objects): Don't set u2sel.
613 * semantics.c (finish_omp_threadprivate): Adjust.
614 * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
615 (decl_cloned_function_p): Out-of-line implementation of macros.
616 (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
617 * mangle.c (write_unqualified_name): Don't check function flags
618 on non-functions.
619 * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
620 * pt.c (build_template_decl): Don't set function flags.
621 (check_default_tmpl_args): Check that it's a function.
622 (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
623 cloned template.
624
625 * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
626 DECL_CLONED_FUNCTION.
627
628 * cp-tree.h (struct lang_type_class): Move sorted_fields here.
629 * class.c (finish_struct_1): Adjust.
630 * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
631 * search.c (lookup_field_1): Adjust.
632
633 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
634 * decl.c (finish_method): Don't add to it.
635 * class.c (fixup_pending_inline): Remove.
636 (fixup_inline_methods): Remove.
637 (finish_struct_1): Don't call it.
638
639 * error.c (dump_function_name): Handle null name.
640
641 2009-07-02 Mark Mitchell <mark@codesourcery.com>
642
643 * typeck.c (cp_build_binary_op): Move warnings about use of NULL
644 in arithmetic earlier and allow comparisions of NULL with
645 pointers-to-members.
646
647 2009-07-02 Jason Merrill <jason@redhat.com>
648
649 Use hash tables for template specialization lookup.
650 * pt.c (struct spec_entry): New type.
651 (decl_specializations, type_specializations): New hash tables.
652 (register_specialization, retrieve_specialization): Use them.
653 (reregister_specialization, lookup_template_class): Use them.
654 (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
655 (iterative_hash_template_arg): New.
656 (init_template_processing): New
657 (process_partial_specialization): Don't look to see if we already
658 have this partial specialization.
659 (maybe_process_partial_specialization): Handle reassigning
660 full specializations when we get an explicit specialization
661 of the partial instantiation.
662 (tsubst_friend_function): Adjust specialization reassignment code.
663 (instantiate_template): Only do one lookup.
664 (instantiate_decl): Don't do any lookup.
665 * cp-tree.h: Declare init_template_processing.
666 * decl.c (duplicate_decls): Pass args to reregister_specialization.
667
668 2009-07-01 Jason Merrill <jason@redhat.com>
669
670 * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
671
672 * pt.c (register_specialization): Use duplicate_decls to merge
673 the argument with a previous specialization.
674 (check_explicit_specialization): Call register_specialization to
675 merge the TEMPLATE_DECL with a previous version.
676 (determine_specialization): Return the args even if fn is a template.
677
678 2009-07-01 Ian Lance Taylor <iant@google.com>
679
680 * g++spec.c (lang_specific_driver): Bump num_args by 1.
681
682 2009-06-30 Jason Merrill <jason@redhat.com>
683
684 PR c++/40595
685 * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
686 EXPR_PACK_EXPANSION.
687
688 2009-06-29 Jason Merrill <jason@redhat.com>
689
690 PR c++/40274
691 * error.c (dump_template_parms): Pass all args to
692 count_non_default_template_args.
693 (count_non_default_template_args): Pull out the inner ones.
694
695 2009-06-26 H.J. Lu <hongjiu.lu@intel.com>
696
697 * decl.c (duplicate_decls): Re-indent.
698
699 2009-06-25 Ian Lance Taylor <iant@google.com>
700
701 * call.c (avoid_sign_compare_warnings): New static function.
702 (build_new_op): Call it.
703 * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
704 TREE_NO_WARNING is set on either operand.
705
706 2009-06-25 Ian Lance Taylor <iant@google.com>
707
708 * g++spec.c (SKIPOPT): define.
709 (lang_specific_driver): Handle -static-libstdc++. Only add
710 LIBSTDCXX_STATIC if we add LIBSTDCXX.
711
712 2009-06-25 Ian Lance Taylor <iant@google.com>
713
714 * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
715 the second nor third operand has side effects.
716
717 2009-06-25 Ian Lance Taylor <iant@google.com>
718
719 * parser.c (cp_parser_binary_expression): Increment
720 c_inhibit_evaluation_warnings while parsing the right hand side of
721 "true || x" or "false && x".
722 * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
723 if c_inhibit_evaluation_warnings is zero.
724
725 2009-06-24 Jason Merrill <jason@redhat.com>
726
727 * error.c (dump_decl): Do say "typedef" for the injected class name.
728
729 * pt.c (lookup_template_class): Use currently_open_class,
730 compare template args later.
731
732 PR c++/40342
733 * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
734 * class.c (resolve_address_of_overloaded_function): Fix typo.
735
736 2009-06-18 Aldy Hernandez <aldyh@redhat.com>
737
738 * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
739 * decl.c (finish_decl): Remove.
740 (declare_global_var): Replace finish_decl with cp_finish_decl.
741 (start_method): Same.
742 * rtti.c (emit_tinfo_decl): Same.
743 * pt.c (tsubst_expr): Same.
744 (instantiate_decl): Same.
745 * decl2.c (grokbitfield): Same.
746 * name-lookup.c (pushdecl_top_level_1): Same.
747 * cp-tree.h: Remove finish_decl.
748
749 2009-06-16 David Edelsohn <edelsohn@gnu.org>
750
751 * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
752 (lang_specific_driver): Always allocate extra argument.
753 Add LIBSTDCXX_STATIC to arglist if defined and linking
754 statically.
755
756 2009-06-16 Ian Lance Taylor <iant@google.com>
757
758 * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
759 (cp/semantics.o): Depend upon gt-cp-semantics.h.
760
761 2009-06-16 Ian Lance Taylor <iant@google.com>
762
763 * parser.c (cp_unevaluated_operand): Define global variable.
764 (cp_parser_question_colon_clause): Increment
765 c_inhibit_evaluation_warnings when evaluating an expression which
766 will never be executed.
767 (cp_parser_decltype): Increment cp_unevaluated_operand and
768 c_inhibit_evaluation_warnings, not skip_evaluation.
769 (cp_parser_sizeof_operand): Likewise.
770 (cp_parser_enclosed_template_argument_list): Save
771 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
772 skip_evaluation.
773 * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
774 Add unevaluated_operand and inhibit_evaluation_warnings fields.
775 (cp_unevaluated_operand): Declare.
776 * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
777 and c_inhibit_evaluation_warnings rather than skip_evaluation.
778 (pop_from_top_level): Restore cp_unevaluated_operand and
779 c_inhibit_evaluation_warnings rather than skip_evaluation.
780 * class.c (build_base_path): Check cp_unevaluated_operand rather
781 than skip_evaluation.
782 * typeck.c (build_class_member_access_expr): Likewise.
783 (cp_build_binary_op): Don't warn about bad shift counts if
784 c_inhibit_evaluation_warnings is non-zero.
785 * pt.c (coerce_template_parms): Save state of
786 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
787 skip_evaluation.
788 (tsubst_aggr_type): Likewise.
789 (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
790 skip_evaluation.
791 (tsubst_copy): Likewise.
792 (tsubst): Set cp_unevaluated_operand and
793 c_inhibit_evaluation_warnings, not skip_evaluation.
794 (tsubst_copy_and_build): Likewise.
795 * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
796 rather than skip_evaluation.
797 * decl2.c (mark_used): Likewise.
798 * semantics.c (finish_non_static_data_member): Likewise.
799 * cvt.c (cp_convert_and_check): Check
800 c_inhibit_evaluation_warnings rather than skip_evaluation.
801 * mangle.c (write_type): Set cp_unevaluated_operand rather than
802 skip_evaluation.
803
804 2009-06-15 Ian Lance Taylor <iant@google.com>
805
806 * parser.c (cp_parser_direct_declarator): Add braces around
807 variables declared before label.
808
809 2009-06-15 Rafael Avila de Espindola <espindola@google.com>
810
811 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
812 * cp-tree.h (cxx_comdat_group): Change signature.
813 * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
814 (cxx_comdat_group): Change signature.
815 * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
816 make_decl_one_only.
817 (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
818 * method.c (use_thunk): Update call to make_decl_one_only.
819 * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
820
821 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
822
823 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
824 (build_modify_expr): New arg.
825 * semantics.c (finish_unary_op_expr): Pass location to
826 overflow_warning.
827 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
828 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
829 c_sizeof_or_alignof_type.
830 (build_array_ref): New argument.
831 (build_compound_expr): Same.
832 (build_const_cast): Same.
833 (build_ptrmemfunc): Pass location to build_c_cast.
834 * init.c (avoid_placement_new_aliasing): Pass location to
835 build_stmt.
836 (build_vec_delete_1): Pass location to cp_build_modify_expr,
837 build_compound_expr.
838 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
839 * decl.c (poplevel): Pass location to c_build_bind_expr.
840 (finish_case_label): Pass location to build_case_label.
841 (finish_constructor_body): Same.
842 (finish_destructor_body): Pass location to build_stmt.
843 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
844 * call.c (build_new_op): Pass location to build_array_ref.
845 (build_x_va_arg): Pass location to build_va_arg.
846 * except.c (expand_end_catch_block): Pass location to
847 build_stmt.
848 * cp-tree.h (build_array_ref): New argument.
849 (build_compound_expr): Same.
850 (build_c_cast): Same.
851 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
852 (gimplify_switch_stmt): Same.
853 * typeck2.c (split_nonconstant_init_1): Same.
854 * pt.c (tsubst_copy): Same.
855 * semantics.c (add_decl_expr): Same.
856 (do_poplevel): Same.
857 (push_cleanup): Same.
858 (finish_goto_stmt): Same.
859 (finish_expr_stmt): Same.
860 (begin_if_stmt): Same.
861 (begin_while_stmt): Same.
862 (begin_do_stmt): Same.
863 (finish_return_stmt): Same.
864 (begin_for_stmt): Same.
865 (finish_break_stmt): Same.
866 (finish_continue_stmt): Same.
867 (begin_switch_stmt): Same.
868 (begin_try_block): Same.
869 (begin_handler): Same.
870 (finish_asm_stmt): Same.
871 (finish_label_stmt): Same.
872 (finish_stmt_expr_expr): Same.
873 (finalize_nrv_r): Same.
874 (finish_omp_atomic): Same.
875 * name-lookup.c (do_using_directive): Same.
876 * decl2.c (grok_array_decl): Same.
877 * parser.c (cp_parser_cast_expression): Same.
878 (cp_parser_selection_statement): Same.
879 (cp_parser_implicitly_scoped_statement): Same.
880 (cp_parser_objc_selector_expression): Same.
881 (cp_parser_objc_synchronized_statement): Same.
882 (cp_parser_objc_throw_statement): Same.
883 (cp_parser_omp_critical): Same.
884 (cp_parser_omp_master): Same.
885 * typeck.c (build_function_call): Add location argument.
886 * init.c: Add location argument to all build_decl calls.
887 * class.c: Same.
888 * method.c: Same.
889 * rtti.c: Same.
890 * tree.c: Same.
891 * pt.c: Same.
892 * semantics.c: Same.
893 * lex.c: Same.
894 * decl2.c: Same.
895 * cp-gimplify.c: Same.
896 * decl.c: Same.
897 (cp_make_fname_decl): Add location argument. Pass location ot
898 build_decl.
899 (finish_case_label): Same.
900 * cp-tree.h (finish_case_label): Add location argument.
901 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
902 finish_case_label.
903
904 2009-06-09 Jason Merrill <jason@redhat.com>
905
906 PR c++/40381
907 * decl2.c (mark_used): Return after complaining about deleted fn.
908
909 2009-06-08 Jason Merrill <jason@redhat.com>
910
911 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
912 late-specified return type.
913
914 2009-06-08 Jakub Jelinek <jakub@redhat.com>
915
916 PR c++/40373
917 * call.c (check_dtor_name): Return false even if
918 get_type_value (name) is error_mark_node.
919
920 PR c++/40370
921 PR c++/40372
922 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
923 on error_mark_node. Check for VLAs outside of function context
924 before check whether to wrap bounds into a NOP_EXPR with
925 TREE_SIDE_EFFECTS.
926
927 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
928
929 * repo.c (get_base_filename): Use aux_base_name rather than
930 alternate temporary file during second compare debug compilation.
931 (finish_repo): Skip during -fcompare-debug-second.
932
933 2009-06-06 Ian Lance Taylor <iant@google.com>
934
935 * parser.c (cp_parser_label_for_labeled_statement): Support
936 attribute on labels if immediately followed by semicolon.
937 * semantics.c (finish_label_stmt): Return new label.
938 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
939
940 2009-06-03 Ian Lance Taylor <iant@google.com>
941
942 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
943 $(SYSTEM_H).
944
945 2009-06-02 Mark Mitchell <mark@codesourcery.com>
946
947 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
948
949 2009-06-02 Jason Merrill <jason@redhat.com>
950
951 PR c++/40308
952 PR c++/40311
953 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
954 conversion code.
955 * call.c (implicit_conversion): Allow init-list conversion to scalar
956 during direct-initialization, too. Mark the conversion bad if it
957 has too many levels of braces.
958 (convert_like_real): And give a helpful error.
959
960 PR c++/40306
961 PR c++/40307
962 * decl.c (cp_finish_decl): Handle auto deduction from ().
963 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
964 with dependent type that is known to be a pointer.
965
966 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
967
968 PR c++/38089
969 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
970 specializations in an invalid namespace.
971
972 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
973
974 * error.c (print_instantiation_partial_context): Print column
975 numbers.
976
977 2009-05-29 Ian Lance Taylor <iant@google.com>
978
979 * error.c (cp_printer): Don't use va_arg with enum type.
980
981 2009-05-28 Dodji Seketeli <dodji@redhat.com>
982
983 PR c++/39754
984 * cp-tree.h (canonical_type_variant): Remove this function declaration.
985 (strip_typedefs): New function declaration.
986 * tree.c (strip_typedefs): New function definition.
987 (canonical_type_variant): Remove function definition.
988 * cvt.c (convert_from_reference): No need to use
989 canonical_type_variant.
990 * typeck.c (cp_build_indirect_ref): Likewise.
991 * error.c (dump_template_bindings): Use strip_typedefs instead of
992 canonical_type_variant.
993 * pt.c (convert_template_argument, unify): Likewise.
994 * mangle.c (canonicalize_for_substitution): Don't use
995 canonical_type_variant.
996
997 2009-05-27 Jason Merrill <jason@redhat.com>
998
999 * call.c (implicit_conversion): Handle conversion from
1000 initializer-list to scalar.
1001 (convert_like_real): Likewise. Avoid crashing on list
1002 initialization with bad conversions.
1003 (can_convert): Use LOOKUP_EXPLICIT.
1004 (can_convert_arg_bad): Add flags parm.
1005 * cp-tree.h: Adjust.
1006 * typeck.c (convert_for_assignment): Pass flags.
1007
1008 2009-05-27 Ian Lance Taylor <iant@google.com>
1009
1010 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
1011 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
1012
1013 2009-05-26 Ian Lance Taylor <iant@google.com>
1014
1015 * Make-lang.in (g++spec.o): Use $(COMPILER).
1016 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
1017 (cc1plus$(exeext)): Likewise.
1018
1019 2009-05-26 Dodji Seketeli <dodji@redhat.com>
1020
1021 PR c++/40007
1022 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
1023 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
1024 (get_types_needing_access_check): Declare new entry point.
1025 * pt.c (append_type_to_template_for_access_check_1,
1026 get_types_needing_access_check): New functions.
1027 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
1028 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
1029 get_types_needing_access_check, no more
1030 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
1031 (instantiate_class_template): Set input_location to the source
1032 location of the most specialized template definition.
1033 Perform access check using the RECORD_TYPE of the template, not its
1034 associated most generic TEMPLATE_DECL.
1035 (append_type_to_template_for_access_check): Augment function
1036 comments. Use the new get_types_needing_access_check, not
1037 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
1038 append_type_to_template_for_access_check_1 subroutine.
1039
1040 2009-05-22 Jason Merrill <jason@redhat.com>
1041
1042 PR c++/38064
1043 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
1044 arithmetic comparisons.
1045 (cp_common_type): Handle scoped enums.
1046
1047 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
1048 (add_builtin_candidate, add_builtin_candidates): Likewise.
1049 (convert_like_real): Likewise.
1050 * class.c (check_bitfield_decl): Likewise.
1051 * decl.c (check_static_variable_definition): Likewise.
1052 (compute_array_index_type): Likewise.
1053 * decl2.c (grokbitfield): Likewise.
1054 * init.c (build_new_1): Likewise.
1055 * pt.c (convert_nontype_argument): Likewise.
1056 (current_instantiation): Likewise.
1057 * tree.c (pod_type_p): Likewise.
1058 * typeck.c (build_static_cast_1): Likewise.
1059 (build_reinterpret_cast_1): Likewise.
1060
1061 2009-05-22 Richard Guenther <rguenther@suse.de>
1062
1063 PR middle-end/38964
1064 * init.c (avoid_placement_new_aliasing): Remove.
1065 (build_new_1): Do not call it.
1066
1067 2009-05-22 Mark Mitchell <mark@codesourcery.com>
1068
1069 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
1070 * semantics.c (expand_or_defer_fn): Similarly.
1071
1072 2009-05-20 Ian Lance Taylor <iant@google.com>
1073
1074 * parser.c (cp_parser_postfix_expression): Change args to a vec.
1075 Release it when done.
1076 (tree_vector): Define typedef. Define VEC functions.
1077 (cp_parser_parenthesized_expression_list): Change return type to
1078 vec. Change all callers.
1079 (cp_parser_new_expression): Change placement and initializer to
1080 vecs. Release them when done.
1081 (cp_parser_new_placement): Change return type to vec. Change all
1082 callers.
1083 (cp_parser_new_initializer): Likewise.
1084 * typeck.c (build_function_call_vec): Just call
1085 cp_build_function_call_vec.
1086 (cp_build_function_call): Just build a vec and call
1087 cp_build_function_call_vec.
1088 (cp_build_function_call_vec): New function based on old
1089 cp_build_function_call.
1090 (convert_arguments): Remove nargs and argarray parameters. Change
1091 values to a vec. Change caller.
1092 (build_x_compound_expr_from_vec): New function.
1093 (cp_build_modify_expr): Build vec to pass to
1094 build_special_member_call.
1095 * call.c (struct z_candidate): Add first_arg field. Change args
1096 field to vec.
1097 (convert_class_to_reference): Handle first argument separately.
1098 (add_candidate): Add first_arg parameter. Change args parameter
1099 to vec. Change all callers.
1100 (add_function_candidate, add_conv_candidate): Likewise.
1101 (add_template_candidate_real, add_template_candidate): Likewise.
1102 (add_template_conv_candidate): Likewise.
1103 (build_user_type_conversion_1): Handle first argument separately.
1104 (resolve_args): Change return type and parameter type to vecs.
1105 Change all callers.
1106 (perform_overload_resolution): Change args parameter to vec.
1107 Change all callers.
1108 (build_new_function_call, build_operator_new_call): Likewise.
1109 (add_candidates): Likewise.
1110 (build_op_call): New globally visible function, built from and
1111 replacing static function build_object_call.
1112 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
1113 of arguments.
1114 (build_op_delete_call): Build vec to pass to
1115 cp_build_function_call_vec.
1116 (build_temp): Build vec to pass to build_special_member_call.
1117 (convert_like_real): Likewise.
1118 (perform_direct_initialization_if_possible): Likewise.
1119 (build_over_call): Handle first_arg field. Use build_call_array
1120 rather than build_call_list.
1121 (build_special_member_call): Change args parameter to vec. Change
1122 all callers.
1123 (build_new_method_call): Likewise.
1124 * init.c (expand_default_init): Change parms to vec.
1125 (build_raw_new_expr): Change placement and init to vecs. Change
1126 all callers.
1127 (build_new_1, build_new): Likewise.
1128 * class.c (resolve_address_of_overloaded_function): Build array to
1129 pass to fn_type_unification.
1130 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
1131 build_new. For CALL_EXPR create a vec rather than a tree_list;
1132 expand a pack if necessary.
1133 (fn_type_unification): Change args parameter to const tree *. Add
1134 nargs parameter. Change all callers.
1135 (type_unification_real): Likewise.
1136 (unify): Build array to pass to type_unification_real.
1137 (get_bindings): Build array to pass to fn_type_unification.
1138 (any_type_dependent_arguments_p): Change args parameter to a vec.
1139 Change all callers.
1140 (make_args_non_dependent): Renamed from build_non_dependent_args.
1141 Change return type to void. Change parameter type to vec. Change
1142 all callers.
1143 (do_auto_deduction): Pass an array to type_unification_real.
1144 * semantics.c (perform_koenig_lookup): Change args to vec. Change
1145 all callers.
1146 (finish_call_expr): Change args to vec. Change all callers. Call
1147 build_op_call instead of passing CALL_EXPR to build_new_op.
1148 (cxx_omp_create_clause_info): Allocate vec to pass to
1149 build_special_member_call.
1150 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
1151 to vec. Change all callers.
1152 * name-lookup.c (lookup_function_nonclass): Likewise.
1153 (struct arg_lookup): Change args to vec.
1154 (arg_assoc_namespace): Handle args as a vec.
1155 (arg_assoc_args_vec): New static function.
1156 (lookup_arg_dependent): Change args parameter to vec. Change all
1157 callers.
1158 * method.c (do_build_assign_ref): Allocate vec to pass to
1159 build_special_member_call.
1160 * except.c (build_throw): Likewise.
1161 * typeck2.c (build_functional_cast): Likewise.
1162 * cvt.c (ocp_convert): Likewise.
1163 * tree.c (build_min_non_dep_call_vec): Change last parameter to
1164 vec. Change all callers.
1165 * cp-tree.h: Update declarations.
1166 * name-lookup.h: Update declarations.
1167
1168 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
1169
1170 * typeck.c (default_conversion): Check targetm.promoted_type.
1171 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
1172 (grokparms): Check targetm.invalid_parameter_type.
1173 * cvt.c (ocp_convert): Check targetm.convert_to_type.
1174 (build_expr_type_conversion): Check targetm.promoted_type.
1175
1176 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
1177
1178 * typeck.c (build_binary_op): Allow % on integal vectors.
1179
1180 2009-05-18 Jason Merrill <jason@redhat.com>
1181
1182 Implement explicit conversions ops as specified in N2437.
1183 * decl.c (grokdeclarator): Handle explicit conversion ops.
1184 (check_initializer): Pass flags to store_init_value.
1185 * decl2.c (maybe_emit_vtables): Likewise.
1186 * init.c (expand_aggr_init_1): Likewise.
1187 * call.c (convert_class_to_reference): Take flags parm,
1188 check DECL_NONCONVERTING_P.
1189 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
1190 (add_builtin_candidates): Simplify getting type of conversion.
1191 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
1192 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
1193 (reference_binding): Take flags parm. Direct-initialize copy parm.
1194 (add_function_candidate): Direct-initialize the copy parm.
1195 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
1196 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
1197 (conditional_conversion): Likewise.
1198 (convert_like_real): Only complain about DECL_NONCONVERTING_P
1199 constructors.
1200 (perform_implicit_conversion_flags): Add flags parm to
1201 perform_implicit_conversion. Improve diagnostics.
1202 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
1203 (LOOKUP_COPY_PARM): New bit macro.
1204 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
1205 * typeck.c (convert_for_assignment): Take flags parm, pass it to
1206 perform_implicit_conversion_flags.
1207 (cp_build_modify_expr): Pass flags to convert_for_assignment.
1208 (convert_for_initialization): Likewise.
1209 * typeck2.c (store_init_value): Take flags parm, pass to
1210 digest_init_flags.
1211 (digest_init_flags): Add flags parm to digest_init.
1212 (digest_init_r): Take flags parm, pass to convert_for_initialization.
1213 (process_init_constructor_array): Pass it.
1214 (process_init_constructor_record): Likewise.
1215 (process_init_constructor_union): Likewise.
1216
1217 2009-05-16 Jason Merrill <jason@redhat.com>
1218
1219 PR c++/40139
1220 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
1221 with a dependent type. Actually look up the destructor.
1222 * semantics.c (finish_id_expression): Fix logic.
1223 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
1224 a function.
1225 * typeck.c (build_x_unary_op): Diagnose taking the address of a
1226 constructor or destructor.
1227 * tree.c (get_first_fn): Handle OFFSET_REF.
1228
1229 2009-05-17 Joseph Myers <joseph@codesourcery.com>
1230
1231 * tree.c (cxx_printable_name_internal): Allow consecutive
1232 translated and untranslated cached copies of the name of the
1233 current function.
1234
1235 2009-05-15 Ian Lance Taylor <iant@google.com>
1236
1237 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
1238 cp_lvalue_kind. Change all uses.
1239 (enum base_access_flags): Rename from enum base_access. Change
1240 all uses.
1241 * parser.c (enum cp_parser_flags): Remove enum tag.
1242
1243 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1244
1245 PR 16302
1246 * call.c (build_new_op): Update calls to warn_logical_operator.
1247
1248 2009-05-14 Ian Lance Taylor <iant@google.com>
1249
1250 * class.c (layout_class_type): Change itk to unsigned int.
1251 * decl.c (finish_enum): Change itk to unsigned int.
1252 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
1253 casts.
1254
1255 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
1256
1257 * decl.c (duplicate_decls): Preserve parameter attributes.
1258
1259 2009-05-10 Jan Hubicka <jh@suse.cz>
1260
1261 * decl2.c (cxx_callgraph_analyze_expr): Use
1262 cgraph_mark_address_taken.
1263
1264 2009-05-10 Joseph Myers <joseph@codesourcery.com>
1265
1266 * call.c (name_as_c_string): Call type_as_string_translate.
1267 Translate identifiers to locale character set.
1268 * cp-tree.h (lang_decl_name): Update prototype.
1269 (type_as_string_translate, decl_as_string_translate,
1270 cxx_printable_name_translate): Declare.
1271 * cxx-pretty-print.c (M_): Define.
1272 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
1273 English fragments for conditional translation with M_.
1274 * decl.c (grokdeclarator): Translate identifiers to locale
1275 character set for diagnostics.
1276 * error.c (M_): Define.
1277 (dump_template_bindings, dump_type, dump_aggr_type,
1278 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
1279 dump_function_decl, dump_template_parms, dump_expr,
1280 dump_binary_op, op_to_string, assop_to_string): Mark English
1281 fragments for conditional translation with M_.
1282 (type_as_string): Disable translation of identifiers.
1283 (type_as_string_translate): New.
1284 (expr_as_string): Disable translation of identifiers.
1285 (decl_as_string): Disable translation of identifiers.
1286 (decl_as_string_translate): New.
1287 (lang_decl_name): Add parameter translate.
1288 (args_to_string): Call type_as_string_translate.
1289 (cp_print_error_function): Call cxx_printable_name_translate.
1290 (print_instantiation_full_context,
1291 print_instantiation_partial_context): Call
1292 decl_as_string_translate.
1293 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
1294 identifier in diagnostic.
1295 * tree.c (cxx_printable_name): Change to
1296 cxx_printable_name_internal. Add parameter translate.
1297 (cxx_printable_name, cxx_printable_name_translate): New wrappers
1298 round cxx_printable_name_internal.
1299
1300 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 PR c/36892
1303 * call.c (build_call_a): Updated warn_deprecated_use call.
1304 (build_over_call): Likewise.
1305 * decl.c (grokdeclarator): Likewise.
1306 (grokparms): Likewise.
1307 * semantics.c (finish_id_expression): Likewise.
1308 * typeck.c (build_class_member_access_expr): Likewise.
1309 (finish_class_member_access_expr): Likewise.
1310
1311 2009-05-06 Dodji Seketeli <dodji@redhat.com>
1312
1313 PR c++/17395
1314 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
1315 whole list of PARM_DECLs, just the current one.
1316
1317 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
1318
1319 * cp-tree.h:
1320 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
1321 mangle_compound_literal): Remove unused declarations.
1322 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
1323 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
1324 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
1325 check_for_out_of_scope_variable, print_other_binding_stack,
1326 maybe_push_decl, cxx_mark_addressable, force_target_expr,
1327 build_target_expr_with_type, finish_case_label,
1328 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
1329 check_template_keyword, cxx_omp_predetermined_sharing,
1330 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1331 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
1332 cxx_omp_privatize_by_reference): Rearrange the declarations line to
1333 match the comment that indicates the .c file which the functions are
1334 defined.
1335 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1336 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1337
1338 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
1339
1340 * typeck.c (cp_build_compound_expr): Require RHS to have a known
1341 type.
1342 * class.c (resolve_address_of_overloaded_function): Use
1343 OVL_CURRENT for error message.
1344 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1345 with them. Do not copy the node.
1346
1347 2009-05-05 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR c++/40013
1350 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1351 set it from its operand's type after tsubst_expr.
1352
1353 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1354
1355 PR c++/28152
1356 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
1357 canonical spelling for keywords.
1358 (cp_parser_attribute_list): Use the canonical spelling for
1359 keywords in attributes.
1360
1361 2009-05-01 Joseph Myers <joseph@codesourcery.com>
1362
1363 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1364 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1365 pp_cxx_new_expression, pp_cxx_delete_expression,
1366 pp_cxx_unary_expression, pp_cxx_assignment_operator,
1367 pp_cxx_assignment_expression, pp_cxx_expression,
1368 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1369 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1370 pp_cxx_exception_specification, pp_cxx_direct_declarator,
1371 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1372 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1373 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1374 pp_cxx_declaration, pp_cxx_typeid_expression,
1375 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1376 pp_cxx_trait_expression): Mostly use pp_string and
1377 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1378 for non-identifiers. Mark English strings for translation.
1379 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1380 * error.c (dump_template_parameter, dump_template_bindings,
1381 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1382 dump_decl, dump_template_decl, dump_function_decl,
1383 dump_parameters, dump_exception_spec, dump_template_parms,
1384 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1385 assop_to_string, args_to_string, cp_print_error_function,
1386 print_instantiation_full_context,
1387 print_instantiation_partial_context): Mostly use pp_string and
1388 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1389 for non-identifiers. Mark English strings for translation.
1390 (dump_global_iord): Mark strings for translation; use longer
1391 strings instead of substituting single words.
1392 (function_category): Return a format string marked for
1393 translation, not a single word or phrase to substitute in a longer
1394 phrase.
1395
1396 2009-04-28 Ben Elliston <bje@au.ibm.com>
1397
1398 PR c++/35652
1399 Revert:
1400
1401 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1402
1403 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1404
1405 2009-04-27 Ian Lance Taylor <iant@google.com>
1406
1407 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1408 omp_clause_code.
1409
1410 2009-04-27 Jakub Jelinek <jakub@redhat.com>
1411
1412 PR c++/39875
1413 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1414 -Wunused-value if implicit.
1415
1416 2009-04-24 Ian Lance Taylor <iant@google.com>
1417
1418 * call.c (build_temp): Change 0 to enum constant.
1419 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1420 type.
1421 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1422 * decl2.c (constrain_visibility): Likewise.
1423 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1424 (cp_parser_flags): Typedef to int rather than enum type.
1425 (cp_parser_expression_stack_entry): Change prec field to enum
1426 cp_parser_prec.
1427
1428 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1429 Change all callers.
1430
1431 2009-04-22 Dodji Seketeli <dodji@redhat.com>
1432
1433 PR c++/39639
1434 * parser.c (cp_parser_template_argument_list): Display an error
1435 when an ellipsis is not preceded by a parameter pack. Also, warn
1436 about variadic templates usage without -std=c++0x.
1437
1438 2009-04-21 Taras Glek <tglek@mozilla.com>
1439
1440 * cp-tree.h: Update GTY annotations to new syntax.
1441 * decl.c: Likewise.
1442 * mangle.c: Likewise.
1443 * name-lookup.c: Likewise.
1444 * name-lookup.h: Likewise.
1445 * parser.c: Likewise.
1446 * pt.c: Likewise.
1447 * rtti.c: Likewise.
1448 * semantics.c: Likewise.
1449 * typeck2.c: Likewise.
1450
1451 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1452
1453 PR c++/14875
1454 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1455
1456 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1457
1458 PR c++/35711
1459 * typeck.c (check_for_casting_away_constness): We diagnose casting
1460 away any qualifiers not just constness.
1461 (casts_away_constness): Mention that it handles more than just
1462 constness.
1463
1464 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1465
1466 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1467 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1468 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1469 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1470 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1471 cfns.gperf: Add copyright and license notices.
1472 * cfns.h: Regenerate.
1473 * ChangeLog, ChangeLog-2004: Correct dates.
1474
1475 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1476
1477 PR 16202
1478 * tree.c (lvalue_p_1): Use const_tree.
1479 Use CONST_CAST_TREE to avoid warning.
1480 (lvalue_p): Returns bool, receives const_tree.
1481
1482 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1483
1484 PR c++/13358
1485 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1486 * error.c (pedwarn_cxx98): New.
1487 * cp-tree.h (pedwarn_cxx98): Declare.
1488
1489 2009-04-20 Le-Chun Wu <lcwu@google.com>
1490
1491 PR c++/39803
1492 * init.c (build_vec_init): Set TREE_NO_WARNING on the
1493 compiler-generated INDIRECT_REF expression.
1494
1495 2009-04-20 Ian Lance Taylor <iant@google.com>
1496
1497 * typeck.c (build_function_call_vec): New function.
1498 (cp_build_function_call): Only pass first parameter to
1499 objc_rewrite_function_call.
1500 (build_modify_expr): Add rhs_origtype parameter. Change all
1501 callers.
1502 * decl.c (finish_decl): Add origtype parameter. Change all
1503 callers.
1504 * semantics.c (finish_call_expr): Pass VEC to
1505 resolve_overloaded_builtin.
1506
1507 2009-04-20 Ian Lance Taylor <iant@google.com>
1508
1509 * cp-tree.h (base_access): Change typedef to int.
1510 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
1511 (cp_parser_omp_threadprivate): Likewise.
1512 * pt.c (unify_pack_expansion): Add casts to enum type.
1513
1514 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1515
1516 PR c/32061
1517 PR c++/36954
1518 * call.c (build_new_op): Save the original codes of operands
1519 before folding.
1520
1521 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
1522
1523 * cp-tree.h: Remove the prototype for insert_block.
1524 * decl.c (insert_block): Remove.
1525
1526 2009-04-16 Ian Lance Taylor <iant@google.com>
1527
1528 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
1529 (tsubst_flags_t): Change typedef from enum type to int.
1530
1531 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
1532
1533 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
1534 instead of targetm.vector_opaque_p.
1535
1536 2009-04-15 Le-Chun Wu <lcwu@google.com>
1537
1538 PR c++/39551
1539 * call.c (build_over_call): Set TREE_NO_WARNING on the
1540 compiler-generated INDIRECT_REF expression.
1541 * cvt.c (convert_to_void): Emit warning when stripping off
1542 INDIRECT_REF.
1543
1544 2009-04-14 Diego Novillo <dnovillo@google.com>
1545
1546 * parser.c (cp_parser_type_specifier_seq): Move call to
1547 invoke_plugin_callbacks ...
1548 (cp_parser_type_specifier_seq): ... here.
1549
1550 2009-04-14 Le-Chun Wu <lcwu@google.com>
1551
1552 * Make-lang.in: Modify dependencies of files including plugin.h.
1553 * decl.c (finish_function): Call invoke_plugin_callbacks.
1554 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
1555
1556 2009-04-14 Jason Merrill <jason@redhat.com>
1557
1558 PR c++/39763
1559 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
1560 about shadowing by tentative parms.
1561
1562 2009-04-13 Jason Merrill <jason@redhat.com>
1563
1564 PR c++/39480
1565 * call.c (build_over_call): Don't call memcpy if the target is
1566 the same as the source.
1567
1568 2009-04-13 Jason Merrill <jason@redhat.com>
1569
1570 PR c++/39750
1571 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
1572
1573 2009-04-12 Jason Merrill <jason@redhat.com>
1574
1575 PR c++/39742
1576 * call.c (joust): Don't crash on variadic fn.
1577
1578 2009-04-10 Jason Merrill <jason@redhat.com>
1579
1580 PR c++/28301
1581 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
1582 if we see a close brace without an open brace.
1583
1584 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
1585
1586 * parser.c (cp_parser_class_specifier): Remove the unused
1587 has_trailing_semicolon.
1588
1589 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
1590
1591 PR c++/20118
1592 * parser.c (cp_parser_check_template_parameters): Take a
1593 cp_declarator parameter.
1594 (cp_parser_elaborated_type_specifier): Update to
1595 cp_parser_check_template_parameters.
1596 (cp_parser_class_head): Likewise.
1597 (cp_parser_check_declarator_template_parameters): Likewise.
1598 (cp_parser_check_template_parameters): Handle first the non-error
1599 conditions. Give more accurate diagnostics if a declarator is
1600 given.
1601
1602 2009-04-08 Jason Merrill <jason@redhat.com>
1603
1604 PR c++/25185
1605 * error.c (dump_aggr_type): Chase template typedefs if
1606 -fno-pretty-templates.
1607
1608 2009-04-08 Dodji Seketeli <dodji@redhat.com>
1609
1610 PR c++/39637
1611 * parser.c (cp_parser_enumerator_definition): Make sure the
1612 initializer of the enumerator doesn't contain any bare parameter pack.
1613
1614 2009-04-07 Jason Merrill <jason@redhat.com>
1615
1616 PR c++/34691
1617 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
1618 * call.c (joust): Complain about mismatched default arguments
1619 in extern "C" functions.
1620 * class.c (resolve_address_of_overloaded_function): Handle multiple
1621 extern "C" functions.
1622 * pt.c (resolve_overloaded_unification): Likewise.
1623
1624 2009-04-07 Jason Merrill <jason@redhat.com>
1625
1626 PR c++/25185
1627 * error.c (dump_function_decl): Don't pretty-print templates
1628 if -fno-pretty-templates.
1629 (count_non_default_template_args): Print all args if
1630 -fno-pretty-templates.
1631
1632 2009-04-06 Jason Merrill <jason@redhat.com>
1633
1634 PR c++/35146
1635 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
1636 the deduced template arguments give us the parameter types
1637 we're looking for.
1638
1639 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
1640 Jason Merrill <jason@redhat.com>
1641
1642 PR c++/14912
1643 * error.c (count_non_default_template_args): New fn.
1644 (dump_template_parms): Call it.
1645 (dump_template_argument_list): Call it. Add parms parm.
1646 (dump_template_argument): Adjust call to dump_template_argument_list.
1647 (dump_type, dump_decl): Likewise.
1648 (dump_template_bindings): Refactor logic.
1649
1650 2009-04-03 Jason Merrill <jason@redhat.com>
1651
1652 PR c++/25185
1653 * error.c (dump_template_bindings): Look through typedefs in
1654 typename results.
1655 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
1656 (find_typenames_r): Also collect typedefs.
1657 * pt.c (unify): Strip typedefs.
1658
1659 PR c++/39608
1660 * semantics.c (finish_id_expression): Don't assume a dependent
1661 member of the current instantiation isn't a valid integral
1662 constant expression. Check dependent_scope_p.
1663 * pt.c (dependent_scope_p): Check TYPE_P.
1664 (tsubst_copy): If args is null, just return.
1665
1666 2009-04-02 Jason Merrill <jason@redhat.com>
1667
1668 PR c++/25185
1669 * error.c (find_typenames, find_typenames_r): New fns.
1670 (dump_function_decl): Call find_typenames.
1671 (dump_template_bindings): Print typenames as well.
1672 * pt.c (tsubst): Non-static.
1673 * cp-tree.h: Declare it.
1674
1675 2009-04-02 Dodji Seketeli <dodji@redhat.com>
1676
1677 PR c++/26693
1678 * decl2.c (grokfield): when a typedef appears in a
1679 class, create the typedef variant type node for it.
1680 (save_template_attributes): Creating typedef variant type node
1681 here is now useless.
1682 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1683 anonymous, set the proper type name to all its type variants.
1684 (xref_basetypes) : Fixup the variant types after setting
1685 TYPE_BINFO on REF.
1686 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1687 set_underlying_type function to install typedef variant types.
1688 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1689 macro.
1690 (append_type_to_template_for_access_check): New entry points.
1691 * semantics.c (check_accessibility_of_qualified_id):
1692 When a typedef that is a member of a class appears in a template,
1693 add it to the template. It will be ...
1694 * class.c (finish_struct_bits): Split type variant fixup into ...
1695 (fixup_type_variants): A new entry point.
1696 * pt.c (instantiate_class_template, instantiate_template ): ... access
1697 checked at template instantiation time.
1698 (resolve_type_name_type): The type name should be the name of the
1699 main type variant.
1700 (retrieve_specialization): Specializations of template typedefs aren't
1701 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
1702 (append_type_to_template_for_access_check): New entry point.
1703 (tsubst_decl): For typedefs, build the variant type from the correct
1704 original type.
1705 (get_class_bindings): Fix function comment.
1706 (perform_typedefs_access_check): New entry point.
1707
1708 2009-03-31 Jason Merrill <jason@redhat.com>
1709
1710 PR c++/34691
1711 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
1712 extern "C" declarations.
1713
1714 C++ DR 613
1715 * semantics.c (finish_non_static_data_member): Allow such references
1716 without an associated object in sizeof/decltype/alignof.
1717
1718 * ptree.c (cxx_print_decl): Pretty-print full name of
1719 function/template.
1720 (cxx_print_type): Pretty-print full name of class.
1721
1722 * decl.c (grokdeclarator): Reject pointer to qualified function
1723 type.
1724
1725 PR c++/37806, core issue 547
1726 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
1727 to a typedef.
1728 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
1729 function type.
1730 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
1731 * decl.c (groktypename): Add is_template_arg parameter.
1732 (grokdeclarator): Allow function cv-quals on a template type arg.
1733 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
1734 is_template_arg argument in calls to groktypename.
1735 * cp-tree.h: Adjust prototype.
1736 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
1737 FUNCTION_TYPE printing.
1738
1739 * mangle.c (write_expression): Mangle dependent name as
1740 source-name.
1741
1742 PR c++/38030, 38850, 39070
1743 * pt.c (type_dependent_expression_p_push): New fn.
1744 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
1745 substitution makes the call non-dependent. Preserve koenig_p.
1746 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
1747 for non-dependent calls.
1748 * semantics.c (finish_call_expr): Revert earlier changes.
1749 * cp-tree.h: Revert change to finish_call_expr prototype.
1750
1751 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1752
1753 PR preprocessor/34695
1754 * cp-tree.h (cp_cpp_error): Remove.
1755 * error.c (cp_cpp_error): Remove.
1756 * parser.c (cp_lexer_new_main): Set done_lexing instead of
1757 client_diagnostic and error callback.
1758
1759 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
1760
1761 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1762 * cp/cp-objcp-common.c (cxx_staticp): Remove.
1763 * cp/cp-tree.h (cxx_staticp): Remove.
1764
1765 2009-03-28 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c++/39554
1768 * parser.c (cp_parser_postfix_expression): Don't call
1769 warning_if_disallowed_function_p.
1770
1771 2009-03-27 Jan Hubicka <jh@suse.cz>
1772
1773 * except.c (choose_personality_routine): Set terminate_node to abort
1774 for java exceptions.
1775
1776 2009-03-27 Dodji Seketeli <dodji@redhat.com>
1777 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR debug/37959
1780 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
1781 (cp_function_decl_explicit_p): New prototype.
1782 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
1783
1784 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
1785
1786 PR c++/38638
1787 * parser.c (cp_parser_elaborated_type_specifier): If we have a
1788 typename tag and don't have either a TYPE_DECL or a
1789 TEMPLATE_ID_EXPR, set the type to NULL.
1790
1791 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1792
1793 PR c++/37647
1794 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
1795 scope.
1796
1797 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1798
1799 PR c++/29727
1800 * decl.c (check_array_designated_initializer): Handle error_mark_node.
1801
1802 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1803
1804 PR c++/35652
1805 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1806
1807 2009-03-26 Andrew Haley <aph@redhat.com>
1808
1809 PR C++/39380
1810 * decl2.c (possibly_inlined_p): If java exceptions are in use
1811 don't inline a decl unless it is explicitly marked inline.
1812 * lex.c: (pragma_java_exceptions): New variable.
1813 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
1814 * cp-tree.h (pragma_java_exceptions): Declare new variable.
1815
1816 2009-03-24 Jason Merrill <jason@redhat.com>
1817
1818 PR c++/28274
1819 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1820
1821 2009-03-23 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c/39495
1824 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1825 code if iter is the second operand.
1826 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1827 argument. If it is set, don't build the toplevel expression with
1828 build_x_binary_op, but build2.
1829 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
1830 callers.
1831 (cp_parser_omp_for_cond): Don't assume the first operand of the
1832 comparison must be decl.
1833
1834 2009-03-23 Jason Merrill <jason@redhat.com>
1835
1836 PR c++/37729
1837 * pt.c (make_fnparm_pack): Split out from...
1838 (instantiate_decl): ...here.
1839 (tsubst_pack_expansion): Handle being called in a late-specified
1840 return type.
1841
1842 PR c++/39526
1843 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1844 a parm with a parm.
1845
1846 2009-03-20 Jason Merrill <jason@redhat.com>
1847
1848 PR c++/28879
1849 * parser.c (cp_parser_direct_declarator): In a template, wrap
1850 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1851 * pt.c (tsubst): Preserve it in a partial instantiation.
1852 (dependent_type_p_r): Don't check value_dependent_expression_p.
1853 * decl.c (compute_array_index_type): Don't check
1854 value_dependent_expression_p if TREE_SIDE_EFFECTS.
1855
1856 C++ core issue 703
1857 * typeck2.c (check_narrowing): Don't complain about loss of
1858 precision when converting a floating-point constant.
1859
1860 2009-03-19 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR c/39495
1863 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1864 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1865
1866 2009-03-18 Jakub Jelinek <jakub@redhat.com>
1867
1868 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1869 (eof_token): Adjust.
1870
1871 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
1872
1873 PR c++/39425
1874 * parser.c (cp_parser_explicit_specialization): Don't skip the
1875 rest of the specialization when begin_specialization returns
1876 false.
1877
1878 2009-03-17 Jason Merrill <jason@redhat.com>
1879
1880 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1881 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1882 * pt.c (check_explicit_specialization): Likewise.
1883 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1884 local specialization.
1885 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1886 * decl2.c (parm_index): New fn.
1887 * semantics.c (finish_decltype_type): Don't use describable_type.
1888 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
1889 Give a sorry for unsupported codes rather than crash. Mangle
1890 conversions with other than 1 operand. New mangling for PARM_DECL.
1891 * operators.def (ALIGNOF_EXPR): Mangle as "az".
1892
1893 2009-03-17 Jing Yu <jingyu@google.com>
1894
1895 PR middle-end/39378
1896 * method.c (use_thunk): Change is_thunk from crtl to cfun.
1897
1898 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1899
1900 PR c++/39475
1901 * semantics.c (check_trait_type): New.
1902 (finish_trait_expr): Use it.
1903
1904 2009-03-17 Jakub Jelinek <jakub@redhat.com>
1905
1906 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1907 instead of calling imported_module_or_decl debug hook if
1908 building_stmt_tree ().
1909 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1910 is a NAMESPACE_DECL.
1911
1912 PR debug/37890
1913 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1914 hook at function scope.
1915
1916 PR debug/39471
1917 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1918 on IMPORTED_DECL.
1919
1920 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR c++/39371
1923 * semantics.c (finish_switch_cond): Don't call get_unwidened.
1924 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1925 instead of TREE_TYPE (cond).
1926
1927 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1928
1929 PR c++/39060
1930 * parser.c (cp_parser_late_parsing_default_args): Continue
1931 the loop when cp_parser_assignment_expression returns
1932 error_mark_node.
1933
1934 2009-03-07 Jason Merrill <jason@redhat.com>
1935
1936 PR c++/39367
1937 * init.c (build_new_1): Don't use a VLA type.
1938 (build_vec_init): Handle getting a pointer for BASE.
1939
1940 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1941
1942 PR c++/37520
1943 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1944 when mangling symbols.
1945
1946 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1947
1948 PR c++/33492
1949 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1950
1951 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1952
1953 * decl.c (record_builtin_java_type): Use canonicalized integer
1954 types.
1955
1956 2009-03-04 Jason Merrill <jason@redhat.com>
1957
1958 PR c++/38908
1959 * class.c (is_really_empty_class): New fn.
1960 * cp-tree.h: Declare it.
1961 * cp-objcp-common.c (cp_expr_size): Use it.
1962
1963 PR c++/13549
1964 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1965 * parser.c (cp_parser_postfix_expression): Call it for
1966 TEMPLATE_ID_EXPR.
1967 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1968 (get_first_fn): Likewise.
1969
1970 PR c++/9634
1971 PR c++/29469
1972 PR c++/29607
1973 Implement DR 224.
1974 * decl.c (make_typename_type): Do look inside currently open classes.
1975 * parser.c (cp_parser_lookup_name): Likewise.
1976 (cp_parser_template_name): Likewise.
1977 * pt.c (dependent_scope_p): New function.
1978 * cp-tree.h: Declare it.
1979 * class.c (currently_open_class): Return fast if T isn't a class.
1980
1981 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1982
1983 PR c++/37789
1984 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1985 if cp_parser_mem_initializer_id returns error_mark_node.
1986
1987 2009-02-24 Richard Guenther <rguenther@suse.de>
1988
1989 PR c++/39242
1990 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1991 declared functions.
1992
1993 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1994
1995 PR c++/36411
1996 * pt.c (coerce_template_template_parms): Return 0 if parameter
1997 is error_mark_node.
1998
1999 2009-02-23 Jason Merrill <jason@redhat.com>
2000
2001 * pt.c (unify): Call maybe_adjust_types_for_deduction when
2002 deducing from an initializer list.
2003
2004 2009-02-20 Jason Merrill <jason@redhat.com>
2005
2006 PR c++/39225
2007 * decl.c (grokdeclarator): Handle ~identifier.
2008
2009 2009-02-19 Jakub Jelinek <jakub@redhat.com>
2010
2011 PR target/39175
2012 * decl2.c (determine_visibility): If visibility changed and
2013 DECL_RTL has been already set, call make_decl_rtl to update symbol
2014 flags.
2015
2016 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
2017
2018 PR c++/39188
2019 * cp-tree.h (maybe_commonize_var): New.
2020
2021 * decl.c (maybe_commonize_var): Make it extern.
2022
2023 * decl2.c (finish_anon_union): Call maybe_commonize_var.
2024
2025 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
2026
2027 PR c++/39219
2028 * parser.c (cp_parser_enum_specifier): Apply all attributes.
2029
2030 2009-02-18 Jason Merrill <jason@redhat.com>
2031
2032 * cfns.h: Tweak pathname for cfns.gperf.
2033
2034 2009-02-13 Jason Merrill <jason@redhat.com>
2035
2036 PR c++/39070
2037 * semantics.c (finish_call_expr): Change koenig_p parm to int.
2038 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
2039 * cp-tree.h: Adjust prototype.
2040 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
2041
2042 2009-02-12 Jason Merrill <jason@redhat.com>
2043
2044 PR c++/38950
2045 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
2046
2047 2009-02-11 Jason Merrill <jason@redhat.com>
2048
2049 PR c++/39153
2050 * decl2.c (cp_write_global_declarations):
2051 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
2052
2053 PR c++/30111
2054 * init.c (build_value_init_noctor): Split out from...
2055 (build_value_init): ...here.
2056 (expand_aggr_init_1): Handle value-initialization.
2057 * cp-tree.h: Add declaration.
2058 * class.c (type_has_user_provided_constructor):
2059 Handle non-class arguments.
2060
2061 2009-02-10 Jason Merrill <jason@redhat.com>
2062
2063 PR c++/38649
2064 * class.c (defaultable_fn_p): Handle ... properly.
2065
2066 PR c++/36744
2067 * tree.c (lvalue_p_1): Condition rvalue ref handling on
2068 treat_class_rvalues_as_lvalues, too.
2069
2070 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
2071
2072 PR c++/34397
2073 * typeck.c (build_x_array_ref): New.
2074 * cp-tree.h: Declare it.
2075 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
2076
2077 2009-02-09 Jason Merrill <jason@redhat.com>
2078
2079 PR c++/39109
2080 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
2081 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
2082 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
2083 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
2084 for build_value_init TARGET_EXPR.
2085 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
2086
2087 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
2088
2089 PR c++/35147
2090 PR c++/37737
2091 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
2092
2093 2009-02-04 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR c++/39095
2096 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
2097 remove ./dt operator.
2098 * mangle.c (write_expression): Handle COMPONENT_REF after handling
2099 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
2100 write_string ("dt") instead of using operators.def.
2101
2102 2009-02-03 Jason Merrill <jason@redhat.com>
2103
2104 * typeck.c (cp_build_unary_op): Only complain about taking address
2105 of main if pedantic.
2106
2107 2009-02-03 Jakub Jelinek <jakub@redhat.com>
2108
2109 PR inline-asm/39059
2110 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
2111
2112 PR c++/39056
2113 * typeck2.c (digest_init_r): Don't call process_init_constructor
2114 for COMPLEX_TYPE.
2115
2116 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
2117
2118 PR c++/36897
2119 * pt.c (convert_nontype_argument_function): Expect expr to be an
2120 ADDR_EXPR.
2121
2122 PR c++/37314
2123 * typeck.c (merge_types): Call resolve_typename_type if only
2124 one type is a typename.
2125
2126 2009-02-02 Jason Merrill <jason@redhat.com>
2127
2128 PR c++/39054
2129 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
2130 in BIT_NOT_EXPR.
2131
2132 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2133
2134 PR c++/39053
2135 * parser.c (cp_parser_pure_specifier): If there are no tokens left
2136 do not call cp_lexer_consume_token.
2137
2138 2009-01-30 Jakub Jelinek <jakub@redhat.com>
2139
2140 PR c++/39028
2141 * parser.c (cp_parser_already_scoped_statement): Handle __label__
2142 declarations.
2143
2144 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2145
2146 PR c++/33465
2147 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
2148
2149 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2150
2151 PR c++/38655
2152 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
2153
2154 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2155
2156 * typeck.c (invalid_nonstatic_memfn_p): Use
2157 DECL_NONSTATIC_MEMBER_FUNCTION_P.
2158
2159 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
2160
2161 PR c++/37554
2162 * call.c (build_over_call): If convert_for_arg_passing returns
2163 error_mark_node unconditionally return it.
2164
2165 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
2166
2167 * class.c (check_field_decls): Also inherit packed for bitfields
2168 regardless of their type.
2169
2170 2009-01-22 Dodji Seketeli <dodji@redhat.com>
2171
2172 PR c++/38930
2173 * decl2.c (grokfield): Reverting changes of PR c++/26693
2174 (save_template_attributes): Likewise.
2175 * decl.c (grokdeclarator): Likewise.
2176 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2177 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
2178 (append_type_to_template_for_access_check): Likewise.
2179 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2180 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
2181 (tsubst): Likewise.
2182 (resolve_type_name_type): Likewise.
2183 (append_type_to_template_for_access_check): Likewise.
2184
2185 2009-01-21 Dodji Seketeli <dodji@redhat.com>
2186
2187 PR c++/26693
2188 * decl2.c (grokfield): when a typedef appears in a
2189 class, create the typedef variant type node for it.
2190 (save_template_attributes): Creating typedef variant type node
2191 here is now useless.
2192 * decl.c (grokdeclarator): If the typedef'ed struct/class was
2193 anonymous, set the proper type name to all its type variants.
2194 * name-lookup.c (pushdecl_maybe_friend): Reuse the
2195 set_underlying_type function to install typedef variant types.
2196 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2197 macro.
2198 (append_type_to_template_for_access_check): New entry points.
2199 * semantics.c (check_accessibility_of_qualified_id):
2200 When a typedef that is a member of a class appears in a template,
2201 add it to the template. It will be ...
2202 * pt.c (instantiate_class_template, instantiate_template ): ... access
2203 checked at template instantiation time.
2204 (tsubst): Handle the case of being called with NULL args.
2205 (resolve_type_name_type): The type name should be the name of the
2206 main type variant.
2207 (append_type_to_template_for_access_check): New entry point.
2208
2209 2009-01-19 Jason Merrill <jason@redhat.com>
2210
2211 PR c++/23287
2212 * parser.c (cp_parser_unqualified_id): In a template,
2213 accept ~identifier.
2214 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
2215
2216 2009-01-16 Jason Merrill <jason@redhat.com>
2217
2218 PR c++/38877
2219 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
2220 * init.c (build_new): Don't call describable_type unless we
2221 have an auto.
2222
2223 PR c++/29470
2224 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
2225
2226 PR c++/38579
2227 * search.c (protected_accessible_p): N doesn't vary.
2228
2229 2009-01-15 Jason Merrill <jason@redhat.com>
2230
2231 PR c++/38850
2232 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
2233 accept hidden friends.
2234
2235 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2236
2237 PR C++/29388
2238 * decl.c (grokdeclarator): Check for a non namespace/class context.
2239
2240 2009-01-15 Jason Merrill <jason@redhat.com>
2241
2242 PR c++/36334
2243 PR c++/37646
2244 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
2245 a function isn't necessarily an lvalue. Take tree, not const_tree.
2246 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
2247 * typeck.c (lvalue_or_else): Likewise.
2248 * cp-tree.h: Adjust prototypes.
2249
2250 2009-01-15 Steve Ellcey <sje@cup.hp.com>
2251
2252 PR c++/38357
2253 * pt.c (tsubst): Check for NULL args.
2254
2255 2009-01-15 Dodji Seketeli <dodji@redhat.com>
2256
2257 PR c++/38636
2258 * name-lookup.c (pushtag): Don't create members to types that are not
2259 being created.
2260
2261 2009-01-14 Nick Clifton <nickc@redhat.com>
2262
2263 PR c++/37862
2264 * parser.c: Pass cp_id_kind computed in
2265 cp_parser_postfix_dot_deref_expression to
2266 cp_parser_primary_expression.
2267
2268 2009-01-13 Jakub Jelinek <jakub@redhat.com>
2269
2270 PR c++/38795
2271 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
2272 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
2273 as CAST_EXPR.
2274
2275 2009-01-12 Jason Merrill <jason@redhat.com>
2276 Steve Ellcey <sje@cup.hp.com>
2277
2278 PR c++/35109
2279 * name-lookup.c (lookup_name_real): Keep looking past a hidden
2280 binding.
2281
2282 2009-01-12 Dodji Seketeli <dodji@redhat.com>
2283
2284 PR c++/36019
2285 * pt.c (parameter_of_template_p): New function.
2286 * cp-tree.h: Declare it.
2287 * name-lookup.c (binding_to_template_parms_of_scope_p): New
2288 function.
2289 (outer_binding): Take template parameters in account when looking for
2290 a name binding.
2291
2292 2009-01-12 Jason Merrill <jason@redhat.com>
2293
2294 PR c++/31488
2295 * tree.c (pod_type_p): Return 1 for structs created by the back end.
2296
2297 2009-01-12 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR c/32041
2300 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
2301 offsetof member-designator, handle it as `[0].'.
2302
2303 PR c++/38794
2304 * decl.c (start_function): If grokdeclarator hasn't returned
2305 FUNCTION_DECL nor error_mark_node, issue diagnostics.
2306
2307 2009-01-11 Jakub Jelinek <jakub@redhat.com>
2308
2309 PR c++/36254
2310 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
2311 (gimplify_if_stmt): ... this.
2312 (cp_gimplify_expr): Don't handle IF_STMT here.
2313 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
2314
2315 2009-01-10 Andrew Pinski <pinskia@gmail.com>
2316
2317 PR c++/38648
2318 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
2319
2320 PR c++/36695
2321 * typeck2.c (build_functional_cast): Check for reference type and NULL
2322 PARMS.
2323
2324 2009-01-09 Steve Ellcey <sje@cup.hp.com>
2325
2326 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
2327
2328 2009-01-09 Jakub Jelinek <jakub@redhat.com>
2329
2330 PR c++/35335
2331 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2332
2333 2009-01-09 John F. Carr <jfc@mit.edu>
2334
2335 PR c++/37877
2336 * parser.c (cp_parser_class_specifier): Clear
2337 parser->in_unbraced_linkage_specification_p while parsing class
2338 specifiers.
2339
2340 2009-01-07 Jakub Jelinek <jakub@redhat.com>
2341
2342 PR c++/38725
2343 * semantics.c (finish_goto_stmt): Convert destination to
2344 void *.
2345
2346 2009-01-06 Jason Merrill <jason@redhat.com>
2347
2348 PR c++/35297
2349 PR c++/35477
2350 PR c++/35784
2351 PR c++/36846
2352 PR c++/38276
2353 * pt.c (check_default_tmpl_args): Don't complain about
2354 out-of-order parameter packs in the enclosing class
2355 or parameter packs after default args.
2356 (coerce_template_parms): If we have more than one
2357 parameter pack, don't flatten argument packs.
2358 (template_args_equal): Handle argument packs.
2359 (comp_template_args): Don't flatten argument packs.
2360 (check_instantiated_arg): Split out from...
2361 (check_instantiated_args): Here. Handle arg packs.
2362 (convert_template_argument): Just check that nontype argument
2363 packs have the right type.
2364
2365 2009-01-05 Dodji Seketeli <dodji@redhat.com>
2366
2367 PR c++/38472
2368 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2369
2370 2009-01-05 Jason Merrill <jason@redhat.com>
2371
2372 PR c++/38698
2373 * typeck2.c (process_init_constructor_union): Handle union with
2374 no fields.
2375
2376 * mangle.c (write_expression): Remove mangling for zero-operand
2377 casts.
2378
2379 PR c++/38701
2380 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2381 defaulting.
2382
2383 PR c++/38702
2384 * class.c (defaultable_fn_p): Only operator== can be a copy
2385 assignment operator.
2386
2387 2009-01-02 Jason Merrill <jason@redhat.com>
2388
2389 PR c++/38698
2390 * typeck2.c (process_init_constructor_union): Handle excess
2391 initializers.
2392 (process_init_constructor_record): Likewise.
2393
2394 PR c++/38684
2395 * typeck2.c (digest_init_r): Don't use process_init_constructor
2396 for non-aggregate classes.
2397
2398 \f
2399 Copyright (C) 2009 Free Software Foundation, Inc.
2400
2401 Copying and distribution of this file, with or without modification,
2402 are permitted in any medium without royalty provided the copyright
2403 notice and this notice are preserved.