OSDN Git Service

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