Check in tree-dce enh to trunk
[official-gcc.git] / gcc / cp / ChangeLog
blob49f91bab0cf7feaa763dbaf9fe9b9d759a1c0fb7
1 2008-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
3         PR c++/35331
4         * semantics.c (begin_class_definition): Extend checks on the first
5         argument.
7 2008-05-12  Tomas Bily  <tbily@suse.cz>
9         * typeck2.c (digest_init): Use CONVERT_EXPR_P.
10         * call.c (build_over_call): Likewise.
11         * error.c (dump_expr): Use CASE_CONVERT.
12         * class.c (fixed_type_or_null): Likewise.
14 2008-05-11  Volker Reichelt  <v.reichelt@netcologne.de>
16         * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
17         in error message.
18         (cp_parser_omp_clause_schedule): Remove superfluous "expected"
19         in error message.
21 2008-05-07  Kenneth Zadeck  <zadeck@naturalbridge.com>
23         * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
24         DECL_LOOPING_CONST_OR_PURE_P attributes.
25         * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
26         DECL_PURE_P.
28 2008-05-02  Simon Baldwin  <simonb@google.com>
30         PR bootstrap/36108
31         * typeck.c (build_array_ref): Remove warn_array_subscript_range.
33 2008-05-01  Simon Baldwin  <simonb@google.com>
35         * typeck.c (build_array_ref): Call warn_array_subscript_range.
37 2008-04-30  Jakub Jelinek  <jakub@redhat.com>
39         PR c++/35986
40         * pt.c (more_specialized_fn): Stop the loop even if there are no
41         arguments before ellipsis.
43 2008-04-29  Jakub Jelinek  <jakub@redhat.com>
45         PR c++/35650
46         * parser.c (cp_parser_lookup_name): Look through single function
47         OVERLOAD.
49         PR c++/35987
50         * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
51         COMPOUND_EXPR if the second argument would be error_mark_node.
53 2008-04-28  Jason Merrill  <jason@redhat.com>
54             Liu Guanwei <liu_gw@163.com>
56         PR c++/57
57         * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
58         in default arguments.
60 2008-04-25  Jan Hubicka  <jh@suse.cz>
62         * typeck.c (check_return_expr): Update.
63         * decl.c (start_preparsed_function): Update.
64         * method.c (use_thunk): Update.
66 2008-04-24  Jakub Jelinek  <jakub@redhat.com>
68         PR c++/35758
69         * cp-tree.h (cp_reconstruct_complex_type): New prototype.
70         * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
71         * decl2.c (is_late_template_attribute): Only make vector_size
72         late tmpl attribute if argument is type or value dependent.
73         (cp_reconstruct_complex_type): New function.
75 2008-04-24  Richard Guenther  <rguenther@suse.de>
77         * typeck.c (cp_build_function_call): Call
78         check_builtin_function_arguments.
80 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
82         * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
83         (build_ptrmemfunc1): Don't set TREE_INVARIANT.
84         * init.c (build_zero_init): Don't set TREE_INVARIANT.
85         * class.c (build_base_path): Don't set TREE_INVARIANT.
86         (build_vtbl_ref_1): Don't set TREE_INVARIANT.
87         (build_vtbl_initializer): Don't set TREE_INVARIANT.
88         * decl.c (build_enumerator): Don't set TREE_INVARIANT.
89         * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
90         (generic_initializer): Don't set TREE_INVARIANT.
91         (ptr_initializer): Don't set TREE_INVARIANT.
92         (ptm_initializer): Don't set TREE_INVARIANT.
93         (class_initializer): Don't set TREE_INVARIANT.
94         * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
95         * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
96         (build_template_parm_index): Don't set TREE_INVARIANT.
97         (reduce_template_parm_level): Don't set TREE_INVARIANT.
98         (process_template_parm): Don't set TREE_INVARIANT.
100 2008-04-22  Jason Merrill  <jason@redhat.com>
102         PR c++/35316
103         * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
104         to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
105         * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
107 2008-04-22  Jakub Jelinek  <jakub@redhat.com>
109         PR c++/35747
110         * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
111         expression is errorneous.
113 2008-04-21  Jason Merrill  <jason@redhat.com>
115         PR c++/35325
116         * tree.c (cp_tree_equal): Handle FIXED_CST.
118         PR c++/35678
119         * pt.c (template_template_parm_bindings_ok_p): Set 
120         processing_template_decl while in this function.
122 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
124         * cvt.c (type_promotes_to): Support char16_t and char32_t.
125         * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
126         char16_t and char32_t.
127         * lex.c (reswords): Add char16_t and char32_t (for c++0x).
128         * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
129         extended builtin type "u8char{16,32}_t".
130         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
131         RID_CHAR{16,32}.
132         (cp_lexer_print_token): Support CPP_STRING{16,32}.
133         (cp_parser_is_string_literal): Idem.
134         (cp_parser_string_literal): Idem.
135         (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
136         CPP_STRING{16,32}.
137         (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
138         * tree.c (char_type_p): Support char16_t and char32_t as char types.
139         * typeck.c (string_conv_p): Support char16_t and char32_t.
141 2008-04-17  Jason Merrill  <jason@redhat.com>
143         PR c++/35773
144         * call.c (build_user_type_conversion_1): Represent second step of 
145         copy-init with an rvalue conversion.
146         (convert_like_real) [ck_user]: Don't implicitly add it here.
148 2008-04-15  Jakub Jelinek  <jakub@redhat.com>
150         PR c/35751
151         * decl.c (layout_var_decl): If extern or static var has variable
152         size, set TREE_TYPE (decl) to error_mark_node.
154 2008-04-16  Danny Smith  <dannysmith@users.sourceforge.net>
156        PR target/35921
157        * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
158        to clone.
160 2008-04-09  Jason Merrill  <jason@redhat.com>
162         PR c++/35708
163         * semantics.c (finish_compound_literal): Return a TARGET_EXPR, 
164         not a pushed variable.
166 2008-04-09  Volker Reichelt  <v.reichelt@netcologne.de>
168         * call.c (build_op_delete_call): Fix quotation in warning message.
169         * decl.c (grokdeclarator): Quote keyword in error message.
170         * pt.c (check_for_bare_parameter_packs): Fix quotation in error
171         message.
173         * parser.c (cp_parser_check_type_definition): Print error string
174         directly rather than using "%s".
175         (cp_parser_postfix_expression): Fix quotation.
176         (cp_parser_decltype): Likewise.
177         (cp_parser_sizeof_operand): Fix quotation. Simplify.
179         * parser.c (cp_parser_non_integral_constant_expression): Build error
180         message with CONCAT rather than using "%s".
181         (cp_parser_primary_expression): Fix quotation.
182         (cp_parser_postfix_expression): Likewise.
183         (cp_parser_postfix_dot_deref_expression): Likewise.
184         (cp_parser_unary_expression): Likewise.
185         (cp_parser_new_expression): Likewise.
186         (cp_parser_delete_expression): Likewise.
188         * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
189         as `)', not as `('.  Fix quotation.
190         (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
191         (cp_parser_primary_expression): Likewise.
192         (cp_parser_nested_name_specifier_opt): Likewise.
193         (cp_parser_postfix_expression): Likewise.
194         (cp_parser_postfix_open_square_expression): Likewise.
195         (cp_parser_parenthesized_expression_list): Likewise.
196         (cp_parser_pseudo_destructor_name): Likewise.
197         (cp_parser_new_expression): Likewise.
198         (cp_parser_direct_new_declarator): Likewise.
199         (cp_parser_delete_expression): Likewise.
200         (cp_parser_cast_expression): Likewise.
201         (cp_parser_question_colon_clause): Likewise.
202         (cp_parser_builtin_offsetof): Likewise.
203         (cp_parser_trait_expr): Likewise.
204         (cp_parser_label_for_labeled_statement): Likewise.
205         (cp_parser_compound_statement): Likewise.
206         (cp_parser_selection_statement): Likewise.
207         (cp_parser_condition): Likewise.
208         (cp_parser_iteration_statement): Likewise.
209         (cp_parser_already_scoped_statement): Likewise.
210         (cp_parser_simple_declaration): Likewise.
211         (cp_parser_linkage_specification): Likewise.
212         (cp_parser_static_assert): Likewise.
213         (cp_parser_decltype): Likewise.
214         (cp_parser_conversion_function_id): Likewise.
215         (cp_parser_operator_function_id): Likewise.
216         (cp_parser_operator): Likewise.
217         (cp_parser_type_parameter): Likewise.
218         (cp_parser_template_id): Likewise.
219         (cp_parser_explicit_instantiation): Likewise.
220         (cp_parser_explicit_specialization): Likewise.
221         (cp_parser_enum_specifier): Likewise.
222         (cp_parser_namespace_definition): Likewise.
223         (cp_parser_namespace_alias_definition): Likewise.
224         (cp_parser_using_declaration): Likewise.
225         (cp_parser_using_directive): Likewise.
226         (cp_parser_asm_definition): Likewise.
227         (cp_parser_direct_declarator): Likewise.
228         (cp_parser_ptr_operator): Likewise.
229         (cp_parser_parameter_declaration_clause): Likewise.
230         (cp_parser_initializer_clause): Likewise.
231         (cp_parser_class_specifier): Likewise.
232         (cp_parser_member_specification_opt): Likewise.
233         (cp_parser_member_declaration): Likewise.
234         (cp_parser_pure_specifier): Likewise.
235         (cp_parser_constant_initializer): Likewise.
236         (cp_parser_base_clause): Likewise.
237         (cp_parser_exception_specification_opt): Likewise.
238         (cp_parser_try_block): Likewise.
239         (cp_parser_function_try_block): Likewise.
240         (cp_parser_handler): Likewise.
241         (cp_parser_throw_expression): Likewise.
242         (cp_parser_asm_operand_list): Likewise.
243         (cp_parser_attributes_opt): Likewise.
244         (cp_parser_label_declaration): Likewise.
245         (cp_parser_constructor_declarator_p): Likewise.
246         (cp_parser_template_declaration_after_export): Likewise.
247         (cp_parser_single_declaration): Likewise.
248         (cp_parser_objc_message_expression): Likewise.
249         (cp_parser_objc_message_args): Likewise.
250         (cp_parser_objc_encode_expression): Likewise.
251         (cp_parser_objc_defs_expression): Likewise.
252         (cp_parser_objc_protocol_expression): Likewise.
253         (cp_parser_objc_selector_expression): Likewise.
254         (cp_parser_objc_protocol_refs_opt): Likewise.
255         (cp_parser_objc_typename): Likewise.
256         (cp_parser_objc_method_keyword_params): Likewise.
257         (cp_parser_objc_superclass_or_category): Likewise.
258         (cp_parser_objc_try_catch_finally_statement): Likewise.
259         (cp_parser_objc_synchronized_statement): Likewise.
260         (cp_parser_objc_throw_statement): Likewise.
261         (cp_parser_omp_var_list_no_open): Likewise.
262         (cp_parser_omp_clause_default): Likewise.
263         (cp_parser_omp_clause_if): Likewise.
264         (cp_parser_omp_clause_num_threads): Likewise.
265         (cp_parser_omp_clause_reduction): Likewise.
266         (cp_parser_omp_clause_schedule): Likewise.
267         (cp_parser_omp_critical): Likewise.
268         (cp_parser_omp_for_loop): Likewise.
269         (cp_parser_omp_sections_scope): Likewise.
271         * parser.c (cp_parser_template_parameter_list): Simplify.
273 2008-04-07  James E. Wilson  <wilson@tuliptree.org>
275         * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
277 2008-04-07  Jason Merrill  <jason@redhat.com>
279         PR c++/35734
280         * class.c (type_has_user_nondefault_constructor): A template 
281         counts as a nondefault constructor.
283 2008-04-04  Paolo Bonzini  <bonzini@gnu.org>
285         * decl.c (cxx_push_function_context): Delete.
286         (cxx_pop_function_context): Delete.
287         (start_preparsed_function): Merge cxx_push_function_context (!f->decl
288         code only).
289         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
290         LANG_HOOKS_FUNCTION_FINAL): Delete.
291         (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
292         LANG_HOOKS_MISSING_NORETURN_OK_P.
293         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
294         Delete prototype.
295         * semantics.c (current_stmt_tree): Fix comment.
297 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
299         PR c++/35741
300         * semantics.c (finish_offsetof): Undo effect of convert_from_reference
301         before calling fold_offsetof.
303 2008-04-03  Tom Tromey  <tromey@redhat.com>
305         * Make-lang.in (c++_OBJS): New variable.
307 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
308     
309         * optimize.c (clone_body): New, from tree-inline.c.
311 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
313         * method.c (synthesize_method): Use {push,pop}_function_context.
314         * name-lookup.c (push_to_top_level): Likewise.
315         * parser.c (cp_parser_late_parsing_for_member): Likewise.
317 2008-03-30  Volker Reichelt  <v.reichelt@netcologne.de>
319         PR c++/35578
320         * parser.c (cp_parser_decl_specifier_seq): Add location to error
321         message.
323 2008-03-27  Tom Tromey  <tromey@redhat.com>
325         * Make-lang.in: Revert automatic dependency patch.
327 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
329         PR obj-c++/35704
330         * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
331         (build_compound_expr): New, for compatibility with C
332         build_compound_expr.
333         (cp_build_compound_expr): Renamed from build_compound_expr.
334         (build_c_cast): New, for compatibility with C build_c_cast.
335         (cp_build_c_cast): Renamed from build_c_cast.
336         * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
337         * decl.c (cxx_maybe_build_cleanup): Ditto.
338         * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
339         (cp_build_compound_expr): Renamed from build_compound_expr.
340         (build_c_cast): Add C-compatible prototype.
341         (cp_build_c_cast): Renamed from build_c_cast.
342         * typeck2.c (build_functional_cast): Use cp_build_c_cast.
343         * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
345 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
347         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
348         tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
349         ending in a pack expansion, both of which can occur when
350         substituting into a nested template.
351         (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
352         instantiating the sizeof...(X) form, make tsubst_copy do the work.
353         * parser.c (cp_parser_template_parameter): Deal with unnamed
354         non-type template parameter packs identified by pack expansions in
355         the parameter type.
357 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
359         PR c++/35546
360         * pt.c (apply_late_template_attributes): Don't call tsubst on
361         first attribute argument if it is IDENTIFIER_NODE.
363         PR c++/35332
364         * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
365         and LTGT_EXPR to pp_expression.
367 2008-03-26  Douglas Gregor  <doug.gregor@gmail.com>
369        * pt.c (coerce_template_template_parm): Moved the body of the loop
370        of coerce_template_template_parms here, to make iteration over a
371        template argument pack simpler.
372        Also, allow matching of a template parameter pack in the template
373        template parameter to a template parameter in the template
374        template argument.
375        (coerce_template_template_parms): Deal with variadic template
376        template parameters. Use coerce_template_template_parm.
377        (unify): Make sure we coerce the template template argument's
378        template arguments to the template template parameter's template
379        parameters, not the other way around.
381 2008-03-25  Tom Tromey  <tromey@redhat.com>
383         * Make-lang.in: Remove .o targets.
384         (cp/g++spec.o): Moved to cp/.  Reduce to variable setting.
385         (GXX_OBJS): Update.
386         (c++_OBJS): New variable.
387         (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
389 2008-03-25  Douglas Gregor  <doug.gregor@gmail.com>
391        * typeck.c (composite_pointer_type_r): Add SFINAE support.
392        (composite_pointer_type): Ditto.
393        (common_type): Fix call to composite_pointer_type.
394        (cxx_sizeof_nowarn): New; used to be a macro.
395        (cxx_sizeof_expr): Add SFINAE support.
396        (cxx_alignof_expr): Ditto.
397        (decay_conversion): Fix calls for SFINAE support.
398        (rationalize_conditional_expr): Add SFINAE support.
399        (build_class_member_access_expr): Ditto.
400        (finish_class_member_access_expr): Ditto.
401        (build_x_indirect_ref): Ditto.
402        (build_indirect_ref): Original version renamed to
403        cp_build_indirect_ref; new version provides a bridge from
404        c-common.
405        (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
406        support.
407        (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
408        (build_function_call): Original version renamed to
409        cp_build_function_call; new version provides a bridge from
410        c-common.
411        (cp_build_function_call): Was build_function_call; added SFINAE
412        support.
413        (convert_arguments): Add SFINAE support.
414        (build_x_binary_op): Ditto.
415        (build_binary_op): Original version renamed to cp_build_binary_op;
416        new version provides a bridge from c-common.
417        (cp_build_binary_op): Was build_binary_op; added SFINAE support.
418        (pointer_diff): Fix calls for SFINAE.
419        (build_x_unary_op): Add SFINAE support.
420        (condition_conversion): Fix calls for SFINAE.
421        (build_unary_op): Original version renamed to cp_build_unary_op;
422        new version provides a bridge from c-common.
423        (cp_build_unary_op): Was build_unary_op; added SFINAE support.
424        (unary_complex_lvalue): Fix calls for SFINAE.
425        (build_x_conditional_expr): Add SFINAE support.
426        (build_x_compound_expr_from_list): Fix calls for SFINAE.
427        (build_x_compound_expr): Add SFINAE support.
428        (convert_ptrmem): Fix calls for SFINAE.
429        (build_static_cast_1): Add SFINAE support.
430        (build_static_cast): Ditto.
431        (build_reinterpret_cast_1): Ditto.
432        (build_reinterpret_cast): Ditto.
433        (build_const_cast_1): Ditto.
434        (build_const_cast): Ditto.
435        (build_c_cast): Ditto.
436        (build_modify_expr): Original version renamed to
437        cp_build_modify_expr; new version provides a bridge from c-common.
438        (cp_build_modify_expr): Was build_modify_expr; added SFINAE
439        support.
440        (build_x_modify_expr): Add SFINAE support.
441        (build_ptrmemfunc): Fix calls for SFINAE.
442        (convert_for_assignment): Add SFINAE support.
443        (convert_for_initialization): Ditto.
444        (check_return_expr): Fix calls for SFINAE.
445        (lvalue_or_else): Add SFINAE support.
446        * init.c (perform_member_init): Fix calls for SFINAE.
447        (emit_mem_initializers): Ditto.
448        (expand_virtual_init): Ditto.
449        (expand_cleanup_for_base): Ditto.
450        (build_aggr_init): Add SFINAE support.
451        (expand_default_init): Ditto.
452        (expand_aggr_init_1): Fix calls for SFINAE.
453        (build_offset_ref): Ditto.
454        (build_new_1): Add SFINAE support.
455        (build_new): Ditto.
456        (build_vec_delete_1): Fix calls for SFINAE.
457        (get_temp_regvar): Ditto.
458        (build_vec_init): Add SFINAE support.
459        (build_dtor_call): Fix calls for SFINAE.
460        (build_delete): Ditto.
461        (push_base_cleanups): Ditto.
462        (build_vec_delete_1): Ditto.
463        * class.c (build_base_path): Fix calls for SFINAE.
464        (build_simple_base_path): Ditto.
465        (convert_to_base_statically): Ditto.
466        (build_vfn_ref): Ditto.
467        (resolve_address_of_overloaded_function): Ditto.
468        * decl.c (check_initializer): Fix calls for SFINAE.
469        (register_dtor_fn): Ditto.
470        (compute_array_index_type): Ditto.
471        (finish_enum): Ditto.
472        (start_preparsed_function): Ditto.
473        (cxx_maybe_build_cleanup): Ditto.
474        * call.c (convert_like): Add COMPLAIN argument.
475        (convert_like_with_context): Ditto.
476        (build_this): Fix calls for SFINAE.
477        (build_user_type_conversion): Ditto.
478        (resolve_args): Ditto.
479        (build_new_function_call): Add SFINAE support.
480        (build_operator_new_call): Fix calls for SFINAE.
481        (build_object_call): Add SFINAE support.
482        (build_conditional_expr): Ditto.
483        (build_new_op): Ditto.
484        (build_op_delete_call): Fix calls for SFINAE.
485        (build_temp): Ditto.
486        (convert_like_real): Add SFINAE support.
487        (build_x_va_arg): Fix calls for SFINAE.
488        (convert_default_arg): Ditto.
489        (build_over_call): Add SFINAE support.
490        (build_java_interface_fn_ref): Fix calls for SFINAE.
491        (build_special_member_call): Add SFINAE support.
492        (build_new_method_call): Ditto.
493        (perform_implicit_conversion): Ditto.
494        (perform_direct_initialization_if_possible): Ditto.
495        (initialize_reference): Fix calls for SFINAE.
496        * method.c (do_build_assign_ref): Fix calls for SFINAE.
497        * rtti.c (build_headof): Fix calls for SFINAE.
498        (get_tinfo_decl_dynamic): Ditto.
499        (get_typeid): Ditto.
500        (build_dynamic_cast_1): Add SFINAE support.
501        (build_dynamic_cast): Ditto.
502        (tinfo_base_init): Fix calls for SFINAE.
503        * except.c (do_get_exception_ptr): Fix calls for SFINAE.
504        (do_end_catch): Ditto.
505        (initialize_handler_parm): Ditto.
506        (expand_start_catch_block): Ditto.
507        (do_allocate_exception): Ditto.
508        (do_free_exception): Ditto.
509        (build_throw): Ditto.
510        * cvt.c (build_up_reference): Fix calls for SFINAE.
511        (convert_to_reference): Ditto.
512        (ocp_convert): Ditto.
513        (convert_to_void): Add SFINAE support.
514        * tree.c (build_dummy_object): Fix calls for SFINAE.
515        (stabilize_expr): Ditto.
516        * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
517        parameter.
518        (build_new_method_call): Ditto.
519        (build_special_member_call): Ditto.
520        (build_new_op): Ditto.
521        (perform_implicit_conversion): Ditto.
522        (perform_direct_initialization_if_possible): Ditto.
523        (convert_to_void): Ditto.
524        (build_aggr_init): Ditto.
525        (build_new): Ditto.
526        (build_vec_init): Ditto.
527        (build_dynamic_cast): Ditto.
528        (finish_call_expr): Ditto
529        (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
530        (cxx_sizeof_nowarn): Remove macro; add function declaration.
531        (build_class_member_access_expr): Add tsubst_flags_t parameter.
532        (finish_class_member_access_expr): Ditto.
533        (build_x_indirect_ref): Ditto.
534        (cp_build_indirect_ref): New.
535        (cp_build_function_call): Add tsubst_flags_t parameter.
536        (build_x_unary_op): Ditto.
537        (cp_build_unary_op): New.
538        (build_x_conditional_expr): Add tsubst_flags_t parameter.
539        (build_x_compound_expr): Ditto.
540        (build_compound_expr): Ditto.
541        (build_static_cast): Ditto.
542        (build_reinterpret_cast): Ditto.
543        (build_const_cast): Ditto.
544        (build_c_cast): Ditto.
545        (build_x_modify_expr): Ditto.
546        (cp_build_modify_expr): New.
547        (convert_for_initialization): Add tsubst_flags_t parameter.
548        (cp_build_binary_op): Remove macro; add function declaration.
549        (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
550        (lvalue_or_else): Ditto.
551        (build_functional_cast): Ditto.
552        * typeck2.c (digest_init): Fix calls for SFINAE.
553        (process_init_constructor_array): Ditto.
554        (process_init_constructor_record): Ditto.
555        (build_x_arrow): Ditto.
556        (build_m_component_ref): Ditto.
557        (build_functional_cast): Add SFINAE support.
558        * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
559        * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
560        (finish_expr_stmt): Ditto.
561        (finish_for_expr): Ditto.
562        (finish_asm_stmt): Ditto.
563        (finish_non_static_data_member): Ditto.
564        (finish_qualified_id_expr): Ditto.
565        (finish_call_expr): Add SFINAE support.
566        (finish_increment_expr): Fix calls for SFINAE.
567        (finish_unary_op_expr): Ditto.
568        (simplify_aggr_init_expr): Ditto.
569        (finish_omp_clauses): Ditto.
570        (finish_omp_for): Ditto.
571        (finish_omp_barrier): Ditto.
572        (finish_omo_flush): Ditto.
573        * decl2.c (grok_array_decl): Fix calls or SFINAE.
574        (build_anon_union_vars): Ditto.
575        (get_guard_cond): Ditto.
576        (set_guard): Ditto.
577        (one_static_initialization_or_destruction): Ditto.
578        (do_static_initialization_or_destruction): Ditto.
579        (generate_ctor_or_dtor_function): Ditto.
580        (build_offset_ref_call_from_tree): Ditto.
581        * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
582        (cp_parser_postfix_dot_deref_expression): Ditto.
583        (cp_parser_unary_expression): Ditto.
584        (cp_parser_new_expression): Ditto.
585        (cp_parser_cast_expression): Ditto.
586        (cp_parser_binary_expression): Ditto.
587        (cp_parser_question_colon_clause): Ditto.
588        (cp_parser_assignment_expression): Ditto.
589        (cp_parser_expression): Ditto.
590        (cp_parser_builtin_offsetof): Ditto.
591        (cp_parser_template_argument): Ditto.
592        (cp_parser_functional_cast): Ditto.
594 2008-03-24  Tom Tromey  <tromey@redhat.com>
596         * lex.c (handle_pragma_interface): Don't copy the filename.
597         (handle_pragma_implementation): Copy filename using xstrdup.
599 2008-03-21  Paolo Carlini  <pcarlini@suse.de>
601         * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
602         (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
603         (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
604         (PROMOTES_TO_AGGR_TYPE): Remove.
605         (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
606         * typeck.c (unary_complex_lvalue, build_modify_expr,
607         convert_for_initialization): Adjust.
608         * init.c (is_aggr_type): Remove.
609         (is_class_type): Add.
610         (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
611         build_delete): Adjust.
612         * lex.c (make_aggr_type): Remove.
613         (make_class_type): Add.
614         (cxx_make_type): Adjust.
615         * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
616         Adjust.
617         * decl.c (build_typename_type, make_typename_type,
618         make_unbound_class_template, cxx_init_decl_processing,
619         check_tag_decl, groktypename, start_decl_1, layout_var_decl,
620         check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
621         grok_op_properties, xref_tag, check_function_type): Adjust.
622         * call.c (check_dtor_name, standard_conversion, implicit_conversion,
623         add_builtin_candidate, add_builtin_candidates,
624         build_user_type_conversion_1, convert_like_real, build_cxx_call,
625         is_subseq, compare_ics): Adjust.
626         * method.c (use_thunk): Adjust.
627         * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
628         create_tinfo_types): Adjust.
629         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
630         build_up_reference, convert_to_reference, convert_from_reference,
631         ocp_convert, build_expr_type_conversion): Adjust.
632         * tree.c (bind_template_template_parm, error_type): Adjust.
633         * dump.c (cp_dump_tree): Adjust.
634         * search.c (lookup_member): Adjust.
635         * friend.c (make_friend_class, do_friend): Adjust.
636         * typeck2.c (store_init_value, process_init_constructor_array,
637         process_init_constructor_record, build_x_arrow, build_m_component_ref,
638         build_functional_cast): Adjust.
639         * pt.c (finish_member_template_decl, process_template_parm,
640         lookup_template_class, tsubst_function_type, tsubst,
641         tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
642         Adjust.
643         * semantics.c (begin_class_definition, finish_base_specifier,
644         finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
645         Adjust.
646         * name-lookup.c (constructor_name_p, push_overloaded_decl,
647         do_class_using_decl, lookup_qualified_name,
648         maybe_process_template_type_declaration): Adjust.
649         * decl2.c (grok_array_decl, check_member_template,
650         constrain_class_visibility): Adjust.
651         * parser.c (cp_parser_class_name): Adjust.
653 2008-03-18  Paolo Bonzini  <bonzini@gnu.org>
655         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
656         
657 2008-03-17  Jason Merrill  <jason@redhat.com>
659         PR c++/35548
660         * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
661         a temp directly to a reference as per DR391.
663 2008-03-12  Richard Guenther  <rguenther@suse.de>
665         PR c++/35469
666         Revert:
667         2008-02-04  Richard Guenther  <rguenther@suse.de>
669         PR java/35035
670         * decl.c (record_builtin_java_type): Make jboolean a
671         integer type again where its mode doesn't match that of bool.
673         2008-01-25  Richard Guenther  <rguenther@suse.de>
675         PR c++/33887
676         * decl.c (record_builtin_java_type): Make __java_boolean
677         a variant of bool.
678         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
679         after TYPE_MAIN_VARIANT check.
681 2008-03-10  Jakub Jelinek  <jakub@redhat.com>
683         PR c++/35328
684         * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
685         if errorcount.
687         PR c++/35337
688         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
689         DECL_P in not a variable and appears more than once error messages.
691 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
693         Revert:
695         2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
697         PR c++/35049
698         PR c++/35096
699         * typeck.c (structural_comptypes): Call cp_comptypes.
700         (comptypes): New; called from the C/C++ common bits to perform
701         strict checks.
702         (cp_comptypes): Renamed from comptypes, which is already used,
703         with a different signature, by the C++ front end.
704         (build_reinterpret_cast_1): Call cp_comptypes.
705         (ptr_reasonably_similar): Ditto.
706         * decl.c (decls_match): Ditto.
707         * cvt.c (convert_to_reference): Ditto.
708         * cp-tree.h (same_type_p): Ditto.
709         (same_or_base_type_p): Ditto.
710         (comptypes): Rename to cp_comptypes.
711         * pt.c (canonical_type_parameter): Call cp_comptypes.
713 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
715         * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
716         test for equivalence between pointer and references.
718 2008-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
720         PR 24924
721         * class.c (finish_struct_anon): Use permerror instead of pedwarn.
722         (check_field_decls): Likewise.
723         (note_name_declared_in_class): Likewise.
724         * call.c (build_new_op): Likewise.
725         (convert_like_real): Likewise.
726         (build_over_call): Likewise.
727         * lex.c (unqualified_fn_lookup_error): Likewise.
728         * parser.c (cp_parser_template_id): Likewise.
729         * cvt.c (warn_ref_binding): Likewise.
730         (convert_to_reference): Likewise.
731         (ocp_convert): Likewise.
732         (convert_to_void): Use error instead of pedwarn.
733         * error.c (cp_cpp_error): Use pedantic_warning_kind.
734         * decl.c (compute_array_index_type): Use constant_expression_error.
735         
736 2008-03-01  Douglas Gregor  <doug.gregor@gmail.com>
738         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
739         that auto is either a storage class or a simple type specifier,
740         depending on the dialect.
741         (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
742         specifier in C++98 mode, error in C++0x mode (since we don't
743         support auto as a type specifier, yet).
744         (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
745         storage specifier in C++0x mode.
746         (cp_parser_simple_type_specifier): Parse `auto' as a
747         simple-type-specifier, but error because we don't support it yet.
749 2008-02-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
751         * parser.c (cp_parser_nonclass_name): New.
752         (cp_parser_pseudo_destructor_name): Use it instead of
753         cp_parser_type_name.
754         (cp_parser_type_name): Move code to cp_parser_nonclass_name.
756 2008-02-29  Tom Tromey  <tromey@redhat.com>
758         * parser.c (struct cp_token) <input_file_stack_index>: Remove.
759         (cp_lexer_get_preprocessor_token): Update.
760         (cp_lexer_set_source_position_from_token): Don't call
761         restore_input_file_stack.
762         * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
764 2008-02-28  Richard Guenther  <rguenther@suse.de>
766         Revert:
767         2008-02-26  Richard Guenther  <rguenther@suse.de>
769         * decl.c (duplicate_decls): Remove decl from global mapping
770         before ggc_freeing it.
772 2008-02-27  Jakub Jelinek  <jakub@redhat.com>
774         PR c++/35368
775         * rtti.c: Include c-pragma.h.
776         (push_abi_namespace, pop_abi_namespace): New functions.
777         (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
778         create_tinfo_types, emit_support_tinfos): Use them.
779         * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
781 2008-02-26  Jason Merrill  <jason@redhat.com>
783         PR c++/35315
784         * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
785         to name the struct for linkage purposes even if it has attributes.
786         (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
788 2008-02-26  Tom Tromey  <tromey@redhat.com>
790         * parser.c (eof_token): Remove old location code.
791         (check_empty_body): Remove test of USE_MAPPED_LOCATION.
792         * decl2.c (generate_ctor_or_dtor_function): Remove old location
793         code.
794         (cp_write_global_declarations): Likewise.
795         * lex.c (cxx_init): Remove old location code.
796         (handle_pragma_implementation): Remove test of
797         USE_MAPPED_LOCATION.
798         * pt.c (tsubst): Remove old location code.
799         * error.c (cp_print_error_function): Remove test of
800         USE_MAPPED_LOCATION.
801         * decl.c (pop_label): Remove old location code.
802         (finish_function): Likewise.
804 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
806         PR 26264
807         * call.c (magic_varargs_p):  Remove BUILT_IN_STDARG_START.
808         
809 2008-02-26  Richard Guenther  <rguenther@suse.de>
811         * decl.c (duplicate_decls): Remove decl from global mapping
812         before ggc_freeing it.
814 2008-02-26  Paolo Carlini  <pcarlini@suse.de>
816         PR c++/35323
817         * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
819 2008-02-26  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
820         
821         * typeck.c (build_class_member_access_expr): Add appropriate
822         OPT_W* parameter to warning.
823         (build_reinterpret_cast_1): Likewise.
824         * name-lookup.c (push_overloaded_decl): Likewise.
825         
826 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
828         PR c++/35333
829         * error.c (dump_expr): Handle CONJ_EXPR.
831 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
833         PR c++/35338
834         * error.c (dump_type): Handle FIXED_POINT_TYPE.
835         (dump_expr): Handle FIXED_CST.
837 2008-02-24  Jason Merrill  <jason@redhat.com>
839         * parser.c (cp_parser_declaration): Handle "inline namespace".
840         (cp_parser_namespace_definition): Likewise.
842         PR c++/33486
843         * name-lookup.c (arg_assoc_namespace): Look down into inline 
844         namespaces, too.
846 2008-02-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
848         * typeck.c (check_for_casting_away_constness): Use 1 single
849         argument, the type of cast, to decide what diagnostics generate.
850         (build_static_cast_1): Remove unused code. Update call to
851         check_for_casting_away_constness.
852         (build_reinterpret_cast_1): Update call to
853         check_for_casting_away_constness.
854         (build_const_cast_1): Likewise.
855         
856 2008-02-24  Paolo Carlini  <pcarlini@suse.de>
858         * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
859         VEC_NEW_EXPR), forward to pp_expression.
860         * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
862 2008-02-24  Danny Smith  <dannysmith@users.sourceforge.net>
864         PR c++/34749
865         * friend.c (do_friend): Call cplus_decl_attributes earlier.
867 2008-02-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
869         PR C++/34715
870         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
871         template decls' function decl.
873 2008-02-22  Paolo Carlini  <pcarlini@suse.de>
875         PR c++/35282
876         Revert:
877         2008-02-14  Paolo Carlini  <pcarlini@suse.de>
879         PR c++/28743
880         * pt.c (determine_specialization): In case of function templates,
881         when the type of DECL does not match FN there is no match.
883 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
885         PR c/19999
886         * typeck.c (build_binary_op): Warn about floating point
887         comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
889 2008-02-19  Jason Merrill  <jason@redhat.com>
891         PR c++/34950
892         * pt.c (resolve_overloaded_unification): Set processing_template_decl
893         while we look for possible bindings.
895 2008-02-19  Jakub Jelinek  <jakub@redhat.com>
897         PR c++/35028
898         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
900         PR c++/34964
901         PR c++/35244
902         * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
903         vars.  Afterwards ensure v is VAR_DECL.
905         PR c++/35078
906         * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
907         call cp_finish_decl.
908         * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
909         early.
911 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
913         PR c++/35023
914         PR c++/35024
915         PR c++/35026
916         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
917         is error_mark_node, return an error early.
918         (find_parameter_packs_r): Pass the pointer set along to recursive
919         calls of cp_walk_subtrees; don't try to manage the pointer set
920         ourselves.
921         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
922         (make_pack_expansion): Ditto.
923         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
924         a second pass through the tree with find_parameter_packs_r; that
925         second pass no longer does anything.
926         (push_template_decl_real): If we have an erroneous declaration,
927         set its type to error_mark_node before returning an error.
929 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
931         PR c++/34050
932         * pt.c (tsubst_initializer_list): Deal with the use of
933         VOID_TYPE_NODE to indicate value-initialization of the bases.
935 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
936             Jason Merrill  <jason@redhat.com>
938         PR c++/5645
939         PR c++/11159
940         * class.c (type_has_user_nondefault_constructor): New fn.
941         * cp-tree.h: Declare it.
942         * init.c (emit_mem_initializers): Use it for -W warning about
943         missing base initializer.
945 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
947         PR c++/28743
948         * pt.c (determine_specialization): In case of function templates,
949         when the type of DECL does not match FN there is no match.
951 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
952             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
954         PR c++/35138
955         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
956         are not identifier :: ~, return before calling cp_parser_type_name.
958 2008-02-13  Jason Merrill  <jason@redhat.com>
960         PR c++/34962, c++/34937, c++/34939
961         * decl2.c (is_late_template_attribute): Always defer attributes 
962         vector_size and weak.
964         PR c++/34774
965         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
966         of enumerators, too.
968 2008-02-12  Jason Merrill  <jason@redhat.com>
970         PR c++/34824
971         * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
972         if we're doing conversions to call a user-defined conversion function.
974 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
976         PR c++/29048
977         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
978         check here, too.
980 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
982         PR c++/34862
983         * init.c (build_new_1): Don't create placement_expr before
984         constructing alloc_call.  Verify that the pointer is passed by
985         value to operator new.
987 2008-02-11  Jason Merrill  <jason@redhat.com>
989         PR c++/35097
990         * pt.c (tsubst): Don't look up a template typedef in an explicit
991         specialization.
993 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
995        PR c++/35113
996        * tree.c (cp_build_qualified_type_real): When building a
997        cv-qualified array type, build it as a unique type with
998        build_cplus_array_type_1 and then adopt the unqualified type's
999        main variant.
1000         
1001 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
1003         PR c++/35077
1004         * decl.c (groktypename): Check grokdeclarator return.
1006 2008-02-10  Jason Merrill  <jason@redhat.com>
1008         PR c++/34094
1009         * decl2.c (cp_write_global_declarations): Don't write out static 
1010         data members with DECL_IN_AGGR_P set.
1012 2008-02-08  Jason Merrill  <jason@redhat.com>
1014         PR c++/35116
1015         * tree.c (build_target_expr_with_type): Handle void initializer.
1016         (bot_manip): Remap slot before recursing.
1018 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1020         PR other/35107
1021         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1023 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
1025         PR c++/35056
1026         * tree.c: Include tree-flow.h.
1027         (build_target_expr): Check type compatibility.
1028         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1029         * call.c (convert_like_real): Convert bitfield to expected type.
1031 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
1033         PR c++/35049
1034         PR c++/35096
1035         * typeck.c (structural_comptypes): Call cp_comptypes.
1036         (comptypes): New; called from the C/C++ common bits to perform
1037         strict checks.
1038         (cp_comptypes): Renamed from comptypes, which is already used,
1039         with a different signature, by the C++ front end.
1040         (build_reinterpret_cast_1): Call cp_comptypes.
1041         (ptr_reasonably_similar): Ditto.
1042         * decl.c (decls_match): Ditto.
1043         * cvt.c (convert_to_reference): Ditto.
1044         * cp-tree.h (same_type_p): Ditto.
1045         (same_or_base_type_p): Ditto.
1046         (comptypes): Rename to cp_comptypes.
1047         * pt.c (canonical_type_parameter): Call cp_comptypes.
1049 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
1051         PR c++/33553
1052         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1053         value dependent expression.
1055 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
1057         PR c++/35074
1058         * decl2.c (save_template_attributes): When we're modifying the
1059         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1060         all of the other variants to add those same attributes. Otherwise,
1061         the main variant will be inconsistent with those other variants.
1062         
1063 2008-02-04  Richard Guenther  <rguenther@suse.de>
1065         PR java/35035
1066         * decl.c (record_builtin_java_type): Make jboolean a
1067         integer type again where its mode doesn't match that of bool.
1069 2008-02-02  Jason Merrill  <jason@redhat.com>
1070             Mark Mitchell  <mark@codesourcery.com>
1072         PR c++/33916
1073         * init.c (build_value_init_1): New function.
1074         (build_value_init): New function.
1075         * typeck2.c (build_functional_cast): Call it.
1076         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1078         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from 
1079         TYPE_HAS_CONSTRUCTOR.
1080         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1081         add_implicitly_declared_members): Adjust.
1082         (check_field_decls): Adjust. Remove warnings about reference/const
1083         in class without constructor.
1084         (check_bases_and_members): Adjust.  Give those warnings here instead.
1085         * decl.c (fixup_anonymous_aggr): Adjust.
1086         (check_initializer): Adjust, clarify logic slightly.
1087         (grok_special_member_properties): Adjust, only set if user-provided.
1088         * rtti.c (create_tinfo_types): Don't set.
1089         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1090         Use same_type_ignoring_top_level_qualifiers_p.
1091         * pt.c (check_explicit_specialization): Adjust.
1092         (instantiate_class_template): Adjust.
1094 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
1095            Jakub Jelinek  <jakub@redhat.com>
1097        PR c++/34935
1098        PR c++/34936
1099        * typeck.c (structural_comptypes): Handle comparisons of
1100        VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1101        REAL_TYPE nodes.
1102        * mangle.c (write_builtin_type): Map down to the canonical type,
1103        which will be one of the predefined type nodes.
1105 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
1107         PR 35004
1108         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1109         bits to allow for expansion of the number of middle end tree
1110         codes.
1112 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
1114         PR c++/34055
1115         PR c++/34103
1116         PR c++/34219
1117         PR c++/34606
1118         PR c++/34753
1119         PR c++/34754
1120         PR c++/34755
1121         PR c++/34919
1122         PR c++/34961
1123         * typeck.c (check_return_expr): Tweak call to
1124         check_for_bare_parameter_packs.
1125         * class.c (add_method): Be careful with error_mark_nodes.
1126         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1127         signature.
1128         * pt.c (struct find_parameter_pack_data): Remove
1129         SET_PACKS_TO_ERROR.
1130         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1131         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1132         (make_pack_expansion): Ditto.
1133         (check_for_bare_parameter_packs): Parameter is now a tree, not a
1134         tree*.
1135         (process_template_parm): Tweak call to
1136         check_for_bare_parameter_packs.  
1137         (push_template_decl_real): Tweak calls to
1138         check_for_bare_parameter_packs. If bare parameter packs are found
1139         in the list of exceptions, clear out that list after giving an
1140         error.
1141         * semantics.c (finish_cond): Tweak call to
1142         check_for_bare_parameter_packs.
1143         (finish_expr_stmt): Ditto.
1144         (finish_for_expr): Ditto.
1145         (finish_switch_cond): Ditto.
1146         (finish_mem_initializers): Ditto.
1147         (finish_member_declaration): Ditto.
1148         (finish_static_assert): Check for bare parameter packs in the
1149         condition.
1150         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1151         attributes of a declaration.
1152         * parser.c (cp_parser_using_declaration): Tweak call to
1153         check_for_bare_parameter_packs.
1154         (cp_parser_base_clause): Ditto.
1156 2008-01-28  Jason Merrill  <jason@redhat.com>
1158         PR c++/35007
1159         * class.c (build_base_path): Fix !want_pointer case.
1161 2008-01-27  Jason Merrill  <jason@redhat.com>
1163         PR c++/27177
1164         * class.c (build_base_path): Fix previous change.
1166 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
1168         PR c++/34965
1169         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1170         and TRUTH_XOR_EXPR.
1172 2008-01-26  Richard Guenther  <rguenther@suse.de>
1174         PR c++/34235
1175         * typeck.c (build_binary_op): Remove code to shorten compares.
1177 2008-01-25  Richard Guenther  <rguenther@suse.de>
1179         PR c++/33887
1180         * decl.c (record_builtin_java_type): Make __java_boolean
1181         a variant of bool.
1182         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1183         after TYPE_MAIN_VARIANT check.
1185 2008-01-25  Jason Merrill  <jason@redhat.com>
1187         PR c++/27177
1188         * class.c (build_base_path): Don't mess with virtual access if
1189         skip_evaluation.
1190         * call.c (standard_conversion): Don't check whether source type
1191         is complete.
1193         * decl2.c (is_late_template_attribute): Don't defer attribute
1194         visibility just because the type is dependent.
1196 2008-01-25  Jason Merrill  <jason@redhat.com>
1197             Mark Mitchell  <mark@codesourcery.com>
1199         PR c++/31780
1200         * call.c (standard_conversion): Allow conversion from integer/real
1201         to complex.
1202         (compare_ics): Such a conversion is worse than a normal arithmetic
1203         conversion.
1204         
1205 2008-01-25  Richard Guenther  <rguenther@suse.de>
1207         PR c++/33887
1208         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1209         to true.
1211 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
1213         PR c++/34603
1214         * pt.c (push_template_decl_real): Return error_mark_node in case
1215         of template definition of non-template.
1217 2008-01-24  Jason Merrill  <jason@redhat.com>
1219         PR c++/34913
1220         * decl2.c (is_late_template_attribute): Defer any attribute with 
1221         dependent args.  Also defer type attributes if the type is dependent.
1223 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1224             Alexandre Oliva  <aoliva@redhat.com>
1226         PR c++/33984
1227         * call.c (reference_binding): For bitfields use the declared bitfield
1228         type.
1229         (add_builtin_candidates): Likewise.
1230         * class.c (layout_class_type): For bitfields copy over the
1231         original type quals.
1233 2008-01-22  Jason Merrill  <jason@redhat.com>
1235         PR c++/28560
1236         * decl.c (groktypename): Also ignore attributes on dependent 
1237         possibly-class types.
1239         PR c++/34912
1240         * friend.c (do_friend): Check for prior declaration of a friend 
1241         function of a local class.
1242         * name-lookup.c (lookup_name_innermost_nonclass_level): 
1243         No longer static.
1244         * name-lookup.h: Declare it.
1246 2008-01-22  Tom Tromey  <tromey@redhat.com>
1248         PR c++/34829:
1249         * init.c (build_new_1): Only disallow Java aggregates.
1251 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1253         PR c++/34607
1254         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1255         if decl or init is error_mark_node.
1257         PR c++/34918
1258         * error.c (dump_expr): Handle VECTOR_CST.
1260 2008-01-21  Jason Merrill  <jason@redhat.com>
1262         PR c++/33959
1263         * pt.c (tsubst_aggr_type): Make sure our context is complete.
1265         PR c++/34573
1266         * pt.c (retrieve_local_specialization): Robustify.
1267         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1269         PR c++/34846
1270         * pt.c (tsubst): Only call retrieve_local_specialization if the
1271         original typedef was in a function template.
1273         PR c++/34196
1274         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1276 2008-01-21  Richard Guenther  <rguenther@suse.de>
1278         PR c++/34850
1279         * error.c (cp_print_error_function): Deal with recursive
1280         BLOCK trees.
1282 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1284         PR c++/34891
1285         * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1287 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1289         PR c++/34776
1290         PR c++/34486
1291         * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1292         on non-IS_AGGR_TYPE scope.
1293         (constructor_name_p): Assert IS_AGGR_TYPE.
1295 2008-01-18  Ian Lance Taylor  <iant@google.com>
1297         PR c++/33407
1298         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1299         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1300         DECL_IS_OPERATOR_NEW flag.
1302 2008-01-16  Richard Guenther  <rguenther@suse.de>
1304         PR c++/33819
1305         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1306         for conversions to type variants.
1308 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
1310         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1311         declaration and code.  Update copyright year.
1313 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1315         PR c++/34399
1316         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1317         know we have a class type.
1319 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1321         PR c++/34751
1322         * pt.c (coerce_template_parameter_pack): When substituting into
1323         the type of a non-type template parameter pack. use the
1324         deduced/substituted arguments.
1325         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1326         can be a parameter pack with the ellipsis following it.  When we
1327         have an erroneous declaration, allow it to be a parameter pack.
1328         (cp_parser_template_parameter): Complain about default
1329         arguments on non-type template parameter packs, and parse them
1330         using the new cp_parser_default_argument.
1331         (cp_parser_parameter_declaration): Complain about parameter packs
1332         with default arguments. Move parsing of default arguments into a
1333         new function, cp_parser_default_argument.
1334         (cp_parser_default_argument): New; extracted from
1335         cp_parser_parameter_declaration.
1337 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1339         PR c++/34051
1340         PR c++/34055
1341         PR c++/34102
1342         PR c++/34103
1343         * typeck.c (check_return_expr): If there are bare parameter packs
1344         in the return value, set it to error_mark_node.
1345         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1346         * pt.c (find_parameter_packs_r): Look at the type of
1347         IDENTIFIER_NODEs (e.g., for user-defined conversions).
1348         (check_for_bare_parameter_packs): Flip the result: now returns
1349         TRUE when there were bare parameter packs, FALSE otherwise.
1350         (push_template_decl_real): Deal with flipped result of
1351         check_for_bare_parameter_packs.
1352         * semantics.c (finish_cond): If there are bare parameter packs in
1353         the conditional, set it to error_mark_node.
1354         (finish_expr_stmt): If there are bare parameter packs in the
1355         expression, set it to error_mark_node.
1356         (finish_for_expr): Ditto.
1357         (finish_switch_cond): If there are bare parameter packs in
1358         the conditional, set it to error_mark_node.
1359         (finish_mem_initializers): If there are bare parameter packs in
1360         the member initializer, set it to error_mark_node.
1361         (finish_member_declaration): Check the attributes of the
1362         declaration for bare parameter packs, and remove the attributes if
1363         any have bare parameter packs.
1364         * parser.c (cp_parser_using_declaration): Check the using
1365         declaration for bare parameter packs.
1366         (cp_parser_base_clause): If there are bare parameter packs in a
1367         base specifier, don't add it to the chain.
1369 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1371        PR c++/34314
1372        * error.c (dump_simple_decl): Display ellipsis for template
1373        non-type parameter packs.
1374        (dump_decl): Display ellipsis for template type parameter packs.
1375        (dump_template_decl): Display ellipsis for template template
1376        parameter packs.
1377        * pt.c (redeclare_class_template): When redeclaring a class
1378        template, check for collisions between template parameters and
1379        template parameter packs.
1381 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1383        PR c++/33964
1384        * pt.c (process_partial_specialization): Don't mark template
1385        parameters that occur in non-deduced contexts.
1386        (struct pair_fn_data): Add include_nondeduced_p.
1387        (for_each_template_parm_r): Only visit non-deduced contexts if
1388        include_nondeduced_p is set.
1389        (for_each_template_parm): Added parameter include_nondeduced_p,
1390        which states whether template parameters found in non-deduced
1391        contexts should be visited.
1392        (uses_template_parms): Visit all template parameters, even those
1393        in non-deduced contexts.
1395 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1397        PR c++/34052
1398        * pt.c (check_default_tmpl_args): Check for parameter packs that
1399        aren't at the end of a primary template.
1400        (push_template_decl_real): Remove check for parameter packs that
1401        aren't at the end of a primary template; that now happens in
1402        check_default_tmpl_args.
1403        * semantics.c (finish_template_template_parm): Use
1404        check_default_tmpl_args to check for errors in the template
1405        parameter list.
1406         
1407 2008-01-12  Doug Kwan  <dougkwan@google.com>
1409         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1410         instead of OPT_Wreturn_type in warning due to ignored return type
1411         qualifiers.
1412         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1413         instead of OPT_Wreturn_type in warning due to ignored return type
1414         qualifiers.
1416 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
1418         PR c++/33890
1419         * semantics.c (finish_omp_for): Don't call
1420         fold_build_cleanup_point_expr if processing_template_decl.
1422 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
1423             Jakub Jelinek  <jakub@redhat.com>
1425         PR c++/34611
1426         * error.c (dump_template_argument): Deal with TREE_LIST.
1428 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
1430        * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1431        long" in C++0x mode; change the warning to note that "long long"
1432        is only unsupported in C++98 mode.
1434 2007-12-20  Jason Merrill  <jason@redhat.com>
1436         PR c++/34111
1437         * call.c (standard_conversion): Derived-to-base is considered a
1438         standard conversion.
1440 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
1442         PR c++/34513
1443         * parser.c (cp_parser_omp_parallel): For non-combined parallel
1444         call cp_parser_statement rather than
1445         cp_parser_already_scoped_statement.
1447 2007-12-18  Jason Merrill  <jason@redhat.com>
1449         PR c++/34206
1450         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't 
1451         use template parms.
1452         (dependent_type_p_r): Handle the domain of an array.
1454 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
1455             Jakub Jelinek  <jakub@redhat.com>
1456         
1457         PR c++/32565
1458         PR c++/33943
1459         PR c++/33965
1460         * pt.c (template_template_parm_bindings_ok_p): New; verifies
1461         bindings of template template parameters after all template
1462         arguments have been deduced.
1463         (coerce_template_parms): Don't complain when COMPLAIN doesn't
1464         include tf_error.
1465         (fn_type_unification): Use template_template_parm_bindings_ok_p. 
1466         (unify): Deal with variadic, bound template template parameters. 
1467         (get_class_bindings): Use template_template_parm_bindings_ok_p. 
1469 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
1471         PR c++/34488
1472         * decl.c (grokdeclarator): Reject friend sfk_constructor
1473         FUNCTION_TYPE.
1475 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
1477         PR c/34506
1478         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1479         in between clauses.
1481 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1483         PR debug/7081
1484         * cp-lang.c (cp_classify_record): New.
1485         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1487 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
1489         PR c++/34238
1490         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1492         PR c++/34364
1493         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1494         dynamic_cast in a template.
1496 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
1498         PR c++/34059
1499         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1500         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1502 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
1504         PR c++/34395
1505         * error.c (dump_type_prefix, dump_type_suffix): Handle
1506         TYPE_PACK_EXPANSION.
1508         PR c++/34394
1509         * error.c (dump_expr): Handle ABS_EXPR.
1511 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
1513         PR c++/34178
1514         PR c++/34340
1515         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1516         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1517         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1518         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1519         flag_use_repository and repo_emit_p returned 2.
1521 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
1523         PR c++/34336
1524         * tree.c (stabilize_call, stabilize_init): Do nothing if
1525         processing_template_decl.
1527 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
1529         PR c++/34271
1530         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1531         error instead of assertion failure.
1532         * parser.c (cp_parser_decltype): If closing paren is not found,
1533         return error_mark_node.
1535 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1537        PR c++/34101
1538        * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1539        packs.
1540        (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1541        since arg_assoc_template_arg will deal with them (better).
1543 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1545        PR c++/33509
1546        * pt.c (tsubst_exception_specification): Handle substitutions into
1547        member templates, where tsubst_pack_expansion returns a
1548        TYPE_PACK_EXPANSION.
1550 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1552        PR c++/33091
1553        * pt.c (unify_pack_expansion): If we didn't deduce any actual
1554        bindings for the template parameter pack, don't try to keep the
1555        empty deduced arguments.
1556        (unify): If a parameter is a template-id whose template argument
1557        list contains a pack expansion that is not at the end, then we
1558        cannot unify against that template-id.
1560 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1562         PR c++/34061
1563         * pt.c (current_template_args): Use error_operand_p.
1565 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1567         PR c++/34273
1568         * error.c (dump_decl): Handle TREE_BINFO.
1570 2007-12-01  Ollie Wild  <aaw@google.com>
1572         PR c++/8171
1573         * typeck.c (build_binary_op): Add conversion of pointers to function
1574         members appearing as operands to the equality operators.
1576 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
1578         PR c++/34275
1579         * error.c (dump_expr): Handle OBJ_TYPE_REF.
1581 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
1583         PR c++/34270
1584         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1585         in templates.
1586         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1587         Likewise.
1589         PR c++/34267
1590         PR c++/34268
1591         * parser.c (cp_parser_decltype): Don't call finish_id_expression
1592         on ~type.
1593         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1594         and ~type early.
1596 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
1598         PR tree-optimization/34181
1599         * method.c (use_thunk): Don't inline the call in the thunk.
1601         PR c++/34213
1602         * tree.c (decl_linkage): Static data members and static member
1603         functions in anonymous ns classes are lk_external.
1605 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1607         PR c++/34081
1608         * decl.c (start_preparsed_function): Pass 
1609         processing_template_decl for the new allocate_struct_function
1610         parameter.
1612 2007-11-25  Richard Guenther  <rguenther@suse.de>
1614         * decl.c (poplevel): Use BLOCK_CHAIN.
1616 2007-11-24  Ollie Wild  <aaw@google.com>
1618         * typeck.c (delta_from_ptrmemfunc): New function.
1619         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1620         (build_binary_op): Call delta_from_ptrmemfunc.
1622 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
1624         PR c++/30293
1625         PR c++/30294
1626         * decl.c (cp_finish_decl): Disallow variable or field
1627         definitions if extern "Java" aggregates.
1628         (grokparms): Disallow parameters with extern "Java"
1629         aggregates.
1630         (check_function_type): Disallow function return values
1631         with extern "Java" aggregates.
1632         * init.c (build_new_1): Disallow placement new with
1633         extern "Java" aggregates.
1635 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
1636             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1637         
1638         PR c++/5310
1639         * call.c (convert_like_real): Build a zero constant when __null is
1640         converted to an integer type.
1641         
1642 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
1644         PR c++/34094
1645         * decl2.c (cp_write_global_declarations): Issue error about static
1646         data members in anonymous namespace which are declared and used,
1647         but not defined.
1649 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1651         PR c++/34089
1652         * parser.c (cp_parser_class_head): Reject function template ids.
1654         PR c++/28879
1655         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1656         when processing_template_decl to build_array_type.
1658         PR c++/33962
1659         * pt.c (more_specialized_fn): Don't segfault if one or
1660         both argument list end with ellipsis.
1662 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
1664         PR c++/30988
1665         * semantics.c (finish_call_expr): Set
1666         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1667         or OVERLOAD with all noreturn functions.
1669 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
1671         PR c++/34100
1672         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1673         error_mark_node.
1675 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
1677         PR c++/34054
1678         PR c++/34056
1679         PR c++/34057
1680         PR c++/34058
1681         PR c++/34060
1682         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1683         set to error_mark_node the outermost POINTER_TYPE to the pack if
1684         it is seen in a POINTER_TYPE.
1685         (push_template_decl_real): If check_for_bare_parameter_packs
1686         fails for function return type, set the return type to
1687         integer_type_node.  If check_for_bare_parameter_packs failed
1688         for non-function, return error_mark_node.
1690         PR c++/29225
1691         * call.c (build_new_op): Call resolve_args before calling
1692         build_over_call.
1694 2007-11-11  Tom Tromey  <tromey@redhat.com>
1696         PR c++/17577:
1697         * lex.c (handle_pragma_implementation): Use cpp_included_before.
1699 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1701         PR c++/8570
1702         * pt.c (redeclare_class_template): Update error message. Use a
1703         note to show the previous declaration.
1704         (tsubst_friend_class): Use the location of the friend template as
1705         the input location before calling redeclare_class_template.
1707 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
1709         PR c++/34068
1710         * semantics.c (finish_pseudo_destructor_expr): Handle
1711         object == error_mark_node.
1713 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
1715         PR c++/32241
1716         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1717         is not scalar type, let finish_class_member_access_expr handle
1718         diagnostics.  Pass BIT_NOT_EXPR argument to
1719         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
1721 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
1723         PR c++/33510
1724         * decl.c (cp_complete_array_type): If any of the initializer
1725         elements are pack expansions, don't compute the array size yet.
1727 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
1729         PR c++/30297:
1730         * tree.c (decl_linkage): Fields have no linkage.
1732 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
1734         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1736 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
1738         PR c++/33045
1739         PR c++/33837
1740         PR c++/33838
1741         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1742         Be careful with ERROR_MARK_NODEs.
1743         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1744         argument.
1746 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
1748         PR c++/33501
1749         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1750         on incomplete type.
1752 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1754         PR c++/33977
1755         PR c++/33886
1756         * tree.c (c_build_qualified_type): Define bridge to
1757         cp_build_qualified_type.
1759 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1761         PR c++/31439
1762         PR c++/32114
1763         PR c++/32115
1764         PR c++/32125
1765         PR c++/32126
1766         PR c++/32127
1767         PR c++/32128
1768         PR c++/32253
1769         PR c++/32566
1770         * typeck.c (check_return_expr): Pass address of retval to
1771         check_for_bare_parameter_packs.
1772         * class.c (build_base_field): Tolerate bases that have no layout
1773         due to errors.
1774         (end_of_base): Ditto.
1775         * tree.c (canonical_type_variant): Be careful with
1776         ERROR_MARK_NODE.
1777         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1778         tree*.
1779         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1780         which states whether parameter packs should be replaced with
1781         ERROR_MARK_NODE.
1782         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1783         possible. If set_packs_to_error is set true, replace the parameter
1784         pack with ERROR_MARK_NODE. Manage our own pointer sets.
1785         (uses_parameter_packs): Don't set parameter packs to
1786         ERROR_MARK_NODE.
1787         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1788         which may be modified (if it is a parameter pack). Instructs
1789         find_parameter_packs_r to replace parameter packs with
1790         ERROR_MARK_NODE (so that they won't cause errors later on).
1791         (process_template_parm): Pass pointer to
1792         check_for_bare_parameter_packs.
1793         (process_partial_specialization): Replace pack expansions before
1794         the end of the template argument list with ERROR_MARK_NODE.
1795         (push_template_decl_real): Pass pointer to
1796         check_for_bare_parameter_packs. Replace parameter packs not at the
1797         end of the template parameter list with ERROR_MARK_NODE.
1798         (convert_template_argument): Be more careful about using DECL_NAME
1799         on only declarations.
1800         (unify): Can't unify against ERROR_MARK_NODE.
1801         * semantics.c (finish_cond): Pass pointer to
1802         check_for_bare_parameter_packs.
1803         (finish_expr_stmt): Ditto.
1804         (finish_for_expr): Ditto.
1805         (finish_switch_cond): Pass pointer to
1806         check_for_bare_parameter_packs, and call it before we put the
1807         condition into the statement.
1808         (finish_mem_initializers): Pass pointer to
1809         check_for_bare_parameter_packs.
1810         (finish_member_declaration): Ditto.
1811         * parser.c (cp_parser_base_clause): Ditto.
1812         
1813 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
1815         PR target/33168
1816         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1817         with the final TREE_READONLY flag in place.  processing_template_decl
1818         is known to be 0 in this part of function.
1820         PR c++/33894
1821         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1822         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1823         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1824         * semantics.c (finish_omp_atomic): Revert most of the
1825         2007-02-05 changes, just keep the new representation of
1826         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1828 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
1830         PR c++/33871
1831         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1832         local.
1834 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1836         PR c++/33996
1837         PR c++/33235
1838         PR c++/33930
1839         * typeck.c (merge_types): Don't lose rvalue references when
1840         merging types.
1841         * call.c (build_over_call): Don't elide move constructors just
1842         because the copy constructor is trivial (!).
1843         (compare_ics): If comparing cv-qualifiers fails, we can still order
1844         based on binding lvalues vs. rvalues.
1846 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1848         PR c++/33939
1849         * pt.c (unify_pack_expansion): bring handling of function call
1850         arguments into line with type_unification_real. 
1852 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1854         * typeck.c (build_binary_op): Use pedwarn instead of error for
1855         consistency.
1857 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
1859         PR c++/33836
1860         * parser.c (cp_parser_unary_expression): For &&label call
1861         cp_parser_non_integral_constant_expression and return error_mark_node
1862         if it returned true.
1864         PR c++/33969
1865         * decl.c (grokdeclarator): Don't call build_memfn_type if type
1866         is neither FUNCTION_TYPE nor METHOD_TYPE.
1868 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
1870         PR c++/33516
1871         * parser.c (cp_parser_nested_name_specifier_opt): Use
1872         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1873         typedef of currently open class.
1875 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
1877         PR c++/33495
1878         * error.c (dump_expr): Deal specially with statements.
1880 2007-11-01  Jason Merrill  <jason@redhat.com>
1882         PR c++/30897
1883         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1884         template parms.
1885         (lookup_template_class): Use it to get the outer template args
1886         for instantiating one.
1888         PR c++/29236
1889         * pt.c (reduce_template_parm_level): tsubst the parameters
1890         of a template template parm.
1892 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
1894         PR c++/33955
1895         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1897 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
1899         PR c++/32384
1900         * parser.c (cp_parser_postfix_dot_deref_expression): If
1901         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1902         first and if that succeeds and type is SCALAR_TYPE_P, create
1903         PSEUDO_DTOR_EXPR.
1905         PR c++/32260
1906         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1907         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1908         as for std::type_info.
1910 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
1912         PR c++/33494
1913         * cxx-pretty-print.c (pp_cxx_typeid_expression,
1914         pp_cxx_delete_expression): Change to static linkage.
1915         * cxx-pretty-print.h: Adjust declarations.
1916         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1917         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1918         MODOP_EXPR): Forward to pp_expression.
1920         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1921         Fix typo.
1923 2007-10-31 Christian Bruel  <christian.bruel@st.com>
1924            Mark Mitchell  <mark@codesourcery.com>
1926         PR c++/19531
1927         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1928         if retval is volatile. 
1929         
1930 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
1932         PR c++/33616
1933         * decl2.c (build_offset_ref_call_from_tree): Call
1934         build_non_dependent_expr on object prior to building ADDR_EXPR from it
1935         if FN is DOTSTAR_EXPR.
1937 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
1939         PR c++/31993
1940         PR c++/32252
1941         * pt.c (find_parameter_packs_r): Fix typo in comment.
1942         (convert_template_argument): Look at the pattern of a pack
1943         expansion to determine what kind of entity we're converting.
1944         (coerce_template_parameter_pack): When we have coerced a non-type
1945         template parameter pack, substitute into the type of that pack.
1946         (tsubst_pack_expansion): When our substitution of a parameter pack
1947         is a "trivial" substitution of itself, just substitute into the
1948         pack expansion rather than actually expanding.
1950 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
1952         PR c++/33841
1953         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1954         for non-integral type bitfields.  Return true if bitfield is correct, false
1955         error has been diagnosed.
1956         (check_field_decls): If check_bitfield_decl returned false, call also
1957         check_field_decl.
1959 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
1960             Mark Mitchell  <mark@codesourcery.com>
1962         PR c++/30659
1963         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1964         class member error out and return.
1966 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1968         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1969         to current_function_decl rather than 0.
1971         PR c++/33844
1972         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1973         ->* rather than .*.
1974         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1976 2007-10-27  Jason Merrill  <jason@redhat.com>
1978         PR c++/5247
1979         * call.c (convert_default_arg): Detect recursion.
1981 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1983         PR c++/33842
1984         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1985         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1986         OFFSETOF_EXPR.
1987         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1988         functions.
1989         * error.c (dump_expr): Handle OFFSETOF_EXPR.
1991 2007-10-26  Jason Merrill  <jason@redhat.com>
1993         PR c++/24791
1994         * pt.c (get_template_info): New fn.
1995         (template_class_depth): Use it.
1996         (push_template_decl_real): Check that the template args of the 
1997         definition match the args of the previous declaration.
1999 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
2001         PR c++/31988
2002         * decl2.c (coerce_new_type): Do not allow a default argument for
2003         the first parameter.
2005 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
2007         PR c++/33839
2008         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2009         don't see the leading '('. Only lookup names if we get an
2010         IDENTIFIER_NODE.
2012 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
2014         PR c++/33744
2015         * parser.c (cp_parser_parenthesized_expression_list): Set
2016         greater_than_is_operator_p to true in between the parens.
2018 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
2020         PR c++/31747
2021         * decl.c (grokdeclarator): In case of conflicting specifiers
2022         just return error_mark_node.
2024 2007-10-26  Ollie Wild  <aaw@google.com>
2026         * expr.c (cxx_expand_expr): Removed.
2027         * cp-tree.h (exx_expand_expr): Removed.
2028         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2029         with c_expand_expr.
2031 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
2033         PR c++/33843
2034         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2036 2007-10-23  Jason Merrill  <jason@redhat.com>
2038         PR c++/25950 (DR 391)
2039         * call.c (struct conversion): Remove check_copy_constructor_p.
2040         (reference_binding): Always bind a reference directly to a 
2041         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
2042         temporary creation.
2043         (check_constructor_callable): Remove.
2044         (convert_like_real): Don't call it.
2045         (initialize_reference): Don't call check_constructor_callable.
2046         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2047         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
2048         conversions if LOOKUP_NO_TEMP_BIND.
2049         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2050         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2051         second conversion.
2052         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2054 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
2056         PR c++/33372
2057         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2058         before checking if its type is integral.
2060 2007-10-22  Jason Merrill  <jason@redhat.com>
2062         PR c++/33620
2063         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2064         * pt.c (apply_late_template_attributes): Splice out dependent
2065         attributes from DECL_ATTRIBUTES.
2067         * decl.c (cxx_maybe_build_cleanup): Use build_address.
2069 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2071         * typeck.c (build_binary_op) : Use appropriate warning option
2072         instead of unnamed warning.
2074 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
2076         PR c++/31446
2077         * pt.c (current_template_args): Do not change TREE_LIST elements
2078         with a TREE_VALUE of error_mark_node.
2080 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
2082         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2083         * decl.c (start_decl): Tidy.
2084         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2085         the type.
2086         (grokdeclarator): Clarify comment.
2088 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
2090         PR c++/30303
2091         * decl.c (grokfndecl): Return NULL after the "definition of
2092         implicitly-declared" error happened.
2094 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
2096         PR c++/26698
2097         * call.c (build_user_type_conversion_1): Do not consider conversion
2098         functions to convert a (possibly cv-qualified) object to the (possibly
2099         cv-qualified) same object type (or a reference to it), to a (possibly
2100         cv-qualified) base class of that type (or a reference to it).
2102 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
2104         * pt.c (tsubst): Use template_parm_level_and_index.
2106 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
2108         PR c++/32121
2109         * parser.c (cp_parser_compound_statement): Handle label-declarations
2110         at the beginning of the compound statement.
2111         (cp_parser_block_declaration): Issue diagnostics about __label__
2112         not at the beginning of a block.
2114 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
2116         PR c++/33461
2117         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2118         to convert_template_argument.
2119         (coerce_template_parms): Return error_mark_node after fixed-length
2120         error.
2121         (tsubst_decl): Check for error_mark_node the return value of the
2122         first tsubst in 'case VAR_DECL'.
2124 2007-10-08  Ollie Wild  <aaw@google.com>
2126         * typeck2.c (digest_init): Call cplus_expand_constant after
2127         convert_for_initialization.
2128         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2129         * expr.c (cplus_expand_constant): Updated function description.
2131 2007-10-04  Jason Merrill  <jason@redhat.com>
2133         PR c++/20416
2134         * call.c (initialize_reference): Handle local static reference
2135         temps properly.
2137 2007-10-03  Jason Merrill  <jason@redhat.com>
2139         PR c++/32470
2140         * name-lookup.c (push_namespace_with_attrs): Fold back into...
2141         (push_namespace): Here.
2142         (handle_namespace_attrs): New fn for the attr code.
2143         (leave_scope): Don't pop_visibility.
2144         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2145         * parser.c (cp_parser_namespace_definition): Call
2146         handle_namespace_attrs and pop_visibility as appropriate. 
2148         PR c++/11756
2149         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2151 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
2153         * decl.c (duplicate_decls): Preserve linkage flags for mere
2154         redeclarations of gnu_inline definitions.
2156 2007-10-03  Jason Merrill  <jason@redhat.com>
2158         PR c++/15764
2159         * decl.c (wrap_cleanups_r): New fn.
2160         (wrap_temporary_cleanups): New fn.
2161         (initialize_local_var): Call it.
2163 2007-09-29  Jason Merrill  <jason@redhat.com>
2165         PR c++/33094
2166         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
2167         constant to not have DECL_EXTERNAL if it's file-local.
2169 2007-09-28  Ollie Wild  <aaw@google.com>
2171         Revert
2172         2007-09-27  Ollie Wild  <aaw@google.com>
2174         * typeck2.c (digest_init): Call cplus_expand_constant after
2175         convert_for_initialization.
2176         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2177         * expr.c (cplus_expand_constant): Updated function description.
2179 2007-09-28  Jason Merrill  <jason@redhat.com>
2181         PR c++/10179
2182         * class.c (layout_empty_base): Take rli parameter, update
2183         rli->record_align if empty base has user-specified alignment.
2184         (build_base_field): Pass rli to it.
2186 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
2188         PR c++/33213
2189         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2191 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
2193         PR c++/33118
2194         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2195         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2196         (dump_parameters): Just call dump_type for argument packs too.
2198 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
2200         PR c++/31434
2201         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2202         qualification by creating qualified PACK_EXPANSION_PATTERN and
2203         then calling make_pack_expansion on it.
2205 2007-09-27  Ollie Wild  <aaw@google.com>
2207         * typeck2.c (digest_init): Call cplus_expand_constant after
2208         convert_for_initialization.
2209         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2210         * expr.c (cplus_expand_constant): Updated function description.
2212 2007-09-27  Jason Merrill  <jason@redhat.com>
2214         PR c++/33571
2215         * decl2.c (is_late_template_attribute): Don't crash on unknown
2216         attribute.
2218 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
2220         PR c++/33493
2221         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2222         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2223         spaces in the formatting.
2224         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2226 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
2228         * error.c (cxx_print_error_function): Add third argument, pass
2229         it over to lhd_print_error_function.
2230         (cp_print_error_function): If diagnostic->abstract_origin, print
2231         virtual backtrace.
2232         * cp-tree.h (struct diagnostic_info): New forward decl.
2233         (cxx_print_error_function): Add third argument.
2235 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
2237         PR c++/33207
2238         * name-lookup.c (pushtag): Do not create an implicit typedef before
2239         the associated type declaration is known to be valid.
2241 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
2243         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2244         rather than pointers.
2246 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
2248         PR c++/14688
2249         * search.c (check_final_overrider): Fail if
2250         targetm.comp_type_attributes returns 0.
2252 2007-09-24  Jason Merrill  <jason@redhat.com>
2254         PR c++/33239
2255         * pt.c (resolve_typename_type): Don't look things up in the original
2256         template if it would mean losing template arguments.    
2258 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
2260         PR c++/33506
2261         * cp-tree.h (cxx_type_hash_eq): New prototype.
2262         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2263         * tree.c (cxx_type_hash_eq): New function.
2265 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2267         PR c++/33185    
2268         * tree.c (cp_build_qualified_type_real): Build a canonical
2269         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2270         
2271 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2273         PR c++/33112
2274         PR c++/33185    
2275         * tree.c (cplus_array_compare): Compare pointers, not types.
2276         (build_cplus_array_type_1): Store new array type into the hash
2277         table before building the canonical type; build the canonical type
2278         correctly.
2279         (cp_build_qualified_type_real): Put all of the array types with
2280         cv-qualified element types into the C++ array hash table, built as 
2281         variants of the unqualified versions.
2282         
2283 2007-09-23  Jason Merrill  <jason@redhat.com>
2285         PR c++/16370
2286         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2287         for deprecation warnings.
2289 2007-09-22  Jason Merrill  <jason@redhat.com>
2291         PR c++/15269
2292         * call.c (build_over_call): Warn about deprecated virtuals.
2294         PR c++/19407
2295         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2296         (MAYBE_TAGGED_TYPE_P): Remove.
2297         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2298         instead of calling is_late_template_attribute again.
2299         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2300         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2301         Don't crash on typedefs from non-template classes.
2302         * decl2.c (grokfield): Don't sorry about attrs on template parms.
2303         (is_late_template_attribute): All attributes applied to template
2304         parms or typename types are dependent.  Static.
2305         (splice_template_attributes): Pass decl through.
2306         (save_template_attributes): Likewise.
2308 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
2310         PR c++/33496
2311         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2312         returned from tsubst_pack_expansion.
2313         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2314         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2316 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2318         PR c++/33460
2319         * semantics.c (finish_id_expression): Use consistently
2320         context_for_name_lookup.
2321         * decl.c (fixup_anonymous_aggr): Fix error message for
2322         anonymous struct (vs union).
2324 2007-09-19  Jason Merrill  <jason@redhat.com>
2326         PR c++/7586
2327         * pt.c (tsubst): Handle typedefs by looking for the specialization.
2328         (retrieve_specialization): Only tagged types use 
2329         DECL_TEMPLATE_INSTANTIATIONS.
2330         (instantiate_class_template): Push nested classes too.
2331         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2332         tagged types.
2333         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2334         * init.c (is_aggr_type): Remove redundant tests.
2335         * class.c (push_nested_class): Use CLASS_TYPE_P.
2337 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2339         PR c++/33459
2340         * init.c (build_zero_init): If, recursively, build_zero_init
2341         returns a NULL_TREE, do not append it to the VEC of constructors.
2343 2007-09-18  Jason Merrill  <jason@redhat.com>
2345         PR c++/17743
2346         * pt.c (apply_late_template_attributes): Set processing_template_decl.
2347         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2348         ATTR_FLAG_TYPE_IN_PLACE.
2349         (tsubst): Do unqualified lookup to find typedefs from current class.
2350         [ARRAY_TYPE]: Propagate alignment info.
2351         * decl2.c (is_late_template_attribute): Only defer handling of
2352         attribute aligned if the expression is dependent.
2353         (save_template_attributes): If we're deferring any attributes,
2354         make this a naming typedef.
2356 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2358         PR c++/33462 (again)
2359         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2360         va_arg instead of __builtin_va_arg.
2362 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2364         PR c++/33462
2365         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2366         (pp_cxx_primary_expression): Use it.
2367         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2368         * error.c (dump_expr): Use it.
2370 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2372         PR c++/33463
2373         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2374         out case TYPEID_EXPR to...
2375         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2376         and pp_cxx_right_paren.
2377         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2378         * error.c (dump_expr): Use it.
2380 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2382         PR c++/33464
2383         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2384         (pp_cxx_primary_expression): Use it.
2385         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2386         * error.c (dump_expr): Use it.
2388 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
2390         PR c++/33124
2391         * init.c (build_new): Remove warning for zero-element
2392         allocations.
2394 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2396         PR c++/32756
2397         * call.c (maybe_handle_implicit_object): Set this_p, clear
2398         rvaluedness_matches_p.
2399         (compare_ics): Do not compare rvaluedness matching when one of the
2400         operands is an implicit object.
2402 2007-09-14  Jason Merrill  <jason@redhat.com>
2404         PR c++/17743, c++/19163
2405         * decl2.c (is_late_template_attribute): New fn.
2406         (splice_template_attributes, save_template_attributes): New fns.
2407         (cplus_decl_attributes): Call save_template_attributes.
2408         * pt.c (apply_late_template_attributes): New fn.
2409         (instantiate_class_template, tsubst_decl): Use it.
2410         * cp-tree.h: Declare is_late_template_attribute.
2412 2007-09-13  Tom Tromey  <tromey@redhat.com>
2414         * parser.c (cp_lexer_new_main): Don't use
2415         c_lex_return_raw_strings.
2416         (cp_lexer_get_preprocessor_token): Update.  Add special case when
2417         lexer is NULL.
2419 2007-09-11  Jan Hubicka <jh@suse.cz>
2421         * method.c (use_thunk): Use tree_rest_of_compilation
2422         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2423         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2424         * cp-tree.h (expand_body): Kill.
2425         (emit_associated_thunks): Declare.
2426         * semantics.c (emit_associated_thunks): Export.
2427         (expand_body): Kill.
2429 2007-09-09  David Daney  <ddaney@avtrex.com>
2431         PR c++/33324
2432         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2433         to calculate cookie_ptr.
2435 2007-09-08  Jason Merrill  <jason@redhat.com>
2437         PR c++/33342
2438         * pt.c (most_specialized_class): Set processing_template_decl
2439         while tsubsting partial spec args.
2441 2007-09-06  Jason Merrill  <jason@redhat.com>
2443         * decl2.c (get_guard): Copy visibility from the guarded variable.
2445 2007-09-06  Jan Hubicka  <jh@suse.cz>
2447         * semantics.c (expand_body): Do not mark arguments of clones used.
2449 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
2451         PR c++/32674
2452         * decl.c (cp_finish_decl): When processing_template_decl,
2453         deal correctly with init as TREE_LIST.
2455 2007-09-06  Tom Tromey  <tromey@redhat.com>
2457         * decl.c (finish_function): Put return's location on line zero of
2458         file.
2460 2007-09-05  Jason Merrill  <jason@redhat.com>
2462         PR c++/15745
2463         * except.c (prepare_eh_type): Use type_decays_to.
2465         PR c++/15097
2466         * init.c (build_delete): Use build_headof to get the address of the
2467         complete object if we aren't using the deleting destructor.
2468         * rtti.c (build_headof): No longer static.
2469         * cp-tree.h: Declare it.
2471 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
2473         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2474         decl if a prototype for XX is provided with throw().
2476         PR c++/33289
2477         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2478         on __*_chk non-__builtin_* decls.
2480 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2482         PR c++/30302
2483         * semantics.c (finish_id_expression): Use context_for_name_lookup
2484         insted of DECL_CONTEXT, to see through anonymous structs and unions.
2485         * class.c (finish_struct_anon): Deal correctly with anonymous
2486         structs (vs unions, as GNU extension) in error messages.
2488 2007-09-05  Jan Hubicka  <jh@suse.cz>
2490         * sematics.c (expand_body): Remove unnecesary import_export_decl
2491         call, DECL_EXTERNAL checks and current_function_decl saving.
2493 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2495         PR c++/29731 (again)
2496         * parser.c (cp_parser_primary_expression): Return error_mark_node
2497         when a statement-expression is found in a template-argument list.
2499 2007-09-04  Jason Merrill  <jason@redhat.com>
2501         * except.c (initialize_handler_parm): Use
2502         fold_build_cleanup_point_expr.
2504         PR c++/31419
2505         * call.c (reference_binding): Don't look for user-defined conversions
2506         to the same type.
2508         PR c++/31411
2509         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2510         the MUST_NOT_THROW_EXPR.
2512 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
2514         * decl.c (cp_finish_decl): Call determine_visibility before
2515         make_rtl_for_nonlocal_decl.
2517 2007-09-04  Jason Merrill  <jason@redhat.com>
2519         PR c++/14032
2520         * pt.c (most_specialized_class): Substitute outer template
2521         arguments into the arguments of a member template partial
2522         specialization.
2523         (strip_innermost_template_args): New fn.
2525 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
2527         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2529 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2531         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2532         * decl.c (cp_make_fname_decl): Likewise,
2533         * parser.c (cp_parser_string_literal): Likewise,
2534         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2535         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2536         Likewise,
2538 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
2540         PR c++/33208
2541         * typeck.c (build_unary_op): Fix error message for
2542         Boolean expression as operand to operator--.
2544 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2546         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2547         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2548         Likewise.
2550 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2552         PR c++/32597
2553         * init.c (build_default_init): Make extern.
2554         * cp-tree.h (build_default_init): Declare here.
2555         * pt.c (tsubst_expr): When the instantiation of the initializer of
2556         a variable results in an empty list, default-initialize the
2557         variable.
2558         (tsubst_copy_and_build): When the instantiation of the initializer
2559         in a new expression results in an empty initializer list,
2560         default-initialize it.
2562 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
2564         * mangle.c (write_type): Change mangling of rvalue reference from
2565         `RR' to `O'. 
2567 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
2569         * decl.c (duplicate_decls): Remove duplicated line.
2571 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2573         PR c++/33210
2574         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2575         BOUND_TEMPLATE_TEMPLATE_PARM.
2577 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2579         PR c++/32113
2580         * search.c (lookup_member): Check the name argument for
2581         error_mark_node.
2583 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2585         PR c++/33212
2586         * parser.c (cp_parser_trait_expr): Check rerurn value of
2587         cp_parser_type_id.
2589 2007-08-30  Ollie Wild  <aaw@google.com>
2591         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2592         convert_ptrmem for pointer to member conversions.
2593         (convert_to_pointer_force): Update cp_convert_to_pointer call.
2594         (ocp_convert): Update cp_convert_to_pointer call.
2595         * typeck.c (convert_ptrmem): Add conditional for null pointers to
2596         members.
2597         (build_static_cast_1): Check can_convert for conversions in either
2598         direction.
2599         (get_delta_difference_1): New function.
2600         (get_delta_difference): Refactor to call get_delta_difference_1.
2602 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
2604         * decl.c (start_preparsed_function): Set
2605         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2607 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
2609         PR c++/33209
2610         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2611         BOUND_TEMPLATE_TEMPLATE_PARM.
2613 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
2615         PR c++/32596
2616         PR c++/32400
2617         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2618         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2620 2007-08-27  Jason Merrill  <jason@redhat.com>
2622         PR c++/29000
2623         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
2624         Look inside STMT_EXPR.
2625         * semantics.c (stmt_expr_value_expr): New fn.
2626         * cp-tree.h: Declare it.
2628         PR c++/28558
2629         * decl.c (groktypename): Ignore attributes applied to class type.
2631 2007-08-28  Richard Guenther  <rguenther@suse.de>
2633         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2635 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2636         
2637         * error.c (dump_expr): Handle COMPLEX_CST.
2638         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2639         (pp_cxx_expression): Likewise.
2641 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
2643         * decl.c (GNU_INLINE_P): New.
2644         (duplicate_decls): Handle gnu_inline.  Merge attributes and
2645         some flags in overriding definitions.
2646         (redeclaration_error_message): Handle gnu_inline.
2647         (start_preparsed_function): Likewise.
2649 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2651         * call.c (sufficient_parms_p): Constify.
2652         * class.c (same_signature_p): Likewise.
2653         * cp-gimplify.c (is_invisiref_parm,
2654         cxx_omp_privatize_by_reference): Likewise.
2655         * cp-objcp-common.c (has_c_linkage): Likewise.
2656         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2657         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2658         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2659         num_artificial_parms_for, comp_template_parms,
2660         template_parameter_pack_p, any_dependent_template_arguments_p,
2661         any_type_dependent_arguments_p, any_value_dependent_elements_p,
2662         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2663         zero_init_p, member_p, cp_lvalue_kind,
2664         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2665         varargs_function_p, is_dummy_object, special_function_kind,
2666         string_conv_p, type_unknown_p, comp_except_specs, compparms,
2667         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2668         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2669         cp_has_mutable_p, at_least_as_qualified_p,
2670         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2671         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2672         * except.c (nothrow_libfn_p): Likewise.
2673         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2674         Likewise.
2675         * pt.c (comp_template_parms, template_parameter_pack_p,
2676         any_type_dependent_arguments_p, any_value_dependent_elements_p,
2677         any_dependent_template_arguments_p): Likewise.
2678         * repo.c (repo_export_class_p): Likewise.
2679         * semantics.c (anon_aggr_type_p): Likewise.
2680         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2681         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2682         varargs_function_p, member_p, is_dummy_object, pod_type_p,
2683         zero_init_p, special_function_p): Likewise.
2684         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2685         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2686         compparms, invalid_nonstatic_memfn_p,
2687         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2688         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2689         cp_has_mutable_p, lvalue_or_else): Likewise.
2691 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
2693         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2694         * cp-objcp-common.c (cp_tree_size): Ditto.
2695         * tree.c (cp_walk_subtrees): Ditto
2696         * cp-tree.def (TINST_LEVEL): Go away.
2697         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2698         move together with other non-tree structs.
2699         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2700         (union lang_tree_node): Eliminate tinst_level field.
2701         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2702         (current_instantiation, outermost_tinst_level): Return
2703         a "struct tinst_level *".
2705         * error.c (print_instantiation_partial_context): Change second
2706         parameter to a "struct tinst_level *".  Replace accessor macros
2707         with field access.
2708         (print_instantiation_full_context): Likewise.
2709         * lex.c (in_main_input_context): Likewise.
2711         * pt.c (struct pending_templates): New.
2712         (pending_templates, last_pending_template): Use it as a type.
2713         (current_tinst_level): Change typo to "struct tinst_level *"
2714         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2715         (add_pending_template): Construct a "struct pending_template".
2716         Replace TINST_LEVEL accessor macros with field access.
2717         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2718         (pop_tinst_level): Likewise.
2719         (instantiate_pending_templates): Likewise.  Factor common code used
2720         when an instantiation has been done.
2721         (outermost_tinst_level): Replace tree_last with loop.
2722         (current_instantiation): Return a "struct tinst_level *".
2724 2007-08-24  Ollie Wild  <aaw@google.com>
2726         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2727         * name-lookup.h (cp_binding_level): Remove vtables member.
2729 2007-08-24  Richard Guenther  <rguenther@suse.de>
2731         * tree.c (cp_cannot_inline_tree_fn): Remove.
2732         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2733         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2734         Remove define.
2736 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
2738         PR c++/32567
2739         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2740         error_mark_node right away if build_expr_type_conversion
2741         returned it.
2743         PR c++/32898
2744         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2745         is error_mark_node rather than NULL_TREE.
2746         * pt.c (check_explicit_specialization): Likewise.
2748         PR c++/31941
2749         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2750         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2752 2007-08-22  Jason Merrill  <jason@redhat.com>
2754         PR c++/29365
2755         * pt.c (outermost_tinst_level): New function.
2756         * lex.c (in_main_input_context): New function.
2757         * cp-tree.h: Declare it.
2758         * decl2.c (constrain_class_visibility): Use it to avoid warning
2759         about uses of the anonymous namespace in the main input file.
2761 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2763         * init.c (build_new_1): Use get_target_expr instead of save_expr.
2765 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
2767         PR c++/7302
2768         * class.c (finish_struct_1): Warn when a class has virtual
2769         functions and accessible non-virtual destructor.
2771 2007-08-20  Richard Guenther  <rguenther@suse.de>
2773         PR c++/22369
2774         PR c++/22451
2775         * call.c (build_new_method_call): Convert initializer to
2776         the basetype.
2777         * init.c (build_aggr_init): Do not fiddle with types.
2778         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2779         * except.c (build_throw): Do not drop qualifiers for the
2780         pointer type.
2781         * typeck.c (get_member_function_from_ptrfunc): Do not
2782         fiddle with types, instead convert.
2783         (build_ptrmemfunc1): Convert to the target type for
2784         initialization.
2785         (gfc_trans_allocate): Convert result to target type.
2786         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2787         pointer-to-member structures shall have alias set zero as well.
2789 2007-08-20  Richard Guenther  <rguenther@suse.de>
2791         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2792         Remove.
2793         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2794         (nonstatic_local_decl_p): Likewise.
2795         * tree.c (cp_auto_var_in_fn_p): Remove.
2796         * decl.c (nonstatic_local_decl_p): Remove.
2798 2007-08-20  Richard Guenther  <rguenther@suse.de>
2800         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2801         Remove define.
2802         * tree.h (cp_walk_tree): New define to walk_tree_1 with
2803         cp_walk_subtrees lh parameter.
2804         (cp_walk_tree_without_duplicates): New define to
2805         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2806         * tree.c (count_trees): Call
2807         cp_walk_tree_without_duplicates.
2808         (verify_stmt_tree): Call cp_walk_tree.
2809         (break_out_target_exprs): Likewise.
2810         (WALK_SUBTREE): Likewise.
2811         * cp-gimplify.c (cp_genericize): Likewise.
2812         * cp-pt.c (find_parameter_packs_r): Likewise.
2813         (uses_parameter_packs): Likewise.
2814         (make_pack_expansion): Likewise.
2815         (check_for_bare_parameter_packs): Likewise.
2816         (for_each_template_parm): Likewise.
2817         * decl.c (check_default_argument): Call
2818         cp_walk_tree_without_duplicates.
2819         * except.c (build_throw): Likewise.
2820         * decl2.c (type_visibility): Likewise.
2821         * semantics.c (expand_or_defer_fn): Likewise.
2822         (finalize_nrv): Call cp_walk_tree.
2824 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
2826         PR c++/33025
2827         * init.c (build_new_1): Rename placement_var variable to placement_expr.
2828         Initialize it with save_expr rather than get_temp_regvar.
2830 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2832         PR c++/28989
2833         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2834         lvalues.
2836 2007-08-17  Ollie Wild  <aaw@google.com>
2838         PR c++/31749
2839         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2840         declarations into appropriate slots for comparison.  Fix type
2841         comparison.
2843 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2845         PR c++/32112
2846         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2847         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2849 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2851         PR c++/32870
2852         * parser.c (cp_parser_class_head): Improve error message.
2854 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
2856         * pt.c (instantiate_decl): Set input_location
2857         for the function end.
2859 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2861         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2862         Constify.
2863         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2864         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2865         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2866         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2867         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2868         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2869         * typeck.c (cp_type_quals): Likewise.
2870         * typeck2.c (cxx_incomplete_type_diagnostic,
2871         cxx_incomplete_type_error): Likewise.
2873 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
2875         PR c++/31132
2876         * pt.c (tsubst_friend_function): When check_classfn
2877         returns error_mark_node likewise return it.
2879 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2881         PR c++/32992
2882         * typeck.c (check_return_expr): Don't NRV optimize vars in
2883         anonymous unions.
2884         * decl.c (finish_function): Comment fix.
2886 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
2888         PR c++/33035
2889         * pt.c (push_template_decl_real): Depending on TYPE_P
2890         use either TYPE_CONTEXT or DECL_CONTEXT.
2892 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
2894         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2895         constructors and destructors return this.
2897 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
2899         PR c++/27211
2900         * decl2.c (check_classfn): Return error_mark_node in case of error;
2901         in that case, do not call add_method.
2902         * decl.c (start_decl): Deal with check_classfn returning
2903         error_mark_node.
2904         (grokfndecl): Likewise.
2905         * pt.c (tsubst_friend_function): Likewise.
2907 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
2909         PR c++/30428
2910         * typeck.c (build_binary_op): Disallow vector float types with
2911         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2913 2007-08-11  Ian Lance Taylor  <iant@google.com>
2915         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2916         alias_set_type.
2917         * cp-tree.h (cxx_get_alias_set): Update declaration.
2919 2007-08-10  Ollie Wild  <aaw@google.com>
2921         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2922         type lookups.
2923         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
2924         function parameter.
2925         (unqualified_namespace_lookup): Fix ambiguous_decl call.
2926         (lookup_using_namespace): Fix ambiguous_decl call.
2927         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2929 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2931         * call.c (name_as_c_string): Use CONST_CAST.
2932         * decl.c (build_decl): Likewise.
2933         * parser.c (cp_parser_string_literal): Likewise.
2935 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2937         PR c++/17763
2938         * error.c (dump_expr): Consistently use the *_cxx_*
2939         variants of the pretty-print functions.
2941 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2943         PR c++/22256
2944         * decl.c (check_special_function_return_type): Just error
2945         on return type specified for conversion operator.
2947 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
2949         * typeck2.c (readonly_error): Handle general expressions.
2950         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2952 2007-08-06  Dan Hipschman  <dsh@google.com>
2954         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2955         access function name.
2957 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
2959         PR pch/13676
2960         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2961         * g++spec.c (lang_specific_driver): Check them.
2963 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
2965         PR c++/19532
2966         * pt.c (inline_needs_template_parms): Fix comment; change return type
2967         to bool.
2969 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
2971         Revert:
2972         2007-03-26  Dirk Mueller  <dmueller@suse.de>
2974         * parser.c (cp_parser_member_declaration): Pedwarn
2975         about stray semicolons after member declarations.
2977 2007-08-02  Lee Millward  <lee.millward@gmail.com>
2979         PR c++/30849
2980         PR c++/30850
2981         PR c++/30851
2982         * parser.c (cp_parser_asm_definition): Detect and discard asm
2983         statements with invalid inputs or outputs.
2984         (cp_parser_asm_operand_list): Return error mark node if any
2985         of the operands are invalid. Adjust documentation.
2986         
2987 2007-08-02  Nick Clifton  <nickc@redhat.com>
2989         * typeck.c: Change copyright header to refer to version 3 of the
2990         GNU General Public License and to point readers at the COPYING3
2991         file and the FSF's license web page.
2992         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2993         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2994         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2995         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2996         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2997         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2998         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2999         name-lookup.h, parser.c: Likewise.
3001 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3003         PR middle-end/32668
3004         * call.c (magic_varargs_p): Honor the "type generic" attribute.
3006 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
3008         PR c++/32108
3009         * semantics.c (finish_label_stmt): Reject the __label__
3010         extension outside function scopes.
3012 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3014         * parser.c (eof_token): Un-constify.
3015         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3016         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3017         casts.
3019 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
3021         * pt.c, tree.c, typeck2.c: Fix comment typos.
3023 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
3024             Mark Mitchell  <mark@codesourcery.com>
3026         PR c++/30917
3027         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3028         hidden due to friend declarations in local classes.
3030 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
3032         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3033         * cp-tree.def (DECLTYPE_TYPE): New.
3034         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3035         (dump_type_prefix): Ditto.
3036         (dump_type_suffix): Ditto.
3037         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3038         * mangle.c (write_type): Handle DECLTYPE_TYPE.
3039         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3040         types.
3041         (DECLTYPE_TYPE_EXPR): New.
3042         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3043         (finish_declared_type): Declare.
3044         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3045         DECLTYPE_TYPE nodes.
3046         (pp_cxx_type_id): Ditto.
3047         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3048         (tsubst): Substitute into a DECLTYPE_TYPE node.
3049         (tsubst_copy): Ditto.
3050         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3051         nodes.
3052         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3053         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3054         structural equality (because we can't hash the expressions).
3055         (finish_declared_type): New.
3056         * lex.c (reswords): Add "decltype" keyword.
3057         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3058         (cp_parser_postfix_expression): Add member_access_only_p to
3059         restrict postfix expression to member access expressions.
3060         (cp_parser_unary_expression): Update call to
3061         cp_parser_postfix_expression to reflect new parameter.
3062         (cp_parser_declared_type): New.
3063         (cp_parser_simple_type_specifier): Parse decltype types.
3065 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
3067         PR c++/32346
3068         * call.c (convert_for_arg_passing): Only widen bitfields to their
3069         declared types if necessary.
3071 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3073         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3074         Constify.
3076 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3078         * decl.c (typename_hash, typename_compare): Constify.
3079         * mangle.c (hash_type, compare_type): Likewise.
3080         * pt.c (eq_local_specializations, hash_local_specialization):
3081         Likewise.
3082         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3083         list_hash): Likewise.
3084         * typeck2.c (pat_compare): Likewise.
3086 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
3088         * method.c (implicitly_declare_fn): Increase alignment if member
3089         function pointer format requires it.
3091 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
3093         PR c++/29001
3094         * typeck.c (check_return_expr): Do not pass a null argument
3095         to null_ptr_cst_p.
3097 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
3099         PR c++/32561
3100         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3101         only on VAR_DECL.
3103 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
3105         PR c++/32839
3106         * typeck.c (convert_arguments): Only use default args if we have
3107         a function decl.
3109         PR c++/30818
3110         * typeck.c (structural_comptypes): No need to check
3111         resolve_typename_type return value here.
3112         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3113         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
3114         original type rather than error_mark_node in case of failure.
3115         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3116         resolve_typename_type result check.
3117         (cp_parser_direct_declarator, cp_parser_head,
3118         cp_parser_constructor_declarator_p): Likewise.
3120 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
3122         * pt.c (template_parms_variadic_p): Remove.
3123         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3125 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
3127         PR c++/30854
3128         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3129         argument to dump_aggr_init_expr_args instead of false.
3131 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
3133         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3134         canonical types; otherwise, fall back to structural type
3135         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3136         internal compiler error if the canonical types are wrong.
3137         
3138 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
3140         PR c++/32560
3141         * parser.c (cp_parser_make_indirect_declarator): When the
3142         the code argument is ERROR_MARK return cp_error_declarator.
3144 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
3146         PR 32617
3147         * decl.c (cxx_init_decl_processing): Don't set
3148         force_align_functions_log.
3149         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3150         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3151         FUNCTION_DECL, return its alignment.
3153 2007-07-09  Richard Guenther  <rguenther@suse.de>
3155         * decl.c (start_preparsed_function): Do not promote return type.
3157 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
3159         PR c++/30535
3160         * pt.c (unify): Never pass error_mark_node to template_decl_level.
3162 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
3164         PR c++/32232
3165         * pt.c (resolve_overloaded_unification): Robustify.  Return a
3166         bool, not an int.
3167         (type_unification_real): Adjust accordingly.
3169 2007-07-06  Richard Guenther  <rguenther@suse.de>
3171         * init.c (build_new_1): Use the correct pointer type.
3172         * typeck2.c (build_m_component_ref): Likewise.
3174 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
3176         PR c++/32245
3177         * init.c (build_zero_init): Always build an initializer for
3178         non-static storage.
3179         * typeck2.c (build_functional_cast): Use build_zero_init.
3181         PR c++/32251
3182         * init.c (build_new_1): Always pass the allocation function to
3183         build_op_delete_call.
3184         * call.c (build_op_delete_call): Handle operator delete with a
3185         variable-argument list.  Do not issue an error when no matching
3186         deallocation function is available for a new operator.
3188         PR c++/31992
3189         * cp-tree.h (any_value_dependent_elements_p): Declare it.
3190         * decl.c (value_dependent_init_p): New function.
3191         (cp_finish_decl): Use it.
3192         * pt.c (value_dependent_expression_p): Use
3193         any_value_dependent_elements_p.
3194         * parser.c (cp_parser_primary_expression): Add comment about
3195         treating dependent qualified names as integral
3196         constant-expressions.
3198 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
3200         * decl.c (build_ptrmemfunc_type): Always use structural equality
3201         tests when comparing pointer-to-member-function types, because the
3202         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3203         types.
3204         
3205 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
3207         * init.c (build_new): Tweak comment.
3209 2007-06-29  Dave Brolley  <brolley@redhat.com>
3211         PR c++/31743
3212         * parser.c (cp_parser_new_type_id): Don't reduce a named array
3213         type to its base type and number of elements here.
3214         * init.c (build_new): Call complete_type_or_else to ensure that the
3215         type is complete and to issue a diagnostic if it is not.
3216         (build_new_1): Don't call complete_type_or_else here.
3218 2007-07-03  Richard Guenther  <rguenther@suse.de>
3220         PR c++/32609
3221         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3222         after recursing.
3224 2007-07-02  Simon Baldwin  <simonb@google.com>
3226         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3227         for inner-style nested forward declarations that don't declare
3228         anything useful.
3230 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
3232         PR c++/31748
3233         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3234         DECL_P in not a variable and appears more than once error messages.
3236 2007-07-01  Ollie Wild  <aaw@google.com>
3238         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3239         (select_decl): Remove function.
3240         (unqualified_namespace_lookup): Populate binding by calling
3241         ambiguous_decl.  Remove select_decl call.
3242         (lookup_qualified_name): Remove select_decl call.
3243         * decl.c (lookup_and_check_tag): Check for ambiguous references.
3244         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3245         generation when name lookup is ambiguous.
3247 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
3249         PR c++/31724
3250         * init.c (build_new_1): Use structural equality on the copy of the
3251         array type.
3253 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3255         * decl2.c (determine_visibility): Implement
3256         flag_visibility_ms_compat effect on type info.
3257         * decl.c (cxx_init_decl_processing): Implement
3258         global effect of flag_visibility_ms_compat.
3260 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3262         * decl2.c (start_objects): Mark constructor-running function
3263         as artificial.
3265 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
3267         PR c++/32111
3268         * decl.c (grokdeclarator): Reset friendp for member functions declared
3269         friend of their own class.
3271 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
3273         * decl2.c (determine_visibility): Don't look for dllexport here.
3274         (determine_visibility_from_class): Tidy.
3276 2007-06-18  Simon Baldwin <simonb@google.com>
3278         PR c++/31923
3279         * parser.c (cp_parser_single_declaration): Added check for storage
3280         class other than sc_none in parsed declaration, and a flag to indicate
3281         if the call is part of an explicit template specialization parse.
3282         * (cp_parser_explicit_specialization): Specialization check flag added
3283         to call to cp_parser_single_declaration(), set true.
3284         * (cp_parser_template_declaration_after_export): Specialization check
3285         flag added to call to cp_parser_single_declaration(), set false.
3286         * pt.c (check_explicit_specialization): Added code to copy visiblity
3287         and linkage from the templated function to the explicit specialization.
3289 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3291         * typeck.c (build_binary_op): For templates build the
3292         expression in pieces to avoid the assert in build2_stat.
3293         (get_member_function_from_ptrfunc):
3294         Change over to using POINTER_PLUS_EXPR and convert
3295         the second operand to sizetype.
3296         * typeck2.c (build_m_component_ref):  Likewise.
3297         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3298         instead of PLUS_EXPR for pointers.
3299         (build_new_1): Likewise.
3300         (build_vec_delete_1): Likewise.
3301         (build_vec_delete): Likewise.
3302         * class.c (build_base_path): Likewise.
3303         (build_base_path): Likewise.
3304         (convert_to_base_statically): Likewise.
3305         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3306         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3307         instead of PLUS_EXPR.
3308         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3309         instead of PLUS_EXPR for pointers.
3310         * call.c (build_special_member_call): Likewise.
3311         * rtti.c (build_headof): Likewise.
3312         Use sizetype instead of ptrdiff_type_node.
3313         (tinfo_base_init): Create a POINTER_PLUS_EXPR
3314         instead of PLUS_EXPR for pointers.
3315         * except.c (expand_start_catch_block):  Do a
3316         NEGATIVE and then a POINTER_PLUS_EXPR instead
3317         of a MINUS_EXPR.
3318         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3319         PLUS_EXPR on pointer types over to use
3320         POINTER_PLUS_EXPR and remove the conversion
3321         to the pointer types.
3322         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3323         adding to a pointer type. Use size_int instead of
3324         ssize_int. Convert the index to sizetype before
3325         adding it to the pointer.
3327 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
3329         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3330         (DECL_ANON_UNION_VAR_P): New macro.
3331         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
3332         than DECL_VAR_MARKED_P, to keep track of which variables we have
3333         seen.
3334         * decl.c (redeclaration_error_message): Complain about redeclaring
3335         anonymous union members at namespace scope.
3336         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3338 2007-06-14  Geoff Keating  <geoffk@apple.com>
3340         * decl2.c (determine_visibility): Ensure that functions with
3341         hidden types as parameters are hidden.
3343         PR 31093
3344         * decl2.c (determine_visibility): Remove duplicate code for
3345         handling type info.
3347 2007-06-12  Ian Lance Taylor  <iant@google.com>
3349         PR libstdc++/29286
3350         * init.c (avoid_placement_new_aliasing): New static function.
3351         (build_new_1): Call it.
3353 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
3355         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3356         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3358 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
3360         PR c++/32177
3361         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3362         on init, the non-decl cond operand and increment value.
3364 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
3366         PR c++/30759
3367         * decl.c (check_initializer): Report an error when a brace enclosed
3368         initializer is used for a non-aggregate type in C++98.
3369         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3370         cxx_dialect.
3371         (grokdeclarator): Likewise.
3372         (move_fn_p): Likewise.
3373         * typeck.c (check_return_expr): Likewise.
3374         * call.c (reference_binding): Likewise.
3375         * error.c (cp_cpp_error): Likewise.
3376         * pt.c (check_default_tmpl_args): Likewise.
3377         (tsubst): Likewise.
3378         * lex.c (init_reswords): Likewise.
3379         * parser.c (p_parser_primary_expression): Likewise.
3380         (TOKEN_PRECEDENCE): Likewise.
3381         (cp_parser_init_declarator): Likewise.
3382         (cp_parser_ptr_operator): Likewise.
3383         (cp_parser_parameter_declaration): Likewise.
3384         (cp_parser_enclosed_template_argument_list): Likewise.
3385         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3386         (cp_parser_next_token_ends_template_argument_p): Likewise.
3388 2007-06-04  Simon Baldwin  <simonb@google.com>
3390         * decl.c (grokdeclarator): Readability change.  Moved case labels
3391         into direct switch statement scope.
3393 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
3395         * call.c (convert_like_real): Remove pointless code.
3397 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
3399         * decl.c (get_atexit_fn_ptr_type): New function.
3400         (get_atexit_node): Use it.
3401         (start_cleanup_fn): Likewise.
3402         (register_dtor_fn): Use the object's destructor, instead of a
3403         separate cleanup function, where possible.
3404         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3405         (atexit_fn_ptr_type_node): New macro.
3406         * decl2.c (build_cleanup): Use build_address.
3408 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
3410         * typeck.c (build_binary_op): Include types in error.
3412 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
3414         PR c++/31806
3415         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3416         needs runtime initialization.
3418 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
3420         PR c++/32158
3421         * semantics.c (finish_trait_expr): Complete the types.
3423 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
3424             Douglas Gregor <doug.gregor@gmail.com>
3425             Pedro Lamarao <pedro.lamarao@mndfck.org>
3426             Howard Hinnant <howard.hinnant@gmail.com>
3428         PR c++/7412
3429         PR c++/29939
3430         * typeck.c (comptypes): Don't consider rvalue and lvalue
3431         reference types to be equivalent.
3432         (check_return_expr): Move from certain lvalues when returning
3433         them.
3434         * decl.c (grokdeclarator): Implement reference collapsing.
3435         (copy_fn_p): Don't consider constructors taking rvalue references
3436         to be copy constructors.
3437         (move_fn_p): New.
3438         * call.c (conversion): New "rvaluedness_matches_p" member.
3439         (convert_class_to_reference): Require reference type as first
3440         parameter instead of base type.
3441         (reference_binding): Add logic to handle rvalue references.
3442         (implicit_conversion): Update inaccurate comment.
3443         (convert_like_real): Disable creation of temporaries that are
3444         impossible to initialize for types with move constructors.
3445         (build_over_call): Elide move constructors when possible.
3446         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3447         (maybe_handle_ref_bind): Return conversion instead of type node.
3448         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3449         determine preferred conversion sequences.
3450         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3451         (LOOKUP_PREFER_RVALUE): New.
3452         (DECL_MOVE_CONSTRUCTOR_P): New.
3453         (struct cp_declarator): Add "reference" member for reference
3454         types, with new "rvalue_ref" flag.
3455         (cp_build_reference_type): Declare.
3456         (move_fn_p): Declare.
3457         * error.c (dump_type_prefix): Format rvalue reference types
3458         correctly in error messages.
3459         * except.c (build_throw): Move from certain lvalues when
3460         throwing.
3461         * mangle.c (write_type): Mangle rvalue references differently
3462         than regular references.
3463         * parser.c (make_reference_declarator): Add boolean parameter for
3464         rvalue references.
3465         (cp_parser_make_indirect_declarator): New.
3466         (cp_parser_new_declarator_opt): Call
3467         cp_parser_make_indirect_declarator. 
3468         (cp_parser_conversion_declarator_opt): Ditto.
3469         (cp_parser_declarator): Ditto.
3470         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3471         declarators.
3472         * pt.c (tsubst): Implement reference collapsing.
3473         (maybe_adjust_types_for_deduction): Implement special template
3474         parameter deduction rule for rvalue references.
3475         (type_unification_real): Update calls to
3476         maybe_adjust_types_for_deduction.
3477         (try_one_overload): Ditto.
3478         (unify_pack_expansion): Ditto.
3479         * tree.c (lvalue_p_1): Handle rvalue reference types.
3480         (cp_build_reference_type): New.
3482 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
3484         PR c++/31809
3485         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3486         variables that need runtime initialization.
3488 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
3490         PR c++/31339
3491         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3492         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3493         case POSTDECREMENT_EXPR>): Return the error_mark_node
3494         if either the real or imaginary parts would an
3495         error_mark_node.
3496         
3497 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
3498             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3500         PR c++/31745
3501         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3502         token is a closing brace, false if there are no tokens left.
3503         (cp_parser_namespace_alias_definition): Only consume the next token if
3504         it is a closing brace.
3506         * parser.c (cp_parser_class_specifier): Likewise.
3508 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
3510         * semantics.c (finish_member_declaration): Fix a typo in the
3511         last checkin.
3513 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
3515         PR c++/31431
3516         PR c++/31432
3517         PR c++/31434
3518         PR c++/31435
3519         PR c++/31437
3520         PR c++/31438
3521         PR c++/31442
3522         PR c++/31443
3523         PR c++/31444
3524         PR c++/31445
3525         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3526         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3527         * pt.c (check_for_bare_parameter_packs): Return bool indicated
3528         whether everything was okay. Fix indentation.
3529         (push_template_decl_real): Check for bare parameter packs in
3530         function parameters; where errors occur, mark the parameter types
3531         with ERROR_MARK_NODEs to avert ICEs.
3532         (coerce_template_parameter_pack): New.
3533         (coerce_template_parms): Moved parameter pack coercion into
3534         coerce_template_parameter_pack, and permit it anywhere in the
3535         template parameter list (not just at the end). Parameter and
3536         argument indices can vary (somewhat) separately now, so add
3537         PARM_IDX and ARG_IDX.
3538         (fn_type_unification): Don't set an argument pack as incomplete if
3539         no argument pack was deduced.
3540         (type_unification_real): If a type parameter is a parameter pack
3541         and has not otherwise been deduced, it will be deduced to an empty
3542         parameter pack.
3543         (more_specialized_fn): Use the actual lengths of the argument
3544         lists when comparing against expansions.
3545         * semantics.c (finish_member_declaration): If a field's type has
3546         bare parameter packs, error and set its type to ERROR_MARK_NODE.
3548 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
3550         PR target/27067
3551         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3553 2007-05-22  Ollie Wild  <aaw@google.com>
3555         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3556         (unqualified_namespace_lookup): Adds check for hidden types.
3558 2007-05-22  Ollie Wild  <aaw@google.com>
3560         * decl.c (duplicate_decls): Verify namespace names are unique.
3562 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
3564         * decl.c (cxx_maybe_build_cleanup): Handle
3565         __attribute__((cleanup)).
3567 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3569         * cvt.c (cp_convert_and_check): Don't check warnings if the
3570         conversion failed.
3572 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
3574         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
3576 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
3578         PR c++/29928
3579         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
3580         type only if is a class type (5.2.8/4).
3582 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
3584         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3585         * decl.c (grokdeclarator): Use unsigned_type_for instead of
3586         c_common_unsigned_type.
3588 2007-05-11  Silvius Rus  <rus@google.com>
3590         * typeck.c (build_indirect_ref): Add call to
3591         strict_aliasing_warning.
3592         (build_reinterpret_cast_1): Condition call to
3593         strict_aliasing_warning. 
3595 2007-05-11  Jan Hubicka  <jh@suse.cz>
3597         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
3598         * decl2.c (start_objects): ctors and dtors are no longer public.
3599         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
3600         
3601 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3603         * typeck.c (build_unary_op): Remove code that used to
3604         handle non lvalue increments/decrements.
3606 2007-05-07  Mike Stump  <mrs@apple.com>
3608         * parser.c (check_empty_body): Add.
3609         (cp_parser_iteration_statement): Add call to check_empty_body.
3611 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
3613         PR 31775
3614         * mangle.c (write_mangled_name): Mangle static variable names.
3615         (write_unqualified_name): Use local-source-name for
3616         namespace-scope static variables.
3618 2007-05-04  Dirk Mueller  <dmueller@suse.de>
3620         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
3621         not in effect.
3623 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
3625         PR c++/31663
3626         * decl2.c (constrain_class_visibility): 
3627         Use strip_pointer_or_array_types instead of strip_array_types.
3629 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3631         PR C++/30221
3632         * decl.c (reshape_init_r): Don't reshape the first element if it
3633         is a pointer to member function.
3635 2007-04-27  Simon Baldwin  <simonb@google.com>
3637         * decl.c (grokparms): Changed message format from %qD to %qE.
3639 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
3641         * error.c (maybe_warn_variadic_templates): Variadic templates are
3642        now in C++0x, so only warn about them in C++98 mode.
3643         
3644 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3646         PR C++/30016
3647         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
3648         integeral types from vectors types.
3650 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
3652         PR c++/31598
3653         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
3654         for type dependent OMP_CLAUSE_DECLs.
3656 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
3658         PR c++/31338
3659         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
3660         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
3661         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3662         * init.c (build_zero_init): Adjust, as
3663         COMPLEX_TYPE is now a SCALAR_TYPE.
3664         * typeck2.c (digest_init): Allow brace-enclosed initializers for
3665         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3667 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
3669         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3670         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3671         (trait_expr_value): Adjust.
3673 2007-04-23  Simon Baldwin  <simonb@google.com>
3675         * decl.c (grokparms): Added new error for duplicate function
3676         parameters names in function prototypes, to match gcc behavior.
3678 2007-04-23  Jan Hubicka  <jh@suse.cz>
3680         * decl2.c (finish_objects): Do not call target constructor/destructor
3681         bits dirrectly.
3683 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3685         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3686         instead of checking GIMPLE_STMT_P in chain_next.
3688 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
3690         PR c++/31513
3691         * call.c (convert_for_arg_passing): Convert bitfields to their
3692         declared types.
3694 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
3696         PR c++/31517
3697         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3699 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
3701         PR c++/29365
3702         * decl2.c (constrain_class_visibility):
3703         Do not warn about the use of anonymous namespace in the main input file.
3705 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
3707         * cp-tree.h (current_template_parms): Fix typo in comment.
3709 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
3711         * cp-tree.h, error.c: Fix comment typos.
3713 2007-04-13  Jason Merrill  <jason@redhat.com>
3715         PR c++/31074
3716         * call.c (reference_binding): Add c_cast_p parm.  If true,
3717         add quals to TO as needed to make it reference-compatible.
3719 2007-04-11  Jan Hubicka  <jh@suse.cz>
3721         * class.c (convert_to_base_statically): Fold produced tree; verify
3722         that we are not processing template_decl.
3724 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
3726         PR c++/31449
3727         * class.c (build_base_path): Ensure that the converted pointer has
3728         the same cv-qualification as the input.
3730 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
3732         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3734 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
3736         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3737         Do not set it.
3738         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3739         * tree.c (cp_add_pending_fn_decls): Remove.
3740         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3742 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
3744         Revert change removing staticp.
3746 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
3748         * cp-objcp-common.c (cxx_staticp): Remove.
3749         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3750         * cp-tree.h (cxx_staticp):      
3752 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
3754         * class.c (check_for_override): Don't remove dllmport attribute
3755         of virtual methods.
3757 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
3759         PR c++/30847
3760         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3761         type issue error and return early.
3763 2007-03-30  Jason Merrill  <jason@redhat.com>
3765         PR c++/31187
3766         * typeck.c (cp_type_readonly): New fn.
3767         * cp-tree.h: Declare it.
3768         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3769         (cp_finish_decl): Not here.
3771 2007-03-31  Richard Guenther  <rguenther@suse.de>
3773         * optimize.c (maybe_clone_body): Replace splay-tree usage by
3774         pointer-map.
3776 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
3778         PR c++/31138
3779         PR c++/31140
3780         PR c++/31141
3781         * parser.c (declarator_can_be_parameter_pack): New.
3782         (cp_parser_template_parameter): Only parse the `...' if the
3783         declarator can be a parameter pack.
3784         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3785         is NULL.
3786         * pt.c (find_parameter_packs_r): Look into the bounds on integer
3787         types (they could be used as array bounds). 
3788         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3789         (tsubst_pack_expansion): Handle failure to expand parameter
3790         packs.
3791         
3792 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
3794         PR c++/26099
3795         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3796         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3797         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3798         (CLASS_TYPE_NON_UNION_P): Add.
3799         (struct lang_type_class): Add has_complex_dflt.
3800         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3801         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3802         * cp-tree.def: Add TRAIT_EXPR.
3803         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3804         * lex.c (struct resword): Add __has_nothrow_assign,
3805         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3806         __has_trivial_constructor, __has_trivial_copy,
3807         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3808         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3809         __is_pod, __is_polymorphic, __is_union.
3810         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3811         (cp_parser_trait_expr): New.
3812         * semantics.c (finish_trait_expr, trait_expr_value
3813         classtype_has_nothrow_copy_or_assign_p): New.
3814         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3815         as static.
3816         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3817         * class.c (check_bases, check_field_decl, check_bases_and_members):
3818         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3819         * pt.c (uses_template_parms, tsubst_copy_and_build,
3820         value_dependent_expression_p, type_dependent_expression_p): Deal with
3821         TRAIT_EXPR.
3822         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3824 2007-03-29  Richard Guenther  <rguenther@suse.de>
3826         * tree.c (cp_walk_subtrees): Do not set input_location.
3828 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
3830         PR c++/29077
3831         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3832         destructor.
3834 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3836         * parser.c (struct cp_parser): Update comment for
3837         greater_than_is_operator_p.
3838         (cp_parser_primary_expression): In C++0x mode, a cast operator can
3839         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3840         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3841         !GREATER_THAN_IS_OPERATOR_P.
3842         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3843         `>>' operators that will become two `>' tokens in C++0x.
3844         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3845         mode, allowing it to terminate default arguments.
3846         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3847         `>>' like two consecutive `>' tokens.
3848         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3849         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3850         ends a template argument.
3852 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
3854         * decl.c (redeclaration_error_message): Complain when redeclaring
3855         a friend function with default template arguments (C++0x mode only).
3856         * cp-tree.h (check_default_tmpl_args): Declare.
3857         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3858         template arguments in function templates. Add support for checking
3859         the default template arguments of friend templates.
3860         (push_template_decl_real): Fix call to check_default_tmpl_args.
3861         (type_unification_real): If a template parameter has not been
3862         deduced but provides a default template argument, substitute into
3863         that default template argument.
3864         * parser.c (cp_parser_init_declarator): When declaring (but not
3865         defining!) a function template in C++0x mode, check for default
3866         template arguments.
3868 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3870         PR c++/29993
3871         * decl.c (grokdeclarator): Deal with cv-qualified function type
3872         typedefs in the same way for member and non-member functions.
3874 2007-03-26  Dirk Mueller  <dmueller@suse.de>
3876         * parser.c (cp_parser_member_declaration): Pedwarn
3877         about stray semicolons after member declarations.
3879 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
3881         PR c++/30500
3882         * pt.c (instantiate_decl): Set in_system_header.
3884 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
3886         * cp-tree.h (current_tempalte_parms): Improve documentation.
3887         * pt.c (current_template_args): Likewise.
3889         PR c++/30863
3890         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3891         not consume tokens when failing.
3893 2007-03-22  Jim Wilson  <wilson@specifix.com>
3894             Mark Mitchell  <mark@codesourcery.com>
3896         PR c++/31273
3897         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
3898         consistent with FROM.
3900 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3902         * error.c (dump_expr): Handle dependent names that designate types.
3903         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3905 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
3907         * cp-tree.def, parser.c, pt.c: Fix comment typos.
3909 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3911         * cvt.c (cp_convert_and_check) : Define.
3912         * cp-tree.h (cp_convert_and_check): Declare.
3913         * call.c (convert_conversion_warnings): Rename to
3914         conversion_null_warnings.  The warning for floating-point to
3915         integer is handled by convert_and_check in convert_like_real.
3916         (convert_like_real): convert_conversion_warnings was renamed as
3917         conversion_null_warnings.
3918         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3919         overflow and changes of value during conversion.
3921 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3923         PR c++/30891
3924         * parser.c (cp_parser_statement): If 'namespace' is found, this
3925         only can be a namespace alias definition, so parse it now.
3926         (cp_parser_namespace_alias_definition): if we find an open brace
3927         instead of '=', then this is actually a misplaced namespace
3928         definition.
3929         
3930 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3932         PR c++/24924
3933         * decl.c (cxx_init_decl_processing): Move command-line options
3934         processing to c-opts.c.
3935         
3936 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
3938         * ptree.c (cxx_print_type): Use formatting markup for integers
3939         when printing template parameter index/level/orig level.
3940         (cxx_print_xnode): Ditto.
3941         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3942         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3943         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3944         HOST_WIDE_INTs.
3945         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3946         rather than a HOST_WIDE_INT.
3947         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3948         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3949         better bit-packing.
3950         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3951         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3952         IN_BASE_INITIALIZER bool bitfields.
3953         (struct cp_declarator): Make KIND a 4-bit field. Make
3954         PARAMETER_PACK_P a bool bitfield just after KIND.
3955         * pt.c (uses_parameter_packs): Destroy the pointer set.
3956         (make_pack_expansion): Ditto.
3957         (check_for_bare_parameter_packs): Ditto.
3958         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3959         
3960 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3962         PR c++/31165
3963         * call.c  (convert_default_arg): Instead of copying the node,
3964         unshare it.
3966 2007-03-15  Dirk Mueller  <dmueller@suse.de>
3968         PR c++/30860
3969         * call.c (convert_conversion_warnings): New..
3970         (convert_like_real): .. factored out from here.
3971         (convert_conversion_warnings): Add warning about
3972         false being converted to NULL in argument passing.
3974 2007-03-14  Dirk Mueller  <dmueller@suse.de>
3976         * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3977         (finish_do_body): Warn about empty body in do/while statement.
3979 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3981         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3982         
3983 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3985         PR c/21438
3986         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3987         warning.
3988         
3989 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
3991         * repo.c (init_repo): Initialize random_seed saved options.
3992         (finish_repo): Adjust.
3994 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
3996         PR bootstrap/30899
3997         * Make-lang.in (doc/g++.1): Use $< to specify the location from
3998         which to copy.
4000 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
4002         * decl.c (compute_array_index_type): New warning flag warn_vla.
4004 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
4006         PR c++/30108
4007         * call.c (convert_default_arg): Copy non-constant arguments.
4009 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
4011         PR c++/31038
4012         * parser.c (cp_parser_postfix_expression): Disallow compound
4013         literals in constant expressions.
4015         PR c++/30328
4016         * semantics.c (finish_typeof): Use unlowered_expr_type.
4017         
4018 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
4020         PR c++/30274
4021         * cp-tree.h (unlowered_expr_type): New function.
4022         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4023         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4024         (unlowered_expr_type): New function.
4025         (build_unary_op): Disallow predecrements of bool bitfields.
4026         * call.c (build_conditional_expr): Use unlowered_expr_type.
4027         * pt.c (type_unification_real): Likewise.
4029 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
4031         PR c++/20599
4032         * typeck.c (check_return_expr): Check for bare parameter packs.
4033         (comptypes): Compare template parameter packs and
4034         type pack expansions.
4035         * decl.c (grokdeclarator): Deal with the declaration of function
4036         parameter packs.
4037         (grokparms): Verify that the (optional) function parameter pack is
4038         at the end of the parameter list.
4039         (xref_basetypes): Handle pack expansions in the base class.
4040         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4041         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4042         (NONTYPE_ARGUMENT_PACK): New.
4043         (TYPE_PACK_EXPANSION): New.
4044         (EXPR_PACK_EXPANSION): New.
4045         (ARGUMENT_PACK_SELECT): New.
4046         * cp-objcp-common.c (cp_tree_size): Compute size of
4047         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4048         ARGUMENT_PACK_SELECT.
4049         * error.c (dump_template_argument): Print template argument packs.
4050         (dump_template_argument_list): Ditto.
4051         (dump_template_parameter): Dump `...' for template type parameter
4052         packs.
4053         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4054         (dump_parameters): Print function parameter packs.
4055         (dump_template_parms): Print template argument packs.
4056         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4057         (maybe_warn_variadic_templates): New.
4058         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4059         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4060         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4061         CAST_EXPR. 
4062         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4063         (write_template_arg): Write argument packs as separate arguments.
4064         * cp-tree.h (struct template_parm_index_s): Add flag that
4065         indicates that the template parameter is actually a parameter
4066         pack.
4067         (struct tree_argument_pack_select): New.
4068         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4069         (union lang_tree_node): Add argument_pack_select.
4070         (FUNCTION_PARAMETER_PACK_P): New.
4071         (PACK_EXPANSION_P): New.
4072         (PACK_EXPANSION_PATTERN): New.
4073         (SET_PACK_EXPANSION_PATTERN): New.
4074         (PACK_EXPANSION_PARAMETER_PACKS): New.
4075         (ARGUMENT_PACK_P): New.
4076         (ARGUMENT_PACK_ARGS): New.
4077         (SET_ARGUMENT_PACK_ARGS): New.
4078         (ARGUMENT_PACK_INCOMPLETE_P): New.
4079         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4080         (TEMPLATE_PARM_PARAMETER_PACK): New.
4081         (TEMPLATE_TYPE_PARAMETER_PACK): New.
4082         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4083         (ARGUMENT_PACK_SELECT_INDEX): New.
4084         (ARGUMENT_PACK_SELECT_ARG): New.
4085         (struct cp_declarator): Add parameter_pack_p flag.
4086         (maybe_warn_variadic_templates): Declare.
4087         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4088         indicate a template parameter pack. 
4089         (uses_parameter_packs): Declare.
4090         (template_parameter_pack_p): Declare.
4091         (template_parms_variadic_p): Declare.
4092         (make_pack_expansion): Declare.
4093         (check_for_bare_parameter_packs): Declare.
4094         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4095         sizeof... expressions. 
4096         (pp_cxx_expression): Print pack expansions and non-type argument
4097         packs.
4098         (pp_cxx_exception_specification): Print pack expansions. 
4099         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4100         (pp_cxx_ctor_initializer): Print pack expansions.
4101         (pp_cxx_type_id): Print pack expansions.
4102         (pp_cxx_template_argument_list): Print argument packs.
4103         (pp_cxx_template_parameter): Print ellipsis for template parameter
4104         packs.
4105         * pt.c (comp_template_parms): Compare template parameter packs.
4106         (template_parameter_pack_p): New.
4107         (template_parms_variadic_p): New.
4108         (template_args_variadic_p): New.
4109         (make_ith_pack_parameter_name): New.
4110         (struct find_parameter_pack_data): New.
4111         (find_parameter_packs_r): New.
4112         (uses_parameter_packs): New.
4113         (make_pack_expansion): New.
4114         (check_for_bare_parameter_packs): New.
4115         (expand_template_argument_pack): New.
4116         (reduce_template_parm_level): Propagate parameter pack flag.
4117         (process_template_parm): Add is_parameter_pack parameter to state
4118         when the parameter is actually a parameter pack. Create template
4119         parameter packs when is_parameter_pack is true.
4120         (current_template_args): The argument for a template parameter
4121         pack is an argument pack containing a single pack expansion.
4122         (process_partial_specialization): When checking that non-type
4123         argument expressions do not involve template parameters, loop over
4124         the arguments in argument packs separately.
4125         (push_template_decl_real): Check that the type of the declaration
4126         does not have any bare parameter packs. Check that primary
4127         templates have no more than one parameter pack, and that it comes
4128         at the end of the template parameter list.
4129         (convert_template_argument): Handle coercions for pack expansion
4130         expressions by coercing the pattern then rebuilding the expansion.
4131         (coerce_template_parms): When coercing the arguments for a
4132         variadic template, pack "extra" arguments into an argument pack.
4133         (coerce_template_template_parms): Cannot coerce between parameter
4134         packs and non-pack parameters.
4135         (template_args_equal): Compare PACK_EXPANSION_P expressions.
4136         (comp_template_args): Expand all template arguments packs before
4137         comparing template argument lists.
4138         (mangle_class_name_for_template): Make argument packs as separate
4139         template arguments.
4140         (for_each_template_parm_r): No need to handle BASELINK. 
4141         (instantiate_class_template): Handle pack expansions in the base
4142         class list.
4143         (tsubst_pack_expansion): New.
4144         (tsubst_template_args): Handle substitutions of argument packs and
4145         pack expansion into template argument lists.
4146         (tsubst_decl): Expand function parameter packs into separate
4147         function parameters.
4148         (tsubst_arg_types): Expand a type pack expansion into separate
4149         argument types.
4150         (tsubst_exception_specification): Handle pack expansions in
4151         exception specifiers.
4152         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
4153         replacing a template parameter with its argument. If we encounter
4154         a substitution for an argument pack, just return the parameter
4155         itself. 
4156         (tsubst_copy): sizeof(X...) returns the number of elements in
4157         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
4158         PARM_DECL is a parameter pack.
4159         (tsubst_expr): Expression pack expansions and argument packs
4160         cannot show up here; they will all be handled through function
4161         calls, sizeof, and template argument lists.
4162         (tsubst_copy_and_build): sizeof(X...) returns the number of
4163         elements in parameter pack X.  Handle pack expansions in TREE_LIST
4164         and CONSTRUCTOR nodes.
4165         (fn_type_unification): Handle "incomplete" explicit template
4166         argument lists that specify some of the arguments for a template
4167         parameter pack.
4168         (type_unification_real): Unify arguments against pack expansions.
4169         (template_parm_level_and_index): New, helper function.
4170         (unify_pack_expansion): New.
4171         (unify): Unify argument packs on an argument-by-argument basis,
4172         handling variadic argument packs as well.
4173         (more_specialized_fn): Handle unification of function parameter
4174         packs. All things being equal, prefer non-variadic function
4175         templates to variadic function templates.
4176         (more_specialized_class): Prefer the variadic class template
4177         partial specialization that binds fewer arguments to a parameter
4178         pack.
4179         (regenerate_decl_from_template): Expand function parameter packs
4180         into separate parameters.
4181         (instantiate_decl): Ditto.
4182         (tsubst_initializer_list): Handle pack expansions for base-class
4183         initializers.
4184         (dependent_type_p_r): Determine dependent types in argument packs
4185         and pack expansions.
4186         (value_dependent_expression_p): Determine value-dependence of
4187         non-type argument packs.
4188         (dependent_template_arg_p): Handle argument packs.
4189         * semantics.c (finish_cond): Check for bare parameter packs.
4190         (finish_expr_stmt): Ditto.
4191         (finish_for_expr): Ditto.
4192         (finish_switch_cond): Ditto.
4193         (finish_mem_initializers): Ditto.
4194         * name-lookup.c (arg_assoc_type): Handle pack expansions and
4195         argument packs.
4196         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4197         * parser.c (make_declarator): Declarator is not an expansion.
4198         (make_pointer_declarator): Transfer parameter pack flag to outer
4199         declarator.
4200         (make_reference_declarator): Ditto.
4201         (make_ptrmem_declarator): Ditto.
4202         (make_call_declarator): Ditto.
4203         (make_array_declarator): Ditto.
4204         (cp_parser_postfix_expression): Allow pack expansion expressions
4205         in the argument list for a call expression.
4206         (cp_parser_parenthesized_expression_list): Add new parameter
4207         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4208         into separate arguments."
4209         (cp_parser_new_placement): Allow pack expansion expressions.
4210         (cp_parser_new_initializer): Ditto.
4211         (cp_parser_mem_initializer_list): Allow ellipsis to create a
4212         base-class initializer expansion.
4213         (cp_parser_mem_initializer): Ditto.
4214         (cp_parser_template_parameter_list): Keep track of whether the
4215         template parameter is a template parameter pack.
4216         (cp_parser_template_parameter): Parse the ellipsis to indicate a
4217         template parameter pack.
4218         (cp_parser_type_parameter): Ditto.
4219         (cp_parser_template_argument_list): Parse the ellipsis to indicate
4220         a pack expansion.
4221         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4222         this declarator is a parameter pack.
4223         (cp_parser_parameter_declaration): The ellipsis does not end the
4224         parameter declaration, because it might be a parameter pack. Parse
4225         the ellipsis to indicate a parameter pack.
4226         (cp_parser_initializer): Allow pack expansions.
4227         (cp_parser_initializer_list): Allow ellipsis to create an
4228         initializer expansion.
4229         (cp_parser_base_clause): Allow ellipsis to create a base specifier
4230         expansion.
4231         (cp_parser_type_id_list): Allow ellipsis to create an exception
4232         specifier expansion.
4233         (cp_parser_attribute_list): Don't allow pack expansions.
4234         (cp_parser_functional_cast): Allow pack expansions.
4235         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4236         compute the length of a parameter pack.
4237         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4238         end a template argument.
4239         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4240         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4241         CAST_EXPR. 
4243 2007-03-09  Dirk Mueller  <dmueller@suse.de>
4245         * call.c (build_new_op): Call warn_logical_operator.
4247 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
4249         PR c++/30852
4250         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4252         PR c++/30534
4253         * pt.c (any_template_arguments_need_structural_equality_p):
4254         Robustify.
4256 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
4258         * decl.c (grokdeclarator): Disable warnings for anonymous
4259         bitfields.
4261 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
4263         * typeck2.c (readonly_error): Always emit a hard error.
4264         Remove last argument.
4265         * cp-tree.h (readonly_error): Adjust prototype.
4266         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4267         * typeck.c (build_unary_op): Likewise.
4268         (build_modify_expr): Likewise.
4270 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
4272         PR c++/30895
4273         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4275 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4277         PR c++/15787
4278         * parser.c (struct cp_parser): New IN_IF_STMT.
4279         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4280         returning if parsing the body of an 'if' statement or issuing an
4281         error and continuing.
4282         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4283         body of 'if'.
4284         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4285         
4286 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
4288         PR c++/28253
4289         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4290         for thunks.
4292 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
4294         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4295         Objective-C++.  Don't exit early if -shared-libgcc needs to be
4296         added.
4298 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4300         * typeck.c (common_base_type): Delete unused function.
4301         
4302 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
4304         * Make-lang.in: Add dummy lang.install-pdf target.
4306 2007-03-01  Simon Baldwin <simonb@google.com>
4308         PR c++/23689
4309         * decl.c (check_tag_decl): Added new warning for typedef ignored
4310         when it precedes an otherwise valid non-typedef declaration.
4312 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
4314         * typeck.c (build_function_call): Store converted arguments
4315         in a stack-allocated array instead of building a list.
4316         (convert_arguments): Store arguments in the array passed in as an
4317         argument, and return the actual number of arguments.
4318         * call.c (build_call): Delete, and replace with...
4319         (build_call_n, build_call_a): New.
4320         (build_op_delete_call): Rewrite to avoid constructing argument lists.
4321         (build_over_call): Store converted arguments in a stack-allocated
4322         array instead of building a list.
4323         (build_cxx_call): Pass arguments in an array instead of as a list.
4324         (build_java_interface_fn_ref): Rewrite to avoid constructing
4325         argument lists.
4326         * tree.h: Update declarations to reflect above changes.
4327         * method.c (use_thunk): Use a stack-allocated array to hold
4328         the arguments instead of a list.
4329         * rtti.c (throw_bad_cast): Update call to cxx_call.
4330         (throw_bad_typeid): Likewise.
4331         (build_dynamic_cast_1): Likewise.
4332         * init.c (build_builtin_delete_call): Use build_call_n.
4333         * decl.c (expand_static_init): Likewise.
4334         * except.c (cp_protect_cleanup_actions): Likewise.
4335         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4336         (gimplify_must_not_throw_expr): Likewise.
4337         (cxx_omp_apply_fn): Use build_call_a.
4339 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
4341         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4342         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4344 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
4346         * cp-tree.h (static_ctors): Remove.
4347         * cp-tree.h (static_dtors): Likewise.
4348         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4349         refactoring of tree_map hierarchy.
4350         (decl_shadowed_for_var_insert): Likewise.
4351         * semantics.c (expand_body): Use c_expand_body.
4352         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4353         * decl2.c (static_ctors): Remove.
4354         (static_dtors): Likewise.
4355         (generate_ctor_or_dtor_function): Pass NULL_TREE to
4356         objc_generate_static_init_call.  Do not call static_[cd]tors.
4357         (generate_ctor_and_dtor_functions_for_priority): Do not check for
4358         static_[cd]tors.
4359         (cp_write_global_declarations): Likewise.
4361 2007-02-23  Richard Guenther  <rguenther@suse.de>
4363         * class.c (note_name_declared_in_class): Make declaration
4364         changes meaning a pedwarn.
4366 2007-02-22  Michael Matz  <matz@suse.de>
4368         PR c++/29433
4369         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4370         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4371         dump_function_decl): Guard emitting outer scopes by new flag.
4372         * cp-lang.c (cxx_dwarf_name): New function.
4373         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4374         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4375         Remove functions.
4376         (push_template_decl_real, lookup_template_class): Remove calls
4377         to above functions.
4379 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
4381         * call.c (build_new_method_call): Ensure that explicit calls of
4382         destructors have type "void".
4384 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4386         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4387         and -Walways-true with -Waddress.
4388         * cvt.c (convert_to_void): Replace unconditional warning with
4389         -Waddress.
4391 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
4393         * decl.c, tree.c: Fix comment typos.
4395 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4397         PR C++/30158
4398         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
4399         statement expression if we had an error mark node.
4401 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
4402             Brooks Moses  <brooks.moses@codesourcery.com>
4403             Lee Millward  <lee.millward@codesourcery.com>
4405         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4406         Change class to tcc_vl_exp.
4408         * call.c (build_call): Use build_call_list instead 
4409         of build3. 
4410         (build_over_call): Likewise.
4411         (build_new_method_call): Use build_min_non_dep_call_list 
4412         instead of build_min_non_dep.
4414         * error.c (dump_call_expr_args): New function.
4415         (dump_aggr_init_expr_args): New function.
4416         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
4417         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4419         * cvt.c (convert_to_void): Use build_call_array instead
4420         of build3; use new AGGR_INIT_EXPR accessor macros.
4422         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4423         instead of TREE_CODE_LENGTH.
4425         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4426         AGGR_INIT_EXPR accessor macros.
4428         * cp-gimplify.c (cp_gimplify_init_expr): Use 
4429         AGGR_INIT_EXPR_SLOT to set the slot operand.
4431         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4432         (AGGR_INIT_EXPR_SLOT): New macro.
4433         (AGGR_INIT_EXPR_ARG): New macro.
4434         (aggr_init_expr_nargs): New macro.
4435         (AGGR_INIT_EXPR_ARGP): New macro.
4436         (aggr_init_expr_arg_iterator): New.
4437         (init_aggr_init_expr_arg_iterator): New.
4438         (next_aggr_init_expr_arg): New.
4439         (first_aggr_init_expr_arg): New.
4440         (more_aggr_init_expr_args_p): New.
4441         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4442         (stabilize_aggr_init): New declaration.
4443         (build_min_non_dep_call_list): Likewise.
4445         * tree.c (process_aggr_init_operands): New function.
4446         (build_aggr_init_array) New function.
4447         (build_cplus_new): Update to use new CALL_EXPR and
4448         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4449         build_aggr_init_array.
4450         (build_min_non_dep_call_list) New function.
4451         (build_min_nt): Assert input code parameter is not a variable
4452         length expression class.
4453         (build_min, build_min_non_dep): Likewise.
4454         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4455         to check for equality instead of recursing. Handle tcc_vl_exp
4456         tree code classes.
4457         (stabilize_call): Update to only handle CALL_EXPRs, not 
4458         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4459         (stabilize_aggr_init): New function.
4460         (stabilize_init): Use it.
4462         * cxx-pretty-print.c (pp_cxx_postfix_expression)
4463         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4464         AGGR_INIT_EXPR accessor macros and argument iterators.
4465         
4466         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4467         build_vl_exp. Iterate through the operands, recursively 
4468         processing each one.
4469         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4470         CALL_EXPR accessor macros.
4471         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4472         tree code classes. Use TREE_OPERAND_LENGTH instead of 
4473         TREE_CODE_LENGTH.
4475         * semantics.c (finish_call_expr): Use build_nt_call_list
4476         instead of build_nt.
4477         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
4478         accessor macros. Use build_call_array to construct the 
4479         CALL_EXPR node instead of build3
4480         
4481         * decl2.c (build_offset_ref_call_from_tree): Use 
4482         build_nt_call_list and build_min_non_dep_call_list instead
4483         of build_min_nt and build_min_non_dep.
4485         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4486         Use build_nt_call_list instead of build_min_nt.
4488 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4490         PR c++/28943
4491         * call.c (build_conditional_expr): Improve error message.
4492         
4493 2007-02-13  Dirk Mueller  <dmueller@suse.de>
4495         * friend.c (do_friend): Annotate warning about friend
4496         declarations in templates with OPT_Wnon_template_friend.
4497         Convert informal message from warning() to inform().
4499 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
4500             Mark Mitchell  <mark@codesourcery.com>
4502         PR c++/14622
4503         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4504         instantiations for variables.
4506 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4508         PR middle-end/7651
4509         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4510         Check warn_unused_value just once.
4512 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
4514         PR c++/26988
4515         * pt.c (determine_specialization): Use skip_artificial_parms_for.
4516         (fn_type_unificiation): Likewise.
4517         (get_bindings): Likewise.
4519 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
4521         PR target/29487
4522         * decl.c (finish_function): Use DECL_REPLACEABLE.
4523         * tree.c (cp_cannot_inline_tree_fn): Likewise.
4525 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4527         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4529 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
4531         * decl.c (grokvardecl): Don't error if !have_tls.
4532         (grokdeclarator): Likewise.
4533         * parser.c (cp_parser_omp_threadprivate): Likewise.
4535 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
4537         PR c++/30703
4538         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4539         parameters and result decls in omp clauses.
4540         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4541         by reference.
4543 2007-02-05  Dirk Mueller  <dmueller@suse.de>
4545         PR bootstrap/30510
4546         * parser.c (cp_parser_class_specifier): Always initialize bases.
4548 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4550         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4551         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4552         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4553         expressions.
4554         * semantics.c (finish_omp_atomic): Store a whole expression node
4555         in operand 1, and integer_zero_node in operand 0, for dependent
4556         OMP_ATOMIC.  Rewrite to make flow easier to understand.
4558 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4560         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4562 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
4564         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4565         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4567 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
4569        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
4570        keyword warning to -Wc++0x-compat.
4571         
4572 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4574         * decl.c (grokdeclarator): Update documentation.
4576 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
4578         PR c++/30536
4579         * decl.c (grokdeclarator): If __thread is used together with
4580         a storage class other than extern and static, clear thread_p
4581         after issuing diagnostics and fall through to checking the
4582         storage class.
4584 2007-01-30  Roger Sayle  <roger@eyesopen.com>
4586         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
4587         calculating the size of an array (to avoid recursive errors).
4589 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4591         PR c++/24745
4592         * typeck.c (build_binary_op): Fix logic for warning. Move warning
4593         to -Wpointer-arith.
4594         * call.c (convert_like_real): Don't warn when converting to
4595         boolean type.
4596         
4597 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4599         * decl.c (pop_label): Replace warning with call to
4600         warn_for_unused_label.
4602 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
4604         PR C++/28988
4605         * semantics.c (finish_pseudo_destructor_expr): Check the
4606         destrutor name by calling check_dtor_name.
4608 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
4610         * lex.c (D_CPP0X): Rename.
4611         (D_CXX0X): To this.
4612         (reswords): D_CPP0X -> D_CXX0X.
4613         (init_reswords): Ditto.
4614         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
4615         of C++0x keywords as identifiers.
4617 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
4619         PR c++/27492
4620         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
4621         function decls.
4623 2007-01-23  Ian Lance Taylor  <iant@google.com>
4625         * typeck.c (convert_for_assignment): Only warn about a = b = c
4626         when converting to bool.
4628 2007-01-23  Roger Sayle  <roger@eyesopen.com>
4630         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
4631         TREE_OVERFLOW.
4632         * typeck.c (ignore_overflows): Remove the remaining uses of
4633         TREE_CONSTANT_OVERFLOW.
4635 2007-01-20  Jan Hubicka  <jh@suse.cz>
4637         * decl2.c (start_objects, start_static_storage_duration_function):
4638         Do not make the functions uninlinable.
4640 2007-01-17  Ian Lance Taylor  <iant@google.com>
4642         * class.c (add_method): Call VEC_reserve_exact rather than passing
4643         a negative size to VEC_reserve.
4645 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
4647         PR c++/29573
4648         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
4650 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
4652         PR c++/28999
4653         * decl.c (make_typename_type): If the qualified name is not a
4654         type, issue an error.
4655         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
4656         formatting.
4658 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
4660         * rtti.c: Include target.h.
4661         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4662         don't emit typeinfo for fundamental types as weak.
4663         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4665 2007-01-08  Richard Guenther  <rguenther@suse.de>
4667         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4669 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
4671         * call.c (standard_conversion): Pass flag to
4672         vector_types_convertible_p to disallow emission of note.
4673         * typeck.c (convert_for_assignment): Pass flag to
4674         vector_types_convertible_p to allow emission of note.
4675         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4676         to disallow emission of note.
4678 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4680         PR c++/28986
4681         * typeck.c (build_binary_op): Call overflow_warning if
4682         TREE_OVERFLOW_P is true for the result and not for any of the
4683         operands.
4684         
4685 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
4687        PR c++/19439
4688        * class.c (add_method): Don't wait until template
4689        instantiation time to complain about duplicate methods.
4690         
4691 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4693         PR c/19978
4694         * semantics.c (finish_unary_op_expr): Warn only if result
4695         overflowed and operands did not.
4697 2007-01-05  Ian Lance Taylor  <iant@google.com>
4699         * typeck.c (build_binary_op): Warn about comparing a non-weak
4700         address to NULL.
4702 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
4704         * pt.c (tsubst): Propagate the need for structural equality checks
4705         when reducing the level of template parameters.
4707 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
4709         * pt.c: Fix a comment typo.
4711 2007-01-02  Ian Lance Taylor  <iant@google.com>
4713         * semantics.c (maybe_convert_cond): Optionally warn when using an
4714         assignment as a condition.
4715         * typeck.c (convert_for_assignment): Optionally warn about
4716         assigning the result of an assignment to a bool.
4718 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4720         * pt.c (canonical_template_parms): Correct typo in comment.
4721         
4722 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4724         * typeck.c (structural_comptypes): Renamed from "comptypes".
4725         (comptypes): Use canonical type information to perform fast type
4726         comparison. When VERIFY_CANONICAL_TYPES, verify that the
4727         canonical type comparison returns the same results as we would see
4728         from the current, structural check. Support COMPARE_STRUCTURAL
4729         when we need structural checks.
4730         * decl.c (typename_compare): Fix comment.
4731         (build_typename_type): TYPENAME_TYPE nodes require structural
4732         equality checks, because they resolve different based on the
4733         current class type.
4734         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4735         require structural equality checks (for now).
4736         (build_ptrmemfunc_type): Build the canonical pointer to member
4737         function type.
4738         (compute_array_index_type): Whenever we build a new index type
4739         to represent the size of an array in a template, we need to mark
4740         this index type as requiring structural equality. This goes for
4741         arrays with value-dependent sizes with the current ABI, or all
4742         arrays with ABI-1.
4743         * tree.c (cplus_array_hash): New.
4744         (struct cplus_array_info): New.
4745         (cplus_array_compare): New.
4746         (cplus_array_htab): New.
4747         (build_cplus_array_type_1): Use a hash table to cache the array
4748         types we build. Build the canonical array type for each array
4749         type.
4750         (cp_build_qualified_type_real): When building a cv-qualified array
4751         type, use the hash table of array types and build canonical array
4752         types as necessary.
4753         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4754         use structural equality (for now).
4755         * cp-tree.h (COMPARE_STRUCTURAL): New.
4756         * pt.c (canonical_template_parms): New.
4757         (canonical_type_parameter): New.
4758         (process_template_parm): Find the canonical type parameter.
4759         (lookup_template_class): When we have named the primary template
4760         type, set the canonical type for our template class to the primary
4761         template type. If any of the template arguments need structural
4762         equality checks, the template class needs structural equality
4763         checks.
4764         (tsubst): When reducing the level of a template template
4765         parameter, we require structural equality tests for the resulting
4766         parameter because its template parameters have not had their types
4767         canonicalized. When reducing a template type parameter, find the
4768         canonical reduced type parameter.
4769         (any_template_arguments_need_structural_equality_p): New.