OSDN Git Service

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