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