OSDN Git Service

cp/
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
2
3         PR c++/31747
4         * decl.c (grokdeclarator): In case of conflicting specifiers
5         just return error_mark_node.
6
7 2007-10-26  Ollie Wild  <aaw@google.com>
8
9         * expr.c (cxx_expand_expr): Removed.
10         * cp-tree.h (exx_expand_expr): Removed.
11         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
12         with c_expand_expr.
13
14 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
15
16         PR c++/33843
17         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
18
19 2007-10-23  Jason Merrill  <jason@redhat.com>
20
21         PR c++/25950 (DR 391)
22         * call.c (struct conversion): Remove check_copy_constructor_p.
23         (reference_binding): Always bind a reference directly to a 
24         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
25         temporary creation.
26         (check_constructor_callable): Remove.
27         (convert_like_real): Don't call it.
28         (initialize_reference): Don't call check_constructor_callable.
29         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
30         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
31         conversions if LOOKUP_NO_TEMP_BIND.
32         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
33         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
34         second conversion.
35         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
36
37 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
38
39         PR c++/33372
40         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
41         before checking if its type is integral.
42
43 2007-10-22  Jason Merrill  <jason@redhat.com>
44
45         PR c++/33620
46         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
47         * pt.c (apply_late_template_attributes): Splice out dependent
48         attributes from DECL_ATTRIBUTES.
49
50         * decl.c (cxx_maybe_build_cleanup): Use build_address.
51
52 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
53
54         * typeck.c (build_binary_op) : Use appropriate warning option
55         instead of unnamed warning.
56
57 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
58
59         PR c++/31446
60         * pt.c (current_template_args): Do not change TREE_LIST elements
61         with a TREE_VALUE of error_mark_node.
62
63 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
64
65         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
66         * decl.c (start_decl): Tidy.
67         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
68         the type.
69         (grokdeclarator): Clarify comment.
70
71 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
72
73         PR c++/30303
74         * decl.c (grokfndecl): Return NULL after the "definition of
75         implicitly-declared" error happened.
76
77 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
78
79         PR c++/26698
80         * call.c (build_user_type_conversion_1): Do not consider conversion
81         functions to convert a (possibly cv-qualified) object to the (possibly
82         cv-qualified) same object type (or a reference to it), to a (possibly
83         cv-qualified) base class of that type (or a reference to it).
84
85 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
86
87         * pt.c (tsubst): Use template_parm_level_and_index.
88
89 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
90
91         PR c++/32121
92         * parser.c (cp_parser_compound_statement): Handle label-declarations
93         at the beginning of the compound statement.
94         (cp_parser_block_declaration): Issue diagnostics about __label__
95         not at the beginning of a block.
96
97 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
98
99         PR c++/33461
100         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
101         to convert_template_argument.
102         (coerce_template_parms): Return error_mark_node after fixed-length
103         error.
104         (tsubst_decl): Check for error_mark_node the return value of the
105         first tsubst in 'case VAR_DECL'.
106
107 2007-10-08  Ollie Wild  <aaw@google.com>
108
109         * typeck2.c (digest_init): Call cplus_expand_constant after
110         convert_for_initialization.
111         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
112         * expr.c (cplus_expand_constant): Updated function description.
113
114 2007-10-04  Jason Merrill  <jason@redhat.com>
115
116         PR c++/20416
117         * call.c (initialize_reference): Handle local static reference
118         temps properly.
119
120 2007-10-03  Jason Merrill  <jason@redhat.com>
121
122         PR c++/32470
123         * name-lookup.c (push_namespace_with_attrs): Fold back into...
124         (push_namespace): Here.
125         (handle_namespace_attrs): New fn for the attr code.
126         (leave_scope): Don't pop_visibility.
127         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
128         * parser.c (cp_parser_namespace_definition): Call
129         handle_namespace_attrs and pop_visibility as appropriate. 
130
131         PR c++/11756
132         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
133
134 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
135
136         * decl.c (duplicate_decls): Preserve linkage flags for mere
137         redeclarations of gnu_inline definitions.
138
139 2007-10-03  Jason Merrill  <jason@redhat.com>
140
141         PR c++/15764
142         * decl.c (wrap_cleanups_r): New fn.
143         (wrap_temporary_cleanups): New fn.
144         (initialize_local_var): Call it.
145
146 2007-09-29  Jason Merrill  <jason@redhat.com>
147
148         PR c++/33094
149         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
150         constant to not have DECL_EXTERNAL if it's file-local.
151
152 2007-09-28  Ollie Wild  <aaw@google.com>
153
154         Revert
155         2007-09-27  Ollie Wild  <aaw@google.com>
156
157         * typeck2.c (digest_init): Call cplus_expand_constant after
158         convert_for_initialization.
159         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
160         * expr.c (cplus_expand_constant): Updated function description.
161
162 2007-09-28  Jason Merrill  <jason@redhat.com>
163
164         PR c++/10179
165         * class.c (layout_empty_base): Take rli parameter, update
166         rli->record_align if empty base has user-specified alignment.
167         (build_base_field): Pass rli to it.
168
169 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
170
171         PR c++/33213
172         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
173
174 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
175
176         PR c++/33118
177         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
178         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
179         (dump_parameters): Just call dump_type for argument packs too.
180
181 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
182
183         PR c++/31434
184         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
185         qualification by creating qualified PACK_EXPANSION_PATTERN and
186         then calling make_pack_expansion on it.
187
188 2007-09-27  Ollie Wild  <aaw@google.com>
189
190         * typeck2.c (digest_init): Call cplus_expand_constant after
191         convert_for_initialization.
192         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
193         * expr.c (cplus_expand_constant): Updated function description.
194
195 2007-09-27  Jason Merrill  <jason@redhat.com>
196
197         PR c++/33571
198         * decl2.c (is_late_template_attribute): Don't crash on unknown
199         attribute.
200
201 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
202
203         PR c++/33493
204         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
205         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
206         spaces in the formatting.
207         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
208
209 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
210
211         * error.c (cxx_print_error_function): Add third argument, pass
212         it over to lhd_print_error_function.
213         (cp_print_error_function): If diagnostic->abstract_origin, print
214         virtual backtrace.
215         * cp-tree.h (struct diagnostic_info): New forward decl.
216         (cxx_print_error_function): Add third argument.
217
218 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
219
220         PR c++/33207
221         * name-lookup.c (pushtag): Do not create an implicit typedef before
222         the associated type declaration is known to be valid.
223
224 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
225
226         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
227         rather than pointers.
228
229 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
230
231         PR c++/14688
232         * search.c (check_final_overrider): Fail if
233         targetm.comp_type_attributes returns 0.
234
235 2007-09-24  Jason Merrill  <jason@redhat.com>
236
237         PR c++/33239
238         * pt.c (resolve_typename_type): Don't look things up in the original
239         template if it would mean losing template arguments.    
240
241 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
242
243         PR c++/33506
244         * cp-tree.h (cxx_type_hash_eq): New prototype.
245         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
246         * tree.c (cxx_type_hash_eq): New function.
247
248 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
249
250         PR c++/33185    
251         * tree.c (cp_build_qualified_type_real): Build a canonical
252         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
253         
254 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
255
256         PR c++/33112
257         PR c++/33185    
258         * tree.c (cplus_array_compare): Compare pointers, not types.
259         (build_cplus_array_type_1): Store new array type into the hash
260         table before building the canonical type; build the canonical type
261         correctly.
262         (cp_build_qualified_type_real): Put all of the array types with
263         cv-qualified element types into the C++ array hash table, built as 
264         variants of the unqualified versions.
265         
266 2007-09-23  Jason Merrill  <jason@redhat.com>
267
268         PR c++/16370
269         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
270         for deprecation warnings.
271
272 2007-09-22  Jason Merrill  <jason@redhat.com>
273
274         PR c++/15269
275         * call.c (build_over_call): Warn about deprecated virtuals.
276
277         PR c++/19407
278         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
279         (MAYBE_TAGGED_TYPE_P): Remove.
280         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
281         instead of calling is_late_template_attribute again.
282         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
283         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
284         Don't crash on typedefs from non-template classes.
285         * decl2.c (grokfield): Don't sorry about attrs on template parms.
286         (is_late_template_attribute): All attributes applied to template
287         parms or typename types are dependent.  Static.
288         (splice_template_attributes): Pass decl through.
289         (save_template_attributes): Likewise.
290
291 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
292
293         PR c++/33496
294         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
295         returned from tsubst_pack_expansion.
296         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
297         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
298
299 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
300
301         PR c++/33460
302         * semantics.c (finish_id_expression): Use consistently
303         context_for_name_lookup.
304         * decl.c (fixup_anonymous_aggr): Fix error message for
305         anonymous struct (vs union).
306
307 2007-09-19  Jason Merrill  <jason@redhat.com>
308
309         PR c++/7586
310         * pt.c (tsubst): Handle typedefs by looking for the specialization.
311         (retrieve_specialization): Only tagged types use 
312         DECL_TEMPLATE_INSTANTIATIONS.
313         (instantiate_class_template): Push nested classes too.
314         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
315         tagged types.
316         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
317         * init.c (is_aggr_type): Remove redundant tests.
318         * class.c (push_nested_class): Use CLASS_TYPE_P.
319
320 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
321
322         PR c++/33459
323         * init.c (build_zero_init): If, recursively, build_zero_init
324         returns a NULL_TREE, do not append it to the VEC of constructors.
325
326 2007-09-18  Jason Merrill  <jason@redhat.com>
327
328         PR c++/17743
329         * pt.c (apply_late_template_attributes): Set processing_template_decl.
330         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
331         ATTR_FLAG_TYPE_IN_PLACE.
332         (tsubst): Do unqualified lookup to find typedefs from current class.
333         [ARRAY_TYPE]: Propagate alignment info.
334         * decl2.c (is_late_template_attribute): Only defer handling of
335         attribute aligned if the expression is dependent.
336         (save_template_attributes): If we're deferring any attributes,
337         make this a naming typedef.
338
339 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
340
341         PR c++/33462 (again)
342         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
343         va_arg instead of __builtin_va_arg.
344
345 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
346
347         PR c++/33462
348         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
349         (pp_cxx_primary_expression): Use it.
350         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
351         * error.c (dump_expr): Use it.
352
353 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
354
355         PR c++/33463
356         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
357         out case TYPEID_EXPR to...
358         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
359         and pp_cxx_right_paren.
360         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
361         * error.c (dump_expr): Use it.
362
363 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
364
365         PR c++/33464
366         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
367         (pp_cxx_primary_expression): Use it.
368         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
369         * error.c (dump_expr): Use it.
370
371 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
372
373         PR c++/33124
374         * init.c (build_new): Remove warning for zero-element
375         allocations.
376
377 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
378
379         PR c++/32756
380         * call.c (maybe_handle_implicit_object): Set this_p, clear
381         rvaluedness_matches_p.
382         (compare_ics): Do not compare rvaluedness matching when one of the
383         operands is an implicit object.
384
385 2007-09-14  Jason Merrill  <jason@redhat.com>
386
387         PR c++/17743, c++/19163
388         * decl2.c (is_late_template_attribute): New fn.
389         (splice_template_attributes, save_template_attributes): New fns.
390         (cplus_decl_attributes): Call save_template_attributes.
391         * pt.c (apply_late_template_attributes): New fn.
392         (instantiate_class_template, tsubst_decl): Use it.
393         * cp-tree.h: Declare is_late_template_attribute.
394
395 2007-09-13  Tom Tromey  <tromey@redhat.com>
396
397         * parser.c (cp_lexer_new_main): Don't use
398         c_lex_return_raw_strings.
399         (cp_lexer_get_preprocessor_token): Update.  Add special case when
400         lexer is NULL.
401
402 2007-09-11  Jan Hubicka <jh@suse.cz>
403
404         * method.c (use_thunk): Use tree_rest_of_compilation
405         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
406         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
407         * cp-tree.h (expand_body): Kill.
408         (emit_associated_thunks): Declare.
409         * semantics.c (emit_associated_thunks): Export.
410         (expand_body): Kill.
411
412 2007-09-09  David Daney  <ddaney@avtrex.com>
413
414         PR c++/33324
415         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
416         to calculate cookie_ptr.
417
418 2007-09-08  Jason Merrill  <jason@redhat.com>
419
420         PR c++/33342
421         * pt.c (most_specialized_class): Set processing_template_decl
422         while tsubsting partial spec args.
423
424 2007-09-06  Jason Merrill  <jason@redhat.com>
425
426         * decl2.c (get_guard): Copy visibility from the guarded variable.
427
428 2007-09-06  Jan Hubicka  <jh@suse.cz>
429
430         * semantics.c (expand_body): Do not mark arguments of clones used.
431
432 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
433
434         PR c++/32674
435         * decl.c (cp_finish_decl): When processing_template_decl,
436         deal correctly with init as TREE_LIST.
437
438 2007-09-06  Tom Tromey  <tromey@redhat.com>
439
440         * decl.c (finish_function): Put return's location on line zero of
441         file.
442
443 2007-09-05  Jason Merrill  <jason@redhat.com>
444
445         PR c++/15745
446         * except.c (prepare_eh_type): Use type_decays_to.
447
448         PR c++/15097
449         * init.c (build_delete): Use build_headof to get the address of the
450         complete object if we aren't using the deleting destructor.
451         * rtti.c (build_headof): No longer static.
452         * cp-tree.h: Declare it.
453
454 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
455
456         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
457         decl if a prototype for XX is provided with throw().
458
459         PR c++/33289
460         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
461         on __*_chk non-__builtin_* decls.
462
463 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
464
465         PR c++/30302
466         * semantics.c (finish_id_expression): Use context_for_name_lookup
467         insted of DECL_CONTEXT, to see through anonymous structs and unions.
468         * class.c (finish_struct_anon): Deal correctly with anonymous
469         structs (vs unions, as GNU extension) in error messages.
470
471 2007-09-05  Jan Hubicka  <jh@suse.cz>
472
473         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
474         call, DECL_EXTERNAL checks and current_function_decl saving.
475
476 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
477
478         PR c++/29731 (again)
479         * parser.c (cp_parser_primary_expression): Return error_mark_node
480         when a statement-expression is found in a template-argument list.
481
482 2007-09-04  Jason Merrill  <jason@redhat.com>
483
484         * except.c (initialize_handler_parm): Use
485         fold_build_cleanup_point_expr.
486
487         PR c++/31419
488         * call.c (reference_binding): Don't look for user-defined conversions
489         to the same type.
490
491         PR c++/31411
492         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
493         the MUST_NOT_THROW_EXPR.
494
495 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
496
497         * decl.c (cp_finish_decl): Call determine_visibility before
498         make_rtl_for_nonlocal_decl.
499
500 2007-09-04  Jason Merrill  <jason@redhat.com>
501
502         PR c++/14032
503         * pt.c (most_specialized_class): Substitute outer template
504         arguments into the arguments of a member template partial
505         specialization.
506         (strip_innermost_template_args): New fn.
507
508 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
509
510         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
511
512 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
513
514         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
515         * decl.c (cp_make_fname_decl): Likewise,
516         * parser.c (cp_parser_string_literal): Likewise,
517         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
518         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
519         Likewise,
520
521 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
522
523         PR c++/33208
524         * typeck.c (build_unary_op): Fix error message for
525         Boolean expression as operand to operator--.
526
527 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
528
529         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
530         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
531         Likewise.
532
533 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
534
535         PR c++/32597
536         * init.c (build_default_init): Make extern.
537         * cp-tree.h (build_default_init): Declare here.
538         * pt.c (tsubst_expr): When the instantiation of the initializer of
539         a variable results in an empty list, default-initialize the
540         variable.
541         (tsubst_copy_and_build): When the instantiation of the initializer
542         in a new expression results in an empty initializer list,
543         default-initialize it.
544
545 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
546
547         * mangle.c (write_type): Change mangling of rvalue reference from
548         `RR' to `O'. 
549
550 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
551
552         * decl.c (duplicate_decls): Remove duplicated line.
553
554 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
555
556         PR c++/33210
557         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
558         BOUND_TEMPLATE_TEMPLATE_PARM.
559
560 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
561
562         PR c++/32113
563         * search.c (lookup_member): Check the name argument for
564         error_mark_node.
565
566 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
567
568         PR c++/33212
569         * parser.c (cp_parser_trait_expr): Check rerurn value of
570         cp_parser_type_id.
571
572 2007-08-30  Ollie Wild  <aaw@google.com>
573
574         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
575         convert_ptrmem for pointer to member conversions.
576         (convert_to_pointer_force): Update cp_convert_to_pointer call.
577         (ocp_convert): Update cp_convert_to_pointer call.
578         * typeck.c (convert_ptrmem): Add conditional for null pointers to
579         members.
580         (build_static_cast_1): Check can_convert for conversions in either
581         direction.
582         (get_delta_difference_1): New function.
583         (get_delta_difference): Refactor to call get_delta_difference_1.
584
585 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
586
587         * decl.c (start_preparsed_function): Set
588         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
589
590 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
591
592         PR c++/33209
593         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
594         BOUND_TEMPLATE_TEMPLATE_PARM.
595
596 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
597
598         PR c++/32596
599         PR c++/32400
600         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
601         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
602
603 2007-08-27  Jason Merrill  <jason@redhat.com>
604
605         PR c++/29000
606         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
607         Look inside STMT_EXPR.
608         * semantics.c (stmt_expr_value_expr): New fn.
609         * cp-tree.h: Declare it.
610
611         PR c++/28558
612         * decl.c (groktypename): Ignore attributes applied to class type.
613
614 2007-08-28  Richard Guenther  <rguenther@suse.de>
615
616         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
617
618 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
619         
620         * error.c (dump_expr): Handle COMPLEX_CST.
621         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
622         (pp_cxx_expression): Likewise.
623
624 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
625
626         * decl.c (GNU_INLINE_P): New.
627         (duplicate_decls): Handle gnu_inline.  Merge attributes and
628         some flags in overriding definitions.
629         (redeclaration_error_message): Handle gnu_inline.
630         (start_preparsed_function): Likewise.
631
632 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
633
634         * call.c (sufficient_parms_p): Constify.
635         * class.c (same_signature_p): Likewise.
636         * cp-gimplify.c (is_invisiref_parm,
637         cxx_omp_privatize_by_reference): Likewise.
638         * cp-objcp-common.c (has_c_linkage): Likewise.
639         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
640         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
641         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
642         num_artificial_parms_for, comp_template_parms,
643         template_parameter_pack_p, any_dependent_template_arguments_p,
644         any_type_dependent_arguments_p, any_value_dependent_elements_p,
645         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
646         zero_init_p, member_p, cp_lvalue_kind,
647         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
648         varargs_function_p, is_dummy_object, special_function_kind,
649         string_conv_p, type_unknown_p, comp_except_specs, compparms,
650         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
651         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
652         cp_has_mutable_p, at_least_as_qualified_p,
653         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
654         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
655         * except.c (nothrow_libfn_p): Likewise.
656         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
657         Likewise.
658         * pt.c (comp_template_parms, template_parameter_pack_p,
659         any_type_dependent_arguments_p, any_value_dependent_elements_p,
660         any_dependent_template_arguments_p): Likewise.
661         * repo.c (repo_export_class_p): Likewise.
662         * semantics.c (anon_aggr_type_p): Likewise.
663         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
664         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
665         varargs_function_p, member_p, is_dummy_object, pod_type_p,
666         zero_init_p, special_function_p): Likewise.
667         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
668         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
669         compparms, invalid_nonstatic_memfn_p,
670         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
671         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
672         cp_has_mutable_p, lvalue_or_else): Likewise.
673
674 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
675
676         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
677         * cp-objcp-common.c (cp_tree_size): Ditto.
678         * tree.c (cp_walk_subtrees): Ditto
679         * cp-tree.def (TINST_LEVEL): Go away.
680         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
681         move together with other non-tree structs.
682         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
683         (union lang_tree_node): Eliminate tinst_level field.
684         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
685         (current_instantiation, outermost_tinst_level): Return
686         a "struct tinst_level *".
687
688         * error.c (print_instantiation_partial_context): Change second
689         parameter to a "struct tinst_level *".  Replace accessor macros
690         with field access.
691         (print_instantiation_full_context): Likewise.
692         * lex.c (in_main_input_context): Likewise.
693
694         * pt.c (struct pending_templates): New.
695         (pending_templates, last_pending_template): Use it as a type.
696         (current_tinst_level): Change typo to "struct tinst_level *"
697         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
698         (add_pending_template): Construct a "struct pending_template".
699         Replace TINST_LEVEL accessor macros with field access.
700         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
701         (pop_tinst_level): Likewise.
702         (instantiate_pending_templates): Likewise.  Factor common code used
703         when an instantiation has been done.
704         (outermost_tinst_level): Replace tree_last with loop.
705         (current_instantiation): Return a "struct tinst_level *".
706
707 2007-08-24  Ollie Wild  <aaw@google.com>
708
709         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
710         * name-lookup.h (cp_binding_level): Remove vtables member.
711
712 2007-08-24  Richard Guenther  <rguenther@suse.de>
713
714         * tree.c (cp_cannot_inline_tree_fn): Remove.
715         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
716         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
717         Remove define.
718
719 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
720
721         PR c++/32567
722         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
723         error_mark_node right away if build_expr_type_conversion
724         returned it.
725
726         PR c++/32898
727         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
728         is error_mark_node rather than NULL_TREE.
729         * pt.c (check_explicit_specialization): Likewise.
730
731         PR c++/31941
732         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
733         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
734
735 2007-08-22  Jason Merrill  <jason@redhat.com>
736
737         PR c++/29365
738         * pt.c (outermost_tinst_level): New function.
739         * lex.c (in_main_input_context): New function.
740         * cp-tree.h: Declare it.
741         * decl2.c (constrain_class_visibility): Use it to avoid warning
742         about uses of the anonymous namespace in the main input file.
743
744 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
745
746         * init.c (build_new_1): Use get_target_expr instead of save_expr.
747
748 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
749
750         PR c++/7302
751         * class.c (finish_struct_1): Warn when a class has virtual
752         functions and accessible non-virtual destructor.
753
754 2007-08-20  Richard Guenther  <rguenther@suse.de>
755
756         PR c++/22369
757         PR c++/22451
758         * call.c (build_new_method_call): Convert initializer to
759         the basetype.
760         * init.c (build_aggr_init): Do not fiddle with types.
761         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
762         * except.c (build_throw): Do not drop qualifiers for the
763         pointer type.
764         * typeck.c (get_member_function_from_ptrfunc): Do not
765         fiddle with types, instead convert.
766         (build_ptrmemfunc1): Convert to the target type for
767         initialization.
768         (gfc_trans_allocate): Convert result to target type.
769         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
770         pointer-to-member structures shall have alias set zero as well.
771
772 2007-08-20  Richard Guenther  <rguenther@suse.de>
773
774         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
775         Remove.
776         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
777         (nonstatic_local_decl_p): Likewise.
778         * tree.c (cp_auto_var_in_fn_p): Remove.
779         * decl.c (nonstatic_local_decl_p): Remove.
780
781 2007-08-20  Richard Guenther  <rguenther@suse.de>
782
783         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
784         Remove define.
785         * tree.h (cp_walk_tree): New define to walk_tree_1 with
786         cp_walk_subtrees lh parameter.
787         (cp_walk_tree_without_duplicates): New define to
788         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
789         * tree.c (count_trees): Call
790         cp_walk_tree_without_duplicates.
791         (verify_stmt_tree): Call cp_walk_tree.
792         (break_out_target_exprs): Likewise.
793         (WALK_SUBTREE): Likewise.
794         * cp-gimplify.c (cp_genericize): Likewise.
795         * cp-pt.c (find_parameter_packs_r): Likewise.
796         (uses_parameter_packs): Likewise.
797         (make_pack_expansion): Likewise.
798         (check_for_bare_parameter_packs): Likewise.
799         (for_each_template_parm): Likewise.
800         * decl.c (check_default_argument): Call
801         cp_walk_tree_without_duplicates.
802         * except.c (build_throw): Likewise.
803         * decl2.c (type_visibility): Likewise.
804         * semantics.c (expand_or_defer_fn): Likewise.
805         (finalize_nrv): Call cp_walk_tree.
806
807 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
808
809         PR c++/33025
810         * init.c (build_new_1): Rename placement_var variable to placement_expr.
811         Initialize it with save_expr rather than get_temp_regvar.
812
813 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
814
815         PR c++/28989
816         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
817         lvalues.
818
819 2007-08-17  Ollie Wild  <aaw@google.com>
820
821         PR c++/31749
822         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
823         declarations into appropriate slots for comparison.  Fix type
824         comparison.
825
826 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
827
828         PR c++/32112
829         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
830         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
831
832 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
833
834         PR c++/32870
835         * parser.c (cp_parser_class_head): Improve error message.
836
837 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
838
839         * pt.c (instantiate_decl): Set input_location
840         for the function end.
841
842 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
843
844         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
845         Constify.
846         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
847         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
848         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
849         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
850         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
851         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
852         * typeck.c (cp_type_quals): Likewise.
853         * typeck2.c (cxx_incomplete_type_diagnostic,
854         cxx_incomplete_type_error): Likewise.
855
856 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
857
858         PR c++/31132
859         * pt.c (tsubst_friend_function): When check_classfn
860         returns error_mark_node likewise return it.
861
862 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
863
864         PR c++/32992
865         * typeck.c (check_return_expr): Don't NRV optimize vars in
866         anonymous unions.
867         * decl.c (finish_function): Comment fix.
868
869 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
870
871         PR c++/33035
872         * pt.c (push_template_decl_real): Depending on TYPE_P
873         use either TYPE_CONTEXT or DECL_CONTEXT.
874
875 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
876
877         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
878         constructors and destructors return this.
879
880 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
881
882         PR c++/27211
883         * decl2.c (check_classfn): Return error_mark_node in case of error;
884         in that case, do not call add_method.
885         * decl.c (start_decl): Deal with check_classfn returning
886         error_mark_node.
887         (grokfndecl): Likewise.
888         * pt.c (tsubst_friend_function): Likewise.
889
890 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
891
892         PR c++/30428
893         * typeck.c (build_binary_op): Disallow vector float types with
894         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
895
896 2007-08-11  Ian Lance Taylor  <iant@google.com>
897
898         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
899         alias_set_type.
900         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
901
902 2007-08-10  Ollie Wild  <aaw@google.com>
903
904         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
905         type lookups.
906         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
907         function parameter.
908         (unqualified_namespace_lookup): Fix ambiguous_decl call.
909         (lookup_using_namespace): Fix ambiguous_decl call.
910         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
911
912 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
913
914         * call.c (name_as_c_string): Use CONST_CAST.
915         * decl.c (build_decl): Likewise.
916         * parser.c (cp_parser_string_literal): Likewise.
917
918 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
919
920         PR c++/17763
921         * error.c (dump_expr): Consistently use the *_cxx_*
922         variants of the pretty-print functions.
923
924 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
925
926         PR c++/22256
927         * decl.c (check_special_function_return_type): Just error
928         on return type specified for conversion operator.
929
930 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
931
932         * typeck2.c (readonly_error): Handle general expressions.
933         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
934
935 2007-08-06  Dan Hipschman  <dsh@google.com>
936
937         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
938         access function name.
939
940 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
941
942         PR pch/13676
943         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
944         * g++spec.c (lang_specific_driver): Check them.
945
946 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
947
948         PR c++/19532
949         * pt.c (inline_needs_template_parms): Fix comment; change return type
950         to bool.
951
952 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
953
954         Revert:
955         2007-03-26  Dirk Mueller  <dmueller@suse.de>
956
957         * parser.c (cp_parser_member_declaration): Pedwarn
958         about stray semicolons after member declarations.
959
960 2007-08-02  Lee Millward  <lee.millward@gmail.com>
961
962         PR c++/30849
963         PR c++/30850
964         PR c++/30851
965         * parser.c (cp_parser_asm_definition): Detect and discard asm
966         statements with invalid inputs or outputs.
967         (cp_parser_asm_operand_list): Return error mark node if any
968         of the operands are invalid. Adjust documentation.
969         
970 2007-08-02  Nick Clifton  <nickc@redhat.com>
971
972         * typeck.c: Change copyright header to refer to version 3 of the
973         GNU General Public License and to point readers at the COPYING3
974         file and the FSF's license web page.
975         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
976         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
977         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
978         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
979         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
980         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
981         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
982         name-lookup.h, parser.c: Likewise.
983
984 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
985
986         PR middle-end/32668
987         * call.c (magic_varargs_p): Honor the "type generic" attribute.
988
989 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
990
991         PR c++/32108
992         * semantics.c (finish_label_stmt): Reject the __label__
993         extension outside function scopes.
994
995 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
996
997         * parser.c (eof_token): Un-constify.
998         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
999         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
1000         casts.
1001
1002 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
1003
1004         * pt.c, tree.c, typeck2.c: Fix comment typos.
1005
1006 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
1007             Mark Mitchell  <mark@codesourcery.com>
1008
1009         PR c++/30917
1010         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
1011         hidden due to friend declarations in local classes.
1012
1013 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
1014
1015         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
1016         * cp-tree.def (DECLTYPE_TYPE): New.
1017         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
1018         (dump_type_prefix): Ditto.
1019         (dump_type_suffix): Ditto.
1020         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
1021         * mangle.c (write_type): Handle DECLTYPE_TYPE.
1022         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
1023         types.
1024         (DECLTYPE_TYPE_EXPR): New.
1025         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
1026         (finish_declared_type): Declare.
1027         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
1028         DECLTYPE_TYPE nodes.
1029         (pp_cxx_type_id): Ditto.
1030         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
1031         (tsubst): Substitute into a DECLTYPE_TYPE node.
1032         (tsubst_copy): Ditto.
1033         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
1034         nodes.
1035         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
1036         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
1037         structural equality (because we can't hash the expressions).
1038         (finish_declared_type): New.
1039         * lex.c (reswords): Add "decltype" keyword.
1040         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
1041         (cp_parser_postfix_expression): Add member_access_only_p to
1042         restrict postfix expression to member access expressions.
1043         (cp_parser_unary_expression): Update call to
1044         cp_parser_postfix_expression to reflect new parameter.
1045         (cp_parser_declared_type): New.
1046         (cp_parser_simple_type_specifier): Parse decltype types.
1047
1048 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
1049
1050         PR c++/32346
1051         * call.c (convert_for_arg_passing): Only widen bitfields to their
1052         declared types if necessary.
1053
1054 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1055
1056         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
1057         Constify.
1058
1059 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1060
1061         * decl.c (typename_hash, typename_compare): Constify.
1062         * mangle.c (hash_type, compare_type): Likewise.
1063         * pt.c (eq_local_specializations, hash_local_specialization):
1064         Likewise.
1065         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
1066         list_hash): Likewise.
1067         * typeck2.c (pat_compare): Likewise.
1068
1069 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1070
1071         * method.c (implicitly_declare_fn): Increase alignment if member
1072         function pointer format requires it.
1073
1074 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
1075
1076         PR c++/29001
1077         * typeck.c (check_return_expr): Do not pass a null argument
1078         to null_ptr_cst_p.
1079
1080 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
1081
1082         PR c++/32561
1083         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
1084         only on VAR_DECL.
1085
1086 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1087
1088         PR c++/32839
1089         * typeck.c (convert_arguments): Only use default args if we have
1090         a function decl.
1091
1092         PR c++/30818
1093         * typeck.c (structural_comptypes): No need to check
1094         resolve_typename_type return value here.
1095         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
1096         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
1097         original type rather than error_mark_node in case of failure.
1098         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
1099         resolve_typename_type result check.
1100         (cp_parser_direct_declarator, cp_parser_head,
1101         cp_parser_constructor_declarator_p): Likewise.
1102
1103 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
1104
1105         * pt.c (template_parms_variadic_p): Remove.
1106         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
1107
1108 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
1109
1110         PR c++/30854
1111         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
1112         argument to dump_aggr_init_expr_args instead of false.
1113
1114 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
1115
1116         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
1117         canonical types; otherwise, fall back to structural type
1118         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
1119         internal compiler error if the canonical types are wrong.
1120         
1121 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
1122
1123         PR c++/32560
1124         * parser.c (cp_parser_make_indirect_declarator): When the
1125         the code argument is ERROR_MARK return cp_error_declarator.
1126
1127 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1128
1129         PR 32617
1130         * decl.c (cxx_init_decl_processing): Don't set
1131         force_align_functions_log.
1132         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
1133         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
1134         FUNCTION_DECL, return its alignment.
1135
1136 2007-07-09  Richard Guenther  <rguenther@suse.de>
1137
1138         * decl.c (start_preparsed_function): Do not promote return type.
1139
1140 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
1141
1142         PR c++/30535
1143         * pt.c (unify): Never pass error_mark_node to template_decl_level.
1144
1145 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
1146
1147         PR c++/32232
1148         * pt.c (resolve_overloaded_unification): Robustify.  Return a
1149         bool, not an int.
1150         (type_unification_real): Adjust accordingly.
1151
1152 2007-07-06  Richard Guenther  <rguenther@suse.de>
1153
1154         * init.c (build_new_1): Use the correct pointer type.
1155         * typeck2.c (build_m_component_ref): Likewise.
1156
1157 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
1158
1159         PR c++/32245
1160         * init.c (build_zero_init): Always build an initializer for
1161         non-static storage.
1162         * typeck2.c (build_functional_cast): Use build_zero_init.
1163
1164         PR c++/32251
1165         * init.c (build_new_1): Always pass the allocation function to
1166         build_op_delete_call.
1167         * call.c (build_op_delete_call): Handle operator delete with a
1168         variable-argument list.  Do not issue an error when no matching
1169         deallocation function is available for a new operator.
1170
1171         PR c++/31992
1172         * cp-tree.h (any_value_dependent_elements_p): Declare it.
1173         * decl.c (value_dependent_init_p): New function.
1174         (cp_finish_decl): Use it.
1175         * pt.c (value_dependent_expression_p): Use
1176         any_value_dependent_elements_p.
1177         * parser.c (cp_parser_primary_expression): Add comment about
1178         treating dependent qualified names as integral
1179         constant-expressions.
1180
1181 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
1182
1183         * decl.c (build_ptrmemfunc_type): Always use structural equality
1184         tests when comparing pointer-to-member-function types, because the
1185         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
1186         types.
1187         
1188 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
1189
1190         * init.c (build_new): Tweak comment.
1191
1192 2007-06-29  Dave Brolley  <brolley@redhat.com>
1193
1194         PR c++/31743
1195         * parser.c (cp_parser_new_type_id): Don't reduce a named array
1196         type to its base type and number of elements here.
1197         * init.c (build_new): Call complete_type_or_else to ensure that the
1198         type is complete and to issue a diagnostic if it is not.
1199         (build_new_1): Don't call complete_type_or_else here.
1200
1201 2007-07-03  Richard Guenther  <rguenther@suse.de>
1202
1203         PR c++/32609
1204         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
1205         after recursing.
1206
1207 2007-07-02  Simon Baldwin  <simonb@google.com>
1208
1209         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
1210         for inner-style nested forward declarations that don't declare
1211         anything useful.
1212
1213 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
1214
1215         PR c++/31748
1216         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1217         DECL_P in not a variable and appears more than once error messages.
1218
1219 2007-07-01  Ollie Wild  <aaw@google.com>
1220
1221         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1222         (select_decl): Remove function.
1223         (unqualified_namespace_lookup): Populate binding by calling
1224         ambiguous_decl.  Remove select_decl call.
1225         (lookup_qualified_name): Remove select_decl call.
1226         * decl.c (lookup_and_check_tag): Check for ambiguous references.
1227         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1228         generation when name lookup is ambiguous.
1229
1230 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
1231
1232         PR c++/31724
1233         * init.c (build_new_1): Use structural equality on the copy of the
1234         array type.
1235
1236 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1237
1238         * decl2.c (determine_visibility): Implement
1239         flag_visibility_ms_compat effect on type info.
1240         * decl.c (cxx_init_decl_processing): Implement
1241         global effect of flag_visibility_ms_compat.
1242
1243 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1244
1245         * decl2.c (start_objects): Mark constructor-running function
1246         as artificial.
1247
1248 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
1249
1250         PR c++/32111
1251         * decl.c (grokdeclarator): Reset friendp for member functions declared
1252         friend of their own class.
1253
1254 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
1255
1256         * decl2.c (determine_visibility): Don't look for dllexport here.
1257         (determine_visibility_from_class): Tidy.
1258
1259 2007-06-18  Simon Baldwin <simonb@google.com>
1260
1261         PR c++/31923
1262         * parser.c (cp_parser_single_declaration): Added check for storage
1263         class other than sc_none in parsed declaration, and a flag to indicate
1264         if the call is part of an explicit template specialization parse.
1265         * (cp_parser_explicit_specialization): Specialization check flag added
1266         to call to cp_parser_single_declaration(), set true.
1267         * (cp_parser_template_declaration_after_export): Specialization check
1268         flag added to call to cp_parser_single_declaration(), set false.
1269         * pt.c (check_explicit_specialization): Added code to copy visiblity
1270         and linkage from the templated function to the explicit specialization.
1271
1272 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1273
1274         * typeck.c (build_binary_op): For templates build the
1275         expression in pieces to avoid the assert in build2_stat.
1276         (get_member_function_from_ptrfunc):
1277         Change over to using POINTER_PLUS_EXPR and convert
1278         the second operand to sizetype.
1279         * typeck2.c (build_m_component_ref):  Likewise.
1280         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1281         instead of PLUS_EXPR for pointers.
1282         (build_new_1): Likewise.
1283         (build_vec_delete_1): Likewise.
1284         (build_vec_delete): Likewise.
1285         * class.c (build_base_path): Likewise.
1286         (build_base_path): Likewise.
1287         (convert_to_base_statically): Likewise.
1288         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1289         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1290         instead of PLUS_EXPR.
1291         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1292         instead of PLUS_EXPR for pointers.
1293         * call.c (build_special_member_call): Likewise.
1294         * rtti.c (build_headof): Likewise.
1295         Use sizetype instead of ptrdiff_type_node.
1296         (tinfo_base_init): Create a POINTER_PLUS_EXPR
1297         instead of PLUS_EXPR for pointers.
1298         * except.c (expand_start_catch_block):  Do a
1299         NEGATIVE and then a POINTER_PLUS_EXPR instead
1300         of a MINUS_EXPR.
1301         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1302         PLUS_EXPR on pointer types over to use
1303         POINTER_PLUS_EXPR and remove the conversion
1304         to the pointer types.
1305         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1306         adding to a pointer type. Use size_int instead of
1307         ssize_int. Convert the index to sizetype before
1308         adding it to the pointer.
1309
1310 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
1311
1312         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1313         (DECL_ANON_UNION_VAR_P): New macro.
1314         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
1315         than DECL_VAR_MARKED_P, to keep track of which variables we have
1316         seen.
1317         * decl.c (redeclaration_error_message): Complain about redeclaring
1318         anonymous union members at namespace scope.
1319         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1320
1321 2007-06-14  Geoff Keating  <geoffk@apple.com>
1322
1323         * decl2.c (determine_visibility): Ensure that functions with
1324         hidden types as parameters are hidden.
1325
1326         PR 31093
1327         * decl2.c (determine_visibility): Remove duplicate code for
1328         handling type info.
1329
1330 2007-06-12  Ian Lance Taylor  <iant@google.com>
1331
1332         PR libstdc++/29286
1333         * init.c (avoid_placement_new_aliasing): New static function.
1334         (build_new_1): Call it.
1335
1336 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
1337
1338         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1339         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1340
1341 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
1342
1343         PR c++/32177
1344         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1345         on init, the non-decl cond operand and increment value.
1346
1347 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
1348
1349         PR c++/30759
1350         * decl.c (check_initializer): Report an error when a brace enclosed
1351         initializer is used for a non-aggregate type in C++98.
1352         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1353         cxx_dialect.
1354         (grokdeclarator): Likewise.
1355         (move_fn_p): Likewise.
1356         * typeck.c (check_return_expr): Likewise.
1357         * call.c (reference_binding): Likewise.
1358         * error.c (cp_cpp_error): Likewise.
1359         * pt.c (check_default_tmpl_args): Likewise.
1360         (tsubst): Likewise.
1361         * lex.c (init_reswords): Likewise.
1362         * parser.c (p_parser_primary_expression): Likewise.
1363         (TOKEN_PRECEDENCE): Likewise.
1364         (cp_parser_init_declarator): Likewise.
1365         (cp_parser_ptr_operator): Likewise.
1366         (cp_parser_parameter_declaration): Likewise.
1367         (cp_parser_enclosed_template_argument_list): Likewise.
1368         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1369         (cp_parser_next_token_ends_template_argument_p): Likewise.
1370
1371 2007-06-04  Simon Baldwin  <simonb@google.com>
1372
1373         * decl.c (grokdeclarator): Readability change.  Moved case labels
1374         into direct switch statement scope.
1375
1376 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
1377
1378         * call.c (convert_like_real): Remove pointless code.
1379
1380 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
1381
1382         * decl.c (get_atexit_fn_ptr_type): New function.
1383         (get_atexit_node): Use it.
1384         (start_cleanup_fn): Likewise.
1385         (register_dtor_fn): Use the object's destructor, instead of a
1386         separate cleanup function, where possible.
1387         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1388         (atexit_fn_ptr_type_node): New macro.
1389         * decl2.c (build_cleanup): Use build_address.
1390
1391 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
1392
1393         * typeck.c (build_binary_op): Include types in error.
1394
1395 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
1396
1397         PR c++/31806
1398         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1399         needs runtime initialization.
1400
1401 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
1402
1403         PR c++/32158
1404         * semantics.c (finish_trait_expr): Complete the types.
1405
1406 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
1407             Douglas Gregor <doug.gregor@gmail.com>
1408             Pedro Lamarao <pedro.lamarao@mndfck.org>
1409             Howard Hinnant <howard.hinnant@gmail.com>
1410
1411         PR c++/7412
1412         PR c++/29939
1413         * typeck.c (comptypes): Don't consider rvalue and lvalue
1414         reference types to be equivalent.
1415         (check_return_expr): Move from certain lvalues when returning
1416         them.
1417         * decl.c (grokdeclarator): Implement reference collapsing.
1418         (copy_fn_p): Don't consider constructors taking rvalue references
1419         to be copy constructors.
1420         (move_fn_p): New.
1421         * call.c (conversion): New "rvaluedness_matches_p" member.
1422         (convert_class_to_reference): Require reference type as first
1423         parameter instead of base type.
1424         (reference_binding): Add logic to handle rvalue references.
1425         (implicit_conversion): Update inaccurate comment.
1426         (convert_like_real): Disable creation of temporaries that are
1427         impossible to initialize for types with move constructors.
1428         (build_over_call): Elide move constructors when possible.
1429         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1430         (maybe_handle_ref_bind): Return conversion instead of type node.
1431         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1432         determine preferred conversion sequences.
1433         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1434         (LOOKUP_PREFER_RVALUE): New.
1435         (DECL_MOVE_CONSTRUCTOR_P): New.
1436         (struct cp_declarator): Add "reference" member for reference
1437         types, with new "rvalue_ref" flag.
1438         (cp_build_reference_type): Declare.
1439         (move_fn_p): Declare.
1440         * error.c (dump_type_prefix): Format rvalue reference types
1441         correctly in error messages.
1442         * except.c (build_throw): Move from certain lvalues when
1443         throwing.
1444         * mangle.c (write_type): Mangle rvalue references differently
1445         than regular references.
1446         * parser.c (make_reference_declarator): Add boolean parameter for
1447         rvalue references.
1448         (cp_parser_make_indirect_declarator): New.
1449         (cp_parser_new_declarator_opt): Call
1450         cp_parser_make_indirect_declarator. 
1451         (cp_parser_conversion_declarator_opt): Ditto.
1452         (cp_parser_declarator): Ditto.
1453         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1454         declarators.
1455         * pt.c (tsubst): Implement reference collapsing.
1456         (maybe_adjust_types_for_deduction): Implement special template
1457         parameter deduction rule for rvalue references.
1458         (type_unification_real): Update calls to
1459         maybe_adjust_types_for_deduction.
1460         (try_one_overload): Ditto.
1461         (unify_pack_expansion): Ditto.
1462         * tree.c (lvalue_p_1): Handle rvalue reference types.
1463         (cp_build_reference_type): New.
1464
1465 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
1466
1467         PR c++/31809
1468         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1469         variables that need runtime initialization.
1470
1471 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
1472
1473         PR c++/31339
1474         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1475         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1476         case POSTDECREMENT_EXPR>): Return the error_mark_node
1477         if either the real or imaginary parts would an
1478         error_mark_node.
1479         
1480 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
1481             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1482
1483         PR c++/31745
1484         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1485         token is a closing brace, false if there are no tokens left.
1486         (cp_parser_namespace_alias_definition): Only consume the next token if
1487         it is a closing brace.
1488
1489         * parser.c (cp_parser_class_specifier): Likewise.
1490
1491 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1492
1493         * semantics.c (finish_member_declaration): Fix a typo in the
1494         last checkin.
1495
1496 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
1497
1498         PR c++/31431
1499         PR c++/31432
1500         PR c++/31434
1501         PR c++/31435
1502         PR c++/31437
1503         PR c++/31438
1504         PR c++/31442
1505         PR c++/31443
1506         PR c++/31444
1507         PR c++/31445
1508         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1509         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1510         * pt.c (check_for_bare_parameter_packs): Return bool indicated
1511         whether everything was okay. Fix indentation.
1512         (push_template_decl_real): Check for bare parameter packs in
1513         function parameters; where errors occur, mark the parameter types
1514         with ERROR_MARK_NODEs to avert ICEs.
1515         (coerce_template_parameter_pack): New.
1516         (coerce_template_parms): Moved parameter pack coercion into
1517         coerce_template_parameter_pack, and permit it anywhere in the
1518         template parameter list (not just at the end). Parameter and
1519         argument indices can vary (somewhat) separately now, so add
1520         PARM_IDX and ARG_IDX.
1521         (fn_type_unification): Don't set an argument pack as incomplete if
1522         no argument pack was deduced.
1523         (type_unification_real): If a type parameter is a parameter pack
1524         and has not otherwise been deduced, it will be deduced to an empty
1525         parameter pack.
1526         (more_specialized_fn): Use the actual lengths of the argument
1527         lists when comparing against expansions.
1528         * semantics.c (finish_member_declaration): If a field's type has
1529         bare parameter packs, error and set its type to ERROR_MARK_NODE.
1530
1531 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
1532
1533         PR target/27067
1534         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1535
1536 2007-05-22  Ollie Wild  <aaw@google.com>
1537
1538         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1539         (unqualified_namespace_lookup): Adds check for hidden types.
1540
1541 2007-05-22  Ollie Wild  <aaw@google.com>
1542
1543         * decl.c (duplicate_decls): Verify namespace names are unique.
1544
1545 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
1546
1547         * decl.c (cxx_maybe_build_cleanup): Handle
1548         __attribute__((cleanup)).
1549
1550 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1551
1552         * cvt.c (cp_convert_and_check): Don't check warnings if the
1553         conversion failed.
1554
1555 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1556
1557         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1558
1559 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
1560
1561         PR c++/29928
1562         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1563         type only if is a class type (5.2.8/4).
1564
1565 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1566
1567         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1568         * decl.c (grokdeclarator): Use unsigned_type_for instead of
1569         c_common_unsigned_type.
1570
1571 2007-05-11  Silvius Rus  <rus@google.com>
1572
1573         * cp/typeck.c (build_indirect_ref): Add call to
1574         strict_aliasing_warning.
1575         (build_reinterpret_cast_1): Condition call to
1576         strict_aliasing_warning. 
1577
1578 2007-05-11  Jan Hubicka  <jh@suse.cz>
1579
1580         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1581         * decl2.c (start_objects): ctors and dtors are no longer public.
1582         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1583         
1584 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1585
1586         * typeck.c (build_unary_op): Remove code that used to
1587         handle non lvalue increments/decrements.
1588
1589 2007-05-07  Mike Stump  <mrs@apple.com>
1590
1591         * parser.c (check_empty_body): Add.
1592         (cp_parser_iteration_statement): Add call to check_empty_body.
1593
1594 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
1595
1596         PR 31775
1597         * mangle.c (write_mangled_name): Mangle static variable names.
1598         (write_unqualified_name): Use local-source-name for
1599         namespace-scope static variables.
1600
1601 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1602
1603         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1604         not in effect.
1605
1606 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1607
1608         PR c++/31663
1609         * decl2.c (constrain_class_visibility): 
1610         Use strip_pointer_or_array_types instead of strip_array_types.
1611
1612 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1613
1614         PR C++/30221
1615         * decl.c (reshape_init_r): Don't reshape the first element if it
1616         is a pointer to member function.
1617
1618 2007-04-27  Simon Baldwin  <simonb@google.com>
1619
1620         * decl.c (grokparms): Changed message format from %qD to %qE.
1621
1622 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
1623
1624         * error.c (maybe_warn_variadic_templates): Variadic templates are
1625        now in C++0x, so only warn about them in C++98 mode.
1626         
1627 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1628
1629         PR C++/30016
1630         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1631         integeral types from vectors types.
1632
1633 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
1634
1635         PR c++/31598
1636         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1637         for type dependent OMP_CLAUSE_DECLs.
1638
1639 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
1640
1641         PR c++/31338
1642         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1643         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1644         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1645         * init.c (build_zero_init): Adjust, as
1646         COMPLEX_TYPE is now a SCALAR_TYPE.
1647         * typeck2.c (digest_init): Allow brace-enclosed initializers for
1648         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1649
1650 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
1651
1652         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1653         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1654         (trait_expr_value): Adjust.
1655
1656 2007-04-23  Simon Baldwin  <simonb@google.com>
1657
1658         * decl.c (grokparms): Added new error for duplicate function
1659         parameters names in function prototypes, to match gcc behavior.
1660
1661 2007-04-23  Jan Hubicka  <jh@suse.cz>
1662
1663         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1664         bits dirrectly.
1665
1666 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1667
1668         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1669         instead of checking GIMPLE_STMT_P in chain_next.
1670
1671 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
1672
1673         PR c++/31513
1674         * call.c (convert_for_arg_passing): Convert bitfields to their
1675         declared types.
1676
1677 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
1678
1679         PR c++/31517
1680         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1681
1682 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
1683
1684         PR c++/29365
1685         * cp/decl2.c (constrain_class_visibility):
1686         Do not warn about the use of anonymous namespace in the main input file.
1687
1688 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
1689
1690         * cp-tree.h (current_template_parms): Fix typo in comment.
1691
1692 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
1693
1694         * cp-tree.h, error.c: Fix comment typos.
1695
1696 2007-04-13  Jason Merrill  <jason@redhat.com>
1697
1698         PR c++/31074
1699         * call.c (reference_binding): Add c_cast_p parm.  If true,
1700         add quals to TO as needed to make it reference-compatible.
1701
1702 2007-04-11  Jan Hubicka  <jh@suse.cz>
1703
1704         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1705         that we are not processing template_decl.
1706
1707 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
1708
1709         PR c++/31449
1710         * class.c (build_base_path): Ensure that the converted pointer has
1711         the same cv-qualification as the input.
1712
1713 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
1714
1715         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1716
1717 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
1718
1719         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1720         Do not set it.
1721         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1722         * tree.c (cp_add_pending_fn_decls): Remove.
1723         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1724
1725 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
1726
1727         Revert change removing staticp.
1728
1729 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
1730
1731         * cp-objcp-common.c (cxx_staticp): Remove.
1732         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1733         * cp-tree.h (cxx_staticp):      
1734
1735 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
1736
1737         * class.c (check_for_override): Don't remove dllmport attribute
1738         of virtual methods.
1739
1740 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
1741
1742         PR c++/30847
1743         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1744         type issue error and return early.
1745
1746 2007-03-30  Jason Merrill  <jason@redhat.com>
1747
1748         PR c++/31187
1749         * typeck.c (cp_type_readonly): New fn.
1750         * cp-tree.h: Declare it.
1751         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1752         (cp_finish_decl): Not here.
1753
1754 2007-03-31  Richard Guenther  <rguenther@suse.de>
1755
1756         * optimize.c (maybe_clone_body): Replace splay-tree usage by
1757         pointer-map.
1758
1759 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
1760
1761         PR c++/31138
1762         PR c++/31140
1763         PR c++/31141
1764         * parser.c (declarator_can_be_parameter_pack): New.
1765         (cp_parser_template_parameter): Only parse the `...' if the
1766         declarator can be a parameter pack.
1767         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1768         is NULL.
1769         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1770         types (they could be used as array bounds). 
1771         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1772         (tsubst_pack_expansion): Handle failure to expand parameter
1773         packs.
1774         
1775 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1776
1777         PR c++/26099
1778         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1779         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1780         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1781         (CLASS_TYPE_NON_UNION_P): Add.
1782         (struct lang_type_class): Add has_complex_dflt.
1783         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1784         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1785         * cp-tree.def: Add TRAIT_EXPR.
1786         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1787         * lex.c (struct resword): Add __has_nothrow_assign,
1788         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1789         __has_trivial_constructor, __has_trivial_copy,
1790         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1791         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1792         __is_pod, __is_polymorphic, __is_union.
1793         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1794         (cp_parser_trait_expr): New.
1795         * semantics.c (finish_trait_expr, trait_expr_value
1796         classtype_has_nothrow_copy_or_assign_p): New.
1797         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1798         as static.
1799         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1800         * class.c (check_bases, check_field_decl, check_bases_and_members):
1801         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1802         * pt.c (uses_template_parms, tsubst_copy_and_build,
1803         value_dependent_expression_p, type_dependent_expression_p): Deal with
1804         TRAIT_EXPR.
1805         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1806
1807 2007-03-29  Richard Guenther  <rguenther@suse.de>
1808
1809         * tree.c (cp_walk_subtrees): Do not set input_location.
1810
1811 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1812
1813         PR c++/29077
1814         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1815         destructor.
1816
1817 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1818
1819         * parser.c (struct cp_parser): Update comment for
1820         greater_than_is_operator_p.
1821         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1822         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1823         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1824         !GREATER_THAN_IS_OPERATOR_P.
1825         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1826         `>>' operators that will become two `>' tokens in C++0x.
1827         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1828         mode, allowing it to terminate default arguments.
1829         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1830         `>>' like two consecutive `>' tokens.
1831         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1832         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1833         ends a template argument.
1834
1835 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1836
1837         * decl.c (redeclaration_error_message): Complain when redeclaring
1838         a friend function with default template arguments (C++0x mode only).
1839         * cp-tree.h (check_default_tmpl_args): Declare.
1840         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1841         template arguments in function templates. Add support for checking
1842         the default template arguments of friend templates.
1843         (push_template_decl_real): Fix call to check_default_tmpl_args.
1844         (type_unification_real): If a template parameter has not been
1845         deduced but provides a default template argument, substitute into
1846         that default template argument.
1847         * parser.c (cp_parser_init_declarator): When declaring (but not
1848         defining!) a function template in C++0x mode, check for default
1849         template arguments.
1850
1851 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1852
1853         PR c++/29993
1854         * decl.c (grokdeclarator): Deal with cv-qualified function type
1855         typedefs in the same way for member and non-member functions.
1856
1857 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1858
1859         * parser.c (cp_parser_member_declaration): Pedwarn
1860         about stray semicolons after member declarations.
1861
1862 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1863
1864         PR c++/30500
1865         * pt.c (instantiate_decl): Set in_system_header.
1866
1867 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1868
1869         * cp-tree.h (current_tempalte_parms): Improve documentation.
1870         * pt.c (current_template_args): Likewise.
1871
1872         PR c++/30863
1873         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1874         not consume tokens when failing.
1875
1876 2007-03-22  Jim Wilson  <wilson@specifix.com>
1877             Mark Mitchell  <mark@codesourcery.com>
1878
1879         PR c++/31273
1880         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1881         consistent with FROM.
1882
1883 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1884
1885         * error.c (dump_expr): Handle dependent names that designate types.
1886         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1887
1888 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1889
1890         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1891
1892 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1893
1894         * cvt.c (cp_convert_and_check) : Define.
1895         * cp-tree.h (cp_convert_and_check): Declare.
1896         * call.c (convert_conversion_warnings): Rename to
1897         conversion_null_warnings.  The warning for floating-point to
1898         integer is handled by convert_and_check in convert_like_real.
1899         (convert_like_real): convert_conversion_warnings was renamed as
1900         conversion_null_warnings.
1901         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1902         overflow and changes of value during conversion.
1903
1904 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1905
1906         PR c++/30891
1907         * parser.c (cp_parser_statement): If 'namespace' is found, this
1908         only can be a namespace alias definition, so parse it now.
1909         (cp_parser_namespace_alias_definition): if we find an open brace
1910         instead of '=', then this is actually a misplaced namespace
1911         definition.
1912         
1913 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1914
1915         PR c++/24924
1916         * decl.c (cxx_init_decl_processing): Move command-line options
1917         processing to c-opts.c.
1918         
1919 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1920
1921         * ptree.c (cxx_print_type): Use formatting markup for integers
1922         when printing template parameter index/level/orig level.
1923         (cxx_print_xnode): Ditto.
1924         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1925         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1926         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1927         HOST_WIDE_INTs.
1928         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1929         rather than a HOST_WIDE_INT.
1930         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1931         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1932         better bit-packing.
1933         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1934         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1935         IN_BASE_INITIALIZER bool bitfields.
1936         (struct cp_declarator): Make KIND a 4-bit field. Make
1937         PARAMETER_PACK_P a bool bitfield just after KIND.
1938         * pt.c (uses_parameter_packs): Destroy the pointer set.
1939         (make_pack_expansion): Ditto.
1940         (check_for_bare_parameter_packs): Ditto.
1941         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1942         
1943 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1944
1945         PR c++/31165
1946         * call.c  (convert_default_arg): Instead of copying the node,
1947         unshare it.
1948
1949 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1950
1951         PR c++/30860
1952         * call.c (convert_conversion_warnings): New..
1953         (convert_like_real): .. factored out from here.
1954         (convert_conversion_warnings): Add warning about
1955         false being converted to NULL in argument passing.
1956
1957 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1958
1959         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1960         (finish_do_body): Warn about empty body in do/while statement.
1961
1962 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1963
1964         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1965         
1966 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1967
1968         PR c/21438
1969         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1970         warning.
1971         
1972 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1973
1974         * cp/repo.c (init_repo): Initialize random_seed saved options.
1975         (finish_repo): Adjust.
1976
1977 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1978
1979         PR bootstrap/30899
1980         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1981         which to copy.
1982
1983 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1984
1985         * decl.c (compute_array_index_type): New warning flag warn_vla.
1986
1987 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1988
1989         PR c++/30108
1990         * call.c (convert_default_arg): Copy non-constant arguments.
1991
1992 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1993
1994         PR c++/31038
1995         * parser.c (cp_parser_postfix_expression): Disallow compound
1996         literals in constant expressions.
1997
1998         PR c++/30328
1999         * semantics.c (finish_typeof): Use unlowered_expr_type.
2000         
2001 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
2002
2003         PR c++/30274
2004         * cp-tree.h (unlowered_expr_type): New function.
2005         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
2006         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
2007         (unlowered_expr_type): New function.
2008         (build_unary_op): Disallow predecrements of bool bitfields.
2009         * call.c (build_conditional_expr): Use unlowered_expr_type.
2010         * pt.c (type_unification_real): Likewise.
2011
2012 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
2013
2014         PR c++/20599
2015         * typeck.c (check_return_expr): Check for bare parameter packs.
2016         (comptypes): Compare template parameter packs and
2017         type pack expansions.
2018         * decl.c (grokdeclarator): Deal with the declaration of function
2019         parameter packs.
2020         (grokparms): Verify that the (optional) function parameter pack is
2021         at the end of the parameter list.
2022         (xref_basetypes): Handle pack expansions in the base class.
2023         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
2024         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
2025         (NONTYPE_ARGUMENT_PACK): New.
2026         (TYPE_PACK_EXPANSION): New.
2027         (EXPR_PACK_EXPANSION): New.
2028         (ARGUMENT_PACK_SELECT): New.
2029         * cp-objcp-common.c (cp_tree_size): Compute size of
2030         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
2031         ARGUMENT_PACK_SELECT.
2032         * error.c (dump_template_argument): Print template argument packs.
2033         (dump_template_argument_list): Ditto.
2034         (dump_template_parameter): Dump `...' for template type parameter
2035         packs.
2036         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
2037         (dump_parameters): Print function parameter packs.
2038         (dump_template_parms): Print template argument packs.
2039         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
2040         (maybe_warn_variadic_templates): New.
2041         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
2042         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2043         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2044         CAST_EXPR. 
2045         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
2046         (write_template_arg): Write argument packs as separate arguments.
2047         * cp-tree.h (struct template_parm_index_s): Add flag that
2048         indicates that the template parameter is actually a parameter
2049         pack.
2050         (struct tree_argument_pack_select): New.
2051         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
2052         (union lang_tree_node): Add argument_pack_select.
2053         (FUNCTION_PARAMETER_PACK_P): New.
2054         (PACK_EXPANSION_P): New.
2055         (PACK_EXPANSION_PATTERN): New.
2056         (SET_PACK_EXPANSION_PATTERN): New.
2057         (PACK_EXPANSION_PARAMETER_PACKS): New.
2058         (ARGUMENT_PACK_P): New.
2059         (ARGUMENT_PACK_ARGS): New.
2060         (SET_ARGUMENT_PACK_ARGS): New.
2061         (ARGUMENT_PACK_INCOMPLETE_P): New.
2062         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
2063         (TEMPLATE_PARM_PARAMETER_PACK): New.
2064         (TEMPLATE_TYPE_PARAMETER_PACK): New.
2065         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
2066         (ARGUMENT_PACK_SELECT_INDEX): New.
2067         (ARGUMENT_PACK_SELECT_ARG): New.
2068         (struct cp_declarator): Add parameter_pack_p flag.
2069         (maybe_warn_variadic_templates): Declare.
2070         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
2071         indicate a template parameter pack. 
2072         (uses_parameter_packs): Declare.
2073         (template_parameter_pack_p): Declare.
2074         (template_parms_variadic_p): Declare.
2075         (make_pack_expansion): Declare.
2076         (check_for_bare_parameter_packs): Declare.
2077         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
2078         sizeof... expressions. 
2079         (pp_cxx_expression): Print pack expansions and non-type argument
2080         packs.
2081         (pp_cxx_exception_specification): Print pack expansions. 
2082         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
2083         (pp_cxx_ctor_initializer): Print pack expansions.
2084         (pp_cxx_type_id): Print pack expansions.
2085         (pp_cxx_template_argument_list): Print argument packs.
2086         (pp_cxx_template_parameter): Print ellipsis for template parameter
2087         packs.
2088         * pt.c (comp_template_parms): Compare template parameter packs.
2089         (template_parameter_pack_p): New.
2090         (template_parms_variadic_p): New.
2091         (template_args_variadic_p): New.
2092         (make_ith_pack_parameter_name): New.
2093         (struct find_parameter_pack_data): New.
2094         (find_parameter_packs_r): New.
2095         (uses_parameter_packs): New.
2096         (make_pack_expansion): New.
2097         (check_for_bare_parameter_packs): New.
2098         (expand_template_argument_pack): New.
2099         (reduce_template_parm_level): Propagate parameter pack flag.
2100         (process_template_parm): Add is_parameter_pack parameter to state
2101         when the parameter is actually a parameter pack. Create template
2102         parameter packs when is_parameter_pack is true.
2103         (current_template_args): The argument for a template parameter
2104         pack is an argument pack containing a single pack expansion.
2105         (process_partial_specialization): When checking that non-type
2106         argument expressions do not involve template parameters, loop over
2107         the arguments in argument packs separately.
2108         (push_template_decl_real): Check that the type of the declaration
2109         does not have any bare parameter packs. Check that primary
2110         templates have no more than one parameter pack, and that it comes
2111         at the end of the template parameter list.
2112         (convert_template_argument): Handle coercions for pack expansion
2113         expressions by coercing the pattern then rebuilding the expansion.
2114         (coerce_template_parms): When coercing the arguments for a
2115         variadic template, pack "extra" arguments into an argument pack.
2116         (coerce_template_template_parms): Cannot coerce between parameter
2117         packs and non-pack parameters.
2118         (template_args_equal): Compare PACK_EXPANSION_P expressions.
2119         (comp_template_args): Expand all template arguments packs before
2120         comparing template argument lists.
2121         (mangle_class_name_for_template): Make argument packs as separate
2122         template arguments.
2123         (for_each_template_parm_r): No need to handle BASELINK. 
2124         (instantiate_class_template): Handle pack expansions in the base
2125         class list.
2126         (tsubst_pack_expansion): New.
2127         (tsubst_template_args): Handle substitutions of argument packs and
2128         pack expansion into template argument lists.
2129         (tsubst_decl): Expand function parameter packs into separate
2130         function parameters.
2131         (tsubst_arg_types): Expand a type pack expansion into separate
2132         argument types.
2133         (tsubst_exception_specification): Handle pack expansions in
2134         exception specifiers.
2135         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
2136         replacing a template parameter with its argument. If we encounter
2137         a substitution for an argument pack, just return the parameter
2138         itself. 
2139         (tsubst_copy): sizeof(X...) returns the number of elements in
2140         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
2141         PARM_DECL is a parameter pack.
2142         (tsubst_expr): Expression pack expansions and argument packs
2143         cannot show up here; they will all be handled through function
2144         calls, sizeof, and template argument lists.
2145         (tsubst_copy_and_build): sizeof(X...) returns the number of
2146         elements in parameter pack X.  Handle pack expansions in TREE_LIST
2147         and CONSTRUCTOR nodes.
2148         (fn_type_unification): Handle "incomplete" explicit template
2149         argument lists that specify some of the arguments for a template
2150         parameter pack.
2151         (type_unification_real): Unify arguments against pack expansions.
2152         (template_parm_level_and_index): New, helper function.
2153         (unify_pack_expansion): New.
2154         (unify): Unify argument packs on an argument-by-argument basis,
2155         handling variadic argument packs as well.
2156         (more_specialized_fn): Handle unification of function parameter
2157         packs. All things being equal, prefer non-variadic function
2158         templates to variadic function templates.
2159         (more_specialized_class): Prefer the variadic class template
2160         partial specialization that binds fewer arguments to a parameter
2161         pack.
2162         (regenerate_decl_from_template): Expand function parameter packs
2163         into separate parameters.
2164         (instantiate_decl): Ditto.
2165         (tsubst_initializer_list): Handle pack expansions for base-class
2166         initializers.
2167         (dependent_type_p_r): Determine dependent types in argument packs
2168         and pack expansions.
2169         (value_dependent_expression_p): Determine value-dependence of
2170         non-type argument packs.
2171         (dependent_template_arg_p): Handle argument packs.
2172         * semantics.c (finish_cond): Check for bare parameter packs.
2173         (finish_expr_stmt): Ditto.
2174         (finish_for_expr): Ditto.
2175         (finish_switch_cond): Ditto.
2176         (finish_mem_initializers): Ditto.
2177         * name-lookup.c (arg_assoc_type): Handle pack expansions and
2178         argument packs.
2179         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
2180         * parser.c (make_declarator): Declarator is not an expansion.
2181         (make_pointer_declarator): Transfer parameter pack flag to outer
2182         declarator.
2183         (make_reference_declarator): Ditto.
2184         (make_ptrmem_declarator): Ditto.
2185         (make_call_declarator): Ditto.
2186         (make_array_declarator): Ditto.
2187         (cp_parser_postfix_expression): Allow pack expansion expressions
2188         in the argument list for a call expression.
2189         (cp_parser_parenthesized_expression_list): Add new parameter
2190         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
2191         into separate arguments."
2192         (cp_parser_new_placement): Allow pack expansion expressions.
2193         (cp_parser_new_initializer): Ditto.
2194         (cp_parser_mem_initializer_list): Allow ellipsis to create a
2195         base-class initializer expansion.
2196         (cp_parser_mem_initializer): Ditto.
2197         (cp_parser_template_parameter_list): Keep track of whether the
2198         template parameter is a template parameter pack.
2199         (cp_parser_template_parameter): Parse the ellipsis to indicate a
2200         template parameter pack.
2201         (cp_parser_type_parameter): Ditto.
2202         (cp_parser_template_argument_list): Parse the ellipsis to indicate
2203         a pack expansion.
2204         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
2205         this declarator is a parameter pack.
2206         (cp_parser_parameter_declaration): The ellipsis does not end the
2207         parameter declaration, because it might be a parameter pack. Parse
2208         the ellipsis to indicate a parameter pack.
2209         (cp_parser_initializer): Allow pack expansions.
2210         (cp_parser_initializer_list): Allow ellipsis to create an
2211         initializer expansion.
2212         (cp_parser_base_clause): Allow ellipsis to create a base specifier
2213         expansion.
2214         (cp_parser_type_id_list): Allow ellipsis to create an exception
2215         specifier expansion.
2216         (cp_parser_attribute_list): Don't allow pack expansions.
2217         (cp_parser_functional_cast): Allow pack expansions.
2218         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2219         compute the length of a parameter pack.
2220         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2221         end a template argument.
2222         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2223         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2224         CAST_EXPR. 
2225
2226 2007-03-09  Dirk Mueller  <dmueller@suse.de>
2227
2228         * cp/call.c (build_new_op): Call warn_logical_operator.
2229
2230 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
2231
2232         PR c++/30852
2233         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2234
2235         PR c++/30534
2236         * pt.c (any_template_arguments_need_structural_equality_p):
2237         Robustify.
2238
2239 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
2240
2241         * decl.c (grokdeclarator): Disable warnings for anonymous
2242         bitfields.
2243
2244 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
2245
2246         * typeck2.c (readonly_error): Always emit a hard error.
2247         Remove last argument.
2248         * cp-tree.h (readonly_error): Adjust prototype.
2249         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2250         * typeck.c (build_unary_op): Likewise.
2251         (build_modify_expr): Likewise.
2252
2253 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
2254
2255         PR c++/30895
2256         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2257
2258 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2259
2260         PR c++/15787
2261         * parser.c (struct cp_parser): New IN_IF_STMT.
2262         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2263         returning if parsing the body of an 'if' statement or issuing an
2264         error and continuing.
2265         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2266         body of 'if'.
2267         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2268         
2269 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
2270
2271         PR c++/28253
2272         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2273         for thunks.
2274
2275 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
2276
2277         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2278         Objective-C++.  Don't exit early if -shared-libgcc needs to be
2279         added.
2280
2281 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2282
2283         * typeck.c (common_base_type): Delete unused function.
2284         
2285 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2286
2287         * Make-lang.in: Add dummy lang.install-pdf target.
2288
2289 2007-03-01  Simon Baldwin <simonb@google.com>
2290
2291         PR c++/23689
2292         * decl.c (check_tag_decl): Added new warning for typedef ignored
2293         when it precedes an otherwise valid non-typedef declaration.
2294
2295 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
2296
2297         * typeck.c (build_function_call): Store converted arguments
2298         in a stack-allocated array instead of building a list.
2299         (convert_arguments): Store arguments in the array passed in as an
2300         argument, and return the actual number of arguments.
2301         * call.c (build_call): Delete, and replace with...
2302         (build_call_n, build_call_a): New.
2303         (build_op_delete_call): Rewrite to avoid constructing argument lists.
2304         (build_over_call): Store converted arguments in a stack-allocated
2305         array instead of building a list.
2306         (build_cxx_call): Pass arguments in an array instead of as a list.
2307         (build_java_interface_fn_ref): Rewrite to avoid constructing
2308         argument lists.
2309         * tree.h: Update declarations to reflect above changes.
2310         * method.c (use_thunk): Use a stack-allocated array to hold
2311         the arguments instead of a list.
2312         * rtti.c (throw_bad_cast): Update call to cxx_call.
2313         (throw_bad_typeid): Likewise.
2314         (build_dynamic_cast_1): Likewise.
2315         * init.c (build_builtin_delete_call): Use build_call_n.
2316         * decl.c (expand_static_init): Likewise.
2317         * except.c (cp_protect_cleanup_actions): Likewise.
2318         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2319         (gimplify_must_not_throw_expr): Likewise.
2320         (cxx_omp_apply_fn): Use build_call_a.
2321
2322 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
2323
2324         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2325         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2326
2327 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
2328
2329         * cp-tree.h (static_ctors): Remove.
2330         * cp-tree.h (static_dtors): Likewise.
2331         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2332         refactoring of tree_map hierarchy.
2333         (decl_shadowed_for_var_insert): Likewise.
2334         * semantics.c (expand_body): Use c_expand_body.
2335         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2336         * decl2.c (static_ctors): Remove.
2337         (static_dtors): Likewise.
2338         (generate_ctor_or_dtor_function): Pass NULL_TREE to
2339         objc_generate_static_init_call.  Do not call static_[cd]tors.
2340         (generate_ctor_and_dtor_functions_for_priority): Do not check for
2341         static_[cd]tors.
2342         (cp_write_global_declarations): Likewise.
2343
2344 2007-02-23  Richard Guenther  <rguenther@suse.de>
2345
2346         * class.c (note_name_declared_in_class): Make declaration
2347         changes meaning a pedwarn.
2348
2349 2007-02-22  Michael Matz  <matz@suse.de>
2350
2351         PR c++/29433
2352         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2353         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2354         dump_function_decl): Guard emitting outer scopes by new flag.
2355         * cp-lang.c (cxx_dwarf_name): New function.
2356         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2357         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2358         Remove functions.
2359         (push_template_decl_real, lookup_template_class): Remove calls
2360         to above functions.
2361
2362 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
2363
2364         * call.c (build_new_method_call): Ensure that explicit calls of
2365         destructors have type "void".
2366
2367 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2368
2369         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2370         and -Walways-true with -Waddress.
2371         * cvt.c (convert_to_void): Replace unconditional warning with
2372         -Waddress.
2373
2374 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2375
2376         * decl.c, tree.c: Fix comment typos.
2377
2378 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2379
2380         PR C++/30158
2381         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
2382         statement expression if we had an error mark node.
2383
2384 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2385             Brooks Moses  <brooks.moses@codesourcery.com>
2386             Lee Millward  <lee.millward@codesourcery.com>
2387
2388         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2389         Change class to tcc_vl_exp.
2390
2391         * call.c (build_call): Use build_call_list instead 
2392         of build3. 
2393         (build_over_call): Likewise.
2394         (build_new_method_call): Use build_min_non_dep_call_list 
2395         instead of build_min_non_dep.
2396
2397         * error.c (dump_call_expr_args): New function.
2398         (dump_aggr_init_expr_args): New function.
2399         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
2400         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2401
2402         * cvt.c (convert_to_void): Use build_call_array instead
2403         of build3; use new AGGR_INIT_EXPR accessor macros.
2404
2405         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2406         instead of TREE_CODE_LENGTH.
2407
2408         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2409         AGGR_INIT_EXPR accessor macros.
2410
2411         * cp-gimplify.c (cp_gimplify_init_expr): Use 
2412         AGGR_INIT_EXPR_SLOT to set the slot operand.
2413
2414         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2415         (AGGR_INIT_EXPR_SLOT): New macro.
2416         (AGGR_INIT_EXPR_ARG): New macro.
2417         (aggr_init_expr_nargs): New macro.
2418         (AGGR_INIT_EXPR_ARGP): New macro.
2419         (aggr_init_expr_arg_iterator): New.
2420         (init_aggr_init_expr_arg_iterator): New.
2421         (next_aggr_init_expr_arg): New.
2422         (first_aggr_init_expr_arg): New.
2423         (more_aggr_init_expr_args_p): New.
2424         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2425         (stabilize_aggr_init): New declaration.
2426         (build_min_non_dep_call_list): Likewise.
2427
2428         * tree.c (process_aggr_init_operands): New function.
2429         (build_aggr_init_array) New function.
2430         (build_cplus_new): Update to use new CALL_EXPR and
2431         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2432         build_aggr_init_array.
2433         (build_min_non_dep_call_list) New function.
2434         (build_min_nt): Assert input code parameter is not a variable
2435         length expression class.
2436         (build_min, build_min_non_dep): Likewise.
2437         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2438         to check for equality instead of recursing. Handle tcc_vl_exp
2439         tree code classes.
2440         (stabilize_call): Update to only handle CALL_EXPRs, not 
2441         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2442         (stabilize_aggr_init): New function.
2443         (stabilize_init): Use it.
2444
2445         * cxx-pretty-print.c (pp_cxx_postfix_expression)
2446         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2447         AGGR_INIT_EXPR accessor macros and argument iterators.
2448         
2449         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2450         build_vl_exp. Iterate through the operands, recursively 
2451         processing each one.
2452         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2453         CALL_EXPR accessor macros.
2454         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2455         tree code classes. Use TREE_OPERAND_LENGTH instead of 
2456         TREE_CODE_LENGTH.
2457
2458         * semantics.c (finish_call_expr): Use build_nt_call_list
2459         instead of build_nt.
2460         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
2461         accessor macros. Use build_call_array to construct the 
2462         CALL_EXPR node instead of build3
2463         
2464         * decl2.c (build_offset_ref_call_from_tree): Use 
2465         build_nt_call_list and build_min_non_dep_call_list instead
2466         of build_min_nt and build_min_non_dep.
2467
2468         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2469         Use build_nt_call_list instead of build_min_nt.
2470
2471 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2472
2473         PR c++/28943
2474         * call.c (build_conditional_expr): Improve error message.
2475         
2476 2007-02-13  Dirk Mueller  <dmueller@suse.de>
2477
2478         * friend.c (do_friend): Annotate warning about friend
2479         declarations in templates with OPT_Wnon_template_friend.
2480         Convert informal message from warning() to inform().
2481
2482 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
2483             Mark Mitchell  <mark@codesourcery.com>
2484
2485         PR c++/14622
2486         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2487         instantiations for variables.
2488
2489 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2490
2491         PR middle-end/7651
2492         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2493         Check warn_unused_value just once.
2494
2495 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
2496
2497         PR c++/26988
2498         * pt.c (determine_specialization): Use skip_artificial_parms_for.
2499         (fn_type_unificiation): Likewise.
2500         (get_bindings): Likewise.
2501
2502 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
2503
2504         PR target/29487
2505         * decl.c (finish_function): Use DECL_REPLACEABLE.
2506         * tree.c (cp_cannot_inline_tree_fn): Likewise.
2507
2508 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2509
2510         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2511
2512 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2513
2514         * decl.c (grokvardecl): Don't error if !have_tls.
2515         (grokdeclarator): Likewise.
2516         * parser.c (cp_parser_omp_threadprivate): Likewise.
2517
2518 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
2519
2520         PR c++/30703
2521         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2522         parameters and result decls in omp clauses.
2523         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2524         by reference.
2525
2526 2007-02-05  Dirk Mueller  <dmueller@suse.de>
2527
2528         PR bootstrap/30510
2529         * parser.c (cp_parser_class_specifier): Always initialize bases.
2530
2531 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2532
2533         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2534         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2535         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2536         expressions.
2537         * semantics.c (finish_omp_atomic): Store a whole expression node
2538         in operand 1, and integer_zero_node in operand 0, for dependent
2539         OMP_ATOMIC.  Rewrite to make flow easier to understand.
2540
2541 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2542
2543         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2544
2545 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
2546
2547         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2548         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2549
2550 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
2551
2552        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2553        keyword warning to -Wc++0x-compat.
2554         
2555 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2556
2557         * decl.c (grokdeclarator): Update documentation.
2558
2559 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2560
2561         PR c++/30536
2562         * decl.c (grokdeclarator): If __thread is used together with
2563         a storage class other than extern and static, clear thread_p
2564         after issuing diagnostics and fall through to checking the
2565         storage class.
2566
2567 2007-01-30  Roger Sayle  <roger@eyesopen.com>
2568
2569         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2570         calculating the size of an array (to avoid recursive errors).
2571
2572 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2573
2574         PR c++/24745
2575         * typeck.c (build_binary_op): Fix logic for warning. Move warning
2576         to -Wpointer-arith.
2577         * call.c (convert_like_real): Don't warn when converting to
2578         boolean type.
2579         
2580 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2581
2582         * decl.c (pop_label): Replace warning with call to
2583         warn_for_unused_label.
2584
2585 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
2586
2587         PR C++/28988
2588         * semantics.c (finish_pseudo_destructor_expr): Check the
2589         destrutor name by calling check_dtor_name.
2590
2591 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
2592
2593         * lex.c (D_CPP0X): Rename.
2594         (D_CXX0X): To this.
2595         (reswords): D_CPP0X -> D_CXX0X.
2596         (init_reswords): Ditto.
2597         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2598         of C++0x keywords as identifiers.
2599
2600 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
2601
2602         PR c++/27492
2603         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2604         function decls.
2605
2606 2007-01-23  Ian Lance Taylor  <iant@google.com>
2607
2608         * typeck.c (convert_for_assignment): Only warn about a = b = c
2609         when converting to bool.
2610
2611 2007-01-23  Roger Sayle  <roger@eyesopen.com>
2612
2613         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2614         TREE_OVERFLOW.
2615         * typeck.c (ignore_overflows): Remove the remaining uses of
2616         TREE_CONSTANT_OVERFLOW.
2617
2618 2007-01-20  Jan Hubicka  <jh@suse.cz>
2619
2620         * decl2.c (start_objects, start_static_storage_duration_function):
2621         Do not make the functions uninlinable.
2622
2623 2007-01-17  Ian Lance Taylor  <iant@google.com>
2624
2625         * class.c (add_method): Call VEC_reserve_exact rather than passing
2626         a negative size to VEC_reserve.
2627
2628 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
2629
2630         PR c++/29573
2631         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2632
2633 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
2634
2635         PR c++/28999
2636         * decl.c (make_typename_type): If the qualified name is not a
2637         type, issue an error.
2638         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2639         formatting.
2640
2641 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
2642
2643         * rtti.c: Include target.h.
2644         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2645         don't emit typeinfo for fundamental types as weak.
2646         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2647
2648 2007-01-08  Richard Guenther  <rguenther@suse.de>
2649
2650         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2651
2652 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
2653
2654         * call.c (standard_conversion): Pass flag to
2655         vector_types_convertible_p to disallow emission of note.
2656         * typeck.c (convert_for_assignment): Pass flag to
2657         vector_types_convertible_p to allow emission of note.
2658         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2659         to disallow emission of note.
2660
2661 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2662
2663         PR c++/28986
2664         * typeck.c (build_binary_op): Call overflow_warning if
2665         TREE_OVERFLOW_P is true for the result and not for any of the
2666         operands.
2667         
2668 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
2669
2670        PR c++/19439
2671        * class.c (add_method): Don't wait until template
2672        instantiation time to complain about duplicate methods.
2673         
2674 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2675
2676         PR c/19978
2677         * semantics.c (finish_unary_op_expr): Warn only if result
2678         overflowed and operands did not.
2679
2680 2007-01-05  Ian Lance Taylor  <iant@google.com>
2681
2682         * typeck.c (build_binary_op): Warn about comparing a non-weak
2683         address to NULL.
2684
2685 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
2686
2687         * pt.c (tsubst): Propagate the need for structural equality checks
2688         when reducing the level of template parameters.
2689
2690 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
2691
2692         * pt.c: Fix a comment typo.
2693
2694 2007-01-02  Ian Lance Taylor  <iant@google.com>
2695
2696         * semantics.c (maybe_convert_cond): Optionally warn when using an
2697         assignment as a condition.
2698         * typeck.c (convert_for_assignment): Optionally warn about
2699         assigning the result of an assignment to a bool.
2700
2701 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2702
2703         * pt.c (canonical_template_parms): Correct typo in comment.
2704         
2705 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2706
2707         * typeck.c (structural_comptypes): Renamed from "comptypes".
2708         (comptypes): Use canonical type information to perform fast type
2709         comparison. When VERIFY_CANONICAL_TYPES, verify that the
2710         canonical type comparison returns the same results as we would see
2711         from the current, structural check. Support COMPARE_STRUCTURAL
2712         when we need structural checks.
2713         * decl.c (typename_compare): Fix comment.
2714         (build_typename_type): TYPENAME_TYPE nodes require structural
2715         equality checks, because they resolve different based on the
2716         current class type.
2717         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2718         require structural equality checks (for now).
2719         (build_ptrmemfunc_type): Build the canonical pointer to member
2720         function type.
2721         (compute_array_index_type): Whenever we build a new index type
2722         to represent the size of an array in a template, we need to mark
2723         this index type as requiring structural equality. This goes for
2724         arrays with value-dependent sizes with the current ABI, or all
2725         arrays with ABI-1.
2726         * tree.c (cplus_array_hash): New.
2727         (struct cplus_array_info): New.
2728         (cplus_array_compare): New.
2729         (cplus_array_htab): New.
2730         (build_cplus_array_type_1): Use a hash table to cache the array
2731         types we build. Build the canonical array type for each array
2732         type.
2733         (cp_build_qualified_type_real): When building a cv-qualified array
2734         type, use the hash table of array types and build canonical array
2735         types as necessary.
2736         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2737         use structural equality (for now).
2738         * cp-tree.h (COMPARE_STRUCTURAL): New.
2739         * pt.c (canonical_template_parms): New.
2740         (canonical_type_parameter): New.
2741         (process_template_parm): Find the canonical type parameter.
2742         (lookup_template_class): When we have named the primary template
2743         type, set the canonical type for our template class to the primary
2744         template type. If any of the template arguments need structural
2745         equality checks, the template class needs structural equality
2746         checks.
2747         (tsubst): When reducing the level of a template template
2748         parameter, we require structural equality tests for the resulting
2749         parameter because its template parameters have not had their types
2750         canonicalized. When reducing a template type parameter, find the
2751         canonical reduced type parameter.
2752         (any_template_arguments_need_structural_equality_p): New.
2753