OSDN Git Service

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