OSDN Git Service

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