OSDN Git Service

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