OSDN Git Service

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