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