OSDN Git Service

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