OSDN Git Service

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