Merge with gcc-4_3-branch up to revision 175516.
[official-gcc.git] / gcc / cp / ChangeLog
blob73322e509b7725b19f16b8a8e49dd89cc6cde5fc
1 2011-06-27  Release Manager
3         * GCC 4.3.6 released.
5 2011-05-20  Jason Merrill  <jason@redhat.com>
7         PR c++/48873
8         * tree.c (stabilize_expr): Don't make gratuitous copies of classes.
10 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
12         PR c++/39219
13         * parser.c (cp_parser_enum_specifier): Apply all attributes.
15 2011-03-08  Jason Merrill  <jason@redhat.com>
17         PR c++/45651
18         * pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on
19         !TREE_PUBLIC decls.
21 2010-05-27  Jason Merrill  <jason@redhat.com>
23         PR c++/43555
24         * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
25         anonymous VLA size.
27 2010-05-22  Release Manager
29         * GCC 4.3.5 released.
31 2010-05-19  Jason Merrill  <jason@redhat.com>
33         PR c++/44193
34         * pt.c (tsubst) [TYPENAME_TYPE]: Discard cv-quals on
35         function/reference type.
37 2010-04-20  Richard Guenther  <rguenther@suse.de>
39         Backport from mainline
40         2009-01-09  Jakub Jelinek  <jakub@redhat.com>
42         PR c++/35335
43         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
45 2009-11-13  Jason Merrill  <jason@redhat.com>
47         PR c++/21008, DR 515
48         * semantics.c (finish_non_static_data_member): Don't check
49         derivation in a template.
51 2009-11-12  Jason Merrill  <jason@redhat.com>
53         PR c++/37037
54         * decl.c (grokdeclarator): Don't generate a void PARM_DECL.
56 2009-11-09  Jason Merrill  <jason@redhat.com>
58         PR c++/41972
59         * parser.c (cp_parser_template_argument): Accept SCOPE_REF around
60         VAR_DECL.
62 2009-11-04  Jason Merrill  <jason@redhat.com>
64         PR c++/35067
65         * method.c (use_thunk): Check DECL_WEAK as well as
66         DECL_ONE_ONLY.
68 2009-11-04  Dodji Seketeli  <dodji@redhat.com>
70         Revert fix for PR c++/37093
71         * pt.c (check_valid_ptrmem_cst_expr): Revert my previous change.
72         (convert_nontype_argument): Likewise.
74 2009-11-03  Jason Merrill  <jason@redhat.com>
76         PR c++/41876
77         * parser.c (cp_parser_exception_declaration): Pass true to
78         is_condition parm of cp_parser_type_specifier_seq.
80 2009-11-03  Dodji Seketeli  <dodji@redhat.com>
82         PR c++/37093
83         * pt.c (check_valid_ptrmem_cst_expr): New function.
84         (convert_nontype_argument): Use it to output an error for
85         illegal pointer to member expressions used as template arguments.
87 2009-08-04  Dodji Seketeli  <dodji@redhat.com>
89         PR debug/39706
90         * error.c (lang_decl_name): Print qualified names for decls
91         in  namespace scope.
93 2009-08-04  Release Manager
95         * GCC 4.3.4 released.
97 2009-07-10  Richard Guenther  <rguenther@suse.de>
99         Backport from mainline
100         2009-01-09  John F. Carr  <jfc@mit.edu>
102         PR c++/37877
103         * parser.c (cp_parser_class_specifier): Clear
104         parser->in_unbraced_linkage_specification_p while parsing class
105         specifiers.
107 2009-07-10  Richard Guenther  <rguenther@suse.de>
109         Backport from mainline
110         2008-11-17  Jakub Jelinek  <jakub@redhat.com>
112         PR c++/36089
113         * init.c (constant_value_1): Handle TREE_LIST init.
115 2009-06-25  Richard Guenther  <rguenther@suse.de>
117         Backport from mainline
118         2009-01-12  Jakub Jelinek  <jakub@redhat.com>
120         PR c/32041
121         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
122         offsetof member-designator, handle it as `[0].'.
124 2009-06-08  Jakub Jelinek  <jakub@redhat.com>
126         PR c++/40373
127         * call.c (check_dtor_name): Return false even if
128         get_type_value (name) is error_mark_node.
130 2009-06-04  Richard Guenther  <rguenther@suse.de>
132         Backport from mainline
133         2009-03-09  Jakub Jelinek  <jakub@redhat.com>
135         PR c++/39371
136         * semantics.c (finish_switch_cond): Don't call get_unwidened.
137         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
138         instead of TREE_TYPE (cond).
140 2009-04-23  Dodji Seketeli  <dodji@redhat.com>
142         PR c++/38228
143         * pt.c (unify): Do not allow the result of a template argument
144         deduction to be a METHOD_TYPE.
145         * cvt.c (cp_convert): Report a meaningful error for non-valid use
146         of pointer to member functions during conversions.
147         * call.c (build_new_op): Report a meaningful error for non-valid
148         use of pointer to member functions in binary expressions.
149         * typeck.c (invalid_nonstatic_memfn_p): Do not crash when EXPR is
150         NULL;
152 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
154         PR c++/39639
155         * parser.c (cp_parser_template_argument_list): Display an error
156         when an ellipsis is not preceded by a parameter pack. Also, warn
157         about variadic templates usage without -std=c++0x.
159 2009-04-13  Jason Merrill  <jason@redhat.com>
161         PR c++/39480
162         * call.c (build_over_call): Don't call memcpy if the target is
163         the same as the source.
165 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
167         Backport from mainline:
168         2009-04-10  Jason Merrill  <jason@redhat.com>
170         PR c++/28301
171         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
172         if we see a close brace without an open brace.
174 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
176         PR c++/39637
177         * parser.c (cp_parser_enumerator_definition): Make sure the
178         initializer of the enumerator doesn't contain any bare parameter pack.
180 2009-04-06  Jason Merrill  <jason@redhat.com>
182         PR c++/35146
183         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
184         the deduced template arguments give us the parameter types
185         we're looking for.
187 2009-03-30  Jason Merrill  <jason@redhat.com>
189         PR c++/38030, 38850, 39070
190         * pt.c (type_dependent_expression_p_push): New fn.
191         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
192         substitution makes the call non-dependent.  Preserve koenig_p.
193         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
194         for non-dependent calls.
195         * semantics.c (finish_call_expr): Revert earlier changes.
196         * cp-tree.h: Revert change to finish_call_expr prototype.
198 2009-03-26  Ben Elliston  <bje@au.ibm.com>
200         Backport from mainline:
201         2009-02-19  Jakub Jelinek  <jakub@redhat.com>
203         PR target/39175
204         * decl2.c (determine_visibility): If visibility changed and
205         DECL_RTL has been already set, call make_decl_rtl to update symbol
206         flags.
208 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
210         Backport from mainline:
211         2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
213         PR c++/39425
214         * parser.c (cp_parser_explicit_specialization): Don't skip the
215         rest of the specialization when begin_specialization returns
216         false.
218 2009-02-20  Jason Merrill  <jason@redhat.com>
220         PR c++/39225
221         * decl.c (grokdeclarator): Handle ~identifier.
223 2009-02-17  Jason Merrill  <jason@redhat.com>
225         PR c++/38950
226         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
228 2009-02-13  Jason Merrill  <jason@redhat.com>
230         PR c++/39070
231         * semantics.c (finish_call_expr): Change koenig_p parm to int.
232         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
233         * cp-tree.h: Adjust prototype.
234         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
236 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
238         PR c++/36897
239         * pt.c (convert_nontype_argument_function): Expect expr to be an
240         ADDR_EXPR.
242         PR c++/37314
243         * typeck.c (merge_types): Call resolve_typename_type if only
244         one type is a typename.
246 2009-02-02  Jason Merrill  <jason@redhat.com>
248         PR c++/39054
249         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
250         in BIT_NOT_EXPR.
252 2009-01-26  Jason Merrill  <jason@redhat.com>
254         PR c++/23287
255         * parser.c (cp_parser_unqualified_id): In a template,
256         accept ~identifier.
257         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
259 2009-01-24  Release Manager
261         * GCC 4.3.3 released.
263 2009-01-16  Jason Merrill  <jason@redhat.com>
265         PR c++/38877
266         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
268 2009-01-16  Steve Ellcey  <sje@cup.hp.com>
270         PR c++/31260
271         PR c++/38357
272         * pt.c (tsubst): Check for NULL args.
274 2009-01-15  Jason Merrill  <jason@redhat.com>
276         PR c++/38850
277         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
278         accept hidden friends.
280         PR c++/36334
281         PR c++/37646
282         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
283         a function isn't necessarily an lvalue. Take tree, not const_tree.
284         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
285         * typeck.c (lvalue_or_else): Likewise.
286         * cp-tree.h: Adjust prototypes.
288         PR c++/31488
289         * tree.c (pod_type_p): Return 1 for structs created by the back end.
291 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
293         PR c++/36019
294         * pt.c (parameter_of_template_p): New function.
295         * cp-tree.h: Declare it.
296         * name-lookup.c (binding_to_template_parms_of_scope_p): New
297         function.
298         (outer_binding): Take template parameters in account when looking for
299         a name binding.
301 2008-12-04  Janis Johnson  <janis187@us.ibm.com>
303         Backport from mainline:
304         2008-10-18  Jakub Jelinek  <jakub@redhat.com>
305                     Janis Johnson  <janis187@us.ibm.com>
307         * Make-lang.in (check-c++-subtargets): New alias for
308         check-g++-subtargets.
309         (lang_checks_parallelized): Add check-g++.
310         (check_g++_parallelize): New variable.
312 2008-11-19  Dodji Seketeli  <dodji@redhat.com>
314         PR c++/37142
315         * pt.c (coerce_template_template_parm): Use the more robust
316         uses_template_parms instead of dependent_type_p.
318 2008-11-19  Dodji Seketeli  <dodji@redhat.com>
320         PR c++/35405
321         * pt.c (lookup_template_class): Check pointers before dereferencing
322           Them.
323         * error.c (dump_template_decl): Likewise.
325 2008-11-19  Jason Merrill  <jason@redhat.com>
327         PR c++/37563
328         * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
329         name is not a declaration.
331 2008-11-14  Jason Merrill  <jason@redhat.com>
333         PR c++/38030
334         * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
335         for a non-dependent call.
337 2008-11-13  Jason Merrill  <jason@redhat.com>
339         PR c++/37932
340         * typeck2.c (process_init_constructor_record): Update bitfield
341         handling.
342         
343 2008-11-12  Jason Merrill  <jason@redhat.com>
345         PR c++/38007
346         * typeck.c (cp_build_modify_expr): Update bitfield handling.
348 2008-09-30  Simon Martin  <simartin@users.sourceforge.net>
350         PR c++/37555
351         * decl.c (grokdeclarator): Set the type for typedefs to a
352         nested-name-specifier to error_mark_node.
354 2008-09-09  Jakub Jelinek  <jakub@redhat.com>
356         PR c++/37389
357         * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
358         being error_operand_p.
360 2008-09-03  Jakub Jelinek  <jakub@redhat.com>
362         PR c++/37348
363         * decl.c (cp_finish_decl): Only set
364         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
366 2008-08-27  Release Manager
368         * GCC 4.3.2 released.
370 2008-08-19  Jakub Jelinek  <jakub@redhat.com>
372         PR debug/37156
373         * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
375 2008-08-07  Simon Baldwin  <simonb@google.com>
377         Backport from mainline:
378         2008-08-04  Simon Baldwin  <simonb@google.com>
380         PR c++/36999
381         * parser.c (cp_parser_elaborated_type_specifier): Warn only when
382         the declaration's id is followed by a semicolon.
384 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
386         PR c++/36405
387         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
388         complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
390 2008-07-30  Dodji Seketeli  <dseketel@redhat.com>
392         PR c++/36767
393         * decl2.c (fix_temporary_vars_context_r): New function.
394          (one_static_initialization_or_destruction): Make sure temporary
395          variables part of the initialiser have their DECL_CONTEXT()
396          properly set.
398 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
400         PR c++/36852
401         * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
402         TYPE_UID instead of pointers.
404 2008-07-18  Dodji Seketeli  <dseketel@redhat.com>
406         PR c++/36407
407         * call.c (convert_like_real): Don't take the error code path
408         when a rvalue or base conversion has the bad_p field set.
410 2008-07-07  Simon Martin  <simartin@users.sourceforge.net>
412         PR c++/34963
413         * decl.c (grokdeclarator): Reset storage_class and staticp for friend
414         functions declared with a storage class qualifier.
416 2008-06-30  Jakub Jelinek  <jakub@redhat.com>
418         PR c++/36662
419         * decl2.c (is_late_template_attribute): If the first attribute
420         argument is IDENTIFIER_NODE, don't consider it when checking
421         if arguments are value or type dependent.
423 2008-06-28  Jakub Jelinek  <jakub@redhat.com>
425         PR c++/36364
426         * repo.c (repo_emit_p): Put const static data members initialized
427         by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
428         for it is 0.
430 2008-06-15  Simon Martin  <simartin@users.sourceforge.net>
432         PR c++/35320
433         * decl2.c (grokbitfield): Receive the list of attributes, pass it to
434         grokdeclarator and apply it to the created declaration.
435         * cp-tree.h (grokbitfield): Update prototype.
436         * parser.c (cp_parser_member_declaration): Don't apply the attributes
437         since they are now applied in grokbitfield. Adjusted the call to
438         grokbitfield.
439         (cp_parser_objc_class_ivars): Likewise.
441 2008-06-15  Simon Martin  <simartin@users.sourceforge.net>
443         PR c++/35317
444         * class.c (type_requires_array_cookie): Do not consider delete[]
445         operators with an ellipsis as second argument.
447 2008-06-09  Jakub Jelinek  <jakub@redhat.com>
449         PR c++/36408
450         * semantics.c (stmt_expr_value_expr): Don't crash on empty
451         STATEMENT_LIST.
453 2008-06-07  Danny Smith  <dannysmith@users.sourceforge.net>
455         PR target/35921
456         * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
457         to clone.
459 2008-06-06  Release Manager
461         * GCC 4.3.1 released.
463 2008-05-27  Alexandre Oliva  <aoliva@redhat.com>
465         PR c++/35909
466         * call.c (convert_like_real): Convert bitfield to desired type
467         before creating temporary.
469 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
471         PR c++/36237
472         * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
473         fold_build_cleanup_point_expr on build_call_a results.
475         PR c++/36308
476         * semantics.c (omp_clause_info_fndecl): New function.
477         (finish_omp_clauses): Use it.
479 2008-05-21  Jakub Jelinek  <jakub@redhat.com>
481         PR c++/36023
482         * cp-tree.h (check_array_initializer): New prototype.
483         * decl.c (check_array_initializer): New function.
484         (check_initializer): Call it.
485         * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
487 2008-05-11  Volker Reichelt  <v.reichelt@netcologne.de>
489         * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
490         in error message.
491         (cp_parser_omp_clause_schedule): Remove superfluous "expected"
492         in error message.
494         PR c++/35578
495         * parser.c (cp_parser_decl_specifier_seq): Add location to error
496         message.
498 2008-04-30  Jakub Jelinek  <jakub@redhat.com>
500         PR c++/35986
501         * pt.c (more_specialized_fn): Stop the loop even if there are no
502         arguments before ellipsis.
504 2008-04-29  Jakub Jelinek  <jakub@redhat.com>
506         PR c++/35650
507         * parser.c (cp_parser_lookup_name): Look through single function
508         OVERLOAD.
510         PR c++/35987
511         * typeck.c (build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
512         COMPOUND_EXPR if the second argument would be error_mark_node.
514 2008-04-24  Jakub Jelinek  <jakub@redhat.com>
516         PR c++/35758
517         * cp-tree.h (cp_reconstruct_complex_type): New prototype.
518         * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
519         * decl2.c (is_late_template_attribute): Only make vector_size
520         late tmpl attribute if argument is type or value dependent.
521         (cp_reconstruct_complex_type): New function.
523 2008-04-22  Jason Merrill  <jason@redhat.com>
525         PR c++/35316
526         * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
527         to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
528         * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
530 2008-04-22  Jakub Jelinek  <jakub@redhat.com>
532         PR c++/35747
533         * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
534         expression is errorneous.
536 2008-04-21  Jason Merrill  <jason@redhat.com>
538         PR c++/35325
539         * tree.c (cp_tree_equal): Handle FIXED_CST.
541         PR c++/35678
542         * pt.c (template_template_parm_bindings_ok_p): Set 
543         processing_template_decl while in this function.
545 2008-04-18  Jason Merrill  <jason@redhat.com>
547         PR c++/33486
548         * name-lookup.c (arg_assoc_namespace): Look down into inline 
549         namespaces, too.
551 2008-04-17  Volker Reichelt  <v.reichelt@netcologne.de>
553         * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
554         as `)', not as `('.
556 2008-04-17  Jason Merrill  <jason@redhat.com>
558         PR c++/35773
559         * call.c (build_user_type_conversion_1): Represent second step of 
560         copy-init with an rvalue conversion.
561         (convert_like_real) [ck_user]: Don't implicitly add it here.
563 2008-04-15  Jakub Jelinek  <jakub@redhat.com>
565         PR c/35751
566         * decl.c (layout_var_decl): If extern or static var has variable
567         size, set TREE_TYPE (decl) to error_mark_node.
569 2008-04-09  Jason Merrill  <jason@redhat.com>
571         PR c++/35708
572         * semantics.c (finish_compound_literal): Return a TARGET_EXPR, 
573         not a pushed variable.
575 2008-04-07  Jason Merrill  <jason@redhat.com>
577         PR c++/35734
578         * class.c (type_has_user_nondefault_constructor): A template 
579         counts as a nondefault constructor.
581 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
583         PR c++/35741
584         * semantics.c (finish_offsetof): Undo effect of convert_from_reference
585         before calling fold_offsetof.
587 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
589         PR c++/35546
590         * pt.c (apply_late_template_attributes): Don't call tsubst on
591         first attribute argument if it is IDENTIFIER_NODE.
593         PR c++/35332
594         * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
595         and LTGT_EXPR to pp_expression.
597 2008-03-17  Jason Merrill  <jason@redhat.com>
599         PR c++/35548
600         * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
601         a temp directly to a reference as per DR391.
603 2008-03-12  Richard Guenther  <rguenther@suse.de>
605         PR c++/35469
606         Revert:
607         2008-02-04  Richard Guenther  <rguenther@suse.de>
609         PR java/35035
610         * decl.c (record_builtin_java_type): Make jboolean a
611         integer type again where its mode doesn't match that of bool.
613         2008-01-25  Richard Guenther  <rguenther@suse.de>
615         PR c++/33887
616         * decl.c (record_builtin_java_type): Make __java_boolean
617         a variant of bool.
618         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
619         after TYPE_MAIN_VARIANT check.
621 2008-03-10  Jakub Jelinek  <jakub@redhat.com>
623         PR c++/35328
624         * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
625         if errorcount.
627         PR c++/35337
628         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
629         DECL_P in not a variable and appears more than once error messages.
631 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
633         PR c++/35028
634         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
636         PR c++/34964
637         PR c++/35244
638         * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
639         vars.  Afterwards ensure v is VAR_DECL.
641         PR c++/35078
642         * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
643         call cp_finish_decl.
644         * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
645         early.
647 2008-03-06  Paolo Carlini  <pcarlini@suse.de>
649         PR c++/35323
650         * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
652 2008-03-06  Paolo Carlini  <pcarlini@suse.de>
654         PR c++/35333
655         * error.c (dump_expr): Handle CONJ_EXPR.
657 2008-03-06  Paolo Carlini  <pcarlini@suse.de>
659         PR c++/35338
660         * error.c (dump_type): Handle FIXED_POINT_TYPE.
661         (dump_expr): Handle FIXED_CST.
662         
663 2008-03-05  Release Manager
665         * GCC 4.3.0 released.
667 2008-02-27  Jakub Jelinek  <jakub@redhat.com>
669         PR c++/35368
670         * rtti.c: Include c-pragma.h.
671         (push_abi_namespace, pop_abi_namespace): New functions.
672         (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
673         create_tinfo_types, emit_support_tinfos): Use them.
674         * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
676 2008-02-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
678         PR C++/34715
679         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
680         template decls' function decl.
682 2008-02-22  Paolo Carlini  <pcarlini@suse.de>
684         PR c++/35282
685         Revert:
686         2008-02-14  Paolo Carlini  <pcarlini@suse.de>
688         PR c++/28743
689         * pt.c (determine_specialization): In case of function templates,
690         when the type of DECL does not match FN there is no match.
692 2008-02-19  Jason Merrill  <jason@redhat.com>
694         PR c++/34950
695         * pt.c (resolve_overloaded_unification): Set processing_template_decl
696         while we look for possible bindings.
698 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
700         PR c++/35023
701         PR c++/35024
702         PR c++/35026
703         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
704         is error_mark_node, return an error early.
705         (find_parameter_packs_r): Pass the pointer set along to recursive
706         calls of cp_walk_subtrees; don't try to manage the pointer set
707         ourselves.
708         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
709         (make_pack_expansion): Ditto.
710         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
711         a second pass through the tree with find_parameter_packs_r; that
712         second pass no longer does anything.
713         (push_template_decl_real): If we have an erroneous declaration,
714         set its type to error_mark_node before returning an error.
716 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
718         PR c++/34050
719         * pt.c (tsubst_initializer_list): Deal with the use of
720         VOID_TYPE_NODE to indicate value-initialization of the bases.
722 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
723             Jason Merrill  <jason@redhat.com>
725         PR c++/5645
726         PR c++/11159
727         * class.c (type_has_user_nondefault_constructor): New fn.
728         * cp-tree.h: Declare it.
729         * init.c (emit_mem_initializers): Use it for -W warning about
730         missing base initializer.
732 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
734         PR c++/28743
735         * pt.c (determine_specialization): In case of function templates,
736         when the type of DECL does not match FN there is no match.
738 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
739             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
741         PR c++/35138
742         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
743         are not identifier :: ~, return before calling cp_parser_type_name.
745 2008-02-13  Jason Merrill  <jason@redhat.com>
747         PR c++/34962, c++/34937, c++/34939
748         * decl2.c (is_late_template_attribute): Always defer attributes 
749         vector_size and weak.
751         PR c++/34774
752         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
753         of enumerators, too.
755 2008-02-12  Jason Merrill  <jason@redhat.com>
757         PR c++/34824
758         * call.c (convert_like_real): Pass LOOKUP_ONLYCONVERTING to build_temp
759         if we're doing conversions to call a user-defined conversion function.
761 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
763         PR c++/29048
764         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
765         check here, too.
767 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
769         PR c++/34862
770         * init.c (build_new_1): Don't create placement_expr before
771         constructing alloc_call.  Verify that the pointer is passed by
772         value to operator new.
774 2008-02-11  Jason Merrill  <jason@redhat.com>
776         PR c++/35097
777         * pt.c (tsubst): Don't look up a template typedef in an explicit
778         specialization.
780 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
782        PR c++/35113
783        * tree.c (cp_build_qualified_type_real): When building a
784        cv-qualified array type, build it as a unique type with
785        build_cplus_array_type_1 and then adopt the unqualified type's
786        main variant.
787         
788 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
790         PR c++/35077
791         * decl.c (groktypename): Check grokdeclarator return.
793 2008-02-10  Jason Merrill  <jason@redhat.com>
795         PR c++/34094
796         * decl2.c (cp_write_global_declarations): Don't write out static 
797         data members with DECL_IN_AGGR_P set.
799 2008-02-08  Jason Merrill  <jason@redhat.com>
801         PR c++/35116
802         * tree.c (build_target_expr_with_type): Handle void initializer.
803         (bot_manip): Remap slot before recursing.
805 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
807         PR other/35107
808         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
810 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
812         PR c++/35056
813         * tree.c: Include tree-flow.h.
814         (build_target_expr): Check type compatibility.
815         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
816         * call.c (convert_like_real): Convert bitfield to expected type.
818 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
820         PR c++/35049
821         PR c++/35096
822         * typeck.c (structural_comptypes): Call cp_comptypes.
823         (comptypes): New; called from the C/C++ common bits to perform
824         strict checks.
825         (cp_comptypes): Renamed from comptypes, which is already used,
826         with a different signature, by the C++ front end.
827         (build_reinterpret_cast_1): Call cp_comptypes.
828         (ptr_reasonably_similar): Ditto.
829         * decl.c (decls_match): Ditto.
830         * cvt.c (convert_to_reference): Ditto.
831         * cp-tree.h (same_type_p): Ditto.
832         (same_or_base_type_p): Ditto.
833         (comptypes): Rename to cp_comptypes.
834         * pt.c (canonical_type_parameter): Call cp_comptypes.
836 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
838         PR c++/33553
839         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
840         value dependent expression.
842 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
844         PR c++/35074
845         * decl2.c (save_template_attributes): When we're modifying the
846         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
847         all of the other variants to add those same attributes. Otherwise,
848         the main variant will be inconsistent with those other variants.
849         
850 2008-02-04  Richard Guenther  <rguenther@suse.de>
852         PR java/35035
853         * decl.c (record_builtin_java_type): Make jboolean a
854         integer type again where its mode doesn't match that of bool.
856 2008-02-02  Jason Merrill  <jason@redhat.com>
857             Mark Mitchell  <mark@codesourcery.com>
859         PR c++/33916
860         * init.c (build_value_init_1): New function.
861         (build_value_init): New function.
862         * typeck2.c (build_functional_cast): Call it.
863         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
865         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from 
866         TYPE_HAS_CONSTRUCTOR.
867         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
868         add_implicitly_declared_members): Adjust.
869         (check_field_decls): Adjust. Remove warnings about reference/const
870         in class without constructor.
871         (check_bases_and_members): Adjust.  Give those warnings here instead.
872         * decl.c (fixup_anonymous_aggr): Adjust.
873         (check_initializer): Adjust, clarify logic slightly.
874         (grok_special_member_properties): Adjust, only set if user-provided.
875         * rtti.c (create_tinfo_types): Don't set.
876         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
877         Use same_type_ignoring_top_level_qualifiers_p.
878         * pt.c (check_explicit_specialization): Adjust.
879         (instantiate_class_template): Adjust.
881 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
882            Jakub Jelinek  <jakub@redhat.com>
884        PR c++/34935
885        PR c++/34936
886        * typeck.c (structural_comptypes): Handle comparisons of
887        VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
888        REAL_TYPE nodes.
889        * mangle.c (write_builtin_type): Map down to the canonical type,
890        which will be one of the predefined type nodes.
892 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
894         PR 35004
895         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
896         bits to allow for expansion of the number of middle end tree
897         codes.
899 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
901         PR c++/34055
902         PR c++/34103
903         PR c++/34219
904         PR c++/34606
905         PR c++/34753
906         PR c++/34754
907         PR c++/34755
908         PR c++/34919
909         PR c++/34961
910         * typeck.c (check_return_expr): Tweak call to
911         check_for_bare_parameter_packs.
912         * class.c (add_method): Be careful with error_mark_nodes.
913         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
914         signature.
915         * pt.c (struct find_parameter_pack_data): Remove
916         SET_PACKS_TO_ERROR.
917         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
918         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
919         (make_pack_expansion): Ditto.
920         (check_for_bare_parameter_packs): Parameter is now a tree, not a
921         tree*.
922         (process_template_parm): Tweak call to
923         check_for_bare_parameter_packs.  
924         (push_template_decl_real): Tweak calls to
925         check_for_bare_parameter_packs. If bare parameter packs are found
926         in the list of exceptions, clear out that list after giving an
927         error.
928         * semantics.c (finish_cond): Tweak call to
929         check_for_bare_parameter_packs.
930         (finish_expr_stmt): Ditto.
931         (finish_for_expr): Ditto.
932         (finish_switch_cond): Ditto.
933         (finish_mem_initializers): Ditto.
934         (finish_member_declaration): Ditto.
935         (finish_static_assert): Check for bare parameter packs in the
936         condition.
937         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
938         attributes of a declaration.
939         * parser.c (cp_parser_using_declaration): Tweak call to
940         check_for_bare_parameter_packs.
941         (cp_parser_base_clause): Ditto.
943 2008-01-28  Jason Merrill  <jason@redhat.com>
945         PR c++/35007
946         * class.c (build_base_path): Fix !want_pointer case.
948 2008-01-27  Jason Merrill  <jason@redhat.com>
950         PR c++/27177
951         * class.c (build_base_path): Fix previous change.
953 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
955         PR c++/34965
956         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
957         and TRUTH_XOR_EXPR.
959 2008-01-26  Richard Guenther  <rguenther@suse.de>
961         PR c++/34235
962         * typeck.c (build_binary_op): Remove code to shorten compares.
964 2008-01-25  Richard Guenther  <rguenther@suse.de>
966         PR c++/33887
967         * decl.c (record_builtin_java_type): Make __java_boolean
968         a variant of bool.
969         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
970         after TYPE_MAIN_VARIANT check.
972 2008-01-25  Jason Merrill  <jason@redhat.com>
974         PR c++/27177
975         * class.c (build_base_path): Don't mess with virtual access if
976         skip_evaluation.
977         * call.c (standard_conversion): Don't check whether source type
978         is complete.
980         * decl2.c (is_late_template_attribute): Don't defer attribute
981         visibility just because the type is dependent.
983 2008-01-25  Jason Merrill  <jason@redhat.com>
984             Mark Mitchell  <mark@codesourcery.com>
986         PR c++/31780
987         * call.c (standard_conversion): Allow conversion from integer/real
988         to complex.
989         (compare_ics): Such a conversion is worse than a normal arithmetic
990         conversion.
991         
992 2008-01-25  Richard Guenther  <rguenther@suse.de>
994         PR c++/33887
995         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
996         to true.
998 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
1000         PR c++/34603
1001         * pt.c (push_template_decl_real): Return error_mark_node in case
1002         of template definition of non-template.
1004 2008-01-24  Jason Merrill  <jason@redhat.com>
1006         PR c++/34913
1007         * decl2.c (is_late_template_attribute): Defer any attribute with 
1008         dependent args.  Also defer type attributes if the type is dependent.
1010 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1011             Alexandre Oliva  <aoliva@redhat.com>
1013         PR c++/33984
1014         * call.c (reference_binding): For bitfields use the declared bitfield
1015         type.
1016         (add_builtin_candidates): Likewise.
1017         * class.c (layout_class_type): For bitfields copy over the
1018         original type quals.
1020 2008-01-22  Jason Merrill  <jason@redhat.com>
1022         PR c++/28560
1023         * decl.c (groktypename): Also ignore attributes on dependent 
1024         possibly-class types.
1026         PR c++/34912
1027         * friend.c (do_friend): Check for prior declaration of a friend 
1028         function of a local class.
1029         * name-lookup.c (lookup_name_innermost_nonclass_level): 
1030         No longer static.
1031         * name-lookup.h: Declare it.
1033 2008-01-22  Tom Tromey  <tromey@redhat.com>
1035         PR c++/34829:
1036         * init.c (build_new_1): Only disallow Java aggregates.
1038 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1040         PR c++/34607
1041         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1042         if decl or init is error_mark_node.
1044         PR c++/34918
1045         * error.c (dump_expr): Handle VECTOR_CST.
1047 2008-01-21  Jason Merrill  <jason@redhat.com>
1049         PR c++/33959
1050         * pt.c (tsubst_aggr_type): Make sure our context is complete.
1052         PR c++/34573
1053         * pt.c (retrieve_local_specialization): Robustify.
1054         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1056         PR c++/34846
1057         * pt.c (tsubst): Only call retrieve_local_specialization if the
1058         original typedef was in a function template.
1060         PR c++/34196
1061         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1063 2008-01-21  Richard Guenther  <rguenther@suse.de>
1065         PR c++/34850
1066         * error.c (cp_print_error_function): Deal with recursive
1067         BLOCK trees.
1069 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1071         PR c++/34891
1072         * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1074 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1076         PR c++/34776
1077         PR c++/34486
1078         * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1079         on non-IS_AGGR_TYPE scope.
1080         (constructor_name_p): Assert IS_AGGR_TYPE.
1082 2008-01-18  Ian Lance Taylor  <iant@google.com>
1084         PR c++/33407
1085         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1086         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1087         DECL_IS_OPERATOR_NEW flag.
1089 2008-01-16  Richard Guenther  <rguenther@suse.de>
1091         PR c++/33819
1092         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1093         for conversions to type variants.
1095 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
1097         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1098         declaration and code.  Update copyright year.
1100 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1102         PR c++/34399
1103         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1104         know we have a class type.
1106 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1108         PR c++/34751
1109         * pt.c (coerce_template_parameter_pack): When substituting into
1110         the type of a non-type template parameter pack. use the
1111         deduced/substituted arguments.
1112         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1113         can be a parameter pack with the ellipsis following it.  When we
1114         have an erroneous declaration, allow it to be a parameter pack.
1115         (cp_parser_template_parameter): Complain about default
1116         arguments on non-type template parameter packs, and parse them
1117         using the new cp_parser_default_argument.
1118         (cp_parser_parameter_declaration): Complain about parameter packs
1119         with default arguments. Move parsing of default arguments into a
1120         new function, cp_parser_default_argument.
1121         (cp_parser_default_argument): New; extracted from
1122         cp_parser_parameter_declaration.
1124 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1126         PR c++/34051
1127         PR c++/34055
1128         PR c++/34102
1129         PR c++/34103
1130         * typeck.c (check_return_expr): If there are bare parameter packs
1131         in the return value, set it to error_mark_node.
1132         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1133         * pt.c (find_parameter_packs_r): Look at the type of
1134         IDENTIFIER_NODEs (e.g., for user-defined conversions).
1135         (check_for_bare_parameter_packs): Flip the result: now returns
1136         TRUE when there were bare parameter packs, FALSE otherwise.
1137         (push_template_decl_real): Deal with flipped result of
1138         check_for_bare_parameter_packs.
1139         * semantics.c (finish_cond): If there are bare parameter packs in
1140         the conditional, set it to error_mark_node.
1141         (finish_expr_stmt): If there are bare parameter packs in the
1142         expression, set it to error_mark_node.
1143         (finish_for_expr): Ditto.
1144         (finish_switch_cond): If there are bare parameter packs in
1145         the conditional, set it to error_mark_node.
1146         (finish_mem_initializers): If there are bare parameter packs in
1147         the member initializer, set it to error_mark_node.
1148         (finish_member_declaration): Check the attributes of the
1149         declaration for bare parameter packs, and remove the attributes if
1150         any have bare parameter packs.
1151         * parser.c (cp_parser_using_declaration): Check the using
1152         declaration for bare parameter packs.
1153         (cp_parser_base_clause): If there are bare parameter packs in a
1154         base specifier, don't add it to the chain.
1156 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1158        PR c++/34314
1159        * error.c (dump_simple_decl): Display ellipsis for template
1160        non-type parameter packs.
1161        (dump_decl): Display ellipsis for template type parameter packs.
1162        (dump_template_decl): Display ellipsis for template template
1163        parameter packs.
1164        * pt.c (redeclare_class_template): When redeclaring a class
1165        template, check for collisions between template parameters and
1166        template parameter packs.
1168 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1170        PR c++/33964
1171        * pt.c (process_partial_specialization): Don't mark template
1172        parameters that occur in non-deduced contexts.
1173        (struct pair_fn_data): Add include_nondeduced_p.
1174        (for_each_template_parm_r): Only visit non-deduced contexts if
1175        include_nondeduced_p is set.
1176        (for_each_template_parm): Added parameter include_nondeduced_p,
1177        which states whether template parameters found in non-deduced
1178        contexts should be visited.
1179        (uses_template_parms): Visit all template parameters, even those
1180        in non-deduced contexts.
1182 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1184        PR c++/34052
1185        * pt.c (check_default_tmpl_args): Check for parameter packs that
1186        aren't at the end of a primary template.
1187        (push_template_decl_real): Remove check for parameter packs that
1188        aren't at the end of a primary template; that now happens in
1189        check_default_tmpl_args.
1190        * semantics.c (finish_template_template_parm): Use
1191        check_default_tmpl_args to check for errors in the template
1192        parameter list.
1193         
1194 2008-01-12  Doug Kwan  <dougkwan@google.com>
1196         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1197         instead of OPT_Wreturn_type in warning due to ignored return type
1198         qualifiers.
1199         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1200         instead of OPT_Wreturn_type in warning due to ignored return type
1201         qualifiers.
1203 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
1205         PR c++/33890
1206         * semantics.c (finish_omp_for): Don't call
1207         fold_build_cleanup_point_expr if processing_template_decl.
1209 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
1210             Jakub Jelinek  <jakub@redhat.com>
1212         PR c++/34611
1213         * error.c (dump_template_argument): Deal with TREE_LIST.
1215 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
1217        * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1218        long" in C++0x mode; change the warning to note that "long long"
1219        is only unsupported in C++98 mode.
1221 2007-12-20  Jason Merrill  <jason@redhat.com>
1223         PR c++/34111
1224         * call.c (standard_conversion): Derived-to-base is considered a
1225         standard conversion.
1227 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
1229         PR c++/34513
1230         * parser.c (cp_parser_omp_parallel): For non-combined parallel
1231         call cp_parser_statement rather than
1232         cp_parser_already_scoped_statement.
1234 2007-12-18  Jason Merrill  <jason@redhat.com>
1236         PR c++/34206
1237         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't 
1238         use template parms.
1239         (dependent_type_p_r): Handle the domain of an array.
1241 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
1242             Jakub Jelinek  <jakub@redhat.com>
1243         
1244         PR c++/32565
1245         PR c++/33943
1246         PR c++/33965
1247         * pt.c (template_template_parm_bindings_ok_p): New; verifies
1248         bindings of template template parameters after all template
1249         arguments have been deduced.
1250         (coerce_template_parms): Don't complain when COMPLAIN doesn't
1251         include tf_error.
1252         (fn_type_unification): Use template_template_parm_bindings_ok_p. 
1253         (unify): Deal with variadic, bound template template parameters. 
1254         (get_class_bindings): Use template_template_parm_bindings_ok_p. 
1256 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
1258         PR c++/34488
1259         * decl.c (grokdeclarator): Reject friend sfk_constructor
1260         FUNCTION_TYPE.
1262 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
1264         PR c/34506
1265         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1266         in between clauses.
1268 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1270         PR debug/7081
1271         * cp-lang.c (cp_classify_record): New.
1272         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1274 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
1276         PR c++/34238
1277         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1279         PR c++/34364
1280         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1281         dynamic_cast in a template.
1283 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
1285         PR c++/34059
1286         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1287         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1289 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
1291         PR c++/34395
1292         * error.c (dump_type_prefix, dump_type_suffix): Handle
1293         TYPE_PACK_EXPANSION.
1295         PR c++/34394
1296         * error.c (dump_expr): Handle ABS_EXPR.
1298 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
1300         PR c++/34178
1301         PR c++/34340
1302         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1303         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1304         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1305         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1306         flag_use_repository and repo_emit_p returned 2.
1308 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
1310         PR c++/34336
1311         * tree.c (stabilize_call, stabilize_init): Do nothing if
1312         processing_template_decl.
1314 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
1316         PR c++/34271
1317         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1318         error instead of assertion failure.
1319         * parser.c (cp_parser_decltype): If closing paren is not found,
1320         return error_mark_node.
1322 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1324        PR c++/34101
1325        * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1326        packs.
1327        (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1328        since arg_assoc_template_arg will deal with them (better).
1330 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1332        PR c++/33509
1333        * pt.c (tsubst_exception_specification): Handle substitutions into
1334        member templates, where tsubst_pack_expansion returns a
1335        TYPE_PACK_EXPANSION.
1337 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1339        PR c++/33091
1340        * pt.c (unify_pack_expansion): If we didn't deduce any actual
1341        bindings for the template parameter pack, don't try to keep the
1342        empty deduced arguments.
1343        (unify): If a parameter is a template-id whose template argument
1344        list contains a pack expansion that is not at the end, then we
1345        cannot unify against that template-id.
1347 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1349         PR c++/34061
1350         * pt.c (current_template_args): Use error_operand_p.
1352 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1354         PR c++/34273
1355         * error.c (dump_decl): Handle TREE_BINFO.
1357 2007-12-01  Ollie Wild  <aaw@google.com>
1359         PR c++/8171
1360         * typeck.c (build_binary_op): Add conversion of pointers to function
1361         members appearing as operands to the equality operators.
1363 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
1365         PR c++/34275
1366         * error.c (dump_expr): Handle OBJ_TYPE_REF.
1368 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
1370         PR c++/34270
1371         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1372         in templates.
1373         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1374         Likewise.
1376         PR c++/34267
1377         PR c++/34268
1378         * parser.c (cp_parser_decltype): Don't call finish_id_expression
1379         on ~type.
1380         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1381         and ~type early.
1383 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
1385         PR tree-optimization/34181
1386         * method.c (use_thunk): Don't inline the call in the thunk.
1388         PR c++/34213
1389         * tree.c (decl_linkage): Static data members and static member
1390         functions in anonymous ns classes are lk_external.
1392 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1394         PR c++/34081
1395         * decl.c (start_preparsed_function): Pass 
1396         processing_template_decl for the new allocate_struct_function
1397         parameter.
1399 2007-11-25  Richard Guenther  <rguenther@suse.de>
1401         * decl.c (poplevel): Use BLOCK_CHAIN.
1403 2007-11-24  Ollie Wild  <aaw@google.com>
1405         * typeck.c (delta_from_ptrmemfunc): New function.
1406         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1407         (build_binary_op): Call delta_from_ptrmemfunc.
1409 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
1411         PR c++/30293
1412         PR c++/30294
1413         * decl.c (cp_finish_decl): Disallow variable or field
1414         definitions if extern "Java" aggregates.
1415         (grokparms): Disallow parameters with extern "Java"
1416         aggregates.
1417         (check_function_type): Disallow function return values
1418         with extern "Java" aggregates.
1419         * init.c (build_new_1): Disallow placement new with
1420         extern "Java" aggregates.
1422 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
1423             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1424         
1425         PR c++/5310
1426         * call.c (convert_like_real): Build a zero constant when __null is
1427         converted to an integer type.
1428         
1429 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
1431         PR c++/34094
1432         * decl2.c (cp_write_global_declarations): Issue error about static
1433         data members in anonymous namespace which are declared and used,
1434         but not defined.
1436 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1438         PR c++/34089
1439         * parser.c (cp_parser_class_head): Reject function template ids.
1441         PR c++/28879
1442         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1443         when processing_template_decl to build_array_type.
1445         PR c++/33962
1446         * pt.c (more_specialized_fn): Don't segfault if one or
1447         both argument list end with ellipsis.
1449 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
1451         PR c++/30988
1452         * semantics.c (finish_call_expr): Set
1453         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1454         or OVERLOAD with all noreturn functions.
1456 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
1458         PR c++/34100
1459         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1460         error_mark_node.
1462 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
1464         PR c++/34054
1465         PR c++/34056
1466         PR c++/34057
1467         PR c++/34058
1468         PR c++/34060
1469         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1470         set to error_mark_node the outermost POINTER_TYPE to the pack if
1471         it is seen in a POINTER_TYPE.
1472         (push_template_decl_real): If check_for_bare_parameter_packs
1473         fails for function return type, set the return type to
1474         integer_type_node.  If check_for_bare_parameter_packs failed
1475         for non-function, return error_mark_node.
1477         PR c++/29225
1478         * call.c (build_new_op): Call resolve_args before calling
1479         build_over_call.
1481 2007-11-11  Tom Tromey  <tromey@redhat.com>
1483         PR c++/17577:
1484         * lex.c (handle_pragma_implementation): Use cpp_included_before.
1486 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1488         PR c++/8570
1489         * pt.c (redeclare_class_template): Update error message. Use a
1490         note to show the previous declaration.
1491         (tsubst_friend_class): Use the location of the friend template as
1492         the input location before calling redeclare_class_template.
1494 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
1496         PR c++/34068
1497         * semantics.c (finish_pseudo_destructor_expr): Handle
1498         object == error_mark_node.
1500 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
1502         PR c++/32241
1503         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1504         is not scalar type, let finish_class_member_access_expr handle
1505         diagnostics.  Pass BIT_NOT_EXPR argument to
1506         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
1508 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
1510         PR c++/33510
1511         * decl.c (cp_complete_array_type): If any of the initializer
1512         elements are pack expansions, don't compute the array size yet.
1514 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
1516         PR c++/30297:
1517         * tree.c (decl_linkage): Fields have no linkage.
1519 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
1521         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1523 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
1525         PR c++/33045
1526         PR c++/33837
1527         PR c++/33838
1528         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1529         Be careful with ERROR_MARK_NODEs.
1530         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1531         argument.
1533 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
1535         PR c++/33501
1536         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1537         on incomplete type.
1539 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1541         PR c++/33977
1542         PR c++/33886
1543         * tree.c (c_build_qualified_type): Define bridge to
1544         cp_build_qualified_type.
1546 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1548         PR c++/31439
1549         PR c++/32114
1550         PR c++/32115
1551         PR c++/32125
1552         PR c++/32126
1553         PR c++/32127
1554         PR c++/32128
1555         PR c++/32253
1556         PR c++/32566
1557         * typeck.c (check_return_expr): Pass address of retval to
1558         check_for_bare_parameter_packs.
1559         * class.c (build_base_field): Tolerate bases that have no layout
1560         due to errors.
1561         (end_of_base): Ditto.
1562         * tree.c (canonical_type_variant): Be careful with
1563         ERROR_MARK_NODE.
1564         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1565         tree*.
1566         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1567         which states whether parameter packs should be replaced with
1568         ERROR_MARK_NODE.
1569         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1570         possible. If set_packs_to_error is set true, replace the parameter
1571         pack with ERROR_MARK_NODE. Manage our own pointer sets.
1572         (uses_parameter_packs): Don't set parameter packs to
1573         ERROR_MARK_NODE.
1574         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1575         which may be modified (if it is a parameter pack). Instructs
1576         find_parameter_packs_r to replace parameter packs with
1577         ERROR_MARK_NODE (so that they won't cause errors later on).
1578         (process_template_parm): Pass pointer to
1579         check_for_bare_parameter_packs.
1580         (process_partial_specialization): Replace pack expansions before
1581         the end of the template argument list with ERROR_MARK_NODE.
1582         (push_template_decl_real): Pass pointer to
1583         check_for_bare_parameter_packs. Replace parameter packs not at the
1584         end of the template parameter list with ERROR_MARK_NODE.
1585         (convert_template_argument): Be more careful about using DECL_NAME
1586         on only declarations.
1587         (unify): Can't unify against ERROR_MARK_NODE.
1588         * semantics.c (finish_cond): Pass pointer to
1589         check_for_bare_parameter_packs.
1590         (finish_expr_stmt): Ditto.
1591         (finish_for_expr): Ditto.
1592         (finish_switch_cond): Pass pointer to
1593         check_for_bare_parameter_packs, and call it before we put the
1594         condition into the statement.
1595         (finish_mem_initializers): Pass pointer to
1596         check_for_bare_parameter_packs.
1597         (finish_member_declaration): Ditto.
1598         * parser.c (cp_parser_base_clause): Ditto.
1599         
1600 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
1602         PR target/33168
1603         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1604         with the final TREE_READONLY flag in place.  processing_template_decl
1605         is known to be 0 in this part of function.
1607         PR c++/33894
1608         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1609         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1610         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1611         * semantics.c (finish_omp_atomic): Revert most of the
1612         2007-02-05 changes, just keep the new representation of
1613         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1615 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
1617         PR c++/33871
1618         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1619         local.
1621 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1623         PR c++/33996
1624         PR c++/33235
1625         PR c++/33930
1626         * typeck.c (merge_types): Don't lose rvalue references when
1627         merging types.
1628         * call.c (build_over_call): Don't elide move constructors just
1629         because the copy constructor is trivial (!).
1630         (compare_ics): If comparing cv-qualifiers fails, we can still order
1631         based on binding lvalues vs. rvalues.
1633 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1635         PR c++/33939
1636         * pt.c (unify_pack_expansion): bring handling of function call
1637         arguments into line with type_unification_real. 
1639 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1641         * typeck.c (build_binary_op): Use pedwarn instead of error for
1642         consistency.
1644 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
1646         PR c++/33836
1647         * parser.c (cp_parser_unary_expression): For &&label call
1648         cp_parser_non_integral_constant_expression and return error_mark_node
1649         if it returned true.
1651         PR c++/33969
1652         * decl.c (grokdeclarator): Don't call build_memfn_type if type
1653         is neither FUNCTION_TYPE nor METHOD_TYPE.
1655 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
1657         PR c++/33516
1658         * parser.c (cp_parser_nested_name_specifier_opt): Use
1659         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1660         typedef of currently open class.
1662 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
1664         PR c++/33495
1665         * error.c (dump_expr): Deal specially with statements.
1667 2007-11-01  Jason Merrill  <jason@redhat.com>
1669         PR c++/30897
1670         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1671         template parms.
1672         (lookup_template_class): Use it to get the outer template args
1673         for instantiating one.
1675         PR c++/29236
1676         * pt.c (reduce_template_parm_level): tsubst the parameters
1677         of a template template parm.
1679 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
1681         PR c++/33955
1682         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1684 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
1686         PR c++/32384
1687         * parser.c (cp_parser_postfix_dot_deref_expression): If
1688         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1689         first and if that succeeds and type is SCALAR_TYPE_P, create
1690         PSEUDO_DTOR_EXPR.
1692         PR c++/32260
1693         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1694         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1695         as for std::type_info.
1697 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
1699         PR c++/33494
1700         * cxx-pretty-print.c (pp_cxx_typeid_expression,
1701         pp_cxx_delete_expression): Change to static linkage.
1702         * cxx-pretty-print.h: Adjust declarations.
1703         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1704         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1705         MODOP_EXPR): Forward to pp_expression.
1707         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1708         Fix typo.
1710 2007-10-31 Christian Bruel  <christian.bruel@st.com>
1711            Mark Mitchell  <mark@codesourcery.com>
1713         PR c++/19531
1714         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1715         if retval is volatile. 
1716         
1717 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
1719         PR c++/33616
1720         * decl2.c (build_offset_ref_call_from_tree): Call
1721         build_non_dependent_expr on object prior to building ADDR_EXPR from it
1722         if FN is DOTSTAR_EXPR.
1724 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
1726         PR c++/31993
1727         PR c++/32252
1728         * pt.c (find_parameter_packs_r): Fix typo in comment.
1729         (convert_template_argument): Look at the pattern of a pack
1730         expansion to determine what kind of entity we're converting.
1731         (coerce_template_parameter_pack): When we have coerced a non-type
1732         template parameter pack, substitute into the type of that pack.
1733         (tsubst_pack_expansion): When our substitution of a parameter pack
1734         is a "trivial" substitution of itself, just substitute into the
1735         pack expansion rather than actually expanding.
1737 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
1739         PR c++/33841
1740         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1741         for non-integral type bitfields.  Return true if bitfield is correct, false
1742         error has been diagnosed.
1743         (check_field_decls): If check_bitfield_decl returned false, call also
1744         check_field_decl.
1746 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
1747             Mark Mitchell  <mark@codesourcery.com>
1749         PR c++/30659
1750         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1751         class member error out and return.
1753 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1755         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1756         to current_function_decl rather than 0.
1758         PR c++/33844
1759         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1760         ->* rather than .*.
1761         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1763 2007-10-27  Jason Merrill  <jason@redhat.com>
1765         PR c++/5247
1766         * call.c (convert_default_arg): Detect recursion.
1768 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1770         PR c++/33842
1771         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1772         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1773         OFFSETOF_EXPR.
1774         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1775         functions.
1776         * error.c (dump_expr): Handle OFFSETOF_EXPR.
1778 2007-10-26  Jason Merrill  <jason@redhat.com>
1780         PR c++/24791
1781         * pt.c (get_template_info): New fn.
1782         (template_class_depth): Use it.
1783         (push_template_decl_real): Check that the template args of the 
1784         definition match the args of the previous declaration.
1786 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1788         PR c++/31988
1789         * decl2.c (coerce_new_type): Do not allow a default argument for
1790         the first parameter.
1792 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
1794         PR c++/33839
1795         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1796         don't see the leading '('. Only lookup names if we get an
1797         IDENTIFIER_NODE.
1799 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
1801         PR c++/33744
1802         * parser.c (cp_parser_parenthesized_expression_list): Set
1803         greater_than_is_operator_p to true in between the parens.
1805 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1807         PR c++/31747
1808         * decl.c (grokdeclarator): In case of conflicting specifiers
1809         just return error_mark_node.
1811 2007-10-26  Ollie Wild  <aaw@google.com>
1813         * expr.c (cxx_expand_expr): Removed.
1814         * cp-tree.h (exx_expand_expr): Removed.
1815         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1816         with c_expand_expr.
1818 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
1820         PR c++/33843
1821         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1823 2007-10-23  Jason Merrill  <jason@redhat.com>
1825         PR c++/25950 (DR 391)
1826         * call.c (struct conversion): Remove check_copy_constructor_p.
1827         (reference_binding): Always bind a reference directly to a 
1828         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
1829         temporary creation.
1830         (check_constructor_callable): Remove.
1831         (convert_like_real): Don't call it.
1832         (initialize_reference): Don't call check_constructor_callable.
1833         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1834         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
1835         conversions if LOOKUP_NO_TEMP_BIND.
1836         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1837         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1838         second conversion.
1839         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1841 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
1843         PR c++/33372
1844         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1845         before checking if its type is integral.
1847 2007-10-22  Jason Merrill  <jason@redhat.com>
1849         PR c++/33620
1850         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1851         * pt.c (apply_late_template_attributes): Splice out dependent
1852         attributes from DECL_ATTRIBUTES.
1854         * decl.c (cxx_maybe_build_cleanup): Use build_address.
1856 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1858         * typeck.c (build_binary_op) : Use appropriate warning option
1859         instead of unnamed warning.
1861 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
1863         PR c++/31446
1864         * pt.c (current_template_args): Do not change TREE_LIST elements
1865         with a TREE_VALUE of error_mark_node.
1867 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
1869         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1870         * decl.c (start_decl): Tidy.
1871         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1872         the type.
1873         (grokdeclarator): Clarify comment.
1875 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
1877         PR c++/30303
1878         * decl.c (grokfndecl): Return NULL after the "definition of
1879         implicitly-declared" error happened.
1881 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
1883         PR c++/26698
1884         * call.c (build_user_type_conversion_1): Do not consider conversion
1885         functions to convert a (possibly cv-qualified) object to the (possibly
1886         cv-qualified) same object type (or a reference to it), to a (possibly
1887         cv-qualified) base class of that type (or a reference to it).
1889 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
1891         * pt.c (tsubst): Use template_parm_level_and_index.
1893 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
1895         PR c++/32121
1896         * parser.c (cp_parser_compound_statement): Handle label-declarations
1897         at the beginning of the compound statement.
1898         (cp_parser_block_declaration): Issue diagnostics about __label__
1899         not at the beginning of a block.
1901 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
1903         PR c++/33461
1904         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1905         to convert_template_argument.
1906         (coerce_template_parms): Return error_mark_node after fixed-length
1907         error.
1908         (tsubst_decl): Check for error_mark_node the return value of the
1909         first tsubst in 'case VAR_DECL'.
1911 2007-10-08  Ollie Wild  <aaw@google.com>
1913         * typeck2.c (digest_init): Call cplus_expand_constant after
1914         convert_for_initialization.
1915         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1916         * expr.c (cplus_expand_constant): Updated function description.
1918 2007-10-04  Jason Merrill  <jason@redhat.com>
1920         PR c++/20416
1921         * call.c (initialize_reference): Handle local static reference
1922         temps properly.
1924 2007-10-03  Jason Merrill  <jason@redhat.com>
1926         PR c++/32470
1927         * name-lookup.c (push_namespace_with_attrs): Fold back into...
1928         (push_namespace): Here.
1929         (handle_namespace_attrs): New fn for the attr code.
1930         (leave_scope): Don't pop_visibility.
1931         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1932         * parser.c (cp_parser_namespace_definition): Call
1933         handle_namespace_attrs and pop_visibility as appropriate. 
1935         PR c++/11756
1936         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1938 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
1940         * decl.c (duplicate_decls): Preserve linkage flags for mere
1941         redeclarations of gnu_inline definitions.
1943 2007-10-03  Jason Merrill  <jason@redhat.com>
1945         PR c++/15764
1946         * decl.c (wrap_cleanups_r): New fn.
1947         (wrap_temporary_cleanups): New fn.
1948         (initialize_local_var): Call it.
1950 2007-09-29  Jason Merrill  <jason@redhat.com>
1952         PR c++/33094
1953         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
1954         constant to not have DECL_EXTERNAL if it's file-local.
1956 2007-09-28  Ollie Wild  <aaw@google.com>
1958         Revert
1959         2007-09-27  Ollie Wild  <aaw@google.com>
1961         * typeck2.c (digest_init): Call cplus_expand_constant after
1962         convert_for_initialization.
1963         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1964         * expr.c (cplus_expand_constant): Updated function description.
1966 2007-09-28  Jason Merrill  <jason@redhat.com>
1968         PR c++/10179
1969         * class.c (layout_empty_base): Take rli parameter, update
1970         rli->record_align if empty base has user-specified alignment.
1971         (build_base_field): Pass rli to it.
1973 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1975         PR c++/33213
1976         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1978 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1980         PR c++/33118
1981         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1982         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1983         (dump_parameters): Just call dump_type for argument packs too.
1985 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
1987         PR c++/31434
1988         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1989         qualification by creating qualified PACK_EXPANSION_PATTERN and
1990         then calling make_pack_expansion on it.
1992 2007-09-27  Ollie Wild  <aaw@google.com>
1994         * typeck2.c (digest_init): Call cplus_expand_constant after
1995         convert_for_initialization.
1996         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1997         * expr.c (cplus_expand_constant): Updated function description.
1999 2007-09-27  Jason Merrill  <jason@redhat.com>
2001         PR c++/33571
2002         * decl2.c (is_late_template_attribute): Don't crash on unknown
2003         attribute.
2005 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
2007         PR c++/33493
2008         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2009         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2010         spaces in the formatting.
2011         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2013 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
2015         * error.c (cxx_print_error_function): Add third argument, pass
2016         it over to lhd_print_error_function.
2017         (cp_print_error_function): If diagnostic->abstract_origin, print
2018         virtual backtrace.
2019         * cp-tree.h (struct diagnostic_info): New forward decl.
2020         (cxx_print_error_function): Add third argument.
2022 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
2024         PR c++/33207
2025         * name-lookup.c (pushtag): Do not create an implicit typedef before
2026         the associated type declaration is known to be valid.
2028 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
2030         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2031         rather than pointers.
2033 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
2035         PR c++/14688
2036         * search.c (check_final_overrider): Fail if
2037         targetm.comp_type_attributes returns 0.
2039 2007-09-24  Jason Merrill  <jason@redhat.com>
2041         PR c++/33239
2042         * pt.c (resolve_typename_type): Don't look things up in the original
2043         template if it would mean losing template arguments.    
2045 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
2047         PR c++/33506
2048         * cp-tree.h (cxx_type_hash_eq): New prototype.
2049         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2050         * tree.c (cxx_type_hash_eq): New function.
2052 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2054         PR c++/33185    
2055         * tree.c (cp_build_qualified_type_real): Build a canonical
2056         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2057         
2058 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2060         PR c++/33112
2061         PR c++/33185    
2062         * tree.c (cplus_array_compare): Compare pointers, not types.
2063         (build_cplus_array_type_1): Store new array type into the hash
2064         table before building the canonical type; build the canonical type
2065         correctly.
2066         (cp_build_qualified_type_real): Put all of the array types with
2067         cv-qualified element types into the C++ array hash table, built as 
2068         variants of the unqualified versions.
2069         
2070 2007-09-23  Jason Merrill  <jason@redhat.com>
2072         PR c++/16370
2073         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2074         for deprecation warnings.
2076 2007-09-22  Jason Merrill  <jason@redhat.com>
2078         PR c++/15269
2079         * call.c (build_over_call): Warn about deprecated virtuals.
2081         PR c++/19407
2082         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2083         (MAYBE_TAGGED_TYPE_P): Remove.
2084         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2085         instead of calling is_late_template_attribute again.
2086         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2087         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2088         Don't crash on typedefs from non-template classes.
2089         * decl2.c (grokfield): Don't sorry about attrs on template parms.
2090         (is_late_template_attribute): All attributes applied to template
2091         parms or typename types are dependent.  Static.
2092         (splice_template_attributes): Pass decl through.
2093         (save_template_attributes): Likewise.
2095 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
2097         PR c++/33496
2098         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2099         returned from tsubst_pack_expansion.
2100         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2101         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2103 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2105         PR c++/33460
2106         * semantics.c (finish_id_expression): Use consistently
2107         context_for_name_lookup.
2108         * decl.c (fixup_anonymous_aggr): Fix error message for
2109         anonymous struct (vs union).
2111 2007-09-19  Jason Merrill  <jason@redhat.com>
2113         PR c++/7586
2114         * pt.c (tsubst): Handle typedefs by looking for the specialization.
2115         (retrieve_specialization): Only tagged types use 
2116         DECL_TEMPLATE_INSTANTIATIONS.
2117         (instantiate_class_template): Push nested classes too.
2118         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2119         tagged types.
2120         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2121         * init.c (is_aggr_type): Remove redundant tests.
2122         * class.c (push_nested_class): Use CLASS_TYPE_P.
2124 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2126         PR c++/33459
2127         * init.c (build_zero_init): If, recursively, build_zero_init
2128         returns a NULL_TREE, do not append it to the VEC of constructors.
2130 2007-09-18  Jason Merrill  <jason@redhat.com>
2132         PR c++/17743
2133         * pt.c (apply_late_template_attributes): Set processing_template_decl.
2134         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2135         ATTR_FLAG_TYPE_IN_PLACE.
2136         (tsubst): Do unqualified lookup to find typedefs from current class.
2137         [ARRAY_TYPE]: Propagate alignment info.
2138         * decl2.c (is_late_template_attribute): Only defer handling of
2139         attribute aligned if the expression is dependent.
2140         (save_template_attributes): If we're deferring any attributes,
2141         make this a naming typedef.
2143 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2145         PR c++/33462 (again)
2146         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2147         va_arg instead of __builtin_va_arg.
2149 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2151         PR c++/33462
2152         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2153         (pp_cxx_primary_expression): Use it.
2154         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2155         * error.c (dump_expr): Use it.
2157 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2159         PR c++/33463
2160         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2161         out case TYPEID_EXPR to...
2162         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2163         and pp_cxx_right_paren.
2164         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2165         * error.c (dump_expr): Use it.
2167 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2169         PR c++/33464
2170         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2171         (pp_cxx_primary_expression): Use it.
2172         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2173         * error.c (dump_expr): Use it.
2175 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
2177         PR c++/33124
2178         * init.c (build_new): Remove warning for zero-element
2179         allocations.
2181 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2183         PR c++/32756
2184         * call.c (maybe_handle_implicit_object): Set this_p, clear
2185         rvaluedness_matches_p.
2186         (compare_ics): Do not compare rvaluedness matching when one of the
2187         operands is an implicit object.
2189 2007-09-14  Jason Merrill  <jason@redhat.com>
2191         PR c++/17743, c++/19163
2192         * decl2.c (is_late_template_attribute): New fn.
2193         (splice_template_attributes, save_template_attributes): New fns.
2194         (cplus_decl_attributes): Call save_template_attributes.
2195         * pt.c (apply_late_template_attributes): New fn.
2196         (instantiate_class_template, tsubst_decl): Use it.
2197         * cp-tree.h: Declare is_late_template_attribute.
2199 2007-09-13  Tom Tromey  <tromey@redhat.com>
2201         * parser.c (cp_lexer_new_main): Don't use
2202         c_lex_return_raw_strings.
2203         (cp_lexer_get_preprocessor_token): Update.  Add special case when
2204         lexer is NULL.
2206 2007-09-11  Jan Hubicka <jh@suse.cz>
2208         * method.c (use_thunk): Use tree_rest_of_compilation
2209         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2210         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2211         * cp-tree.h (expand_body): Kill.
2212         (emit_associated_thunks): Declare.
2213         * semantics.c (emit_associated_thunks): Export.
2214         (expand_body): Kill.
2216 2007-09-09  David Daney  <ddaney@avtrex.com>
2218         PR c++/33324
2219         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2220         to calculate cookie_ptr.
2222 2007-09-08  Jason Merrill  <jason@redhat.com>
2224         PR c++/33342
2225         * pt.c (most_specialized_class): Set processing_template_decl
2226         while tsubsting partial spec args.
2228 2007-09-06  Jason Merrill  <jason@redhat.com>
2230         * decl2.c (get_guard): Copy visibility from the guarded variable.
2232 2007-09-06  Jan Hubicka  <jh@suse.cz>
2234         * semantics.c (expand_body): Do not mark arguments of clones used.
2236 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
2238         PR c++/32674
2239         * decl.c (cp_finish_decl): When processing_template_decl,
2240         deal correctly with init as TREE_LIST.
2242 2007-09-06  Tom Tromey  <tromey@redhat.com>
2244         * decl.c (finish_function): Put return's location on line zero of
2245         file.
2247 2007-09-05  Jason Merrill  <jason@redhat.com>
2249         PR c++/15745
2250         * except.c (prepare_eh_type): Use type_decays_to.
2252         PR c++/15097
2253         * init.c (build_delete): Use build_headof to get the address of the
2254         complete object if we aren't using the deleting destructor.
2255         * rtti.c (build_headof): No longer static.
2256         * cp-tree.h: Declare it.
2258 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
2260         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2261         decl if a prototype for XX is provided with throw().
2263         PR c++/33289
2264         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2265         on __*_chk non-__builtin_* decls.
2267 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2269         PR c++/30302
2270         * semantics.c (finish_id_expression): Use context_for_name_lookup
2271         insted of DECL_CONTEXT, to see through anonymous structs and unions.
2272         * class.c (finish_struct_anon): Deal correctly with anonymous
2273         structs (vs unions, as GNU extension) in error messages.
2275 2007-09-05  Jan Hubicka  <jh@suse.cz>
2277         * sematics.c (expand_body): Remove unnecesary import_export_decl
2278         call, DECL_EXTERNAL checks and current_function_decl saving.
2280 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2282         PR c++/29731 (again)
2283         * parser.c (cp_parser_primary_expression): Return error_mark_node
2284         when a statement-expression is found in a template-argument list.
2286 2007-09-04  Jason Merrill  <jason@redhat.com>
2288         * except.c (initialize_handler_parm): Use
2289         fold_build_cleanup_point_expr.
2291         PR c++/31419
2292         * call.c (reference_binding): Don't look for user-defined conversions
2293         to the same type.
2295         PR c++/31411
2296         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2297         the MUST_NOT_THROW_EXPR.
2299 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
2301         * decl.c (cp_finish_decl): Call determine_visibility before
2302         make_rtl_for_nonlocal_decl.
2304 2007-09-04  Jason Merrill  <jason@redhat.com>
2306         PR c++/14032
2307         * pt.c (most_specialized_class): Substitute outer template
2308         arguments into the arguments of a member template partial
2309         specialization.
2310         (strip_innermost_template_args): New fn.
2312 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
2314         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2316 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2318         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2319         * decl.c (cp_make_fname_decl): Likewise,
2320         * parser.c (cp_parser_string_literal): Likewise,
2321         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2322         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2323         Likewise,
2325 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
2327         PR c++/33208
2328         * typeck.c (build_unary_op): Fix error message for
2329         Boolean expression as operand to operator--.
2331 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2333         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2334         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2335         Likewise.
2337 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2339         PR c++/32597
2340         * init.c (build_default_init): Make extern.
2341         * cp-tree.h (build_default_init): Declare here.
2342         * pt.c (tsubst_expr): When the instantiation of the initializer of
2343         a variable results in an empty list, default-initialize the
2344         variable.
2345         (tsubst_copy_and_build): When the instantiation of the initializer
2346         in a new expression results in an empty initializer list,
2347         default-initialize it.
2349 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
2351         * mangle.c (write_type): Change mangling of rvalue reference from
2352         `RR' to `O'. 
2354 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
2356         * decl.c (duplicate_decls): Remove duplicated line.
2358 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2360         PR c++/33210
2361         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2362         BOUND_TEMPLATE_TEMPLATE_PARM.
2364 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2366         PR c++/32113
2367         * search.c (lookup_member): Check the name argument for
2368         error_mark_node.
2370 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
2372         PR c++/33212
2373         * parser.c (cp_parser_trait_expr): Check rerurn value of
2374         cp_parser_type_id.
2376 2007-08-30  Ollie Wild  <aaw@google.com>
2378         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2379         convert_ptrmem for pointer to member conversions.
2380         (convert_to_pointer_force): Update cp_convert_to_pointer call.
2381         (ocp_convert): Update cp_convert_to_pointer call.
2382         * typeck.c (convert_ptrmem): Add conditional for null pointers to
2383         members.
2384         (build_static_cast_1): Check can_convert for conversions in either
2385         direction.
2386         (get_delta_difference_1): New function.
2387         (get_delta_difference): Refactor to call get_delta_difference_1.
2389 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
2391         * decl.c (start_preparsed_function): Set
2392         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2394 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
2396         PR c++/33209
2397         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2398         BOUND_TEMPLATE_TEMPLATE_PARM.
2400 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
2402         PR c++/32596
2403         PR c++/32400
2404         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2405         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2407 2007-08-27  Jason Merrill  <jason@redhat.com>
2409         PR c++/29000
2410         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
2411         Look inside STMT_EXPR.
2412         * semantics.c (stmt_expr_value_expr): New fn.
2413         * cp-tree.h: Declare it.
2415         PR c++/28558
2416         * decl.c (groktypename): Ignore attributes applied to class type.
2418 2007-08-28  Richard Guenther  <rguenther@suse.de>
2420         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2422 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2423         
2424         * error.c (dump_expr): Handle COMPLEX_CST.
2425         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2426         (pp_cxx_expression): Likewise.
2428 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
2430         * decl.c (GNU_INLINE_P): New.
2431         (duplicate_decls): Handle gnu_inline.  Merge attributes and
2432         some flags in overriding definitions.
2433         (redeclaration_error_message): Handle gnu_inline.
2434         (start_preparsed_function): Likewise.
2436 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2438         * call.c (sufficient_parms_p): Constify.
2439         * class.c (same_signature_p): Likewise.
2440         * cp-gimplify.c (is_invisiref_parm,
2441         cxx_omp_privatize_by_reference): Likewise.
2442         * cp-objcp-common.c (has_c_linkage): Likewise.
2443         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2444         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2445         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2446         num_artificial_parms_for, comp_template_parms,
2447         template_parameter_pack_p, any_dependent_template_arguments_p,
2448         any_type_dependent_arguments_p, any_value_dependent_elements_p,
2449         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2450         zero_init_p, member_p, cp_lvalue_kind,
2451         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2452         varargs_function_p, is_dummy_object, special_function_kind,
2453         string_conv_p, type_unknown_p, comp_except_specs, compparms,
2454         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2455         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2456         cp_has_mutable_p, at_least_as_qualified_p,
2457         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2458         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2459         * except.c (nothrow_libfn_p): Likewise.
2460         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2461         Likewise.
2462         * pt.c (comp_template_parms, template_parameter_pack_p,
2463         any_type_dependent_arguments_p, any_value_dependent_elements_p,
2464         any_dependent_template_arguments_p): Likewise.
2465         * repo.c (repo_export_class_p): Likewise.
2466         * semantics.c (anon_aggr_type_p): Likewise.
2467         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2468         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2469         varargs_function_p, member_p, is_dummy_object, pod_type_p,
2470         zero_init_p, special_function_p): Likewise.
2471         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2472         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2473         compparms, invalid_nonstatic_memfn_p,
2474         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2475         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2476         cp_has_mutable_p, lvalue_or_else): Likewise.
2478 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
2480         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2481         * cp-objcp-common.c (cp_tree_size): Ditto.
2482         * tree.c (cp_walk_subtrees): Ditto
2483         * cp-tree.def (TINST_LEVEL): Go away.
2484         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2485         move together with other non-tree structs.
2486         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2487         (union lang_tree_node): Eliminate tinst_level field.
2488         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2489         (current_instantiation, outermost_tinst_level): Return
2490         a "struct tinst_level *".
2492         * error.c (print_instantiation_partial_context): Change second
2493         parameter to a "struct tinst_level *".  Replace accessor macros
2494         with field access.
2495         (print_instantiation_full_context): Likewise.
2496         * lex.c (in_main_input_context): Likewise.
2498         * pt.c (struct pending_templates): New.
2499         (pending_templates, last_pending_template): Use it as a type.
2500         (current_tinst_level): Change typo to "struct tinst_level *"
2501         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2502         (add_pending_template): Construct a "struct pending_template".
2503         Replace TINST_LEVEL accessor macros with field access.
2504         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2505         (pop_tinst_level): Likewise.
2506         (instantiate_pending_templates): Likewise.  Factor common code used
2507         when an instantiation has been done.
2508         (outermost_tinst_level): Replace tree_last with loop.
2509         (current_instantiation): Return a "struct tinst_level *".
2511 2007-08-24  Ollie Wild  <aaw@google.com>
2513         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2514         * name-lookup.h (cp_binding_level): Remove vtables member.
2516 2007-08-24  Richard Guenther  <rguenther@suse.de>
2518         * tree.c (cp_cannot_inline_tree_fn): Remove.
2519         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2520         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2521         Remove define.
2523 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
2525         PR c++/32567
2526         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2527         error_mark_node right away if build_expr_type_conversion
2528         returned it.
2530         PR c++/32898
2531         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2532         is error_mark_node rather than NULL_TREE.
2533         * pt.c (check_explicit_specialization): Likewise.
2535         PR c++/31941
2536         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2537         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2539 2007-08-22  Jason Merrill  <jason@redhat.com>
2541         PR c++/29365
2542         * pt.c (outermost_tinst_level): New function.
2543         * lex.c (in_main_input_context): New function.
2544         * cp-tree.h: Declare it.
2545         * decl2.c (constrain_class_visibility): Use it to avoid warning
2546         about uses of the anonymous namespace in the main input file.
2548 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2550         * init.c (build_new_1): Use get_target_expr instead of save_expr.
2552 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
2554         PR c++/7302
2555         * class.c (finish_struct_1): Warn when a class has virtual
2556         functions and accessible non-virtual destructor.
2558 2007-08-20  Richard Guenther  <rguenther@suse.de>
2560         PR c++/22369
2561         PR c++/22451
2562         * call.c (build_new_method_call): Convert initializer to
2563         the basetype.
2564         * init.c (build_aggr_init): Do not fiddle with types.
2565         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2566         * except.c (build_throw): Do not drop qualifiers for the
2567         pointer type.
2568         * typeck.c (get_member_function_from_ptrfunc): Do not
2569         fiddle with types, instead convert.
2570         (build_ptrmemfunc1): Convert to the target type for
2571         initialization.
2572         (gfc_trans_allocate): Convert result to target type.
2573         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2574         pointer-to-member structures shall have alias set zero as well.
2576 2007-08-20  Richard Guenther  <rguenther@suse.de>
2578         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2579         Remove.
2580         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2581         (nonstatic_local_decl_p): Likewise.
2582         * tree.c (cp_auto_var_in_fn_p): Remove.
2583         * decl.c (nonstatic_local_decl_p): Remove.
2585 2007-08-20  Richard Guenther  <rguenther@suse.de>
2587         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2588         Remove define.
2589         * tree.h (cp_walk_tree): New define to walk_tree_1 with
2590         cp_walk_subtrees lh parameter.
2591         (cp_walk_tree_without_duplicates): New define to
2592         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2593         * tree.c (count_trees): Call
2594         cp_walk_tree_without_duplicates.
2595         (verify_stmt_tree): Call cp_walk_tree.
2596         (break_out_target_exprs): Likewise.
2597         (WALK_SUBTREE): Likewise.
2598         * cp-gimplify.c (cp_genericize): Likewise.
2599         * cp-pt.c (find_parameter_packs_r): Likewise.
2600         (uses_parameter_packs): Likewise.
2601         (make_pack_expansion): Likewise.
2602         (check_for_bare_parameter_packs): Likewise.
2603         (for_each_template_parm): Likewise.
2604         * decl.c (check_default_argument): Call
2605         cp_walk_tree_without_duplicates.
2606         * except.c (build_throw): Likewise.
2607         * decl2.c (type_visibility): Likewise.
2608         * semantics.c (expand_or_defer_fn): Likewise.
2609         (finalize_nrv): Call cp_walk_tree.
2611 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
2613         PR c++/33025
2614         * init.c (build_new_1): Rename placement_var variable to placement_expr.
2615         Initialize it with save_expr rather than get_temp_regvar.
2617 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2619         PR c++/28989
2620         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2621         lvalues.
2623 2007-08-17  Ollie Wild  <aaw@google.com>
2625         PR c++/31749
2626         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2627         declarations into appropriate slots for comparison.  Fix type
2628         comparison.
2630 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2632         PR c++/32112
2633         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2634         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2636 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2638         PR c++/32870
2639         * parser.c (cp_parser_class_head): Improve error message.
2641 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
2643         * pt.c (instantiate_decl): Set input_location
2644         for the function end.
2646 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2648         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2649         Constify.
2650         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2651         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2652         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2653         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2654         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2655         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2656         * typeck.c (cp_type_quals): Likewise.
2657         * typeck2.c (cxx_incomplete_type_diagnostic,
2658         cxx_incomplete_type_error): Likewise.
2660 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
2662         PR c++/31132
2663         * pt.c (tsubst_friend_function): When check_classfn
2664         returns error_mark_node likewise return it.
2666 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2668         PR c++/32992
2669         * typeck.c (check_return_expr): Don't NRV optimize vars in
2670         anonymous unions.
2671         * decl.c (finish_function): Comment fix.
2673 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
2675         PR c++/33035
2676         * pt.c (push_template_decl_real): Depending on TYPE_P
2677         use either TYPE_CONTEXT or DECL_CONTEXT.
2679 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
2681         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2682         constructors and destructors return this.
2684 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
2686         PR c++/27211
2687         * decl2.c (check_classfn): Return error_mark_node in case of error;
2688         in that case, do not call add_method.
2689         * decl.c (start_decl): Deal with check_classfn returning
2690         error_mark_node.
2691         (grokfndecl): Likewise.
2692         * pt.c (tsubst_friend_function): Likewise.
2694 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
2696         PR c++/30428
2697         * typeck.c (build_binary_op): Disallow vector float types with
2698         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2700 2007-08-11  Ian Lance Taylor  <iant@google.com>
2702         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2703         alias_set_type.
2704         * cp-tree.h (cxx_get_alias_set): Update declaration.
2706 2007-08-10  Ollie Wild  <aaw@google.com>
2708         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2709         type lookups.
2710         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
2711         function parameter.
2712         (unqualified_namespace_lookup): Fix ambiguous_decl call.
2713         (lookup_using_namespace): Fix ambiguous_decl call.
2714         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2716 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2718         * call.c (name_as_c_string): Use CONST_CAST.
2719         * decl.c (build_decl): Likewise.
2720         * parser.c (cp_parser_string_literal): Likewise.
2722 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2724         PR c++/17763
2725         * error.c (dump_expr): Consistently use the *_cxx_*
2726         variants of the pretty-print functions.
2728 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2730         PR c++/22256
2731         * decl.c (check_special_function_return_type): Just error
2732         on return type specified for conversion operator.
2734 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
2736         * typeck2.c (readonly_error): Handle general expressions.
2737         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2739 2007-08-06  Dan Hipschman  <dsh@google.com>
2741         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2742         access function name.
2744 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
2746         PR pch/13676
2747         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2748         * g++spec.c (lang_specific_driver): Check them.
2750 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
2752         PR c++/19532
2753         * pt.c (inline_needs_template_parms): Fix comment; change return type
2754         to bool.
2756 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
2758         Revert:
2759         2007-03-26  Dirk Mueller  <dmueller@suse.de>
2761         * parser.c (cp_parser_member_declaration): Pedwarn
2762         about stray semicolons after member declarations.
2764 2007-08-02  Lee Millward  <lee.millward@gmail.com>
2766         PR c++/30849
2767         PR c++/30850
2768         PR c++/30851
2769         * parser.c (cp_parser_asm_definition): Detect and discard asm
2770         statements with invalid inputs or outputs.
2771         (cp_parser_asm_operand_list): Return error mark node if any
2772         of the operands are invalid. Adjust documentation.
2773         
2774 2007-08-02  Nick Clifton  <nickc@redhat.com>
2776         * typeck.c: Change copyright header to refer to version 3 of the
2777         GNU General Public License and to point readers at the COPYING3
2778         file and the FSF's license web page.
2779         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2780         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2781         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2782         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2783         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2784         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2785         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2786         name-lookup.h, parser.c: Likewise.
2788 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2790         PR middle-end/32668
2791         * call.c (magic_varargs_p): Honor the "type generic" attribute.
2793 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
2795         PR c++/32108
2796         * semantics.c (finish_label_stmt): Reject the __label__
2797         extension outside function scopes.
2799 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2801         * parser.c (eof_token): Un-constify.
2802         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2803         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2804         casts.
2806 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
2808         * pt.c, tree.c, typeck2.c: Fix comment typos.
2810 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
2811             Mark Mitchell  <mark@codesourcery.com>
2813         PR c++/30917
2814         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2815         hidden due to friend declarations in local classes.
2817 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
2819         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2820         * cp-tree.def (DECLTYPE_TYPE): New.
2821         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2822         (dump_type_prefix): Ditto.
2823         (dump_type_suffix): Ditto.
2824         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2825         * mangle.c (write_type): Handle DECLTYPE_TYPE.
2826         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2827         types.
2828         (DECLTYPE_TYPE_EXPR): New.
2829         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2830         (finish_declared_type): Declare.
2831         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2832         DECLTYPE_TYPE nodes.
2833         (pp_cxx_type_id): Ditto.
2834         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2835         (tsubst): Substitute into a DECLTYPE_TYPE node.
2836         (tsubst_copy): Ditto.
2837         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2838         nodes.
2839         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2840         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2841         structural equality (because we can't hash the expressions).
2842         (finish_declared_type): New.
2843         * lex.c (reswords): Add "decltype" keyword.
2844         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2845         (cp_parser_postfix_expression): Add member_access_only_p to
2846         restrict postfix expression to member access expressions.
2847         (cp_parser_unary_expression): Update call to
2848         cp_parser_postfix_expression to reflect new parameter.
2849         (cp_parser_declared_type): New.
2850         (cp_parser_simple_type_specifier): Parse decltype types.
2852 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
2854         PR c++/32346
2855         * call.c (convert_for_arg_passing): Only widen bitfields to their
2856         declared types if necessary.
2858 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2860         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2861         Constify.
2863 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2865         * decl.c (typename_hash, typename_compare): Constify.
2866         * mangle.c (hash_type, compare_type): Likewise.
2867         * pt.c (eq_local_specializations, hash_local_specialization):
2868         Likewise.
2869         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2870         list_hash): Likewise.
2871         * typeck2.c (pat_compare): Likewise.
2873 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2875         * method.c (implicitly_declare_fn): Increase alignment if member
2876         function pointer format requires it.
2878 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2880         PR c++/29001
2881         * typeck.c (check_return_expr): Do not pass a null argument
2882         to null_ptr_cst_p.
2884 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2886         PR c++/32561
2887         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2888         only on VAR_DECL.
2890 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2892         PR c++/32839
2893         * typeck.c (convert_arguments): Only use default args if we have
2894         a function decl.
2896         PR c++/30818
2897         * typeck.c (structural_comptypes): No need to check
2898         resolve_typename_type return value here.
2899         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2900         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
2901         original type rather than error_mark_node in case of failure.
2902         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2903         resolve_typename_type result check.
2904         (cp_parser_direct_declarator, cp_parser_head,
2905         cp_parser_constructor_declarator_p): Likewise.
2907 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
2909         * pt.c (template_parms_variadic_p): Remove.
2910         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2912 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
2914         PR c++/30854
2915         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2916         argument to dump_aggr_init_expr_args instead of false.
2918 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
2920         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2921         canonical types; otherwise, fall back to structural type
2922         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2923         internal compiler error if the canonical types are wrong.
2924         
2925 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
2927         PR c++/32560
2928         * parser.c (cp_parser_make_indirect_declarator): When the
2929         the code argument is ERROR_MARK return cp_error_declarator.
2931 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
2933         PR 32617
2934         * decl.c (cxx_init_decl_processing): Don't set
2935         force_align_functions_log.
2936         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2937         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2938         FUNCTION_DECL, return its alignment.
2940 2007-07-09  Richard Guenther  <rguenther@suse.de>
2942         * decl.c (start_preparsed_function): Do not promote return type.
2944 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
2946         PR c++/30535
2947         * pt.c (unify): Never pass error_mark_node to template_decl_level.
2949 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
2951         PR c++/32232
2952         * pt.c (resolve_overloaded_unification): Robustify.  Return a
2953         bool, not an int.
2954         (type_unification_real): Adjust accordingly.
2956 2007-07-06  Richard Guenther  <rguenther@suse.de>
2958         * init.c (build_new_1): Use the correct pointer type.
2959         * typeck2.c (build_m_component_ref): Likewise.
2961 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
2963         PR c++/32245
2964         * init.c (build_zero_init): Always build an initializer for
2965         non-static storage.
2966         * typeck2.c (build_functional_cast): Use build_zero_init.
2968         PR c++/32251
2969         * init.c (build_new_1): Always pass the allocation function to
2970         build_op_delete_call.
2971         * call.c (build_op_delete_call): Handle operator delete with a
2972         variable-argument list.  Do not issue an error when no matching
2973         deallocation function is available for a new operator.
2975         PR c++/31992
2976         * cp-tree.h (any_value_dependent_elements_p): Declare it.
2977         * decl.c (value_dependent_init_p): New function.
2978         (cp_finish_decl): Use it.
2979         * pt.c (value_dependent_expression_p): Use
2980         any_value_dependent_elements_p.
2981         * parser.c (cp_parser_primary_expression): Add comment about
2982         treating dependent qualified names as integral
2983         constant-expressions.
2985 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
2987         * decl.c (build_ptrmemfunc_type): Always use structural equality
2988         tests when comparing pointer-to-member-function types, because the
2989         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2990         types.
2991         
2992 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
2994         * init.c (build_new): Tweak comment.
2996 2007-06-29  Dave Brolley  <brolley@redhat.com>
2998         PR c++/31743
2999         * parser.c (cp_parser_new_type_id): Don't reduce a named array
3000         type to its base type and number of elements here.
3001         * init.c (build_new): Call complete_type_or_else to ensure that the
3002         type is complete and to issue a diagnostic if it is not.
3003         (build_new_1): Don't call complete_type_or_else here.
3005 2007-07-03  Richard Guenther  <rguenther@suse.de>
3007         PR c++/32609
3008         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3009         after recursing.
3011 2007-07-02  Simon Baldwin  <simonb@google.com>
3013         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3014         for inner-style nested forward declarations that don't declare
3015         anything useful.
3017 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
3019         PR c++/31748
3020         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3021         DECL_P in not a variable and appears more than once error messages.
3023 2007-07-01  Ollie Wild  <aaw@google.com>
3025         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3026         (select_decl): Remove function.
3027         (unqualified_namespace_lookup): Populate binding by calling
3028         ambiguous_decl.  Remove select_decl call.
3029         (lookup_qualified_name): Remove select_decl call.
3030         * decl.c (lookup_and_check_tag): Check for ambiguous references.
3031         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3032         generation when name lookup is ambiguous.
3034 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
3036         PR c++/31724
3037         * init.c (build_new_1): Use structural equality on the copy of the
3038         array type.
3040 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3042         * decl2.c (determine_visibility): Implement
3043         flag_visibility_ms_compat effect on type info.
3044         * decl.c (cxx_init_decl_processing): Implement
3045         global effect of flag_visibility_ms_compat.
3047 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3049         * decl2.c (start_objects): Mark constructor-running function
3050         as artificial.
3052 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
3054         PR c++/32111
3055         * decl.c (grokdeclarator): Reset friendp for member functions declared
3056         friend of their own class.
3058 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
3060         * decl2.c (determine_visibility): Don't look for dllexport here.
3061         (determine_visibility_from_class): Tidy.
3063 2007-06-18  Simon Baldwin <simonb@google.com>
3065         PR c++/31923
3066         * parser.c (cp_parser_single_declaration): Added check for storage
3067         class other than sc_none in parsed declaration, and a flag to indicate
3068         if the call is part of an explicit template specialization parse.
3069         * (cp_parser_explicit_specialization): Specialization check flag added
3070         to call to cp_parser_single_declaration(), set true.
3071         * (cp_parser_template_declaration_after_export): Specialization check
3072         flag added to call to cp_parser_single_declaration(), set false.
3073         * pt.c (check_explicit_specialization): Added code to copy visiblity
3074         and linkage from the templated function to the explicit specialization.
3076 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3078         * typeck.c (build_binary_op): For templates build the
3079         expression in pieces to avoid the assert in build2_stat.
3080         (get_member_function_from_ptrfunc):
3081         Change over to using POINTER_PLUS_EXPR and convert
3082         the second operand to sizetype.
3083         * typeck2.c (build_m_component_ref):  Likewise.
3084         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3085         instead of PLUS_EXPR for pointers.
3086         (build_new_1): Likewise.
3087         (build_vec_delete_1): Likewise.
3088         (build_vec_delete): Likewise.
3089         * class.c (build_base_path): Likewise.
3090         (build_base_path): Likewise.
3091         (convert_to_base_statically): Likewise.
3092         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3093         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3094         instead of PLUS_EXPR.
3095         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3096         instead of PLUS_EXPR for pointers.
3097         * call.c (build_special_member_call): Likewise.
3098         * rtti.c (build_headof): Likewise.
3099         Use sizetype instead of ptrdiff_type_node.
3100         (tinfo_base_init): Create a POINTER_PLUS_EXPR
3101         instead of PLUS_EXPR for pointers.
3102         * except.c (expand_start_catch_block):  Do a
3103         NEGATIVE and then a POINTER_PLUS_EXPR instead
3104         of a MINUS_EXPR.
3105         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3106         PLUS_EXPR on pointer types over to use
3107         POINTER_PLUS_EXPR and remove the conversion
3108         to the pointer types.
3109         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3110         adding to a pointer type. Use size_int instead of
3111         ssize_int. Convert the index to sizetype before
3112         adding it to the pointer.
3114 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
3116         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3117         (DECL_ANON_UNION_VAR_P): New macro.
3118         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
3119         than DECL_VAR_MARKED_P, to keep track of which variables we have
3120         seen.
3121         * decl.c (redeclaration_error_message): Complain about redeclaring
3122         anonymous union members at namespace scope.
3123         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3125 2007-06-14  Geoff Keating  <geoffk@apple.com>
3127         * decl2.c (determine_visibility): Ensure that functions with
3128         hidden types as parameters are hidden.
3130         PR 31093
3131         * decl2.c (determine_visibility): Remove duplicate code for
3132         handling type info.
3134 2007-06-12  Ian Lance Taylor  <iant@google.com>
3136         PR libstdc++/29286
3137         * init.c (avoid_placement_new_aliasing): New static function.
3138         (build_new_1): Call it.
3140 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
3142         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3143         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3145 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
3147         PR c++/32177
3148         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3149         on init, the non-decl cond operand and increment value.
3151 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
3153         PR c++/30759
3154         * decl.c (check_initializer): Report an error when a brace enclosed
3155         initializer is used for a non-aggregate type in C++98.
3156         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3157         cxx_dialect.
3158         (grokdeclarator): Likewise.
3159         (move_fn_p): Likewise.
3160         * typeck.c (check_return_expr): Likewise.
3161         * call.c (reference_binding): Likewise.
3162         * error.c (cp_cpp_error): Likewise.
3163         * pt.c (check_default_tmpl_args): Likewise.
3164         (tsubst): Likewise.
3165         * lex.c (init_reswords): Likewise.
3166         * parser.c (p_parser_primary_expression): Likewise.
3167         (TOKEN_PRECEDENCE): Likewise.
3168         (cp_parser_init_declarator): Likewise.
3169         (cp_parser_ptr_operator): Likewise.
3170         (cp_parser_parameter_declaration): Likewise.
3171         (cp_parser_enclosed_template_argument_list): Likewise.
3172         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3173         (cp_parser_next_token_ends_template_argument_p): Likewise.
3175 2007-06-04  Simon Baldwin  <simonb@google.com>
3177         * decl.c (grokdeclarator): Readability change.  Moved case labels
3178         into direct switch statement scope.
3180 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
3182         * call.c (convert_like_real): Remove pointless code.
3184 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
3186         * decl.c (get_atexit_fn_ptr_type): New function.
3187         (get_atexit_node): Use it.
3188         (start_cleanup_fn): Likewise.
3189         (register_dtor_fn): Use the object's destructor, instead of a
3190         separate cleanup function, where possible.
3191         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3192         (atexit_fn_ptr_type_node): New macro.
3193         * decl2.c (build_cleanup): Use build_address.
3195 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
3197         * typeck.c (build_binary_op): Include types in error.
3199 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
3201         PR c++/31806
3202         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3203         needs runtime initialization.
3205 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
3207         PR c++/32158
3208         * semantics.c (finish_trait_expr): Complete the types.
3210 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
3211             Douglas Gregor <doug.gregor@gmail.com>
3212             Pedro Lamarao <pedro.lamarao@mndfck.org>
3213             Howard Hinnant <howard.hinnant@gmail.com>
3215         PR c++/7412
3216         PR c++/29939
3217         * typeck.c (comptypes): Don't consider rvalue and lvalue
3218         reference types to be equivalent.
3219         (check_return_expr): Move from certain lvalues when returning
3220         them.
3221         * decl.c (grokdeclarator): Implement reference collapsing.
3222         (copy_fn_p): Don't consider constructors taking rvalue references
3223         to be copy constructors.
3224         (move_fn_p): New.
3225         * call.c (conversion): New "rvaluedness_matches_p" member.
3226         (convert_class_to_reference): Require reference type as first
3227         parameter instead of base type.
3228         (reference_binding): Add logic to handle rvalue references.
3229         (implicit_conversion): Update inaccurate comment.
3230         (convert_like_real): Disable creation of temporaries that are
3231         impossible to initialize for types with move constructors.
3232         (build_over_call): Elide move constructors when possible.
3233         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3234         (maybe_handle_ref_bind): Return conversion instead of type node.
3235         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3236         determine preferred conversion sequences.
3237         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3238         (LOOKUP_PREFER_RVALUE): New.
3239         (DECL_MOVE_CONSTRUCTOR_P): New.
3240         (struct cp_declarator): Add "reference" member for reference
3241         types, with new "rvalue_ref" flag.
3242         (cp_build_reference_type): Declare.
3243         (move_fn_p): Declare.
3244         * error.c (dump_type_prefix): Format rvalue reference types
3245         correctly in error messages.
3246         * except.c (build_throw): Move from certain lvalues when
3247         throwing.
3248         * mangle.c (write_type): Mangle rvalue references differently
3249         than regular references.
3250         * parser.c (make_reference_declarator): Add boolean parameter for
3251         rvalue references.
3252         (cp_parser_make_indirect_declarator): New.
3253         (cp_parser_new_declarator_opt): Call
3254         cp_parser_make_indirect_declarator. 
3255         (cp_parser_conversion_declarator_opt): Ditto.
3256         (cp_parser_declarator): Ditto.
3257         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3258         declarators.
3259         * pt.c (tsubst): Implement reference collapsing.
3260         (maybe_adjust_types_for_deduction): Implement special template
3261         parameter deduction rule for rvalue references.
3262         (type_unification_real): Update calls to
3263         maybe_adjust_types_for_deduction.
3264         (try_one_overload): Ditto.
3265         (unify_pack_expansion): Ditto.
3266         * tree.c (lvalue_p_1): Handle rvalue reference types.
3267         (cp_build_reference_type): New.
3269 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
3271         PR c++/31809
3272         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3273         variables that need runtime initialization.
3275 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
3277         PR c++/31339
3278         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3279         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3280         case POSTDECREMENT_EXPR>): Return the error_mark_node
3281         if either the real or imaginary parts would an
3282         error_mark_node.
3283         
3284 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
3285             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3287         PR c++/31745
3288         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3289         token is a closing brace, false if there are no tokens left.
3290         (cp_parser_namespace_alias_definition): Only consume the next token if
3291         it is a closing brace.
3293         * parser.c (cp_parser_class_specifier): Likewise.
3295 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
3297         * semantics.c (finish_member_declaration): Fix a typo in the
3298         last checkin.
3300 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
3302         PR c++/31431
3303         PR c++/31432
3304         PR c++/31434
3305         PR c++/31435
3306         PR c++/31437
3307         PR c++/31438
3308         PR c++/31442
3309         PR c++/31443
3310         PR c++/31444
3311         PR c++/31445
3312         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3313         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3314         * pt.c (check_for_bare_parameter_packs): Return bool indicated
3315         whether everything was okay. Fix indentation.
3316         (push_template_decl_real): Check for bare parameter packs in
3317         function parameters; where errors occur, mark the parameter types
3318         with ERROR_MARK_NODEs to avert ICEs.
3319         (coerce_template_parameter_pack): New.
3320         (coerce_template_parms): Moved parameter pack coercion into
3321         coerce_template_parameter_pack, and permit it anywhere in the
3322         template parameter list (not just at the end). Parameter and
3323         argument indices can vary (somewhat) separately now, so add
3324         PARM_IDX and ARG_IDX.
3325         (fn_type_unification): Don't set an argument pack as incomplete if
3326         no argument pack was deduced.
3327         (type_unification_real): If a type parameter is a parameter pack
3328         and has not otherwise been deduced, it will be deduced to an empty
3329         parameter pack.
3330         (more_specialized_fn): Use the actual lengths of the argument
3331         lists when comparing against expansions.
3332         * semantics.c (finish_member_declaration): If a field's type has
3333         bare parameter packs, error and set its type to ERROR_MARK_NODE.
3335 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
3337         PR target/27067
3338         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3340 2007-05-22  Ollie Wild  <aaw@google.com>
3342         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3343         (unqualified_namespace_lookup): Adds check for hidden types.
3345 2007-05-22  Ollie Wild  <aaw@google.com>
3347         * decl.c (duplicate_decls): Verify namespace names are unique.
3349 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
3351         * decl.c (cxx_maybe_build_cleanup): Handle
3352         __attribute__((cleanup)).
3354 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3356         * cvt.c (cp_convert_and_check): Don't check warnings if the
3357         conversion failed.
3359 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
3361         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
3363 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
3365         PR c++/29928
3366         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
3367         type only if is a class type (5.2.8/4).
3369 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
3371         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3372         * decl.c (grokdeclarator): Use unsigned_type_for instead of
3373         c_common_unsigned_type.
3375 2007-05-11  Silvius Rus  <rus@google.com>
3377         * typeck.c (build_indirect_ref): Add call to
3378         strict_aliasing_warning.
3379         (build_reinterpret_cast_1): Condition call to
3380         strict_aliasing_warning. 
3382 2007-05-11  Jan Hubicka  <jh@suse.cz>
3384         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
3385         * decl2.c (start_objects): ctors and dtors are no longer public.
3386         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
3387         
3388 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3390         * typeck.c (build_unary_op): Remove code that used to
3391         handle non lvalue increments/decrements.
3393 2007-05-07  Mike Stump  <mrs@apple.com>
3395         * parser.c (check_empty_body): Add.
3396         (cp_parser_iteration_statement): Add call to check_empty_body.
3398 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
3400         PR 31775
3401         * mangle.c (write_mangled_name): Mangle static variable names.
3402         (write_unqualified_name): Use local-source-name for
3403         namespace-scope static variables.
3405 2007-05-04  Dirk Mueller  <dmueller@suse.de>
3407         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
3408         not in effect.
3410 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
3412         PR c++/31663
3413         * decl2.c (constrain_class_visibility): 
3414         Use strip_pointer_or_array_types instead of strip_array_types.
3416 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3418         PR C++/30221
3419         * decl.c (reshape_init_r): Don't reshape the first element if it
3420         is a pointer to member function.
3422 2007-04-27  Simon Baldwin  <simonb@google.com>
3424         * decl.c (grokparms): Changed message format from %qD to %qE.
3426 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
3428         * error.c (maybe_warn_variadic_templates): Variadic templates are
3429        now in C++0x, so only warn about them in C++98 mode.
3430         
3431 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3433         PR C++/30016
3434         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
3435         integeral types from vectors types.
3437 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
3439         PR c++/31598
3440         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
3441         for type dependent OMP_CLAUSE_DECLs.
3443 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
3445         PR c++/31338
3446         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
3447         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
3448         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3449         * init.c (build_zero_init): Adjust, as
3450         COMPLEX_TYPE is now a SCALAR_TYPE.
3451         * typeck2.c (digest_init): Allow brace-enclosed initializers for
3452         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3454 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
3456         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3457         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3458         (trait_expr_value): Adjust.
3460 2007-04-23  Simon Baldwin  <simonb@google.com>
3462         * decl.c (grokparms): Added new error for duplicate function
3463         parameters names in function prototypes, to match gcc behavior.
3465 2007-04-23  Jan Hubicka  <jh@suse.cz>
3467         * decl2.c (finish_objects): Do not call target constructor/destructor
3468         bits dirrectly.
3470 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3472         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3473         instead of checking GIMPLE_STMT_P in chain_next.
3475 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
3477         PR c++/31513
3478         * call.c (convert_for_arg_passing): Convert bitfields to their
3479         declared types.
3481 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
3483         PR c++/31517
3484         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3486 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
3488         PR c++/29365
3489         * decl2.c (constrain_class_visibility):
3490         Do not warn about the use of anonymous namespace in the main input file.
3492 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
3494         * cp-tree.h (current_template_parms): Fix typo in comment.
3496 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
3498         * cp-tree.h, error.c: Fix comment typos.
3500 2007-04-13  Jason Merrill  <jason@redhat.com>
3502         PR c++/31074
3503         * call.c (reference_binding): Add c_cast_p parm.  If true,
3504         add quals to TO as needed to make it reference-compatible.
3506 2007-04-11  Jan Hubicka  <jh@suse.cz>
3508         * class.c (convert_to_base_statically): Fold produced tree; verify
3509         that we are not processing template_decl.
3511 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
3513         PR c++/31449
3514         * class.c (build_base_path): Ensure that the converted pointer has
3515         the same cv-qualification as the input.
3517 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
3519         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3521 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
3523         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3524         Do not set it.
3525         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3526         * tree.c (cp_add_pending_fn_decls): Remove.
3527         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3529 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
3531         Revert change removing staticp.
3533 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
3535         * cp-objcp-common.c (cxx_staticp): Remove.
3536         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3537         * cp-tree.h (cxx_staticp):      
3539 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
3541         * class.c (check_for_override): Don't remove dllmport attribute
3542         of virtual methods.
3544 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
3546         PR c++/30847
3547         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3548         type issue error and return early.
3550 2007-03-30  Jason Merrill  <jason@redhat.com>
3552         PR c++/31187
3553         * typeck.c (cp_type_readonly): New fn.
3554         * cp-tree.h: Declare it.
3555         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3556         (cp_finish_decl): Not here.
3558 2007-03-31  Richard Guenther  <rguenther@suse.de>
3560         * optimize.c (maybe_clone_body): Replace splay-tree usage by
3561         pointer-map.
3563 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
3565         PR c++/31138
3566         PR c++/31140
3567         PR c++/31141
3568         * parser.c (declarator_can_be_parameter_pack): New.
3569         (cp_parser_template_parameter): Only parse the `...' if the
3570         declarator can be a parameter pack.
3571         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3572         is NULL.
3573         * pt.c (find_parameter_packs_r): Look into the bounds on integer
3574         types (they could be used as array bounds). 
3575         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3576         (tsubst_pack_expansion): Handle failure to expand parameter
3577         packs.
3578         
3579 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
3581         PR c++/26099
3582         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3583         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3584         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3585         (CLASS_TYPE_NON_UNION_P): Add.
3586         (struct lang_type_class): Add has_complex_dflt.
3587         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3588         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3589         * cp-tree.def: Add TRAIT_EXPR.
3590         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3591         * lex.c (struct resword): Add __has_nothrow_assign,
3592         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3593         __has_trivial_constructor, __has_trivial_copy,
3594         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3595         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3596         __is_pod, __is_polymorphic, __is_union.
3597         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3598         (cp_parser_trait_expr): New.
3599         * semantics.c (finish_trait_expr, trait_expr_value
3600         classtype_has_nothrow_copy_or_assign_p): New.
3601         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3602         as static.
3603         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3604         * class.c (check_bases, check_field_decl, check_bases_and_members):
3605         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3606         * pt.c (uses_template_parms, tsubst_copy_and_build,
3607         value_dependent_expression_p, type_dependent_expression_p): Deal with
3608         TRAIT_EXPR.
3609         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3611 2007-03-29  Richard Guenther  <rguenther@suse.de>
3613         * tree.c (cp_walk_subtrees): Do not set input_location.
3615 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
3617         PR c++/29077
3618         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3619         destructor.
3621 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3623         * parser.c (struct cp_parser): Update comment for
3624         greater_than_is_operator_p.
3625         (cp_parser_primary_expression): In C++0x mode, a cast operator can
3626         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3627         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3628         !GREATER_THAN_IS_OPERATOR_P.
3629         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3630         `>>' operators that will become two `>' tokens in C++0x.
3631         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3632         mode, allowing it to terminate default arguments.
3633         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3634         `>>' like two consecutive `>' tokens.
3635         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3636         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3637         ends a template argument.
3639 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
3641         * decl.c (redeclaration_error_message): Complain when redeclaring
3642         a friend function with default template arguments (C++0x mode only).
3643         * cp-tree.h (check_default_tmpl_args): Declare.
3644         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3645         template arguments in function templates. Add support for checking
3646         the default template arguments of friend templates.
3647         (push_template_decl_real): Fix call to check_default_tmpl_args.
3648         (type_unification_real): If a template parameter has not been
3649         deduced but provides a default template argument, substitute into
3650         that default template argument.
3651         * parser.c (cp_parser_init_declarator): When declaring (but not
3652         defining!) a function template in C++0x mode, check for default
3653         template arguments.
3655 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3657         PR c++/29993
3658         * decl.c (grokdeclarator): Deal with cv-qualified function type
3659         typedefs in the same way for member and non-member functions.
3661 2007-03-26  Dirk Mueller  <dmueller@suse.de>
3663         * parser.c (cp_parser_member_declaration): Pedwarn
3664         about stray semicolons after member declarations.
3666 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
3668         PR c++/30500
3669         * pt.c (instantiate_decl): Set in_system_header.
3671 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
3673         * cp-tree.h (current_tempalte_parms): Improve documentation.
3674         * pt.c (current_template_args): Likewise.
3676         PR c++/30863
3677         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3678         not consume tokens when failing.
3680 2007-03-22  Jim Wilson  <wilson@specifix.com>
3681             Mark Mitchell  <mark@codesourcery.com>
3683         PR c++/31273
3684         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
3685         consistent with FROM.
3687 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3689         * error.c (dump_expr): Handle dependent names that designate types.
3690         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3692 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
3694         * cp-tree.def, parser.c, pt.c: Fix comment typos.
3696 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3698         * cvt.c (cp_convert_and_check) : Define.
3699         * cp-tree.h (cp_convert_and_check): Declare.
3700         * call.c (convert_conversion_warnings): Rename to
3701         conversion_null_warnings.  The warning for floating-point to
3702         integer is handled by convert_and_check in convert_like_real.
3703         (convert_like_real): convert_conversion_warnings was renamed as
3704         conversion_null_warnings.
3705         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3706         overflow and changes of value during conversion.
3708 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3710         PR c++/30891
3711         * parser.c (cp_parser_statement): If 'namespace' is found, this
3712         only can be a namespace alias definition, so parse it now.
3713         (cp_parser_namespace_alias_definition): if we find an open brace
3714         instead of '=', then this is actually a misplaced namespace
3715         definition.
3716         
3717 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3719         PR c++/24924
3720         * decl.c (cxx_init_decl_processing): Move command-line options
3721         processing to c-opts.c.
3722         
3723 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
3725         * ptree.c (cxx_print_type): Use formatting markup for integers
3726         when printing template parameter index/level/orig level.
3727         (cxx_print_xnode): Ditto.
3728         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3729         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3730         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3731         HOST_WIDE_INTs.
3732         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3733         rather than a HOST_WIDE_INT.
3734         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3735         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3736         better bit-packing.
3737         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3738         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3739         IN_BASE_INITIALIZER bool bitfields.
3740         (struct cp_declarator): Make KIND a 4-bit field. Make
3741         PARAMETER_PACK_P a bool bitfield just after KIND.
3742         * pt.c (uses_parameter_packs): Destroy the pointer set.
3743         (make_pack_expansion): Ditto.
3744         (check_for_bare_parameter_packs): Ditto.
3745         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3746         
3747 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3749         PR c++/31165
3750         * call.c  (convert_default_arg): Instead of copying the node,
3751         unshare it.
3753 2007-03-15  Dirk Mueller  <dmueller@suse.de>
3755         PR c++/30860
3756         * call.c (convert_conversion_warnings): New..
3757         (convert_like_real): .. factored out from here.
3758         (convert_conversion_warnings): Add warning about
3759         false being converted to NULL in argument passing.
3761 2007-03-14  Dirk Mueller  <dmueller@suse.de>
3763         * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3764         (finish_do_body): Warn about empty body in do/while statement.
3766 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3768         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3769         
3770 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3772         PR c/21438
3773         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3774         warning.
3775         
3776 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
3778         * repo.c (init_repo): Initialize random_seed saved options.
3779         (finish_repo): Adjust.
3781 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
3783         PR bootstrap/30899
3784         * Make-lang.in (doc/g++.1): Use $< to specify the location from
3785         which to copy.
3787 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
3789         * decl.c (compute_array_index_type): New warning flag warn_vla.
3791 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
3793         PR c++/30108
3794         * call.c (convert_default_arg): Copy non-constant arguments.
3796 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
3798         PR c++/31038
3799         * parser.c (cp_parser_postfix_expression): Disallow compound
3800         literals in constant expressions.
3802         PR c++/30328
3803         * semantics.c (finish_typeof): Use unlowered_expr_type.
3804         
3805 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
3807         PR c++/30274
3808         * cp-tree.h (unlowered_expr_type): New function.
3809         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3810         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3811         (unlowered_expr_type): New function.
3812         (build_unary_op): Disallow predecrements of bool bitfields.
3813         * call.c (build_conditional_expr): Use unlowered_expr_type.
3814         * pt.c (type_unification_real): Likewise.
3816 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
3818         PR c++/20599
3819         * typeck.c (check_return_expr): Check for bare parameter packs.
3820         (comptypes): Compare template parameter packs and
3821         type pack expansions.
3822         * decl.c (grokdeclarator): Deal with the declaration of function
3823         parameter packs.
3824         (grokparms): Verify that the (optional) function parameter pack is
3825         at the end of the parameter list.
3826         (xref_basetypes): Handle pack expansions in the base class.
3827         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3828         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3829         (NONTYPE_ARGUMENT_PACK): New.
3830         (TYPE_PACK_EXPANSION): New.
3831         (EXPR_PACK_EXPANSION): New.
3832         (ARGUMENT_PACK_SELECT): New.
3833         * cp-objcp-common.c (cp_tree_size): Compute size of
3834         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3835         ARGUMENT_PACK_SELECT.
3836         * error.c (dump_template_argument): Print template argument packs.
3837         (dump_template_argument_list): Ditto.
3838         (dump_template_parameter): Dump `...' for template type parameter
3839         packs.
3840         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3841         (dump_parameters): Print function parameter packs.
3842         (dump_template_parms): Print template argument packs.
3843         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3844         (maybe_warn_variadic_templates): New.
3845         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3846         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3847         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3848         CAST_EXPR. 
3849         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3850         (write_template_arg): Write argument packs as separate arguments.
3851         * cp-tree.h (struct template_parm_index_s): Add flag that
3852         indicates that the template parameter is actually a parameter
3853         pack.
3854         (struct tree_argument_pack_select): New.
3855         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3856         (union lang_tree_node): Add argument_pack_select.
3857         (FUNCTION_PARAMETER_PACK_P): New.
3858         (PACK_EXPANSION_P): New.
3859         (PACK_EXPANSION_PATTERN): New.
3860         (SET_PACK_EXPANSION_PATTERN): New.
3861         (PACK_EXPANSION_PARAMETER_PACKS): New.
3862         (ARGUMENT_PACK_P): New.
3863         (ARGUMENT_PACK_ARGS): New.
3864         (SET_ARGUMENT_PACK_ARGS): New.
3865         (ARGUMENT_PACK_INCOMPLETE_P): New.
3866         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3867         (TEMPLATE_PARM_PARAMETER_PACK): New.
3868         (TEMPLATE_TYPE_PARAMETER_PACK): New.
3869         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3870         (ARGUMENT_PACK_SELECT_INDEX): New.
3871         (ARGUMENT_PACK_SELECT_ARG): New.
3872         (struct cp_declarator): Add parameter_pack_p flag.
3873         (maybe_warn_variadic_templates): Declare.
3874         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3875         indicate a template parameter pack. 
3876         (uses_parameter_packs): Declare.
3877         (template_parameter_pack_p): Declare.
3878         (template_parms_variadic_p): Declare.
3879         (make_pack_expansion): Declare.
3880         (check_for_bare_parameter_packs): Declare.
3881         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3882         sizeof... expressions. 
3883         (pp_cxx_expression): Print pack expansions and non-type argument
3884         packs.
3885         (pp_cxx_exception_specification): Print pack expansions. 
3886         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3887         (pp_cxx_ctor_initializer): Print pack expansions.
3888         (pp_cxx_type_id): Print pack expansions.
3889         (pp_cxx_template_argument_list): Print argument packs.
3890         (pp_cxx_template_parameter): Print ellipsis for template parameter
3891         packs.
3892         * pt.c (comp_template_parms): Compare template parameter packs.
3893         (template_parameter_pack_p): New.
3894         (template_parms_variadic_p): New.
3895         (template_args_variadic_p): New.
3896         (make_ith_pack_parameter_name): New.
3897         (struct find_parameter_pack_data): New.
3898         (find_parameter_packs_r): New.
3899         (uses_parameter_packs): New.
3900         (make_pack_expansion): New.
3901         (check_for_bare_parameter_packs): New.
3902         (expand_template_argument_pack): New.
3903         (reduce_template_parm_level): Propagate parameter pack flag.
3904         (process_template_parm): Add is_parameter_pack parameter to state
3905         when the parameter is actually a parameter pack. Create template
3906         parameter packs when is_parameter_pack is true.
3907         (current_template_args): The argument for a template parameter
3908         pack is an argument pack containing a single pack expansion.
3909         (process_partial_specialization): When checking that non-type
3910         argument expressions do not involve template parameters, loop over
3911         the arguments in argument packs separately.
3912         (push_template_decl_real): Check that the type of the declaration
3913         does not have any bare parameter packs. Check that primary
3914         templates have no more than one parameter pack, and that it comes
3915         at the end of the template parameter list.
3916         (convert_template_argument): Handle coercions for pack expansion
3917         expressions by coercing the pattern then rebuilding the expansion.
3918         (coerce_template_parms): When coercing the arguments for a
3919         variadic template, pack "extra" arguments into an argument pack.
3920         (coerce_template_template_parms): Cannot coerce between parameter
3921         packs and non-pack parameters.
3922         (template_args_equal): Compare PACK_EXPANSION_P expressions.
3923         (comp_template_args): Expand all template arguments packs before
3924         comparing template argument lists.
3925         (mangle_class_name_for_template): Make argument packs as separate
3926         template arguments.
3927         (for_each_template_parm_r): No need to handle BASELINK. 
3928         (instantiate_class_template): Handle pack expansions in the base
3929         class list.
3930         (tsubst_pack_expansion): New.
3931         (tsubst_template_args): Handle substitutions of argument packs and
3932         pack expansion into template argument lists.
3933         (tsubst_decl): Expand function parameter packs into separate
3934         function parameters.
3935         (tsubst_arg_types): Expand a type pack expansion into separate
3936         argument types.
3937         (tsubst_exception_specification): Handle pack expansions in
3938         exception specifiers.
3939         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
3940         replacing a template parameter with its argument. If we encounter
3941         a substitution for an argument pack, just return the parameter
3942         itself. 
3943         (tsubst_copy): sizeof(X...) returns the number of elements in
3944         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
3945         PARM_DECL is a parameter pack.
3946         (tsubst_expr): Expression pack expansions and argument packs
3947         cannot show up here; they will all be handled through function
3948         calls, sizeof, and template argument lists.
3949         (tsubst_copy_and_build): sizeof(X...) returns the number of
3950         elements in parameter pack X.  Handle pack expansions in TREE_LIST
3951         and CONSTRUCTOR nodes.
3952         (fn_type_unification): Handle "incomplete" explicit template
3953         argument lists that specify some of the arguments for a template
3954         parameter pack.
3955         (type_unification_real): Unify arguments against pack expansions.
3956         (template_parm_level_and_index): New, helper function.
3957         (unify_pack_expansion): New.
3958         (unify): Unify argument packs on an argument-by-argument basis,
3959         handling variadic argument packs as well.
3960         (more_specialized_fn): Handle unification of function parameter
3961         packs. All things being equal, prefer non-variadic function
3962         templates to variadic function templates.
3963         (more_specialized_class): Prefer the variadic class template
3964         partial specialization that binds fewer arguments to a parameter
3965         pack.
3966         (regenerate_decl_from_template): Expand function parameter packs
3967         into separate parameters.
3968         (instantiate_decl): Ditto.
3969         (tsubst_initializer_list): Handle pack expansions for base-class
3970         initializers.
3971         (dependent_type_p_r): Determine dependent types in argument packs
3972         and pack expansions.
3973         (value_dependent_expression_p): Determine value-dependence of
3974         non-type argument packs.
3975         (dependent_template_arg_p): Handle argument packs.
3976         * semantics.c (finish_cond): Check for bare parameter packs.
3977         (finish_expr_stmt): Ditto.
3978         (finish_for_expr): Ditto.
3979         (finish_switch_cond): Ditto.
3980         (finish_mem_initializers): Ditto.
3981         * name-lookup.c (arg_assoc_type): Handle pack expansions and
3982         argument packs.
3983         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3984         * parser.c (make_declarator): Declarator is not an expansion.
3985         (make_pointer_declarator): Transfer parameter pack flag to outer
3986         declarator.
3987         (make_reference_declarator): Ditto.
3988         (make_ptrmem_declarator): Ditto.
3989         (make_call_declarator): Ditto.
3990         (make_array_declarator): Ditto.
3991         (cp_parser_postfix_expression): Allow pack expansion expressions
3992         in the argument list for a call expression.
3993         (cp_parser_parenthesized_expression_list): Add new parameter
3994         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3995         into separate arguments."
3996         (cp_parser_new_placement): Allow pack expansion expressions.
3997         (cp_parser_new_initializer): Ditto.
3998         (cp_parser_mem_initializer_list): Allow ellipsis to create a
3999         base-class initializer expansion.
4000         (cp_parser_mem_initializer): Ditto.
4001         (cp_parser_template_parameter_list): Keep track of whether the
4002         template parameter is a template parameter pack.
4003         (cp_parser_template_parameter): Parse the ellipsis to indicate a
4004         template parameter pack.
4005         (cp_parser_type_parameter): Ditto.
4006         (cp_parser_template_argument_list): Parse the ellipsis to indicate
4007         a pack expansion.
4008         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4009         this declarator is a parameter pack.
4010         (cp_parser_parameter_declaration): The ellipsis does not end the
4011         parameter declaration, because it might be a parameter pack. Parse
4012         the ellipsis to indicate a parameter pack.
4013         (cp_parser_initializer): Allow pack expansions.
4014         (cp_parser_initializer_list): Allow ellipsis to create an
4015         initializer expansion.
4016         (cp_parser_base_clause): Allow ellipsis to create a base specifier
4017         expansion.
4018         (cp_parser_type_id_list): Allow ellipsis to create an exception
4019         specifier expansion.
4020         (cp_parser_attribute_list): Don't allow pack expansions.
4021         (cp_parser_functional_cast): Allow pack expansions.
4022         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4023         compute the length of a parameter pack.
4024         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4025         end a template argument.
4026         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4027         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4028         CAST_EXPR. 
4030 2007-03-09  Dirk Mueller  <dmueller@suse.de>
4032         * call.c (build_new_op): Call warn_logical_operator.
4034 2007-03-08  Volker Reichelt  <v.reichelt@netcologne.de>
4036         PR c++/30852
4037         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4039         PR c++/30534
4040         * pt.c (any_template_arguments_need_structural_equality_p):
4041         Robustify.
4043 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
4045         * decl.c (grokdeclarator): Disable warnings for anonymous
4046         bitfields.
4048 2007-03-05  Volker Reichelt  <v.reichelt@netcologne.de>
4050         * typeck2.c (readonly_error): Always emit a hard error.
4051         Remove last argument.
4052         * cp-tree.h (readonly_error): Adjust prototype.
4053         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4054         * typeck.c (build_unary_op): Likewise.
4055         (build_modify_expr): Likewise.
4057 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
4059         PR c++/30895
4060         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4062 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4064         PR c++/15787
4065         * parser.c (struct cp_parser): New IN_IF_STMT.
4066         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4067         returning if parsing the body of an 'if' statement or issuing an
4068         error and continuing.
4069         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4070         body of 'if'.
4071         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4072         
4073 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
4075         PR c++/28253
4076         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4077         for thunks.
4079 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
4081         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4082         Objective-C++.  Don't exit early if -shared-libgcc needs to be
4083         added.
4085 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4087         * typeck.c (common_base_type): Delete unused function.
4088         
4089 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
4091         * Make-lang.in: Add dummy lang.install-pdf target.
4093 2007-03-01  Simon Baldwin <simonb@google.com>
4095         PR c++/23689
4096         * decl.c (check_tag_decl): Added new warning for typedef ignored
4097         when it precedes an otherwise valid non-typedef declaration.
4099 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
4101         * typeck.c (build_function_call): Store converted arguments
4102         in a stack-allocated array instead of building a list.
4103         (convert_arguments): Store arguments in the array passed in as an
4104         argument, and return the actual number of arguments.
4105         * call.c (build_call): Delete, and replace with...
4106         (build_call_n, build_call_a): New.
4107         (build_op_delete_call): Rewrite to avoid constructing argument lists.
4108         (build_over_call): Store converted arguments in a stack-allocated
4109         array instead of building a list.
4110         (build_cxx_call): Pass arguments in an array instead of as a list.
4111         (build_java_interface_fn_ref): Rewrite to avoid constructing
4112         argument lists.
4113         * tree.h: Update declarations to reflect above changes.
4114         * method.c (use_thunk): Use a stack-allocated array to hold
4115         the arguments instead of a list.
4116         * rtti.c (throw_bad_cast): Update call to cxx_call.
4117         (throw_bad_typeid): Likewise.
4118         (build_dynamic_cast_1): Likewise.
4119         * init.c (build_builtin_delete_call): Use build_call_n.
4120         * decl.c (expand_static_init): Likewise.
4121         * except.c (cp_protect_cleanup_actions): Likewise.
4122         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4123         (gimplify_must_not_throw_expr): Likewise.
4124         (cxx_omp_apply_fn): Use build_call_a.
4126 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
4128         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4129         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4131 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
4133         * cp-tree.h (static_ctors): Remove.
4134         * cp-tree.h (static_dtors): Likewise.
4135         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4136         refactoring of tree_map hierarchy.
4137         (decl_shadowed_for_var_insert): Likewise.
4138         * semantics.c (expand_body): Use c_expand_body.
4139         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4140         * decl2.c (static_ctors): Remove.
4141         (static_dtors): Likewise.
4142         (generate_ctor_or_dtor_function): Pass NULL_TREE to
4143         objc_generate_static_init_call.  Do not call static_[cd]tors.
4144         (generate_ctor_and_dtor_functions_for_priority): Do not check for
4145         static_[cd]tors.
4146         (cp_write_global_declarations): Likewise.
4148 2007-02-23  Richard Guenther  <rguenther@suse.de>
4150         * class.c (note_name_declared_in_class): Make declaration
4151         changes meaning a pedwarn.
4153 2007-02-22  Michael Matz  <matz@suse.de>
4155         PR c++/29433
4156         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4157         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4158         dump_function_decl): Guard emitting outer scopes by new flag.
4159         * cp-lang.c (cxx_dwarf_name): New function.
4160         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4161         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4162         Remove functions.
4163         (push_template_decl_real, lookup_template_class): Remove calls
4164         to above functions.
4166 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
4168         * call.c (build_new_method_call): Ensure that explicit calls of
4169         destructors have type "void".
4171 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4173         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4174         and -Walways-true with -Waddress.
4175         * cvt.c (convert_to_void): Replace unconditional warning with
4176         -Waddress.
4178 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
4180         * decl.c, tree.c: Fix comment typos.
4182 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4184         PR C++/30158
4185         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
4186         statement expression if we had an error mark node.
4188 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
4189             Brooks Moses  <brooks.moses@codesourcery.com>
4190             Lee Millward  <lee.millward@codesourcery.com>
4192         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4193         Change class to tcc_vl_exp.
4195         * call.c (build_call): Use build_call_list instead 
4196         of build3. 
4197         (build_over_call): Likewise.
4198         (build_new_method_call): Use build_min_non_dep_call_list 
4199         instead of build_min_non_dep.
4201         * error.c (dump_call_expr_args): New function.
4202         (dump_aggr_init_expr_args): New function.
4203         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
4204         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4206         * cvt.c (convert_to_void): Use build_call_array instead
4207         of build3; use new AGGR_INIT_EXPR accessor macros.
4209         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4210         instead of TREE_CODE_LENGTH.
4212         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4213         AGGR_INIT_EXPR accessor macros.
4215         * cp-gimplify.c (cp_gimplify_init_expr): Use 
4216         AGGR_INIT_EXPR_SLOT to set the slot operand.
4218         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4219         (AGGR_INIT_EXPR_SLOT): New macro.
4220         (AGGR_INIT_EXPR_ARG): New macro.
4221         (aggr_init_expr_nargs): New macro.
4222         (AGGR_INIT_EXPR_ARGP): New macro.
4223         (aggr_init_expr_arg_iterator): New.
4224         (init_aggr_init_expr_arg_iterator): New.
4225         (next_aggr_init_expr_arg): New.
4226         (first_aggr_init_expr_arg): New.
4227         (more_aggr_init_expr_args_p): New.
4228         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4229         (stabilize_aggr_init): New declaration.
4230         (build_min_non_dep_call_list): Likewise.
4232         * tree.c (process_aggr_init_operands): New function.
4233         (build_aggr_init_array) New function.
4234         (build_cplus_new): Update to use new CALL_EXPR and
4235         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4236         build_aggr_init_array.
4237         (build_min_non_dep_call_list) New function.
4238         (build_min_nt): Assert input code parameter is not a variable
4239         length expression class.
4240         (build_min, build_min_non_dep): Likewise.
4241         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4242         to check for equality instead of recursing. Handle tcc_vl_exp
4243         tree code classes.
4244         (stabilize_call): Update to only handle CALL_EXPRs, not 
4245         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4246         (stabilize_aggr_init): New function.
4247         (stabilize_init): Use it.
4249         * cxx-pretty-print.c (pp_cxx_postfix_expression)
4250         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4251         AGGR_INIT_EXPR accessor macros and argument iterators.
4252         
4253         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4254         build_vl_exp. Iterate through the operands, recursively 
4255         processing each one.
4256         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4257         CALL_EXPR accessor macros.
4258         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4259         tree code classes. Use TREE_OPERAND_LENGTH instead of 
4260         TREE_CODE_LENGTH.
4262         * semantics.c (finish_call_expr): Use build_nt_call_list
4263         instead of build_nt.
4264         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
4265         accessor macros. Use build_call_array to construct the 
4266         CALL_EXPR node instead of build3
4267         
4268         * decl2.c (build_offset_ref_call_from_tree): Use 
4269         build_nt_call_list and build_min_non_dep_call_list instead
4270         of build_min_nt and build_min_non_dep.
4272         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4273         Use build_nt_call_list instead of build_min_nt.
4275 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4277         PR c++/28943
4278         * call.c (build_conditional_expr): Improve error message.
4279         
4280 2007-02-13  Dirk Mueller  <dmueller@suse.de>
4282         * friend.c (do_friend): Annotate warning about friend
4283         declarations in templates with OPT_Wnon_template_friend.
4284         Convert informal message from warning() to inform().
4286 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
4287             Mark Mitchell  <mark@codesourcery.com>
4289         PR c++/14622
4290         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4291         instantiations for variables.
4293 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4295         PR middle-end/7651
4296         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4297         Check warn_unused_value just once.
4299 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
4301         PR c++/26988
4302         * pt.c (determine_specialization): Use skip_artificial_parms_for.
4303         (fn_type_unificiation): Likewise.
4304         (get_bindings): Likewise.
4306 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
4308         PR target/29487
4309         * decl.c (finish_function): Use DECL_REPLACEABLE.
4310         * tree.c (cp_cannot_inline_tree_fn): Likewise.
4312 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4314         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4316 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
4318         * decl.c (grokvardecl): Don't error if !have_tls.
4319         (grokdeclarator): Likewise.
4320         * parser.c (cp_parser_omp_threadprivate): Likewise.
4322 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
4324         PR c++/30703
4325         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4326         parameters and result decls in omp clauses.
4327         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4328         by reference.
4330 2007-02-05  Dirk Mueller  <dmueller@suse.de>
4332         PR bootstrap/30510
4333         * parser.c (cp_parser_class_specifier): Always initialize bases.
4335 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4337         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4338         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4339         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4340         expressions.
4341         * semantics.c (finish_omp_atomic): Store a whole expression node
4342         in operand 1, and integer_zero_node in operand 0, for dependent
4343         OMP_ATOMIC.  Rewrite to make flow easier to understand.
4345 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4347         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4349 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
4351         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4352         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4354 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
4356        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
4357        keyword warning to -Wc++0x-compat.
4358         
4359 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4361         * decl.c (grokdeclarator): Update documentation.
4363 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
4365         PR c++/30536
4366         * decl.c (grokdeclarator): If __thread is used together with
4367         a storage class other than extern and static, clear thread_p
4368         after issuing diagnostics and fall through to checking the
4369         storage class.
4371 2007-01-30  Roger Sayle  <roger@eyesopen.com>
4373         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
4374         calculating the size of an array (to avoid recursive errors).
4376 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4378         PR c++/24745
4379         * typeck.c (build_binary_op): Fix logic for warning. Move warning
4380         to -Wpointer-arith.
4381         * call.c (convert_like_real): Don't warn when converting to
4382         boolean type.
4383         
4384 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4386         * decl.c (pop_label): Replace warning with call to
4387         warn_for_unused_label.
4389 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
4391         PR C++/28988
4392         * semantics.c (finish_pseudo_destructor_expr): Check the
4393         destrutor name by calling check_dtor_name.
4395 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
4397         * lex.c (D_CPP0X): Rename.
4398         (D_CXX0X): To this.
4399         (reswords): D_CPP0X -> D_CXX0X.
4400         (init_reswords): Ditto.
4401         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
4402         of C++0x keywords as identifiers.
4404 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
4406         PR c++/27492
4407         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
4408         function decls.
4410 2007-01-23  Ian Lance Taylor  <iant@google.com>
4412         * typeck.c (convert_for_assignment): Only warn about a = b = c
4413         when converting to bool.
4415 2007-01-23  Roger Sayle  <roger@eyesopen.com>
4417         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
4418         TREE_OVERFLOW.
4419         * typeck.c (ignore_overflows): Remove the remaining uses of
4420         TREE_CONSTANT_OVERFLOW.
4422 2007-01-20  Jan Hubicka  <jh@suse.cz>
4424         * decl2.c (start_objects, start_static_storage_duration_function):
4425         Do not make the functions uninlinable.
4427 2007-01-17  Ian Lance Taylor  <iant@google.com>
4429         * class.c (add_method): Call VEC_reserve_exact rather than passing
4430         a negative size to VEC_reserve.
4432 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
4434         PR c++/29573
4435         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
4437 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
4439         PR c++/28999
4440         * decl.c (make_typename_type): If the qualified name is not a
4441         type, issue an error.
4442         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
4443         formatting.
4445 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
4447         * rtti.c: Include target.h.
4448         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4449         don't emit typeinfo for fundamental types as weak.
4450         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4452 2007-01-08  Richard Guenther  <rguenther@suse.de>
4454         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4456 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
4458         * call.c (standard_conversion): Pass flag to
4459         vector_types_convertible_p to disallow emission of note.
4460         * typeck.c (convert_for_assignment): Pass flag to
4461         vector_types_convertible_p to allow emission of note.
4462         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4463         to disallow emission of note.
4465 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4467         PR c++/28986
4468         * typeck.c (build_binary_op): Call overflow_warning if
4469         TREE_OVERFLOW_P is true for the result and not for any of the
4470         operands.
4471         
4472 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
4474        PR c++/19439
4475        * class.c (add_method): Don't wait until template
4476        instantiation time to complain about duplicate methods.
4477         
4478 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4480         PR c/19978
4481         * semantics.c (finish_unary_op_expr): Warn only if result
4482         overflowed and operands did not.
4484 2007-01-05  Ian Lance Taylor  <iant@google.com>
4486         * typeck.c (build_binary_op): Warn about comparing a non-weak
4487         address to NULL.
4489 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
4491         * pt.c (tsubst): Propagate the need for structural equality checks
4492         when reducing the level of template parameters.
4494 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
4496         * pt.c: Fix a comment typo.
4498 2007-01-02  Ian Lance Taylor  <iant@google.com>
4500         * semantics.c (maybe_convert_cond): Optionally warn when using an
4501         assignment as a condition.
4502         * typeck.c (convert_for_assignment): Optionally warn about
4503         assigning the result of an assignment to a bool.
4505 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4507         * pt.c (canonical_template_parms): Correct typo in comment.
4508         
4509 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4511         * typeck.c (structural_comptypes): Renamed from "comptypes".
4512         (comptypes): Use canonical type information to perform fast type
4513         comparison. When VERIFY_CANONICAL_TYPES, verify that the
4514         canonical type comparison returns the same results as we would see
4515         from the current, structural check. Support COMPARE_STRUCTURAL
4516         when we need structural checks.
4517         * decl.c (typename_compare): Fix comment.
4518         (build_typename_type): TYPENAME_TYPE nodes require structural
4519         equality checks, because they resolve different based on the
4520         current class type.
4521         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4522         require structural equality checks (for now).
4523         (build_ptrmemfunc_type): Build the canonical pointer to member
4524         function type.
4525         (compute_array_index_type): Whenever we build a new index type
4526         to represent the size of an array in a template, we need to mark
4527         this index type as requiring structural equality. This goes for
4528         arrays with value-dependent sizes with the current ABI, or all
4529         arrays with ABI-1.
4530         * tree.c (cplus_array_hash): New.
4531         (struct cplus_array_info): New.
4532         (cplus_array_compare): New.
4533         (cplus_array_htab): New.
4534         (build_cplus_array_type_1): Use a hash table to cache the array
4535         types we build. Build the canonical array type for each array
4536         type.
4537         (cp_build_qualified_type_real): When building a cv-qualified array
4538         type, use the hash table of array types and build canonical array
4539         types as necessary.
4540         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4541         use structural equality (for now).
4542         * cp-tree.h (COMPARE_STRUCTURAL): New.
4543         * pt.c (canonical_template_parms): New.
4544         (canonical_type_parameter): New.
4545         (process_template_parm): Find the canonical type parameter.
4546         (lookup_template_class): When we have named the primary template
4547         type, set the canonical type for our template class to the primary
4548         template type. If any of the template arguments need structural
4549         equality checks, the template class needs structural equality
4550         checks.
4551         (tsubst): When reducing the level of a template template
4552         parameter, we require structural equality tests for the resulting
4553         parameter because its template parameters have not had their types
4554         canonicalized. When reducing a template type parameter, find the
4555         canonical reduced type parameter.
4556         (any_template_arguments_need_structural_equality_p): New.