OSDN Git Service

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