OSDN Git Service

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