OSDN Git Service

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