PR c++/26905
[official-gcc.git] / gcc / cp / ChangeLog
blobc9eb4b9d7d453eb72b9e90729850a15f0eac9eb3
1 2006-06-29  Jason Merrill  <jason@redhat.com>
3         PR c++/26905
4         PR c++/26612
5         PR c++/27000
6         PR c++/26984
7         PR c++/19134
8         * decl2.c (determine_visibility): Overhaul.
9         (determine_visibility_from_class): Likewise.
10         (min_vis_r, type_visibility, constrain_visibility): New fns.
11         (constrain_visibility_for_template): Likewise.
12         (constrain_class_visibility): Likewise.
13         * decl.c (cp_finish_decl): Call determine_visibility for function
14         decls, too.
15         * name-lookup.c (pushtag): Call determine_visibility.
16         * decl.c (duplicate_decls): Don't copy visibility from template to
17         specialization.
18         * pt.c (check_explicit_specialization): Likewise.
19         (lookup_template_class, tsubst_decl): Call determine_visibility.
20         * class.c (finish_struct_1): Call constrain_class_visibility.
22         PR c++/26905
23         PR c++/21675
24         PR c++/17470
25         * parser.c (cp_parser_explicit_instantiation): Pass the attributes
26         to grokdeclarator.
27         (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
28         (cp_parser_enum_specifier): Likewise.
29         (cp_parser_elaborated_type_specifier): Apply attributes if this
30         declares only the class.
31         (cp_parser_class_specifier): Apply leading attributes immediately.
32         * semantics.c (begin_class_definition): Add attributes parameter,
33         apply them to the type.
35         PR c++/21581
36         PR c++/25915
37         * tree.c (decl_anon_ns_mem_p): New function.
38         * cp-tree.h: Declare it.
39         * decl2.c (determine_visibility): Make anonymous namespace
40         members static.
41         (min_vis_r, constrain_visibility): Likewise.
42         * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
43         pseudo-types.
44         * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
45         global_namespace.
46         * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
47         on anonymous namespaces.
49 2006-06-28  Jason Merrill  <jason@redhat.com>
51         PR c++/27424
52         * pt.c (convert_template_argument): Pass all template arguments 
53         on to coerce_template_template_parms.
55 2006-06-25  Lee Millward  <lee.millward@gmail.com>
56             Mark Mitchell <mark@codesuorcery.com>
58         PR c++/28054
59         * decl2.c (grokbitfied): Remove check for grokdeclarator
60         returning NULL_TREE, instead check for error_mark_node
61         to indicate failure.
62         * decl.c (grokdeclarator): Adjust block comment.
63         
64 2006-06-25  Lee Millward  <lee.millward@gmail.com>
66         PR c++/28051
67         * mangle.c (mangle_conv_op_name_for_type): Check for
68         invalid types.
69         * name-lookup.c (push_class_level_binding): Robustify.
70         (do_class_using_decl): Return early if name is error_mark_node.
71         
72 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
74         PR c++/28114
75         * name-lookup.c (pushtag): Return if we have error_mark_node.
77 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
79         PR c++/27019
80         * typeck2.c (process_init_constructor_array): Set ce->value on errors.
82 2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
84         PR c++/28112
85         * parser.c (cp_parser_attribute_list): Skip attributes with invalid
86         arguments.  Fix comment.
88         PR c++/11468
89         * init.c (build_new_1): Handle error_mark_nodes returned by
90         build_java_class_ref.
91         (build_java_class_ref): Do not abort compilation, but return
92         error_mark_node.  Improve error message.  Fix indentation.
94 2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
96         PR target/27789
97         * decl.c (start_decl): Check that dllimports are not initialized.
99 2006-06-22  Lee Millward  <lee.millward@gmail.com>
101         PR c++/27805
102         * typeck2.c (build_m_component_ref): Use error_operand_p.
104         PR c++/27821
105         * decl.c (grokdeclarator): Return error_mark_node on
106         invalid uses of the scope resolution operator.
107         
108 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
110         PR c++/28111
111         * pt.c (determine_specialization): Check for invalid decls.
113         PR c++/28110
114         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
115         parameters.
117         PR c++/28109
118         * rtti.c (get_tinfo_decl_dynamic): Robustify.
120 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
122         PR c++/28052
123         * init.c (push_base_cleanups): Skip members with invalid types.
124         * typeck.c (build_class_member_access_expr): Robustify.
126 2006-06-19  Mark Mitchell  <mark@codesourcery.com>
128         * pt.c (instantiate_template): Fix typo in comment.
130 2006-06-19  Richard Guenther  <rguenther@suse.de>
132         * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
133         power-of-two token vector size.
135 2006-06-16  Mark Mitchell  <mark@codesourcery.com>
137         PR c++/28016
138         * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
139         members.
141         PR c++/27979
142         * call.c (standard_conversion): Strip cv-qualifiers from bitfield
143         types.
145         PR c++/27884
146         * decl.c (have_extern_spec): Remove.
147         (start_decl): Do not check have_extern_spec.
148         (start_function): Likewise.
149         * cp-tree.h (have_extern_spec): Remove.
150         * parser.c (cp_parser_linkage_specification): Don't set
151         have_extern_spec.
152         (cp_parser_init_declarator): Likewise.
153         (cp_parser_parameter_declaration): Do not treat parameters as
154         within the scope of an unbraced linkage specification.
156 2006-06-15  Mark Mitchell  <mark@codesourcery.com>
158         PR c++/27689
159         * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
160         macro.
161         * pt.c (unify): Use it.
163         PR c++/27666
164         * call.c (build_conditional_expr): Robustify.
166         PR c++/27640
167         * pt.c (instantiate_template): Set processing_template_decl to
168         zero while performing substitutions.
170 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
172         PR c++/27665
173         * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
174         identify destructors.
175         (cp_parser_nested_name_specifier_opt): Remove invalid
176         optimization.
177         (cp_parser_template_id): Refine heuristic for determining whether
178         we are entering a scope.
180         PR c++/27648
181         * parser.c (cp_parser_declarator): Robustify.
183         PR c++/26559
184         * pt.c (tsubst_expr): Use finish_omp_atomic.
185         (value_dependent_expression_p): All CALL_EXPRs are dependent.
186         * semantics.c (finish_omp_atomic): Rework to use standard
187         paradigms for handling non-dependent expressions.
189 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
191         * typeck.c (build_modify_expr): Tidy diagnostic message.
193 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
195         PR c++/28018
196         * typeck.c (build_modify_expr): Disallow array assignment.
198 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
200         * cp-tree.def: Fix typo.
202 2006-06-13  Mark Mitchell  <mark@codesourcery.com>
204         PR c++/27227
205         * decl.c (decls_match): Allow an extern "C" variable declarations
206         from different namespaces to match.
207         (duplicate_decls): Disallow redeclaring a variable with a
208         different linkage specification.
210 2006-06-13  Jakub Jelinek  <jakub@redhat.com>
212         PR middle-end/27793
213         * cp-tree.h (cxx_int_tree_map): New struct.
214         (struct language_function): Add extern_decl_map field.
215         * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
216         to cp_function_chain->extern_decl_map hash table instead of
217         copying over DECL_UID.
218         * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
219         functions.
220         (cp_genericize_r): Remap DECL_EXTERN local decls using
221         cp_function_chain->extern_decl_map hash table.
222         * decl.c (finish_function): Clear extern_decl_map.
224 2006-06-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
226         PR c++/27601
227         * semantics.c (finish_offsetof): Handle pseudo-destructors.
229         PR c++/27933
230         * name-lookup.c (lookup_qualified_name): Always return error_mark_node
231         if lookup fails.
233         PR c++/27951
234         * decl2.c (finish_anon_union): Return early if build_anon_union_vars
235         fails.
237 2006-06-12  Roger Sayle  <roger@eyesopen.com>
239         PR c++/21210
240         * typeck2.c (build_functional_cast): Use cp_convert to construct
241         non-aggregate initializers instead of the user-level build_c_cast.
243 2006-06-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
245         PR c++/27601
246         * cp-tree.h (finish_offsetof): Add prototype.
247         * semantics.c (finish_offsetof): New function.
248         * parser.c (cp_parser_builtin_offsetof): Call it instead of
249         fold_offsetof.
250         * pt.c (tsubst_copy_and_build): Likewise.
252 2006-06-06  Mark Mitchell  <mark@codesourcery.com>
254         PR c++/27177
255         * call.c (standard_conversion): Require that the derived type be
256         complete when performing a derived-to-base conversion.
258 2006-06-04  Mark Mitchell  <mark@codesourcery.com>
260         PR c++/27819
261         * decl.c (cp_finish_decl): Process initializers for static data
262         members with non-dependent initializers, even in templates.
264         PR c++/27722
265         * decl.c (maybe_deduce_size_from_array_init): If the declaration
266         is erroneous, give it an erroneous type.
267         (layout_var_decl): If the type is erroneous, give up.
268         (check_initializer): Likewise.
270         PR c++/27807
271         * cp-tree.h (TYPE_OBJ_P): New macro.
272         (TYPE_PTROB_P): Use it.
273         (TYPE_REF_OBJ_P): Likewise.
274         * semantics.c (finish_compound_literal): Do not permit compound
275         literals of non-object types.
277         PR c++/27806
278         * typeck.c (original_type): Robustify.
280 2006-06-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
282         PR c++/27804
283         * init.c (constant_value_1): Return decl instead of error_mark_node
284         for invalid initializers.
286 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
288         PR c++/27592
289         * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
290         on operand of the COND_EXPR for the null pointer check.
292 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
294         PR c++/26740
295         * typeck.c (build_unary_op): Mark the function as being used.
297 2006-06-01  Alexandre Oliva  <aoliva@redhat.com>
299         PR c++/26660
300         * parser.c (cp_parser_initial_pragma): Read one more token for
301         caller after reading PCH file in.
303 2006-05-31  Mark Mitchell  <mark@codesourcery.com>
305         PR c++/27801
306         * call.c (perform_implicit_conversion): Do not actually perform
307         conversions in templates.
309         PR c++/26496
310         * call.c (resolve_args): Check for invalid uses of bound
311         non-static member functions.
312         * init.c (build_offset_ref): Return error_mark_node for errors.
314         PR c++/27385
315         * decl.c (reshape_init): Robustify.
316         (reshape_init_array_1): Likewise.
318 2006-05-30  Mark Mitchell  <mark@codesourcery.com>
320         PR c++/27808
321         * parser.c (cp_parser_decl_specifier_seq): Issue errors about
322         "friend" specifiers that do not appear in class scopes.
324         PR c++/27803
325         * class.c (check_bitfield_decl): Ensure that all bitfields have
326         integral type.
328 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
330         * pt.c (convert_nontype_argument): Fix a typo in an error
331         message.
333 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
335         * decl.c, decl2.c, parser.c: Fix comment typos.  Follow
336         spelling conventions.
338 2006-05-24  Mark Mitchell  <mark@codesourcery.com>
340         PR c++/20103
341         * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
342         error_mark_node to indicate an initialization is OK.
343         (start_decl): Likewise.  Adjust call to start_decl_1.
344         (start_decl_1): Add initialized parameter.  Simplify.
345         * except.c (initialize_handler_parm): Adjust call to
346         setart_decl_1.
347         (expand_start_catch_block): Let cp_finish_decl initialize catch
348         parameters.
349         * cp-tree.h (start_decl_1): Adjust prototype.
350         * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
351         (instantiate_decl): Let cp_finish_decl handle initialization.
352         * semantics.c (finish_compound_literal): Create a temporary
353         variable for the literal.
354         * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
355         cases.
356         * decl2.c (finish_static_data_member_decl): Don't set
357         DECL_INITIAL.
358         (grokfield): Do not try to initialize functions.
360 2006-05-23  Mark Mitchell  <mark@codesourcery.com>
362         PR c++/20173
363         * pt.c (determine_specialization): Disallow partial
364         specializations of templates.
366 2006-05-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
368         PR c++/27716
369         * typeck.c (build_modify_expr): Test arguments for error_operand_p.
371         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
373 2006-05-21  Mark Mitchell  <mark@codesourcery.com>
375         PR c++/27210
376         * cp-tree.h (cp_save_expr): New function.
377         * init.c (build_new): Correct logic for zero-element array
378         warning.  Use cp_save_expr.
379         * tree.c (cp_save_expr): New function.
381 2006-05-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
383         PR c++/27398
384         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
385         or void_type_node.
387 2006-05-19  Mike Stump  <mrs@apple.com>
389         * typeck.c (default_conversion): Remove static.
391 2006-05-19  Mark Mitchell  <mark@codesourcery.com>
393         PR c++/26433
394         * cp-tree.h (begin_function_try_block): Change prototype.
395         (finish_function_handler_sequence): Likewise.
396         * parser.c (cp_parser_function_try_block): Adjust calls.
397         * pt.c (tsubst_expr): Adjust calls.
398         * semantics.c (begin_function_try_block): Create an artificial
399         outer scope.
400         (finish_function_handler_sequence): Close it.
402 2006-05-18  Mark Mitchell  <mark@codesourcery.com>
404         PR c++/27471
405         PR c++/27506
406         * typeck.c (decay_conversion): Convert bitfields to their declared
407         types here.  Improve documentation.  Avoid use of cp_convert.
408         (default_conversion): Make it static.  Perform integral promotions
409         before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
410         conversions.
411         * init.c (build_init): Remove.
412         (expand_default_init): Do not call rvalue.
413         * call.c (null_ptr_cst_p): Robustify.
414         (build_conditional_expr): Tidy.
415         * except.c (build_throw): Do not perform lvalue-to-rvalue
416         conversion on operand before initializing temporary.
417         * tree.c (convert.h): Include it.
418         (convert_bitfield_to_declared_type): Use convert_to_integer, not
419         cp_convert.
420         (rvalue): Don't convert bitfields to their declared type here.
421         * cp-tree.h (build_init): Remove.
422         (default_conversion): Likewise.
423         * typeck2.c (build_m_component_ref): Do not perform
424         lvalue-to-rvalue, function-to-pointer, or array-to-pointer
425         conversions here.  Correct error message.
427 2006-05-17  Mark Mitchell  <mark@codesourcery.com>
429         PR c++/26122
430         * decl2.c (check_member_template): Remove checks for virtual
431         functions.
432         * parser.c (cp_parser_function_specifier_opt): Complain about
433         virtual templates.
434         (cp_parser_pure_specifier): Likewise.
436         PR c++/26068
437         * parser.c (cp_parser_set_storage_class): Check for
438         invalid uses of storage classes on unbraced linkage
439         specifications.
440         (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
441         to cp_parser_set_storage_class.
443 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
445         PR c++/27491
446         * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
447         on CONSTRUCTORs.
449         PR middle-end/27415
450         * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
451         on combined parallel workshare constructs.
452         * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
454 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
456         PR driver/26885
457         * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
459 2006-05-15  Mark Mitchell  <mark@codesourcery.com>
461         PR c++/27339
462         * cp-tree.h (perform_access_checks): New function.
463         * semantics.c (perform_access_checks): New function.
464         (perform_deferred_access_checks): Use it.
465         * parser.c (cp_parser_simple_declaration): Adjust call to
466         cp_parser_init_declarator.
467         (cp_parser_type_parameter): Do not defer checks in default
468         arguments.
469         (cp_parser_explicit_specialization): Adjust call to
470         cp_parser_single_declaration.
471         (cp_parser_init_declarator): Perform template-parameter access
472         checks.
473         (cp_parser_parameter_declaration): Do not defer checks for
474         template parameter default arguments.
475         (cp_parser_template_declaration_after_export): Gather access
476         checks for template parameters, and pass them to
477         cp_parser_single_declaration.
478         (cp_parser_template_parameter_access_checks): New function.
479         (cp_parser_single_declaration): Add checks parameter.
481         PR c++/27505
482         * call.c (convert_like_real): Convert bitfields to their declared
483         types when forming an rvalue.
484         * tree.c (convert_bitfield_to_declared_type): New function.
485         (rvalue): Use it.
486         * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
488 2006-05-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
490         PR c++/27582
491         * pt.c (any_dependent_template_arguments_p): Return early on invalid
492         argument list.
494         PR c++/27581
495         * search.c (adjust_result_of_qualified_name_lookup): Skip on
496         invalid context_class.
498         PR c++/27315
499         * pt.c (do_decl_instantiation): Return early on invalid decl.
501         PR c++/27559
502         * pt.c (push_template_decl_real): Return error_mark_node instead
503         of broken decl.
505         PR c++/27496
506         * pt.c (tsubst_friend_class): Return early on invalid friend
507         declarations.
509 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
511         * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
512         (cp/decl2.o): Likewise.
513         (cp/typeck.o): Likewise.
514         (cp/cvt.o): Likewise.
515         (cp/parser.o): Likewise.
516         (cp/call.o): Replace target.h with $(TARGET_H).
518 2006-05-14  Alexandre Oliva  <aoliva@redhat.com>
520         * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
521         COMPONENT_REF alone.
523 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
525         PR c++/27547
526         * decl.c (copy_fn_p): Return early on non-member functions.
528 2006-05-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
530         PR c++/27447
531         * decl2.c (build_memfn_type): Skip invalid functions and class types.
533 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
535         PR c++/27427
536         * pt.c (convert_nontype_argument): Return early on invalid arguments.
538         * pt.c (process_template_parm): Remove superfluous temporary.
540         PR c++/27430
541         * pt.c (process_template_parm): Handle erroneous non-type parameters.
543         PR c++/27423
544         * typeck.c (convert_for_initialization): Skip erroneous types.
546         PR c++/27422
547         * typeck.c (convert_arguments): Return early on args with
548         invalid types.
550 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
552         PR/21391
553         * typeck.c (build_static_cast_1): Save casted types in used types
554         hash table.
555         (build_reinterpret_cast_1): Same.
556         * rtti.c (build_dynamic_cast_1): Same.
558 2006-05-04  Jakub Jelinek  <jakub@redhat.com>
560         PR c++/27359
561         * parser.c (cp_parser_omp_for_loop): Only call
562         cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
563         called.
565 2006-05-02  Mark Mitchell  <mark@codesourcery.com>
567         PR c++/27102
568         * decl.c (grokdeclarator): Robustify checks for defining members
569         of incomplete types.
571         PR c++/27309
572         * class.c (add_method): Call grok_special_member_properties.
573         * decl.c (grokdeclarator): Don't call it here.
574         (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
575         assignment operator.  Set TYPE_HAS_CONSTURCTOR if DECL is a
576         constructor.
577         (start_method): Don't call grok_special_member_properties.
578         * method.c (implicitly_declare_fn): Likewise.
579         * pt.c (instantiate_class_template): Likewise.
580         * decl2.c (grokfield): Likewise.
582 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
584         PR middle-end/27337
585         * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
586         * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
587         * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
589 2006-04-30  Mark Mitchell  <mark@codesourcery.com>
591         PR c++/27094
592         * pt.c (tsubst_default_argument): Increment function_depth around
593         call to tsubst_expr.
594         * parser.c (cp_parser_parameter_declaration): Likewise.
595         * decl2.c (mark_used): Tidy.
597 2006-04-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
599         PR c++/27278
600         * decl.c (grok_op_properties): Skip operators with invalid args
601         when checking for class-type or enum-type args.
603 2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
605         PR c++/27279
606         * decl.c (copy_fn_p): Skip functions with invalid first arg.
608 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
610         PR c++/27292
611         * tree.c (rvalue): Convert bitfields to their declared types.
613         PR c++/27102
614         * typeck2.c (cxx_incomplete_type_diagnostic): Handle
615         TYPENAME_TYPE.
617 2006-04-24  Mark Mitchell  <mark@codesourcery.com>
619         PR c++/27292
620         * typeck.c (decay_conversion): Don't adjust bitfield types.
621         (perform_integral_promotions): Treat bitfield enums as enums, not
622         as short integer types.
623         * tree.c (rvalue): Convert bitfields to their correct types.
625 2006-04-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
627         PR c++/19963
628         * class.c (layout_class_type): Skip fields with invalid types.
630 2006-04-23  Mark Mitchell  <mark@codesourcery.com>
632         PR c++/26912
633         * cp-tree.h (build_this_parm): Declare.
634         (grok_method_quals): Remove.
635         (build_memfn_type): Declare.
636         (build_artificial_parm): Declare.
637         (do_friend): Remove quals parameter.
638         * decl.c (build_this_parm): New function.
639         (grokfndecl): Use it.  Do not pass quals to grokclassfn.
640         (grokdeclarator): Rename quals to memfn_quals.  Avoid allocating
641         unnecessary TYPE_DECLs.  Correct qualification of member function
642         types.  Tidy.
643         * method.c (implicitly_declare_fn): Use build_this_parm.
644         * friend.c (do_friend): Remove quals parameter.
645         * decl2.c (grok_method_quals): Remove.
646         (build_memfn_type): New function.
647         (build_artificial_parm): Give it external linkage.
648         (grokclassfn): Remove quals parameter.  Do not build "this"
649         PARM_DECL here.
651         PR c++/26534
652         * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
653         * typeck.c (is_bitfield_expr_with_lowered_type): New function.
654         (decay_conversion): Convert bitfield expressions to the correct
655         type.
656         (build_modify_expr): Remove spurious conversions.
657         * class.c (layout_class_type): Modify the type of bitfields to
658         indicate a limited range.
659         * call.c (standard_conversion): Adjust the type of bitfield
660         expressions used in an rvalue context.
661         (build_conditional_expr): Likewise.
663 2006-04-22  Kazu Hirata  <kazu@codesourcery.com>
665         * decl.c: Fix comment typos.
667 2006-04-21  Eric Christopher  <echristo@apple.com>
669         * decl.c: Fix typo in function name.
671 2006-04-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
673         PR c++/26558
674         * parser.c (cp_parser_class_name): Check for invalid typenames.
675         Rearrange code.
677         PR c++/26739
678         * pt.c (tsubst_friend_function): Return early if
679         pushdecl_namespace_level fails.
681         PR c++/26036
682         * typeck.c (convert_arguments): Return error_mark_node instead of
683         error_mark_list.
684         * cp-tree.h (error_mark_list): Remove declaration.
685         * decl.c (error_mark_list): Remove definition.
686         (cxx_init_decl_processing): Do not initialize error_mark_list.
688         PR c++/10385
689         * rtti.c (build_dynamic_cast_1): Check for invalid conversions
690         before calling convert_to_reference.
691         * cvt.c (convert_to_reference): Assert that reftype is a
692         REFERENCE_TYPE.
694 2006-04-19  Mark Mitchell  <mark@codesourcery.com>
696         PR c++/27102
697         * class.c (currently_open_class): Tidy.
698         * decl.c (grokdeclarator): If we encounter an erroneous
699         declarator, assume that we have already issued an error message
700         and return.  Return error_mark_node instead of NULL_TREE in more
701         places.  Issue errors about function definitions that do not have
702         a function declarator.  Check for complete types for all function
703         definitions.
704         * cp-tree.h (cp_error_declarator): Remove.
705         (currently_open_class): Change return type.
706         * parser.c (cp_parser_id_expression): Add optional_p parameter.
707         (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
708         (cp_parser_id_expression): Likewise.
709         (cp_parser_unqualified_id): If the name is optional, return
710         NULL_TREE.
711         (cp_parser_postfix_dot_deref_expression): Adjust calls.
712         (cp_parser_type_parameter): Likewise.
713         (cp_parser_unqualified_id): Likewise.
714         (cp_parser_direct_declarator): Likewise.
715         (cp_parser_declarator_id): Add optional_p parameter.
716         (cp_parser_function_definition_from_specifiers_and_declarator):
717         Assume that start_function indicates failure only if it has issued
718         an error.
719         (cp_parser_omp_var_list_no_open): Adjust calls.
721 2006-04-17  Janis Johnson  <janis187@us.ibm.com>
723         PR c++/26114, c++/26115
724         * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
725         * class.c (check_field_decls): Ditto.
727 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
729         * init.c (build_offset_ref): Remove superfluous temporary.
731 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
733         PR c++/26365
734         * typeck.c (finish_class_member_access_expr): Robustify
736 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
738         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
739         * pt.c: Include vecprim.h.
740         (inline_parm_levels): Change the type to VEC(int,heap) *.
741         (inline_parm_levels_used): Remove.
742         (maybe_begin_member_template_processing,
743         maybe_end_member_template_processing): Use VEC instead of
744         VARRAY.
746         * cp/call.c: Fix comment typos.
748 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
750         * parser.c (cp_parser_init_declarator): Initialize local variables
751         aggressively.
753 2006-04-12  Roger Sayle  <roger@eyesopen.com>
755         * parser.c (cp_parser_init_declarator): Initialise
756         is_parenthesized_init to false to avoid compiler warning.
758 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
760         * cp-tree.h (build_operator_new_call): Adjust prototype.
761         (build_new_method_call): Likewise.
762         (build_op_delete_call): Likewise.
763         * init.c (build_raw_new_expr): New function.
764         (build_new_1): Pass information as parameters, rather than
765         bundling it into a NEW_EXPR.
766         (build_new): Adjust accordingly.
767         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
768         (build_delete): Likewise.
769         * decl.c (finish_destructor_body): Likewise.
770         * call.c (build_operator_new_call): Return the allocation function
771         used.
772         (build_op_delete_call): Take allocation function as parameter.
773         (build_special_member_call): Adjust call to build_new_method_call.
774         (build_new_method_call): Return function called.
775         * pt.c (tsubst_copy_and_build): Adjust call to
776         build_new_method_call.
777         * semantics.c (finish_call_expr): Likewise.
778         * parser.c (cp_parser_postfix_expression): Likewise.
779         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
780         "incomplete", not "undefined", types.
782         PR c++/26295
783         * decl.c (grokdeclarator): Remove namespace-handling code for
784         pointers-to-members.
785         * parser.c (cp_parser_ptr_operator): Check for qualified names
786         using namespaces.
788         PR c++/26122
789         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
790         whether or not to look for a pure-specifier.
791         (cp_parser_member_declaration): Likewise.
793 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
795         * decl2.c, pt.c, semantics.c: Fix comment typos.
797 2006-04-06  Roger Sayle  <roger@eyesopen.com>
799         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
801 2006-04-05  Jason Merrill  <jason@redhat.com>
803         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
804         default hidden visibility for anonymous namespace.
806 2006-03-29  Roger Sayle  <roger@eyesopen.com>
808         PR c++/22494
809         * init.c (build_vec_delete_1): Convert BASE pointer's type to
810         the base pointer type to avoid a type mismatch in the EQ_EXPR.
812 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
814         * search.c (maybe_suppress_debug_info): If
815         flag_emit_class_debug_always then don't suppress.
817 2006-03-22  Jason Merrill  <jason@redhat.com>
819         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
820         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
822 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
824         PR c++/26691
825         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
827 2006-03-21  Jason Merrill  <jason@redhat.com>
829         PR c++/21581
830         * parser.c (cp_parser_declaration): Support attributes on
831         anonymous namespaces.
832         * name-lookup.c (push_namespace_with_attribs): Anonymous
833         namespaces default to hidden visibility.
835 2006-03-20  Jason Merrill  <jason@redhat.com>
837         PR c++/21764, c++/19238
838         * decl.c (cp_finish_decl): Call determine_visibility later.
839         (start_preparsed_function): Likewise.
840         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
841         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
842         * name-lookup.h (struct cp_binding_level): Add has_visibility
843         bitfield.
844         * name-lookup.c: Include c-pragma.h.
845         (push_namespace_with_attribs): Split out from push_namespace.
846         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
847         (leave_scope): Pop visibility if appropriate.
848         * decl2.c (determine_visibility_from_class): Split out from...
849         (determine_visibility): ...here.  Handle function scope and
850         nested classes.
851         (import_export_decl): Move visibility handling to
852         determine_visibility_from_class.
853         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
854         attributes on namespace declarations.
856 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
858         PR c++/6634
859         * decl.c (grokdeclarator): Do not accept long long double.
860         Reorganize checks for invalid (combinations of) type modifiers.
861         Quote modifiers in messages.
863 2006-03-09  Jason Merrill  <jason@redhat.com>
865         PR c++/16387, c++/16389
866         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
867         (cxx_sizeof_or_alignof_expr): Split out from here.
869 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
871         Merge from gomp-20050608-branch
873         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
875                 * decl.c (pop_labels_1): Use appropriate pointer casting.
876                 (poplevel_named_label_1): Likewise.
877                 (named_label_entry_hash): Likewise.
878                 (named_label_entry_eq): Likewise.
879                 (check_goto): Likewise.
880                 (define_label): Likewise.
882         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
884                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
885                 of TREE_BLOCK.
886                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
887                 instead of TREE_CODE/TREE_OPERAND.
888                 * semantics.c: Likewise.
889                 * parser.c: Likewise.
891         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
893                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
894                 target does not support TLS.
896         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
898                 * decl.c (redeclaration_error_message): Don't error about
899                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
900                 (olddecl).
902         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
904                 PR c++/24735
905                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
906                   functions.
907                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
908                 (cp_parser_omp_flush): Call finish_omp_flush.
909                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
910                   prototypes.
912                 PR c++/24734
913                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
915         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
917                 * semantics.c (finish_omp_threadprivate): Error on class-scope
918                 variables.
920         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
922                 * parser.c (cp_parser_omp_all_clauses): If some clause
923                 type is not allowed, don't remove just one of the
924                 clauses, but all clauses added in that loop round.
926                 * semantics.c (finish_omp_clauses): Fix function
927                 comment. Don't handle non-const or mutable specially,
928                 as const and not mutable is predetermined shared and
929                 that leads to double error. Don't ICE if copyin var is
930                 PARM_DECL.
932                 PR c++/24613
933                 * parser.c (cp_parser_pragma): Diagnose
934                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
935                 construct.
937                 * semantics.c (finish_omp_threadprivate): Error if V
938                   is automatic variable or has incomplete type.
940         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
942                 * parser.c (cp_parser_omp_all_clauses): Use
943                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
945         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
947                 * parser.c (cp_parser_omp_all_clauses): When emitting an
948                 error message, remove the invalid clause from the list.
950         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
952                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
953                 combined parallel+workshare directives.
955         2005-10-31  Richard Henderson  <rth@redhat.com>
957                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
958                 Use cxx_omp_clause_dtor.
959                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
960                 (cxx_omp_clause_dtor): New.
961                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
962                 (cxx_omp_clause_default_ctor): Use it.
963                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
964                 Likewise.
965                 (cxx_omp_clause_dtor): New.
966                 * semantics.c (finish_omp_clauses): Rewrite cdtor
967                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
968                 specialcase LASTPRIVATE for removal.
969                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
970                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
972         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
974                 * semantics.c (finish_omp_threadprivate): If
975                   DECL_RTL_SET_P, call make_decl_rtl again so that
976                   encode_section_info can update SYMBOL_REF's flags.
978         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
980                 * semantics.c (finish_omp_for): Don't segfault if COND
981                 or INCR is NULL.  If not calling c_finish_omp_for
982                 right away and one of COND and INCR is NULL, issue
983                 error and don't expand anything.
985                 PR c++/24512
986                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
987                 * semantics.c (finish_omp_for): Likewise.  Set
988                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
989                 into the current statement list if not processing
990                 template decl or pass it to c_finish_omp_for.
992                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
993                 into PRE_BODY statement list.  Pass it to finish_omp_for.
994                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
995                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
996                 finish_omp_for.  Put all the statements into sk_omp
997                 scope.
999         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
1001                 PR c++/24516
1002                 * parser.c (struct cp_parser): Rename in_iteration_statement
1003                 field to in_statement.
1004                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1005                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
1006                 (cp_parser_new, cp_parser_begin_omp_structured_block,
1007                 cp_parser_end_omp_structured_block,
1008                 cp_parser_omp_for_loop): Adjust for
1009                 in_iteration_statement renaming.
1010                 (cp_parser_selection_statement): Save
1011                 parser->in_iteration, or it temporarily with
1012                 IN_SWITCH_STMT for the
1013                 cp_parser_implicitly_scoped_statement call.
1014                 (cp_parser_iteration_statement): Adjust for
1015                 in_iteration_statement renaming.  Use
1016                 IN_ITERATION_STMT rather than true.
1017                 (cp_parser_jump_statement): Adjust for
1018                 in_iteration_statement renaming and new values.  Don't
1019                 error on break in a switch statement within OMP_FOR or
1020                 OpenMP structured block.
1022                 PR c++/24513
1023                 * parser.c (cp_parser_cache_group): Don't stop if next
1024                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
1025                 well.  If current token is CPP_PRAGMA, consume
1026                 everything until CPP_PRAGMA_EOL inclusive.
1028         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
1030                 PR c++/24502
1031                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
1032                 addition to MODIFY_EXPR.
1034         2005-10-23  Richard Henderson  <rth@redhat.com>
1036                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
1037                 (bc_label): New.
1038                 (begin_bc_block, finish_bc_block): Use it.
1039                 (push_context, pop_context): Remove.
1040                 (cp_genericize): Don't use them.  Assert bc_label is null.
1041                 * semantics.c (finish_omp_clauses): Create a fake data
1042                 element of TYPE for probing ctors.
1044         2005-10-23  Richard Henderson  <rth@redhat.com>
1046                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
1047                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
1048                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
1049                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
1050                 * semantics.c (finish_omp_clauses): Look through
1051                 arrays when looking up special member calls.  Also
1052                 remove FIRSTPRIVATE when LASTPRIVATE fails.
1053                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
1054                 (cxx_omp_clause_assign_op): New.
1055                 * cp-tree.h: Declare them.
1057         2005-10-21  Richard Henderson  <rth@redhat.com>
1059                 * decl.c (check_previous_goto_1): Return false if error.
1060                 (check_switch_goto): Likewise.
1061                 (finish_case_label): Don't emit the case label on error.
1062                 * parser.c (struct cp_parser): Revert
1063                 in_switch_statement_p changes.
1064                 (cp_parser_labeled_statement,
1065                 cp_parser_selection_statement): Likewise.
1066                 (cp_parser_begin_omp_structured_block): Don't save...
1067                 (cp_parser_end_omp_structured_block): or restore
1068                 in_switch_statement_p.
1070         2005-10-21  Richard Henderson  <rth@redhat.com>
1072                 * semantics.c (finish_omp_threadprivate): Set
1073                 decl_flags.u2sel when necessary.
1075         2005-10-21  Richard Henderson  <rth@redhat.com>
1077                 * decl.c (poplevel_named_label_1): Restore creation of the
1078                 bad_decls list.
1079                 (decl_jump_unsafe): Check for error_mark_node types.
1080                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
1081                 * semantics.c (finish_return_stmt): Do check_omp_return before
1082                 converting to cdtor_label goto.
1084         2005-10-21  Richard Henderson  <rth@redhat.com>
1086                 PR c++/24451
1087                 * decl.c (check_omp_return): Return false on error.
1088                 * cp-tree.h (check_omp_return): Update decl.
1089                 * semantics.c (finish_return_stmt): Avoid adding
1090                 return on error.
1092         2005-10-21  Richard Henderson  <rth@redhat.com>
1094                 * cp-tree.h (struct language_function): Remove
1095                 x_named_label_uses.
1096                 Change x_named_labels to a hashtable.
1097                 (check_omp_return): Declare.
1098                 * decl.c (struct named_label_use_entry): Rename from
1099                 named_label_use_list.  Remove label_decl.
1100                 (struct named_label_entry): Rename from
1101                 named_label_list.  Remove old_value and next.  Change
1102                 in_try_scope and in_catch_scope to bool. Add
1103                 in_omp_scope.
1104                 (pop_labels_1): New.
1105                 (pop_labels): Use it.
1106                 (pop_local_label, poplevel_named_label_1): New.
1107                 (poplevel): Use them.
1108                 (named_label_entry_hash, named_label_entry_eq): New.
1109                 (make_label_decl): Create named_labels.  Move label
1110                 creation bits from lookup_label.
1111                 (declare_local_label): Tidy.
1112                 (identify_goto): Split out from ...
1113                 (check_previous_goto_1): Add exited_omp argument.
1114                 Handle omp scopes.
1116                 (use_label): Merge into...
1117                 (check_goto): ... here.  Handle omp scopes.
1118                 (check_omp_return): New.
1119                 (check_previous_gotos): Merge into...
1120                 (define_label): ... here.
1121                 (save_function_data): Remove x_named_label_uses reference.
1122                 (finish_function): Likewise.
1123                 * name-lookup.h (sk_omp): New.
1124                 * name-lookup.c (begin_scope): Handle it.
1125                 * parser.c (cp_parser_omp_for): Don't create extra
1126                 compound stmt.
1128                 (cp_parser_omp_sections): Likewise.
1129                 * semantics.c (finish_return_stmt): Call check_omp_return.
1130                 (begin_omp_structured_block): Use sk_omp.
1131                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
1132                 MUST_NOT_THROW expression here.
1133                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
1134                 compound statements.
1136         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
1138                 PR 24455
1139                 * cp/cp-tree.h (struct lang_decl_flags): Add field
1140                 threadprivate_p.
1141                 (CP_DECL_IS_THREADPRIVATE): Define.
1142                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
1143                 not error out if CP_DECL_IS_THREADPRIVATE is set
1144                 already.
1145                 * cp/decl.c (duplicate_decls): Merge
1146                 CP_DECL_THREADPRIVATE_P.
1148         2005-10-20  Richard Henderson  <rth@redhat.com>
1150                 * cp-gimplify.c (cp_gimplify_omp_for): New.
1151                 (cp_gimplify_expr): Call it.
1152                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
1153                 * parser.c (struct cp_parser): Rename
1154                 in_iteration_statement_p to in_iteration_statement and
1155                 change to unsigned char.  Similarly with
1156                 in_switch_statement.  Update all users.
1157                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
1158                 (cp_parser_labeled_statement): Diagnose case labels
1159                 binding closer to an openmp block nested than the
1160                 switch.
1161                 (cp_parser_jump_statement): Diagnose break and
1162                 continue labels binding closer to an openmp block than
1163                 an iteration or switch.
1164                 (cp_parser_omp_for_loop): Mark in_iteration_statement
1165                 for an omp for.
1166                 (cp_parser_begin_omp_structured_block): New.
1167                 (cp_parser_end_omp_structured_block): New.
1168                 (cp_parser_omp_structured_block): Use them.
1169                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
1170                 (cp_parser_omp_parallel): Likewise.
1172         2005-10-20  Richard Henderson  <rth@redhat.com>
1174                 * semantics.c (begin_omp_structured_block): New.
1175                 (finish_omp_structured_block): New.
1176                 (begin_omp_parallel, finish_omp_parallel): Use them.
1177                 * parser.c (cp_parser_omp_structured_block): Likewise.
1178                 (cp_parser_omp_for): Likewise.
1179                 (cp_parser_omp_sections_scope): Likewise.
1180                 * cp-tree.h: Declare them.
1182         2005-10-20  Richard Henderson  <rth@redhat.com>
1184                 * parser.c (cp_parser_omp_master): Return the statement.
1185                 (cp_parser_omp_ordered): Likewise.
1186                 (cp_parser_omp_construct): Set the locus for them.
1188         2005-10-19  Richard Henderson  <rth@redhat.com>
1190                 * semantics.c (finish_omp_atomic): Revert to
1191                 uses_template_parms.
1193         2005-10-19  Richard Henderson  <rth@redhat.com>
1195                 * semantics.c (finish_omp_clauses): Avoid
1196                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
1197                 stub asserts guaranteed to fail.
1199         2005-10-19  Richard Henderson  <rth@redhat.com>
1201                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
1202                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
1203                 * parser.c (cp_parser_omp_clause_copyin): Remove.
1204                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.                Call finish_omp_clauses.
1205                 (cp_parser_omp_clause_if): Don't do error checking here.
1206                 (cp_parser_omp_clause_num_threads): Likewise.
1207                 (cp_parser_omp_clause_schedule): Likewise.
1208                 (cp_parser_omp_atomic): Use finish_omp_atomic.
1209                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
1210                 Don't decompose assignment statment here.  Use
1211                 finish_omp_for.
1213                 * pt.c (tsubst_omp_clauses): New.
1214                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
1215                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
1216                 * semantics.c (finish_omp_clauses): New.
1217                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
1218                 internals of the stmt_list stack.
1219                 (finish_omp_for, finish_omp_atomic): New.
1221         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1223                 * semantics.c (cxx_omp_predetermined_sharing): New function.
1224                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
1225                 * cp-objcp-common.h
1226                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
1228         2005-10-18  Richard Henderson  <rth@redhat.com>
1230                 * parser.c (cp_parser_omp_single): Use make_node and accessors
1231                 instead of build.
1233         2005-10-17  Richard Henderson  <rth@redhat.com>
1235                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
1237         2005-10-12  Richard Henderson  <rth@redhat.com>
1239                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
1240                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
1241                 (finish_omp_threadprivate): Declare.
1242                 * parser.c (struct cp_lexer): Add in_pragma.
1243                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
1244                 when in_pragma.
1245                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
1246                 (cp_parser_skip_to_end_of_statement): Likewise.
1247                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1248                 (cp_parser_skip_to_closing_brace): Likewise.
1249                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
1250                 (cp_parser_require_pragma_eol): New.
1251                 (cp_parser_statement): Add in_compound argument;
1252                 update all callers.
1253                 Restart if a non-statement pragma seen outside a
1254                 compound.
1255                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
1256                 (cp_parser_declaration_seq_opt): Likewise.
1257                 (cp_parser_member_specification_opt): Likewise.
1258                 (cp_parser_function_definition_after_decl): Likewise.
1259                 (cp_parser_skip_until_found): Likewise.
1260                 (cp_parser_cache_group): Likewise.
1261                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
1262                 check_no_duplicate_clause,
1263                 cp_parser_omp_var_list_no_open,
1264                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
1265                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
1266                 cp_parser_omp_clause_nowait,
1267                 cp_parser_omp_clause_num_threads,
1268                 cp_parser_omp_clause_ordered,
1269                 cp_parser_omp_clause_reduction,
1270                 cp_parser_omp_clause_schedule,
1271                 cp_parser_omp_all_clauses,
1272                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
1273                 cp_parser_omp_barrier, cp_parser_omp_critical,
1274                 cp_parser_omp_flush, cp_parser_omp_for_loop,
1275                 cp_parser_omp_for, cp_parser_omp_master,
1276                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
1277                 cp_parser_omp_sections, cp_parser_omp_parallel,
1278                 cp_parser_omp_single, cp_parser_omp_threadprivate,
1279                 cp_parser_omp_construct): New.
1280                 (cp_parser_pragma): Handle OpenMP pragmas.
1281                 * semantics.c (finish_omp_threadprivate): New.
1282                 (begin_omp_parallel, finish_omp_parallel): New.
1284         2005-10-11  Richard Henderson  <rth@redhat.com>
1286                 * parser.c (struct cp_token): Add pragma_kind.
1287                 (eof_token): Initialize it.
1288                 (cp_lexer_handle_pragma): Remove.
1289                 (cp_parser_initial_pragma): New.
1290                 (cp_lexer_new_main): Use it.
1291                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
1292                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
1293                 (cp_parser_skip_to_pragma_eol): New.
1294                 (cp_parser_error): Use it.
1295                 (pragma_lex): New.
1297         2005-10-09  Richard Henderson  <rth@redhat.com>
1299                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
1300                 (handle_pragma_java_exceptions): Likewise.
1301                 * parser.c (cp_lexer_new_main): Likewise.
1303         2005-10-06  Richard Henderson  <rth@redhat.com>
1305                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
1306                 (cp_lexer_handle_pragma): Comment out
1307                 cpp_handle_deferred_pragma.
1309         2005-10-01  Richard Henderson  <rth@redhat.com>
1311                 * name-lookup.c (lookup_name): Remove prefer_type argument.
1312                 (lookup_name_prefer_type): New function.
1313                 * name-lookup.h (lookup_name_prefer_type): Declare it.
1314                 * decl.c (lookup_and_check_tag): Use it.
1315                 * pt.c (tsubst_friend_class): Likewise. Update for
1316                 lookup_name change.
1317                 (lookup_template_class, tsubst_copy_and_build): Likewise.
1319 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1321         PR c++/15759
1322         * tree.c (bot_manip): Don't call mark_used.
1324 2006-03-02  Mike Stump  <mrs@apple.com>
1326         * decl2.c (import_export_decl): Remove redundant call to
1327         targetm.cxx.key_method_may_be_inline ().
1329 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
1331         * decl.c (start_decl): Use have_global_bss_p when deciding
1332         whether to make the decl common.
1334 2006-03-01  Mike Stump  <mrs@apple.com>
1336         PR darwin/25908
1337         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
1339 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
1341         * except.c (expand_start_catch_block): Handle
1342         flag_use_cxa_get_exception_ptr.
1344 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1346         PR c++/26291
1347         * decl.c (grok_op_properties): Check for ellipsis in arguments of
1348         operators.
1350 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1352         * Make-lang.in (C++): Remove.
1353         (.PHONY): Remove C++.
1355 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
1357         PR c++/26266
1358         * cp-tree.h (cp_finish_decl): Adjust declaration.
1359         (grokbitfield): Likewise.
1360         (finish_static_data_member_decl): Likewise.
1361         * init.c (constant_value_1): Ensure processing_template_decl when
1362         folding non-dependent initializers for static data members of
1363         dependent types.  Return error_mark_node for erroneous
1364         initailizers.
1365         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
1366         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
1367         (cp_finish_decl): Add init_const_expr_p parameter.  Set
1368         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
1369         (finish_decl): Adjust call to cp_finish_decl.
1370         (compute_array_index_type): Robustify.
1371         (start_method): Use finish_decl, not cp_finish_decl.
1372         * rtti.c (emit_tinfo_decl): Likewise.
1373         * except.c (initialize_handler_parm): Adjust call to
1374         cp_finish_decl.
1375         (expand_start_catch_block): Likewise.
1376         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
1377         * pt.c (instantiate_class_template): Adjust call to
1378         finish_static_data_member_decl.
1379         (tsubst_expr): Use finish_decl, not cp_finish_decl.
1380         (instantiate_decl): Adjust call to cp_finish_decl.
1381         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
1382         cp_finish_decl.
1383         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
1384         parameter.
1385         (grokfield): Likewise.
1386         * parser.c (cp_parser_condition): Check for constant initializers.
1387         (cp_parser_init_declarator): Adjust calls to grokfield and
1388         cp_finish_decl.  Don't set
1389         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
1390         (cp_parser_member_declaration): Likewise.
1391         (cp_parser_objc_class_ivars): Likewise.
1393 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1395         * call.c (standard_conversion): Return NULL instead of 0.
1396         (build_user_type_conversion_1): Likewise.
1397         (tourney): Likewise.
1398         * decl.c (redeclaration_error_message): Likewise.
1399         * error.c (language_to_string): Likewise.
1401 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1403         * cp-tree.h (warn_hidden): Remove prototype.
1404         * class.c (warn_hidden): Make static.
1406         * cp-tree.h (build_type_conversion): Remove prototype.
1407         * cvt.c (build_type_conversion): Add prototype, make static.
1409         * cp-tree.h (push_tinst_level): Remove prototype.
1410         (pop_tinst_level): Likewise.
1411         * pt.c (push_tinst_level): Add prototype, make static.
1412         (pop_tinst_level): Likewise.
1414 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1416         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
1417         * typeck.c (unary_complex_lvalue): Likewise.
1419 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1421         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
1422         "(tree)-1" to indicate failure.  Simplify.
1423         (handle_pragma_interface): Test for error_mark_node instead of
1424         "(tree)-1".
1425         (handle_pragma_implementation): Likewise.
1427 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1429         PR c++/26151
1430         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
1431         decl-specifiers.  Remove extra check for duplicate 'friend'.
1432         * decl.c (grokdeclarator): Remove check for duplicate
1433         decl-specifiers.  Set longlong together with long_p.
1435 2006-02-12  Jason Merrill  <jason@redhat.com>
1437         PR c++/24996
1438         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
1439         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
1441 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1443         * class.c (debug_class): Remove extern.
1444         (debug_thunks): Likewise.
1446 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1448         * typeck.c (string_conv_p): Don't test for flag_const_strings.
1450 2006-02-08  Jason Merrill  <jason@redhat.com>
1452         PR c++/25979
1453         * cp-gimplify.c (cp_gimplify_expr): Don't call
1454         cp_gimplify_init_expr for MODIFY_EXPRs.
1455         * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
1457 2006-02-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1459         PR c++/26071
1460         * decl.c (grokdeclarator): Set dname also for destructor.
1462         PR c++/26070
1463         * decl.c (grokdeclarator): Clear storage_class together with staticp.
1465 2006-02-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1467         * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
1468         (cp_build_qualified_type): Propogate renaming.
1469         * call.c (convert_like_real): Likewise.
1470         * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
1471         * decl.c (make_typename_type, grokdeclarator): Likewise.
1472         * pt.c (tsubst_friend_function, instantiate_class_template,
1473         tsubst_default_argument, instantiate_decl,
1474         tsubst_initializer_list, tsubst_enum): Likewise.
1475         * semantics.c (finish_template_type): Likewise.
1476         * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
1478 2006-02-07  Dirk Mueller  <dmueller@suse.com>
1480         * typeck.c (build_binary_op): Annotate div-by-zero
1481         warnings to make -Wno-div-by-zero have an effect.
1483 2006-02-07  Mark Mitchell  <mark@codesourcery.com>
1485         PR c++/9737
1486         * pt.c (coerce_template_template_parms): Do not templates with
1487         excess default arguments to match template template parameters
1488         with fewer parameters.
1489         (coerce_template_parms): Add use_default_args parameter; use
1490         default arguments only when true.
1491         (lookup_template_class): Adjust call to coerce_template_parms.
1492         (fn_type_unification): Likewise.
1493         (unify): Likewise.
1494         (get_bindings): Likewise.
1495         (dependent_type_p): Add assertions.
1497 2006-02-06  Roger Sayle  <roger@eyesopen.com>
1499         * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
1500         * rtti.c (typeinfo_in_lib_p): Likewise.
1501         * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
1502         * name-lookup.c (arg_assoc_type): Likewise.
1504 2006-02-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1506         * cp-tree.h (tf_warn_or_error): New substituion flag.
1507         (cp_build_qualified_type): Use it.
1508         * call.c (convert_like_real): Likewise.
1509         * cvt.c (cp_convert_to_pointer): Likewise.
1510         (convert_to_reference): Likewise.
1511         * decl.c (make_typename_type): Likewise.
1512         (grokdeclarator): Likewise.
1513         * pt.c (tsubst_friend_function): Likewise.
1514         (tsubst_friend_class): Likewise.
1515         (instantiate_class_template): Likewise.
1516         (tsubst_default_argument): Likewise.
1517         (instantiate_decl): Likewise.
1518         (tsubst_initializer_list): Likewise.
1519         (tsubst_enum): Likewise.
1520         * semantics.c (finish_template_type): Likewise.
1521         * typeck.c (build_ptrmemfunc): Likewise.
1522         (convert_for_assignment): Likewise.
1524 2006-02-03  Lee Millward  <lee.millward@gmail.com>
1526        * typeck.c (string_conv_p): Pass appropiate
1527        OPT_Wxxxx values when calling warning().
1528        (build_array_ref, cxx_mark_addressable): Likewise.
1529        (check_return_expr): Likewise.
1531        * init.c (perform_member_init): Likewise.
1532        (sort_mem_initializers, emit_mem_initializers): Likewise.
1534        * class.c (check_field_decls): Likewise.
1535        (warn_about_ambiguous_bases): Likewise.
1537        * decl.c (pop_label, poplevel): Likewise.
1538        (duplicate_decls, grok_op_properties): Likewise.
1539        (start_preparsed_function, finish_function): Likewise.
1541        * name-lookup.c (pushdecl_maybe_friend): Likewise.
1542        (pushdecl_maybe_friend): Likewise.
1544        * parser.c (cp_parser_warn_min_max): Likewise.
1545        (cp_parser_cast_expression): Likewise.
1547        * method.c (lazily_declare_fn): Likewise.
1548        * cvt.c (convert_to_void): Likewise.
1549        * mangle.c (finish_mangling): Likewise.
1550        * cp-gimplify.c (gimplify_expr_stmt): Likewise.
1552 2006-02-03  Mark Mitchell  <mark@codesourcery.com>
1554         * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
1555         not IDENTIFIER_OPNAME_P.
1557 2006-01-31  Mark Mitchell  <mark@codesourcery.com>
1559         PR c++/25342
1560         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
1561         documentation.
1562         * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
1563         not TREE_VALUE.
1564         (instantiate_class_template): Simplify.
1565         (verify_class_unification): Remove.
1566         (unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
1567         permit multiple levels of template arguments.
1568         (more_specialized_class): Simplify.
1569         (get_class_bindings): Pass full arguments to unify.  Fold
1570         verify_class_unification into this function.  Return full
1571         arguments.
1572         (most_specialized_class): Adjust for changes to
1573         get_class_bindings.  Issue errors here for ambiguity.  Return the
1574         fully deduced arguments for the most specialized class, in
1575         addition to the partial specialization.
1577 2006-01-31  Ben Elliston  <bje@au.ibm.com>
1579         * mangle.c: Comment fix.
1581 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1583         * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
1584         * repo.c (extract_string, afgets): Use cast when converting from
1585         void *.
1587 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1589         * call.c (alloc_conversion): Use cast when converting from void *.
1590         (alloc_conversions): Likewise.
1591         (add_candidate): Likewise.
1592         (print_z_candidates): Likewise.
1593         (add_warning): Likewise.
1594         * pt.c (retrieve_local_specialization): Likewise.
1595         (process_partial_specialization): Likewise.
1596         (mangle_class_name_for_template): Likewise.
1597         (tsubst_template_args): Likewise.
1598         * typeck2.c (pat_calc_hash): Likewise.
1599         (pat_compare): Likewise.
1600         (abstract_virtuals_error): Likewise.
1601         * class.c (method_name_cmp): Likewise.
1602         (resort_method_name_cmp): Likewise.
1603         (get_vfield_name): Likewise.
1604         * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
1605         * lex.c (init_reswords): Likewise.
1606         * rtti.c (create_pseudo_type_info): Likewise.
1607         * search.c (dfs_lookup_base): Likewise.
1608         (dfs_dcast_hint_pre): Likewise.
1609         (dfs_dcast_hint_post): Likewise.
1610         * tree.c (hash_tree_cons): Likewise.
1611         * repo.c (extract_string): Likewise.
1612         (afgets): Likewise.
1613         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
1614         * g++spec.c (lang_specific_driver): Likewise.
1616 2006-01-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1618         * call.c (joust): Pass option code to warning.  Use inform for
1619         explanation.
1620         * class.c (check_bases): Likewise.
1621         (maybe_warn_about_overly_private_class): Likewise.
1622         (check_field_decls): Likewise.
1623         (layout_empty_base): Likewise.
1624         (layout_virtual_bases): Likewise.
1625         (layout_class_type): Likewise.
1627 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
1629         PR c++/25999
1630         * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
1631         here, not ...
1632         (start_function): ... here.
1634 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
1636         PR c++/25855
1637         * class.c (resolve_address_of_overloaded_function): Adjust use of
1638         return value from most_specialized_instantiation.
1639         * pt.c (determine_specialization): Avoid multiple calls to
1640         get_bindings.
1641         (most_specialized_instantiation): When a tie occurs, set the
1642         current presumed champion to the next template.  Return the
1643         TREE_LIST node containing the template, rather than the template
1644         itself.
1645         (most_specialized): Remove.
1646         * name-lookup.c (push_overloaded_decl): When duplicate_decls
1647         indicates a failed redeclaration, report that to callers.
1649 2006-01-26  Jason Merrill  <jason@redhat.com>
1651         PR c++/16021
1652         * name-lookup.c (parse_using_directive): Require strong using to
1653         name a nested namespace.
1655 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1657         Revert:
1658         * cp-tree.h (do_poplevel): Remove prototype.
1659         * semantics.c (do_poplevel): Add prototype.  Make static.
1661         Revert:
1662         * cp-tree.h (default_conversion): Remove prototype.
1663         * typeck.c (default_conversion): Make static.
1665 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1667         * cp-tree.h (get_primary_binfo): Remove prototype.
1668         (push_using_decl): Likewise.
1669         (current_template_args): Likewise.
1670         (more_specialized_class): Likewise.
1671         (mark_class_instantiated): Likewise.
1672         (default_conversion): Likewise.
1673         (pfn_from_ptrmemfunc): Likewise.
1674         * class.c (get_primary_binfo): Add prototype, make static, simplify.
1675         * name-lookup.c (push_using_decl): Make static.
1676         * pt.c (current_template_args): Likewise.
1677         (more_specialized_class): Likewise.
1678         (mark_class_instantiated): Likewise.
1679         * typeck.c (default_conversion): Make static.
1680         (pfn_from_ptrmemfunc): Add prototype, make static.
1682 2006-01-24  Dirk Mueller  <dmueller@suse.de>
1684         * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
1686 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1688         PR c++/25552
1689         * parser.c (cp_parser_unqualified_id): Check that destructor name
1690         and scope match.
1691         * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
1692         Adjust comment.  Return early if possible.
1693         Use same_type_p to compare types.
1694         * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
1696 2006-01-24  Mark Mitchell  <mark@codesourcery.com>
1698         * semantics.c: Remove outdated comment.
1700 2006-01-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1702         * cp-tree.h (do_poplevel): Remove prototype.
1703         * semantics.c (do_poplevel): Add prototype.  Make static.
1705         * cp-tree.h (original_type): Remove prototype.
1706         * typeck.c (original_type): Make static.
1708         * cp-tree.h (declare_global_var): Remove prototype.
1709         * decl.c (declare_global_var): Make static.
1711         * cp-tree.h (implicitly_declare_fn): Remove prototype.
1712         * method.c (implicitly_declare_fn): Make static.
1714         * cp-tree.h (fold_decl_constant_value): Remove prototype.
1715         * pt.c (fold_decl_constant_value): Make static.
1717         * cp-tree.h (build_x_delete): Remove prototype.
1718         * init.c (build_vec_delete_1): Call build_op_delete_call directly
1719         and not via build_x_delete.
1720         (build_x_delete): Remove.
1722         * cp-tree.h (get_vtt_name): Remove prototype.
1723         * class.c (get_vtt_name): Remove.
1724         (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
1726 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1728         * rtti.c (build_dynamic_cast): Fix comment.
1730 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1732         PR c++/10891
1733         * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
1734         -fno-rtti.
1736 2006-01-21  Mark Mitchell  <mark@codesourcery.com>
1738         PR c++/25895
1739         * class.c (build_base_path): Generate a NOP_EXPR instead of a
1740         COMPONENT_REF if the base and derived classes are at the same
1741         address.
1743         PR c++/25856
1744         * decl.c (begin_destructor_body): Robustify.
1746         PR c++/25858
1747         * parser.c (cp_parser_direct_declarator): Robustify.
1749 2006-01-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1751         * parser.c (cp_lexer_next_token_is_keyword): Simplify.
1753         * parser.c (clear_decl_specs): Remove prototype.
1755         * parser.c (cp_parser_expression_fn): Remove.
1757         * call.c (add_builtin_candidates): Remove superfluous return.
1758         * name-lookup.c (do_toplevel_using_decl): Likewise.
1759         * parser.c (cp_parser_type_specifier_seq): Likewise.
1760         (cp_parser_save_default_args): Likewise.
1762 2006-01-20  Dirk Mueller  <dmueller@suse.com>
1764         PR c++/5520
1765         * semantics.c (finish_if_stmt): Call empty_body_warning.
1766         * parser.c (cp_parser_implicitly_scoped_statement):
1767         Mark empty statement with an empty stmt.
1769 2006-01-19  Mark Mitchell  <mark@codesourcery.com>
1771         PR c++/22136
1772         * name-lookup.c (do_class_using_decl): Don't try to look up base
1773         classes in templates with dependent base types.
1775 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1777         PR c++/25854
1778         * pt.c (maybe_process_partial_specialization): Return early on
1779         error_mark_node.
1781 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1783         PR c++/16829
1784         * decl.c (start_preparsed_function): Check default arguments
1785         unconditionally.
1786         * name-lookup.c (pushdecl_maybe_friend): Check default arguments
1787         of all functions and function templates.
1788         * parser.c (cp_parser_late_parsing_default_args): Check default
1789         arguments.
1790         * decl2.c (check_default_args): Set missing default arguments to
1791         error_mark_node.
1793 2006-01-18  Mark Mitchell  <mark@codesourcery.com>
1795         PR c++/25836
1796         * cp-tree.h (push_class_stack): New function.
1797         (pop_class_stack): Likewise.
1798         * class.c (class_stack_node): Add hidden field.
1799         (pushclass): Clear it.
1800         (push_class_stack): New function.
1801         (pop_class_stack): Likewise.
1802         (currently_open_class): Ignore hidden classes.
1803         (currently_open_derived_class): Likewise.
1804         * name-lookup.c (push_to_top_level): Call push_class_stack.
1805         (pop_from_top_level): Call pop_class_stack.
1807 2006-01-18  Kazu Hirata  <kazu@codesourcery.com>
1809         * tree.c (find_tree_t, find_tree): Remove.
1810         * cp-tree.h: Remove the prototype for find_tree.
1812 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
1814         * search.c (lookup_conversions_r): Fix a pasto.
1816 2006-01-17  Eric Christopher  <echristo@apple.com>
1818         * call.c (convert_like_real): When issuing conversion
1819         warnings, depend on OPT_Wconversion.
1820         * cvt.c (build_expr_type_conversion): Ditto.
1822 2006-01-17  Kazu Hirata  <kazu@codesourcery.com>
1824         * name-lookup.c (lookup_namespace_name): Remove.
1825         * name-lookup.h: Remove the prototype for
1826         lookup_namespace_name.
1828 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
1830         PR c/25682
1831         * decl.c (compute_array_index_type): After issuing not an integral
1832         constant-expression error, set size to 1 to avoid ICEs later on.
1834 2006-01-16  Ian Lance Taylor  <ian@airs.com>
1836         * parser.c: Include "cgraph.h".
1837         (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
1838         assemble_asm.
1840 2006-01-16  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
1842         * g++spec.c (lang_specific_spec_functions): Remove.
1844 2006-01-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1846         * decl.c (check_initializer): Fix thinko.
1848 2006-01-14  Mark Mitchell  <mark@codesourcery.com>
1850         PR c++/25663
1851         * parser.c (cp_parser_direct_declarator): Use cp_parser_error
1852         instead of error.
1854 2006-01-13  Jason Merrill  <jason@redhat.com>
1856         * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
1858         * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
1859         * pt.c (check_explicit_specialization): Likewise.
1861 2006-01-12  Jason Merrill  <jason@redhat.com>
1863         PR libstdc++/24660
1864         * pt.c (check_explicit_specialization): Handle namespace
1865         association.
1866         * name-lookup.c (set_decl_namespace): Likewise.
1868 2006-01-12  Nathan Sidwell  <nathan@codesourcery.com>
1870         PR c++/24824
1871         * class.c (handle_using_decl): Pass correct scope to
1872         cp_emit_debug_info_for_using.
1874 2006-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1876         PR c++/25386
1877         * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
1878         packedness.
1880 2006-01-06  Gabriel Dos Reis  <gdr@integrablesolutions.net>
1882         * parser.c (cp_parser_primary_expression): Document the grammar
1883         for the built-in offsetof, a GNU extension.
1885 2006-01-04  Zdenek Dvorak <dvorakz@suse.cz>
1887         PR c++/25632
1888         * init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
1889         in condition.
1891 2006-01-04  Chris Lattner  <sabre@gnu.org>
1893         * typeck2.c: update copyright to 2006
1894         (split_nonconstant_init_1):  Set TREE_CONSTANT to true.
1896 2006-01-04  Mark Mitchell  <mark@codesourcery.com>
1898         PR c++/24782
1899         * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
1900         checks, even when parsing tentatively.
1902 2006-01-04  Richard Henderson  <rth@redhat.com>
1904         Merge from gomp branch.
1905         * lex.c (handle_pragma_java_exceptions): Fix whitespace.
1906         * parser.c (struct cp_token): Add pragma_kind.
1907         (eof_token): Update to match.
1908         (struct cp_lexer): Add in_pragma; rearrange next for better packing.
1909         (cp_parser_initial_pragma): New.
1910         (cp_lexer_new_main): Use it.  Don't bother clearing
1911         c_lex_return_raw_strings.
1912         (cp_lexer_get_preprocessor_token): Always initialize keyword
1913         and pragma_kind fields.  Handle CPP_PRAGMA.
1914         (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
1915         in_pragma is set.
1916         (cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
1917         (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
1918         (cp_parser_skip_to_pragma_eol): New.
1919         (cp_parser_error): Use it.
1920         (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
1921         rearrange with switch statement.
1922         (cp_parser_skip_to_end_of_statement): Likewise.
1923         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1924         (cp_parser_skip_to_closing_brace): Likewise.
1925         (cp_parser_skip_until_found): Likewise.
1926         (cp_parser_statement): Add in_compound argument; update callers.
1927         Use it to decide how to handle pragma parsing.
1928         (cp_parser_labeled_statement): Add in_compound argument; pass
1929         it on to cp_parser_statement.
1930         (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
1931         (cp_parser_declaration_seq_opt): Likewise.
1932         (cp_parser_parameter_declaration): Likewise.
1933         (cp_parser_member_specification_opt): Likewise.
1934         (cp_parser_function_definition_after_decl): Likewise.
1935         (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
1936         (cp_parser_pragma): New.
1937         (pragma_lex): New.
1939 2006-01-04  Dirk Mueller <dmueller@suse.com>
1941         * decl.c (finish_constructor_body): create simple
1942         compound stmt instead of a if(1) { } construct.
1944 2006-01-03  Mark Mitchell  <mark@codesourcery.com>
1946         PR c++/25492
1947         * name-lookup.c (push_class_level_binding): When a derived class
1948         provides a type binding, eliminate any type binding from a base
1949         class.
1951         PR c++/25625
1952         * repo.c (repo_emit_p): Always instantiate static data members
1953         initialized by constant expressions, so that there values are
1954         available.
1956 2006-01-02  Mark Mitchell  <mark@codesourcery.com>
1958         PR c++/25635
1959         * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
1960         conversion operator.
1961         * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
1963         PR c++/25638
1964         * class.c (add_method): Never associate more than one destructor
1965         with a single class.
1967         PR c++/25637
1968         * cp-tree.h (do_friend): Adjust prototype.
1969         * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
1970         (grokdeclarator): Likewise.  Refine check for invalid
1971         declarations/definitions of member functions outside of their own
1972         class.
1973         * friend.c (do_friend): Make funcdef_flag a bool, not an int.
1975         PR c++/25633
1976         * parser.c (cp_parser_mem_initializer_list): Check result of
1977         cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
1978         (cp_parser_mem_initializer): Return error_mark_node for failure.
1980         PR c++/25634
1981         * parser.c (cp_parser_template_parameter_list): Call
1982         begin_template_parm_list and end_template_parm_list here.
1983         (cp_parser_type_parameter): Not here.
1984         (cp_parser_template_declaration_after_export): Or here.
1985         (cp_parser_elaborated_type_specifier): Call
1986         cp_parser_check_template_parameters.
1988         * tree.c (build_target_expr_with_type): Use force_target_expr.
1990         * decl2.c (mark_used): Fix typo in comment.
1992 2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1994         * parser.c (cp_parser_using_declaration): Skip name-lookup on
1995         invalid scope.
1997 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1999         * cxx-pretty-print.c (pp_cxx_constant): New.  Print
2000         string-literal in parens if input program says so.
2001         (pp_cxx_primary_expression): Hand off constant printing to
2002         pp_cxx_constant.
2003         (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
2004         (pp_cxx_expression): Use pp_cxx_constant for literals.
2005         * error.c (dump_expr): Use pp_constant for literals.
2007 2005-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2009         * method.c (make_thunk): Don't set comdat_linkage here.
2010         (use_thunk): Make thunk one only here, if thunk target is
2011         DECL_ONE_ONLY.
2013 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2015         PR c++/25439
2016         * decl.c (grokdeclarator): Remove dead code.
2017         * ptree.c (cxx_print_xnode): Handle BASELINK.
2018         * parser.c (make_id_declarator): Add sfk parameter.
2019         (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
2020         make_id_declarator.
2021         (cp_parser_declarator_id): Simplify BASELINKs here.
2022         (cp_parser_member_declaration): Adjust calls to
2023         make_id_declarator.
2025 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2027         PR c++/23171, c++/23172, c++/25417.
2028         * typeck.c (build_unary_op): Create temporary variables for
2029         compound literals whose addresses are taken.
2030         * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
2031         * decl.c (reshape_init_vector): Likewise.
2032         (reshape_init): Give it external linkage.
2033         (check_initializer): Use COMPOUND_LITERAL_P.
2034         (initialize_artificial_var): Allow the initializer to be a
2035         CONSTRUCTOR.
2036         * call.c (make_temporary_var_for_ref_to_temp): Use
2037         create_temporary_var.
2038         * cp-tree.h (COMPOUND_LITERAL_P): New macro.
2039         (rehape_init): Declare.
2040         * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
2041         * semantics.c (finish_compound_literal): Use reshape_init.
2043 2005-12-23  Mark Mitchell  <mark@codesourcery.com>
2045         PR c++/24671
2046         * pt.c (instantiate_template): Handle SFINAE.
2048 2005-12-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2050         * decl.c (grokdeclarator): Improve diagnostic for friend
2051         declarations of class members.
2053 2005-12-22  Mark Mitchell  <mark@codesourcery.com>
2055         PR c++/25369
2056         * tree.c (really_overloaded_fn): Tweak comment.
2057         * pt.c (tsubst_call_declarator_parms): Remove.
2058         (tsubst_copy): Call mark_used on the member referenced by an
2059         OFFSET_REF.
2060         * semantics.c (finish_qualified_id_expr): Simplify.
2061         * decl2.c (mark_used): Accept BASELINKs.
2063         PR c++/25364
2064         * typeck.c (build_unary_op): Pass DECLs not names to
2065         build_offset_refs.
2066         * init.c (build_offset_ref): Do not do name lookup.  Do not call
2067         mark_used.
2068         * call.c (build_call): Simplify and tidy.
2069         * semantics.c (finish_qualified_id_expr): Call mark_used.
2071 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2073         PR c++/23333
2074         * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
2075         identify a single '0'.
2077 2005-12-20  Mark Mitchell  <mark@codesourcery.com>
2079         PR c++/21228
2080         * decl.c (use_eh_spec_block): New function.
2081         (store_parm_decls): Use it.
2082         (finish_function): Likewise.
2084 2005-12-19  Mark Mitchell  <mark@codesourcery.com>
2086         PR c++/24278
2087         * init.c (expand_member_init): Print messages about baseclasses
2088         using %T rather than %D.
2090         PR c++/24915
2091         * class.c (add_method): Do not treat templates as identical unless
2092         their return types are the same.
2094 2005-12-12  Mark Mitchell  <mark@codesourcery.com>
2096         PR c++/25300
2097         * tree.c (build_qualified_name): Return error_mark_node for
2098         erroneous input.
2100 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
2102         PR c++/25337
2103         * pt.c (tsubst_copy_and_build): Permit dependent types for the
2104         object in a class member access expression.
2106 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2108         PR java/9861
2109         * mangle.c (write_bare_function_type): Mangle return type for
2110         methods of Java classes
2112 2005-12-08  Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2114         * call.c (build_conditional_expr): Print types in error messages.
2116 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2118         * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
2120 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2122         * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
2124 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2126         * Make-lang.in (c++.all.build, c++.install-normal): Remove.
2128 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2130         * Make-lang.in: Remove all dependencies on s-gtype.
2132 2005-12-06  Aldy Hernandez  <aldyh@redhat.com>
2134        PR C++/24138
2135         * decl.c (reshape_init_array_1): Handle max_index of -1.
2137 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2139         * typeck.c (build_binary_op): Issue warning if either operand of a
2140         comparison operator is a string literal, except for testing equality
2141         or inequality against NULL.
2143 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2145         PR c++/25263
2146         * decl.c (compute_array_index_type): Check that itype is an
2147         INTEGER_CST node before testing/clearing TREE_OVERFLOW.
2149 2005-12-05  Daniel Berlin  <dberlin@dberlin.org>
2151         * ptree.c (cxx_print_decl): Update to check for decl_common
2152         structure.
2154 2005-12-02  Mark Mitchell  <mark@codesourcery.com>
2156         PR c++/24173
2157         * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
2158         clobbering newdecl.
2160 2005-12-02  Richard Guenther  <rguenther@suse.de>
2162         * semantics.c (simplify_aggr_init_expr): Use buildN instead
2163         of build.
2165 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2167         * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
2168         ggc_realloc.
2169         (cp_parser_template_argument_list): Use XRESIZEVEC instead of
2170         xrealloc.
2171         * class.c (pushclass): Likewise.
2173 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2175         * decl2.c (get_priority_info): Use XNEW, not xmalloc.
2176         * decl.c (push_switch): Likewise.
2177         * lex.c (handle_pragma_implementation): Likewise.
2178         * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
2179         not ggc_alloc.
2180         (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
2181         * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
2182         * g++spec.c (lang_specific_driver): Likewise.
2183         * mangle.c (save_partially_mangled_name): Likewise.
2184         * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
2185         (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
2186         (cp_parser_sizeof_operand): Likewise.
2187         * repo.c (open_repo_file, open_repo_file): Likewise.
2189 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2191         * parser.c (cp_parser_make_typename_type): Call make_typename_type
2192         with tf_none instead of magic value 0.
2193         (cp_parser_explicit_instantiation): Call do_type_instantiation
2194         with tf_error instead of magic value 1.
2195         (cp_parser_elaborated_type_specifier): Call make_typename_type
2196         with tf_error instead of magic value 1.
2197         (cp_parser_class_name): Likewise.
2198         (cp_parser_lookup_name): Likewise.
2200 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2202         * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
2203         not RID_MAX.
2205 2005-11-30  Jason Merrill  <jason@redhat.com>
2207         PR c++/21123
2208         * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
2209         parms in a thunk.
2211 2005-11-30  Ben Elliston  <bje@au.ibm.com>
2213         * typeck.c (build_x_unary_op): Correct spelling in error message.
2215 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
2217         PR c++/21166
2218         * class.c (check_field_decls): Only set DECL_PACKED on a field
2219         when its natural alignment is > BITS_PER_UNIT.
2221 2005-11-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2223         PR c++/24979
2224         * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
2226 2005-11-26  Richard Henderson  <rth@redhat.com>
2228         * lex.c: Update for pragma_lex rename.
2229         * parser.c: Likewise.
2231 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2233         PR c++/9278
2234         * decl.c (grokparms): Do not allow typedef-names in a '(void)'
2235         parmlist.
2237 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2239         * typeck2.c (process_init_constructor_union): Remove check for
2240         unnamed union members.
2242 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2244         * name-lookup.c (lookup_name_real): Merge two if's.
2246 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2248         * pt.c (instantiate_class_template): Clean-up.
2250 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2252         * pt.c (template_class_depth_real): Remove. Move functionality to ...
2253         (template_class_depth): ... here, replacing count_specializations
2254         with 0.  Adjust comment.
2256 2005-11-24  Richard Guenther  <rguenther@suse.de>
2257         Dirk Mueller <dmueller@suse.de>
2259         PR c++/14024
2260         * typeck.c (build_reinterpret_cast_1): Use
2261         strict_aliasing_warning.
2263 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2265         PR c++/24235
2266         * pt.c (check_instantiated_args): Reword diagnostic message about
2267         template argument involving local types.
2269 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2271         PR c++/21667
2272         * typeck.c (build_array_ref): Avoid code duplicate.  Use common
2273         C/C++ diagnostic function warn_array_subscript_with_type_char.
2275 2005-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2277         PR c++/22238
2278         * error.c (resolve_virtual_fun_from_obj_type_ref): New.
2279         (dump_expr): Use it in <case CALL_EXPR>.
2281 2005-11-21  Richard Henderson  <rth@redhat.com>
2283         * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
2285         * name-lookup.c (lookup_name): Remove prefer_type argument.
2286         (lookup_name_prefer_type): New.
2287         * decl.c (lookup_and_check_tag): Use them.
2288         * pt.c (tsubst_friend_class): Likewise.
2289         (lookup_template_class): Likewise.
2290         (tsubst_copy_and_build): Likewise.
2291         * name-lookup.h (lookup_name_prefer_type): New.
2292         (lookup_name): Remove declaration.
2294 2005-11-18  Mark Mitchell  <mark@codesourcery.com>
2296         PR c++/8355
2297         * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
2298         set_decl_namespace.
2299         * name-lookup.c (set_decl_namespace):
2301 2005-11-18  Mike Stump  <mrs@apple.com>
2303         * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
2304         * name-lookup.c (lookup_name_two): Remove.
2305         (lookup_name_one): Add.
2306         * name-lookup.h (lookup_name_two): Remove.
2307         (lookup_name_one): Add.
2309 2005-11-15  Jason Merrill  <jason@redhat.com>
2311         PR c++/24580
2312         * method.c (locate_copy): Also use skip_artificial_parms here.
2313         (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
2314         for RECORD_TYPE.
2315         (locate_ctor): Abort if we fail to find a default constructor.
2317 2005-11-15  Mike Stump  <mrs@apple.com>
2319         * name-lookup.c (lookup_name_two): Add.
2320         * name-lookup.h: Likewise.
2322 2005-11-15  Mark Mitchell  <mark@codesourcery.com>
2324         PR c++/24667
2325         * typeck.c (check_for_casting_away_constness): Use the diag_fn.
2326         (build_const_cast_1): Call it, for C-style casts.
2328 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
2330         PR c++/24687
2331         * pt.c (check_explicit_specialization): Don't check for C linkage.
2332         (push_template_decl_real): Likewise.
2333         * parser.c (cp_parser_explicit_specialization): Check here.
2334         (cp_parser_template_declaration_after_export): And here.
2336         * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
2337         field.
2339 2005-11-14  Jason Merrill  <jason@redhat.com>
2341         PR c++/24580
2342         * method.c (locate_ctor): Skip all artificial parms, not just
2343         'this'.
2345 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
2347         * parser.c (eof_token): Add initializer for ambiguous_p.
2349 2005-11-13  Mark Mitchell  <mark@codesourcery.com>
2351         PR c++/24817
2352         * decl.c (check_redeclaration_exception_specification): New
2353         function.
2354         (duplicate_decls): Use it.
2355         * error.c (fndecl_to_string): Print the template parameter list.
2357         PR c++/20293
2358         * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
2359         for namespaces.
2360         (pp_cxx_original_namespace_definition): Likewise.
2361         * name-lookup.c (ambiguous_decl): Don't issue error messages;
2362         instead return lists of ambiguous candidates.
2363         (select_decl): Handle ambiguous namespace lookups.
2364         * parser.c (cp_token): Add ambiguous_p.
2365         (cp_lexer_get_preprocessor_token): Set it.
2366         (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
2367         when a qualified name uses an invalid scope.
2368         (cp_parser_primary_expression): Print ambiguous candidates.
2369         (cp_parser_type_parameter): Adjust comment to reflect new
2370         parameter name for cp_parser_lookup_name.
2371         (cp_parser_template_argument): Likewise.
2372         (cp_parser_elaborated_type_specifier): Likewise.
2373         (cp_parser_namespace_name): Likewise.
2374         (cp_parser_class_name): Print ambiguous candidates.
2375         (cp_parser_lookup_name): Rename ambiguous_p parameter to
2376         ambiguous_decls.  Use it to return a list of ambiguous candiates
2377         when a lookup is ambiguous.
2378         (cp_parser_lookup_name_simple): Adjust comment to reflect new
2379         parameter name for cp_parser_lookup_name.
2381 2005-11-12  Jakub Jelinek  <jakub@redhat.com>
2383         PR c++/24780
2384         * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
2385         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
2386         of array type.
2388         PR c++/24761
2389         * pt.c (tsubst_copy_asm_operands): New function.
2390         (tsubst_expr) <case ASM_EXPR>: Use it.
2392 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
2394         PR c++/19450
2395         * decl.c (redeclaration_error_message): Issue diagnostics about
2396         olddecl and newdecl disagreement on __thread property.
2397         (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
2399 2005-11-08  Jason Merrill  <jason@redhat.com>
2401         PR c++/21123
2402         * method.c (use_thunk): Use build_cplus_new instead of
2403         force_target_expr.
2405 2005-11-06  Jason Merrill  <jason@redhat.com>
2406             James A. Morrison <phython@gcc.gnu.org>
2408         PR c++/17256
2409         * decl2.c (cp_finish_file): Fix conditions for undefined warning.
2410         Set TREE_NO_WARNING instead of TREE_PUBLIC.
2411         * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
2412         a warning on a function we didn't instantiate because of excessive
2413         recursion.
2415 2005-11-06  Mark Mitchell  <mark@codesourcery.com>
2417         * class.c (record_subobject_offsets): Don't record offsets past
2418         biggest empty class for non-empty base classes.
2419         (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
2420         keeping track of the size of emptyclasses.
2422         PR c++/21308
2423         * class.c (sizeof_biggest_empty_class): New variable.
2424         (record_subobject_offsets): Don't record offsets past biggest
2425         empty class for data members.  Replace vbases_p parameter with
2426         is_data_member parameter.
2427         (build_base_field): Adjust call.
2428         (layout_class_type): Likewise.  Maintain
2429         sizeof_biggest_empty_class.
2431 2005-11-05  Kazu Hirata  <kazu@codesourcery.com>
2433         * decl2.c, init.c, typeck.c: Fix comment typos.
2435 2005-11-04  Richard Guenther  <rguenther@suse.de>
2437         PR c++/22487
2438         * init.c (build_vec_init): Build comparison of matching
2439         types.
2441 2005-11-03  Josh Conner  <jconner@apple.com>
2443         PR c++/19989
2444         pt.c (tsubst): Accept zero-length array if tf_error is set
2445         in complain flags.  Change error message for negative-
2446         length array.
2448 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
2450         * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
2451         parameter.
2453 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
2455         PR c++/17964
2456         * error.c (cp_cpp_error): New function.
2457         * cp-tree.h (cp_cpp_error): Declare.
2458         * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
2459         and error callback after lexing.
2461 2005-11-03  Mark Mitchell  <mark@codesourcery.com>
2463         PR c++/21627
2464         * pt.c (register_specialization): Update inline flags on clones.y
2466 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
2468         PR c++/24582
2469         * decl.c (declare_local_label): Return 0 for variables
2470         with error_mark_node as their types.
2472 2005-11-02  Mark Mitchell  <mark@codesourcery.com>
2474         PR c++/22434
2475         * call.c (build_conditional_expr): Do bad conversions, if there's
2476         no other choice.
2478         PR c++/24560
2479         * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
2480         message for use of overloaded functions on LHS of "." operator.
2482         PR c++/19253
2483         * parser.c (cp_parser_postfix_expression): Use
2484         cp_parser_elaborated_type_specifier to handle typename-types in
2485         functional casts.
2486         (cp_parser_enclosed_argument_list): Skip ahead to the end of the
2487         template argument list if the closing ">" is not found.
2489         PR c++/24569
2490         * pt.c (instantiate_decl): Use cp_finish_decl, not
2491         finish_static_data_member_decl.
2493 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
2495         * decl.c (grokfndecl): Remove the setting
2496         of the return type of the function type
2497         of main after erroring about must returning
2498         int.
2500 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
2502         PR C++/23229
2503         * decl.c (grokfndecl): Create a new function type
2504         after erroring out about main not returning int.
2506 2005-10-28  Josh Conner  <jconner@apple.com>
2508         PR c++/22153
2509         * parser.c (cp_parser_member_declaration): Detect and handle
2510         a template specialization.
2512 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
2514         PR C++/23426
2515         * decl.c (start_decl): Check that the decl is an
2516         error_mark_node before getting the type.
2517         Remove the check for the decl's type being an
2518         error_mark_node.
2520 2005-10-21  Mark Mitchell  <mark@codesourcery.com>
2522         PR c++/24260
2523         * parser.c (cp_parser_init_declarator): Pass attributes to
2524         grokfield.
2526 2005-10-20  Mark Mitchell  <mark@codesourcery.com>
2528         PR c++/22618
2529         * search.c (accessible_p): Check access in the outermost set of
2530         template parameters.
2532 2005-10-20  Richard Guenther  <rguenther@suse.de>
2534         * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
2536 2005-10-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2538         PR c++/22293
2539         * decl.c (grokdeclarator): Reject unqualified destructors in
2540         friend declarations.
2542 2005-10-18  Mark Mitchell  <mark@codesourcery.com>
2544         PR c++/23293
2545         * pt.c (convert_template_argument): Use canonical type variants in
2546         template specializations.
2548 2005-10-18  Nathan Sidwell  <nathan@codesourcery.com>
2550         PR c++/21383
2551         * name-lookup.c (arg_assoc): Template args can be null in a
2552         template-id-expr.
2554         PR c++/22604
2555         * class.c (update_vtable_entry_for_fn): Don't process invalid
2556         covariant overriders.
2558         PR c++/23118
2559         * cp-tree.h (add_method): Add return value.
2560         * class.c (add_method): Return success indicator.
2561         * semantics.c (finish_member_declaration): Don't add an invalid
2562         method to the method list.
2564 2005-10-17  Mark Mitchell  <mark@codesourcery.com>
2566         PR c++/21908
2567         * call.c (build_new_method_call): Do not show VTT parameters to
2568         the user.
2570 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2572         PR c++/23440
2573         * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
2574         only complain about missing statement.
2576 2005-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2578         PR c++/24386
2579         * cp-tree.h (BASELINK_QUALIFIED_P): New.
2580         * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
2581         * typeck.c (finish_class_member_access_expr): Set it.
2583         PR c++/21353
2584         * decl.c (check_default_argument): Don't check
2585         processing_template_decl or uses_template_parms here.
2586         (grokparms): Only call check_default_argument when not processing
2587         a template decl.
2588         * parser.c (cp_parser_late_parsing_default_arg): Call
2589         check_default_argument when not processing a template decl.
2591 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
2593         PR c++/24389
2594         * decl2.c (mark_used): Use uses_template_parms instead of
2595         dependent_type_p.
2596         * init.c (constant_value_1): Handle uninstantiated templates
2597         specially.
2598         * pt.c (instantiate_decl): Add sanity check.
2600 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
2602         PR c++/22173
2603         * typeck.c (check_template_keyword): Fix thinko.
2605 2005-10-16  Andrew Pinski  <pinskia@physics.uc.edu>
2607         PR c++/23959
2608         * decl.c (pop_switch): Only call c_do_switch_warnings
2609         when not processing templates.
2611 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
2613         PR c++/22173
2614         * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
2615         (check_template_keyword): New function.
2616         (finish_id_expression): Change prototoype.
2617         (finish_qualified_id_expr): Change prototype.
2618         (build_qualified_name): New function.
2619         (finish_class_member_access_expr): Change prototype.
2620         * init.c (build_offset_ref): Use build_qualified_name.
2621         * mangle.c (write_expression): Likewise.
2622         * parser.c (cp_parser_primary_expression): Remove qualifying_class
2623         parameter.  Add address_p and template_arg_p.  Use
2624         build_qualified_name.
2625         (cp_parser_id_expression): Default *template_p to
2626         template_keyword_p.  Check for invalid uses of the template
2627         keyword.
2628         (cp_parser_postfix_expression): Eliminate special handling for
2629         qualified names.  Adjust call to cp_parser_primary_expression.
2630         (cp_parser_postfix_dot_deref_expression): Adjust call to
2631         cp_parser_id_expression and finish_class_member_access_expr.
2632         (cp_parser_template_argument_list): Add comment.
2633         (cp_parser_template_argument): Adjust use of
2634         cp_parser_primary_expression.  Remove call to
2635         finish_qualified_id_expr.
2636         (cp_parser_lookup_name): Use build_qualified_name.
2637         * pt.c (tsubst): Use build_qualified_name.
2638         (tsubst_qualified_id): Likewise.  Adjust call to
2639         finish_qualified_id_expr.
2640         (tsubst_copy): Use build_qualified_name.
2641         (tsubst_copy_and_build): Adjusts call to finish_id_expression and
2642         finish_class_member_access_expr.
2643         * semantics.c (finish_non_static_data_member): Use
2644         build_qualified_name.
2645         (finish_qualified_id_expr): Add template_p and template_arg_p
2646         parameters.
2647         (finish_id_expression): Remove qualifiying_class parameter.  Add
2648         template_p, done, address_p, and template_arg_p.  Use
2649         build_qualified_name.  Adjust calls to
2650         finish_class_member_acess_expr.
2651         * tree.c (build_qualified_name): New function.
2652         * typeck.c (check_template_keyword): New function.
2653         (finish_class_member_access_expr): Add template_p argument.  Check
2654         for invalid uses of the template keyword.
2656 2005-10-15  Mark Mitchell  <mark@codesourcery.com>
2658         PR c++/21347
2659         * class.c (maybe_warn_about_overly_private_class): Lazy
2660         constructors are public.
2662 2005-10-14  Mark Mitchell  <mark@codesourcery.com>
2664         PR c++/19565
2665         * call.c (convert_like_real): Rely on convert_and_check to issue
2666         warnings about overflow and conversion to unsigned.
2667         * decl.c (finish_enum): Use the location of the enumerators, not
2668         the closing brace of the enumeration, when reporting warnings
2669         about conversions.
2670         (build_enumerator): Use error_mark_node for erroneous values.
2671         * typeck2.c (digest_init): Remove reference to "signature pointer"
2672         from comment.
2674 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
2676         PR c++/17796
2677         * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
2678         (maybe_clone_body): Track the first clone.
2680 2005-10-13  Nathan Sidwell  <nathan@codesourcery.com>
2682         PR c++/23984
2683         * class.c (build_base_path): The vtable is always the first thing
2684         in the vtt.
2686 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
2688         PR c++/20721
2689         * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
2690         * decl.c (duplicate_decls): Merge it into new declarations.
2691         (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
2692         (cp_finish_decl): Set it, when appropriate.
2694         PR c++/22180
2695         * call.c (build_new_method_call): Correct pretty-printing of
2696         destructor names.
2697         * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
2698         identifier.
2700         PR c++/23694
2701         * decl.c (start_method): Return error_mark_node for errors.
2703         PR c++/23307
2704         * pt.c (push_template_decl_real): Complain about attempts to
2705         declare template variables.
2707         PR c++/22352
2708         * pt.c (tsubst_template_parms): Set processing_template_decl while
2709         processing the parameters.
2710         (tsubst_decl): Set processing_template_decl when substituting into
2711         a TEMPLATE_DECL.
2713         PR c++/22405
2714         * pt.c (most_specialized_instantiation): Robustify.
2716         PR c++/22464
2717         * semantics.c (finish_id_expression): Issue errors about uses of
2718         local variables in containing functions even in templates.
2720 2005-10-12  Danny Smith  <dannysmith@users.sourceforge.net>
2722         PR target/21801
2723         PR target/23589
2724         * class.c (finish_struct_1): Call
2725         targetm.cxx.adjust_class_at_definition.
2728 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2730         PR c++/21592
2731         * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
2732         with already looked up member functions.  Assert we're not
2733         returning a NON_DEPENDENT_EXPR with unknown type.
2734         * typeck.c (finish_class_member_access_expr):  We can get
2735         non-template-id-expr baselinks.  If the lookup finds a baselink,
2736         remember it even inside templates.
2738         PR c++/23797
2739         * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
2740         TYPE_DECL.  Use dependent_type_p to check type.
2741         * pt.c (uses_template_parms_p): Use dependent_type_p for a
2742         TYPE_DECL.
2743         (type_dependent_expression_p): Assert we've not been given a
2744         TYPE_DECL.
2746         PR c++/21117
2747         * decl.c (check_function_type): Correctly overwrite incomplete
2748         return type with void type.
2749         * typeck.c (check_return_expr): If the function's return type is
2750         void, don't try and convert a return expr.
2752 2005-10-12  David Edelsohn  <edelsohn@gnu.org>
2754         PR c++/23730
2755         * call.c (build_object_call): If BINFO is NULL, bypass
2756         lookup_fnfields and set fns to NULL_TREE.
2758 2005-10-12  Paolo Bonzini  <bonzini@gnu.org>
2760         PR c++/24052
2761         * error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
2762         an ADDR_EXPR of a LABEL_DECL as &&.
2764 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2766         PR c++/19964
2767         * class.c (walk_subobject_offsets): Don't walk error_mark_node.
2769 2005-10-11  Ian Lance Taylor  <ian@airs.com>
2771         PR c++/8057
2772         * cvt.c (convert_to_void): Don't warn about unused values when
2773         processing a template declaration.
2775 2005-10-11  Mark Mitchell  <mark@codesourcery.com>
2777         PR c++/21089
2778         * call.c (convert_like_real): Use decl_constant_value, not
2779         integral_constant_value.
2780         * init.c (constant_value_1): New function.
2781         (integral_constant_value): Use it.
2782         (decl_constant_value): Likewise.
2783         * typeck.c (decay_conversion): Use decl_constant_value, not
2784         integral_constant_value.
2786         PR c++/21369
2787         * parser.c (cp_parser_elaborated_type_specifier): Don't treat
2788         class types as templates if the type is not appearing as part of a
2789         type definition or declaration.
2791 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
2793         PR c++/24277
2794         * pt.c (instantiate_decl): Call finish_static_data_member_decl for
2795         static data members.
2797 2005-10-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2798             Mark Mitchell  <mark@codesourcery.com>
2800         PR c++/23437
2801         * parser.c (cp_parser_template_argument_list): Do not treat
2802         contents of argument list as part of a constant expression.
2804 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
2806         PR c++/24139
2807         * decl.c (grokdeclarator): Do not require template parameter lists
2808         for explicitly specialized class.
2809         * error.c (dump_aggr_type): Do not dump template arguments for
2810         non-primary specializations.
2811         (dump_function_name): Likewise.
2813         PR c++/24275
2814         * pt.c (instantiate_decl): Instantiate the initializer of
2815         a static data member in the namespace containing the class
2816         containing the static data member.
2818 2005-10-08  James A. Morrison  <phython@gcc.gnu.org>
2820         PR c++/22172
2821         * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
2822         scopes as nondependent.
2824 2005-10-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2826         * call.c (resolve_args): Remove redundant test.
2828 2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
2830         PR tree-optimization/21419
2831         PR tree-optimization/24146
2832         PR tree-optimization/24151
2834         * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
2835         read-only.  Set ASM_VOLATILE_P for asms without outputs.
2837 2005-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2839         PR c++/23513
2840         * call.c (joust): Adjust length count to more_specialized_fn.
2841         * pt.c (more_specialized_fn): Cope with non-static member vs
2842         non-member.
2844 2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
2846         PR middle-end/23125
2847         * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
2848         instead of change_decl_assembler_name.
2850 2005-10-03  Alexandre Oliva  <aoliva@redhat.com>
2852         * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
2854 2005-10-03  Mark Mitchell  <mark@codesourcery.com>
2856         PR c++/17775
2857         * repo.c: Include flags.h.
2858         (finish_repo): Add -frandom-seed to the arguments.
2860 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
2862         PR c++/22621
2863         * parser.c (cp_parser_template_argument): Don't turn "T::f" into
2864         "(*this).T::f".
2865         * pt.c (convert_nontype_argument): Remove ??? comment.
2867         PR c++/23840
2868         * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
2869         when class rvalues are lvalues.
2871 2005-09-28  Mark Mitchell  <mark@codesourcery.com>
2873         PR c++/16782
2874         * decl.c (grokdeclarator): Always pedwarn about overqualified
2875         member names.
2877 2005-09-27  Mark Mitchell  <mark@codesourcery.com>
2879         PR c++/22147
2880         * name-lookup.c (maybe_process_template_type_declaration): Don't
2881         treat forward declarations of classes as templates just because
2882         we're processing_template_decl.
2883         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
2884         functions.
2886 2005-09-26  Jason Merrill  <jason@redhat.com>
2888         PR c++/13764
2889         * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
2890         * name-lookup.c (pushdecl_maybe_friend): Check it.
2891         * decl.c (begin_function_body): Do nothing if it's false.
2892         (finish_function_body): Ditto.
2893         (outer_curly_brace_block): New fn.
2894         (finish_function): Use it.
2896 2005-09-26  Richard Guenther  <rguenther@suse.de>
2898         PR middle-end/15855
2899         * decl2.c (do_static_destruction): Remove.
2900         (finish_static_initialization_or_destruction): Likewise.
2901         (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
2902         (NEEDS_GUARD_P): Likewise.
2903         (do_static_initialization): Rename to
2904         do_static_initialization_or_destruction.  Process all
2905         initializers/destructors and handle common conditionalizing.
2906         (start_static_initialization_or_destruction): Rename to
2907         one_static_initialization_or_destruction.  Handle only
2908         decl-specific conditionalizing.
2909         (cp_finish_file): Call do_static_initialization_or_destruction.
2911 2005-09-22  Jakub Jelinek  <jakub@redhat.com>
2913         PR c++/21983
2914         * class.c (find_final_overrider): Move diagnostic about no unique final
2915         overrider to...
2916         (update_vtable_entry_for_fn): ... here.
2918 2005-09-21  Mark Mitchell  <mark@codesourcery.com>
2920         PR c++/23993
2921         * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
2923 2005-09-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2925         PR c++/23965
2926         * call.c (resolve_args): Return error_mark_node on arguments
2927         whose TREE_TYPE is error_mark_node.
2929 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
2931         PR c++/23947
2932         * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
2933         get_tinfo_ptr calls.
2935 2005-09-16  Mark Mitchell  <mark@codesourcery.com>
2937         PR c++/23914
2938         * parser.c (cp_parser_enclosed_template_argument_list): Make sure
2939         skip_evaluation is false when processing template arguments.
2941         PR c++/21514
2942         * pt.c (check_instantiated_args): Treat uses of anonymous types as
2943         causing type-deduction failure.
2945 2005-09-15  Jason Merrill  <jason@redhat.com>
2947         PR c++/23357
2948         * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
2949         tcc_expression.
2951 2005-09-15  Mark Mitchell  <mark@codesourcery.com>
2953         PR c++/23896
2954         * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
2955         processing template arguments.
2957         * pt.c (check_explicit_instantiation_namespace): Fix typo.
2959         PR c++/13140
2960         * decl.c (check_class_member_definition_namespace): New function.
2961         (grokfndecl): Use it.
2962         (grokvardecl): Likewise.
2963         (grokdecl): Improve documentation.
2964         * pt.c (check_explicit_instantiation_namespace): New function.
2965         (register_specialization): Call check_specialization_namespace
2966         when replacing an implicitly instantiated function.
2967         (check_explicit_specialization): Ensure that DECL_CONTEXT is set
2968         correctly for namespace-scope specializations.
2969         (do_decl_instantiation): Use
2970         check_explicit_instantiation_namespace.
2971         (do_type_instantiation): Likewise.
2973 2005-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2975         PR c++/23725
2976         * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
2978 2005-09-13  Bastian Blank <waldi@debian.org>
2980         PR c++/16171
2981         * mangle.c (find_substitution): Do not use special substitutions
2982         for identifiers not in std::.
2984 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
2986         PR c++/23839
2987         * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
2988         for VAR_DECLs.
2990 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
2992         PR c++/23842
2993         * pt.c (tsubst_default_argument): Do treat default argument
2994         expressions as occurring in the context of the function called.
2996 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
2998         PR c++/23841
2999         * parser.c (cp_parser_primary_expression): Recognize the closing
3000         ">" of a template-argument-list after a floating-point literal as
3001         the end of a cast expression.
3003 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
3005         PR c++/23789
3006         * cvt.c (perform_qualification_conversions): Don't create
3007         unnecessary NOP_EXPRs.
3008         * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
3010 2005-09-12  Ian Lance Taylor  <ian@airs.com>
3012         PR g++/7874
3013         * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
3014         bitfield.  Make dummy bitfield one bit smaller.
3015         (DECL_HIDDEN_FRIEND_P): Define.
3016         (pushdecl_maybe_friend): Declare.
3017         (pushdecl_top_level_maybe_friend): Declare.
3018         * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
3019         Change prototype and all callers.  Add assertion that a
3020         DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P.  Set
3021         DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
3022         appropriate.
3023         * name-lookup.c (supplement_binding): Don't ignore a
3024         DECL_HIDDEN_FRIEND_P.
3025         (pushdecl_maybe_friend): Break out contents of pushdecl.  Add
3026         is_friend parameter.  Set DECL_ANTICIPATED and
3027         DECL_HIDDEN_FRIEND_P for a friend function.
3028         (pushdecl): Just call pushdecl_maybe_friend.
3029         (pushdecl_with_scope): Add is_friend parameter.  Change prototype
3030         and all callers.
3031         (pushdecl_namespace_level): Likewise.
3032         (push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
3033         well as DECL_ANTICIPATED when checking for a builtin.
3034         (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
3035         DECL_ANTICIPATED when checking for a builtin.
3036         (do_nonmember_using_decl): Likewise.
3037         (pushdecl_top_level_1): Add is_friend parameter.  Change all
3038         callers.
3039         (pushdecl_top_level_maybe_friend): New function.
3040         (remove_hidden_names): New function.
3041         (struct arg_lookup): Add args field.
3042         (friend_of_associated_class_p): New static function.
3043         (arg_assoc_namespace): Ignore hidden functions which are not
3044         friends of an associated class of some argument.
3045         (lookup_arg_dependent): Remove hidden functions from list passed
3046         in.  Initialize k.args.
3047         * name-lookup.h (remove_hidden_names): Declare.
3048         * friend.c (do_friend): Call pushdecl_maybe_friend instead of
3049         pushdecl.
3050         * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
3051         an assertion, with a check for DECL_HIDDEN_FRIEND_P.
3052         (build_new_function_call): Add koenig_p parameter.  Change
3053         prototype and callers.
3054         * pt.c (register_specialization): Add is_friend parameter.  Change
3055         all callers.
3056         (push_template_decl_real): Change is_friend parameter to bool.
3057         Change prototype and all callers.
3058         (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
3059         instead of pushdecl_top_level.
3061 2005-09-11  Richard Henderson  <rth@redhat.com>
3063         * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
3064         * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
3066 2005-09-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3068         * parser.c (cp_parser_translation_unit): Simplify.  The while-block
3069         was actually executed at most once.
3071 2005-09-09  Richard Henderson  <rth@redhat.com>
3073         PR debug/20998
3074         * cp-tree.def (ALIAS_DECL): Remove.
3075         * cp-lang.c (cp_init_ts): Remove support for it.
3076         * error.c (dump_decl): Likewise.
3077         * name-lookup.c (pushdecl): Likewise.
3078         * semantics.c (finish_id_expression): Likewise.
3079         * decl2.c (build_anon_union_vars): Use a VAR_DECL with
3080         DECL_VALUE_EXPR instead.
3082 2005-09-09  Mark Mitchell  <mark@codesourcery.com>
3084         PR c++/22252
3085         * decl.c (start_preparsed_function): Do not pay attention to
3086         #pragma interface for implicitly-defined methods.
3087         * decl2.c (cp_finish_file): Do not complain about uses of inline
3088         functions that have bodies, even if we decided not to emit the
3089         body in this translation unit.
3090         * semantics.c (note_decl_for_pch): Do not mess with linkage.
3091         (expand_or_defer_fn): Make inline, non-template functions COMDAT
3092         at this point.
3094 2005-09-08  Richard Henderson  <rth@redhat.com>
3096         PR debug/23190
3097         * decl.c (wrapup_globals_for_namespace): Call
3098         emit_debug_global_declarations.
3099         * decl2.c (cp_finish_file): Likewise.
3101 2005-09-08  Mark Mitchell  <mark@codesourcery.com>
3103         PR c++/23691
3104         * decl2.c (mark_used): Instantiate static data members initialized
3105         by constants, even in a template.
3107 2005-09-08  Andrew Pinski  <pinskia@physics.uc.edu>
3109         PR obj-c++/16816
3110         * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
3111         two CPP_COLON.
3113 2005-09-07  Richard Guenther  <rguenther@suse.de>
3115         * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
3116         for EMPTY_CLASS_EXPR.
3118 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3120         PR c/23075
3121         * typeck.c (check_return_expr): Add no_warning argument.  Set
3122         *no_warning to true if "return-statement with no value, in function
3123         returning" warning has been issued.
3124         * cp-tree.h (check_return_expr): Adjust prototype.
3125         * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
3126         check_return_expr set *no_warning to true.
3128 2005-09-06  Mark Mitchell  <mark@codesourcery.com>
3130         * cp-tree.h (rvalue): New function.
3131         * call.c (build_conditional_expr): Use it.
3132         * init.c (build_new_1): Likewise.
3133         * rtti.c (build_dynamic_cast_1): Likewise.
3134         * tree.c (rvalue): New function.
3135         * typeck.c (build_unary_op): Use it.
3136         (build_static_cast_1): Likewise.
3138         PR c++/9782
3139         * init.c (build_new_1): Make sure the entire array type is
3140         complete, not just its element types.
3142 2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3144         * decl.c (check_elaborated_type_specifier): Remove redundant check.
3146 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3148         PR c++/23056
3149         * typeck.c (ignore_overflows): New helper function.
3150         (build_static_cast_1): Use it.
3152 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3154         * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
3155         Follow spelling conventions.
3157 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3159         PR c++/23667
3160         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
3161         copying a VAR_DECL.
3163 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3165         PR c++/21440
3166         * semantics.c (finish_stmt_expr_expr): Add an explicit
3167         initialization to the last statement in the statement-expression.
3168         * (finish_stmt_expr): Adjust accordingly.
3170 2005-09-03  Mark Mitchell  <mark@codesourcery.com>
3172         PR c++/23699
3173         * decl2.c (mark_used): Always instantiate static data members
3174         initialized by constant expressions.
3175         * pt.c (instantiate_decl): Instantiate the initializers for static
3176         data members initialized by constant expressions.
3178         PR c++/21687
3179         * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
3180         finishing processing for a template function in a local class.
3181         Revert:
3182         2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3183         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3184         around functions in local classes.
3186 2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3188         PR c++/21687
3189         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3190         around functions in local classes.
3192 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
3194         PR obj-c++/23640
3195         * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
3196         init, call generate_ctor_or_dtor_function.
3198 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3200         PR c++/13377
3201         * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
3202         lookup_name_real on final parse.
3204 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3206         PR c++/23639
3207         * semantics.c (qualified_name_lookup_error): Do not complain again
3208         on invalid scope.
3210 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3212         PR c++/23586
3213         * parser.c (cp_parser_namespace_name): Move diagnostic for
3214         invalid namespace-name to here from ...
3215         * name-lookup.c (do_namespace_alias): ... here and ...
3216         (do_using_directive): ... here.  Remove dead code.
3218 2005-08-28  Mark Mitchell  <mark@codesourcery.com>
3220         PR c++/23099
3221         * cp-tree.h (saved_scope): Add skip_evaluation.
3222         * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
3223         DECL_INITIAL, to determine whether or not a static data member was
3224         initialized in the class-specifier.
3225         (cp_finish_decl): Add comment.
3226         * init.c (integral_constant_value): Subtitute into the
3227         initializers for static data members in templates.
3228         * name-lookup.c (push_to_top_level): Save skip_evaluation.
3229         (pop_from_top_level): Restore it.
3230         * pt.c (instantiate_class_template): Do not substitute into the
3231         intializers of static data members when instantiating a class.
3232         (regenerate_decl_from_template): Simplify.
3233         (instantiate_decl): Tidy.  Substitute into the initializer for a
3234         static data member even when the definition of the data member is
3235         not available.
3237 2005-08-26  Mark Mitchell  <mark@codesourcery.com>
3239         PR c++/19004
3240         * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
3241         (type_dependent_expression_p): Allow BASELINKs whose associated
3242         functions are simply a FUNCTION_DECL.
3244         PR c++/23491
3245         * cp-tree.h (build_vec_init): Adjust prototype.
3246         * init.c (perform_member_init): Adjust call to build_vec_init.
3247         (build_aggr_init): Likewise.
3248         (build_new_1): Do not call build_default_init for array types.
3249         (build_vec_init): Add explicit_default_init_p parameter.  Perform
3250         default initialization of vector elements when set.
3251         * typeck.c (build_modify_expr): Adjust call to build_vec_init.
3253 2005-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3255         PR c++/20817
3256         * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
3257         ->*.
3259 2005-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3261         PR c++/22454
3262         * parser.c (cp_lexer_peek_nth_token): Relax assert.
3264 2005-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3266         PR c++/23044
3267         * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
3269 2005-08-22  James E Wilson  <wilson@specifix.com>
3271         PR tree-optimization/23426
3272         * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
3273         array size check.
3275 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3277         PR c++/22233
3278         * pt.c (push_template_decl_real): Return error_mark_node if the
3279         number of template parameters does not match previous definition.
3281 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3283         PR c++/23089
3284         * decl.c (require_complete_types_for_parms): Mark incomplete types
3285         as invalid.
3287 2005-08-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3289         * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
3290         Fix typo in leading comment.
3292 2005-08-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3294         * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
3296 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
3298         * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
3299         * call.c (add_template_candidate_real): Pass down 'flags' to
3300         fn_type_unification.
3301         (can_convert_arg): New 'flags' argument. Pass it to call to
3302         implicit_conversion instead of LOOKUP_NORMAL.
3303         (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
3304         * class.c (resolve_address_of_overloaded_function): Ditto.
3305         (resolve_address_of_overloaded_function): Ditto.
3306         * decl.c (reshape_init, check_default_argument): Ditto.
3307         * typeck.c (build_ptrmemfunc): Ditto.
3308         * pt.c (type_unification_real): Add 'flags' argument.
3309         (fn_type_unification): Pass 'flags' to type_unification_real.
3310         (type_unification_real): Pass new 'flags' argument to call to
3311         can_convert_arg.
3313 2005-08-12  Giovanni Bajo  <giovannibajo@libero.it>
3314             Nathan Sidwell  <nathan@codesourcery.com>
3316         PR c++/21799
3317         PR c++/8271
3318         * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
3319         explicitly.
3321 2005-08-12  Nathan Sidwell  <nathan@codesourcery.com>
3323         PR c++/21799
3324         Revert my 2005-07-08 patch
3325         * pt.c (type_unification_real): Remove is_method_argument and
3326         assoicated checks.
3327         (fn_type_unification, unify): Adjust type_unification_real calls.
3329 2005-08-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3331         PR c++/23266
3332         * decl2.c (grokfield): Check that method is not static before
3333         marking it as pure.
3335 2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3337         PR c++/23219
3338         * name-lookup.c (pushtag): Process the template type before
3339         altering the identifier lookup fields.  Remove unreachable code
3340         creating an empty stub decl.
3342 2005-08-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3344         PR c++/20646
3345         * decl.c (grokdeclarator): Reset storage_class after error.
3347 2005-08-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3349         PR c++/22508
3350         * init.c (build_new_1): Check for empty candidate list.
3352 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3354         PR c++/23191
3355         * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
3356         before calling build_exception_variant.
3358 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3360         PR c++/19498
3361         * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
3362         if substitution of template args did not succeed.
3364 2005-08-06  Michael Matz  <matz@suse.de>
3366         * method.c (use_thunk): Call init_insn_lengths.
3368 2005-08-05  James A. Morrison  <phython@gcc.gnu.org>
3370         PR c++/22514
3371         * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
3372         sorrycount or errorcount are nonzero.
3374 2005-08-05  Mark Mitchell  <mark@codesourcery.com>
3376         * name-lookup.c (pushtag): Remove accidental commit from:
3377         2004-12-21  Mark Mitchell  <mark@codesourcery.com>
3378         PR c++/19063
3379         * decl.c (grokdeclarator): Return error_mark_node, not
3380         void_type_node, to indicate errors.
3381         * parser.c (cp_parser_template_parameter_list): Robustify.
3382         (cp_parser_template_parameter): Likewise.
3384 2005-08-01  Kazu Hirata  <kazu@codesourcery.com>
3386         * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
3387         Fix comment typos.
3389 2005-07-29  Kazu Hirata  <kazu@codesourcery.com>
3391         * method.c: Fix a comment typo.
3393 2005-07-28  Mark Mitchell  <mark@codesourcery.com>
3395         PR c++/22545
3396         * call.c (add_builtin_candidate): Adjust for changes in
3397         representation of pointer-to-member types.
3399 2005-07-28  Mike Stump  <mrs@apple.com>
3401         * pt.c (check_explicit_specialization): Add visibility logic.
3402         (lookup_template_class): Likewise.
3403         (instantiate_class_template): Likewise.
3405 2005-07-27  Devang Patel  <dpatel@apple.com>
3407         * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
3409 2005-07-25  Ian Lance Taylor  <ian@airs.com>
3411         * ptree.c (cxx_print_identifier): Print a leading space if the
3412         indent level is 0.
3414 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3416         * call.c (convert_for_arg_passing): Check function pointers when
3417         -Wmissing-format-attribute is activated.
3418         * typeck.c (convert_for_assignment): Likewise.
3420 2005-07-22  Manfred Hollstein  <mh@suse.com>
3422         * parser.c (cp_parser_declaration): Fix unitialised warnings.
3424 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
3426         * class.c (build_base_path): Fix typo.
3428 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
3430         PR C++/22358
3431         * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
3433 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3435         * call.c: Fix comment typo(s).
3436         * cxx-pretty-print.h: Likewise.
3437         * name-lookup.c: Likewise.
3438         * parser.c: Likewise.
3440 2005-07-20  Douglas Gregor <doug.gregor@gmail.com>
3442         PR c++/2922
3443         * semantics.c (perform_koenig_lookup): For dependent calls, just
3444         return the set of functions we've found so far. Later, it will be
3445         augmented by those found through argument-dependent lookup.
3446         * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
3447         the optimization that skips namespaces where the functions were
3448         originally found.
3450 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3452         Make CONSTRUCTOR use VEC to store initializers.
3453         * call.c (convert_default_arg): Update call to digest_init.
3454         * class.c (dump_class_hierarchy, dump_array): Update to cope with
3455         VEC in CONSTRUCTOR_ELTS.
3456         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
3457         (finish_compound_literal, digest_init): Update declaration.
3458         * decl.c (struct reshape_iter): New data type.
3459         (reshape_init_array): Rename to...
3460         (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
3461         (reshape_init): Rewrite from scratch. Split parts into...
3462         (reshape_init_array, reshape_init_vector, reshape_init_class,
3463         reshape_init_r): New functions.
3464         (check_initializer): Update call to reshape_init. Remove obsolete
3465         code.
3466         (initialize_artificial_var, cp_complete_array_type): Update to cope
3467         with VEC in CONSTRUCTOR_ELTS.
3468         * decl2.c (grokfield): Update calls to digest_init.
3469         (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
3470         * error.c (dump_expr_init_vec): New function.
3471         (dump_expr): Use dump_expr_init_vec.
3472         * init.c (build_zero_init, build_vec_init): Update to cope with VEC
3473         in CONSTRUCTOR_ELTS.
3474         (expand_default_init): Update call to digest_init.
3475         * parser.c  (cp_parser_postfix_expression): Use a VEC for the
3476         initializers.
3477         (cp_parser_initializer_list): Build a VEC of initializers.
3478         * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
3479         in CONSTRUCTOR_ELTS.
3480         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
3481         ptm_initializer, class_initializer, get_pseudo_ti_init): Use
3482         build_constructor_from_list instead of build_constructor.
3483         * semantics.c (finish_compound_literal): Update call to digest_init.
3484         * tree.c (stabilize_init): Update to cope with VEC in
3485         CONSTRUCTOR_ELTS.
3486         * typeck.c (build_ptrmemfunc1): Likewise.
3487         * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
3488         Likewise.
3489         (store_init_value): Use build_constructor_from_list and update call
3490         to digest_init.
3491         (digest_init): Rewrite.
3492         (process_init_constructor): Rewrite from scratch. Split into...
3493         (process_init_constructor_array, picflag_from_initializer,
3494         process_init_constructor_record, process_init_constructor_union):
3495         New functions.
3496         (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
3497         New macros.
3498         (build_functional_cast): Use build_constructor_from_list instead of
3499         build_constructor.
3501 2005-07-18  Mark Mitchell  <mark@codesourcery.com>
3503         PR c++/22263
3504         * cp-tree.h (instantiate_decl): Change prototype.
3505         * decl2.c (mark_used): Adjust accordingly.
3506         * pt.c (do_decl_instantiation): Likewise.
3507         (instantiate_class_member): Likewise.
3508         (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
3509         Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
3510         that has no definition available.
3511         (instantiate_pending_templates): Adjust call to instantiate_decl.
3513 2005-07-17  Mark Mitchell  <mark@codesourcery.com>
3515         PR c++/22139
3516         * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
3517         * decl.c (duplicate_decls): Re-register template specializations
3518         for functions that have DECL_TEMLPLATE_INFO, even if they do not
3519         have DECL_TEMPLATE_INSTANTIATION set.
3521 2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3523         * call.c (diagnostic_fn_t): New.
3524         (build_temp, convert_like_real): Use diagnostic_fn_t.
3526 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
3528         PR c++/22204
3529         * repo.c (repo_emit_p): Robustify.
3531 2005-07-14  Daniel Berlin  <dberlin@dberlin.org>
3533         Fix PR c++/22452
3534         * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
3536 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
3538         PR c++/22132
3539         * call.c (implicit_conversion): Add c_cast_p parameter.
3540         (standard_conversion): Likewise.  Allow conversions between
3541         differently-qualified pointer types when performing a C-style
3542         cast.
3543         (add_function_candidate): Adjust callee.
3544         (build_builtin_candidate): Likewise.
3545         (build_user_type_conversion_1): Likewise.
3546         (conditional_conversion): Likewise.
3547         (can_convert_arg): Likewise.
3548         (can_convert_arg_bad): Likewise.
3549         (perform_implicit_conversion): Likewise.
3550         * cp-tree.h (comp_ptr_ttypes_const): Declare.
3551         * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
3552         Return bool.
3554 2005-07-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3555             Nathan Sidwell  <nathan@codesourcery.com>
3557         PR c++/20172
3558         * pt.c (tsubst_template_parms): Check for invalid non-type
3559         parameters.
3561 2005-07-09  Andrew Pinski  <pinskia@physics.uc.edu>
3563         * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
3564         decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
3565         (cp_init_ts): Call init_shadowed_var_for_decl.
3566         Remove include of gt-cp-cp-lang.h.
3567         * cp-objcp-common.c (shadowed_var_for_decl,
3568         decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
3569         cp-lang.c.
3570         (init_shadowed_var_for_decl): New function to initialize
3571         shadowed_var_for_decl.
3572         Include gt-cp-cp-objcp-common.h.
3573         * Make-lang.in (gt-cp-lang.h): Remove.
3574         (gt-cp-cp-objcp-common.h): Add.
3575         (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
3576         (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
3577         * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
3578         * cp-tree (init_shadowed_var_for_decl): Add prototype.
3580 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3582         * Make-lang.in: Add gt-cp-lang.h.
3583         (cp-lang.o): Ditto.
3584         * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
3585         the field.
3586         * config-lang.in: Add cp-lang.c to gtfiles.
3587         * cp-lang.c: Include hashtab.h.
3588         (cp_init_ts): New function.
3589         (LANG_HOOK_INIT_TS): Use macro.
3590         (decl_shadowed_for_var_lookup): New function.
3591         (decl_shadowed_for_var_insert): Ditto.
3592         * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
3593         (NON_THUNK_FUNCTION_CHECK): Ditto.
3594         (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
3595         (DECL_INIT_PRIORITY): Ditto.
3596         (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
3597         (DECL_SHADOWED_FOR_VAR): Use hashtable.
3598         (SET_DECL_SHADOWED_FOR_VAR): Ditto.
3599         * decl.c (duplicate_decls): Update for new/updated structures.
3600         (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
3601         * decl2.c (start_static_initialization_or_destruction): Deal with
3602         priority.
3603         * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
3604         SET_DECL_RTL.
3605         * tree.c (handle_init_priority_attribute): Handle priority.
3607 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
3609         PR c++/21799
3610         * pt.c (type_unification_real): Add is_method argument.  Use it
3611         for this pointer unification.
3612         (fn_type_unification): Adjust type_unification_real call.
3613         (unify): Likewise.
3615 2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3617         * pt.c (type_unification_real): Remove allow_incomplete argument.
3618         Remove unreachable code.
3619         (fn_type_unification): Adjust call to type_unification_real.
3620         (unify): Likewise.
3622 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3624         * Makefile.in (class.o, decl2.o): Adjust dependencies.
3625         * class.c: Include tree-dump.h.
3626         * decl2.c: Include tree-dump.h.
3628 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3630         * dump.c: Use dump_string_field.
3632 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
3634         * cp-tree.h (GCC_DIAG_STYLE): #undef before defining.  Change
3635         minimum GCC version for format checking to 4.1.
3637 2005-07-02  Kazu Hirata  <kazu@codesourcery.com>
3639         * Make-lang.in (cc1plus-checksum.c): Use
3640         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
3642 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3644         * name-lookup.c, parser.c: Use %q, %< and %> to quote in
3645         diagnostics.
3647 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
3648             Joseph S. Myers  <joseph@codesourcery.com>
3650         * error.c (location_of): Add comment.
3651         (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
3652         * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
3653         * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
3654         name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
3655         typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
3656         or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
3658 2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
3660         * decl.c (require_complete_types_for_parms): Call relayout_decl
3661         instead of layout_decl.
3663 2005-06-30  Zack Weinberg  <zack@codesourcery.com>
3664             Jakub Jelinek  <jakub@redhat.com>
3666         * cp-lang.c: No need to include cxx-pretty-print.h.
3667         * error.c (cp_printer): Update signature.  No need to process
3668         flags.
3669         (print_instantiation_partial_context): Output last newline
3670         with pp_base_newline.
3671         * Make-lang.in: Update dependencies.
3673 2005-06-30  Steven Bosscher  <stevenb@suse.de>
3675         * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
3676         DECL_THREAD_LOCAL_P.
3677         (cp_finish_decl): Likewise.
3678         (grokvardecl): Set the default DECL_TLS_MODEL here.
3680 2005-06-28  Joseph S. Myers  <joseph@codesourcery.com>
3682         * cvt.c (ocp_convert): Use invalid_conversion hook.
3683         * typeck.c (build_binary_op): Use invalid_binary_op hook.
3684         (build_unary_op): Use invalid_unary_op hook.
3686 2005-06-28  Paul Brook  <paul@codesourcery.com>
3688         * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
3689         * except.c: Include target.h.
3690         (init_exception_processing): Initialize unwind_resume_libfunc.
3691         * doc/tm.texi: Document TARGET_ASM_TTYPE
3693 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3695         * call.c (build_over_call): Pass in named argument list to
3696         `check_function_arguments'.
3697         * typeck.c (build_function_call): Likewise.
3699 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3701         * cp-tree.h (lang_check_failed): Add noreturn attribute.
3703 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3705         * all files: Update FSF address in copyright headers.
3707 2005-06-23  Jason Merrill  <jason@redhat.com>
3709         PR c++/19317
3710         * semantics.c (simplify_aggr_init_expr): Use
3711         CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3713 2005-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3715         * pt.c (register_specialization): Remove superfluous assertion.
3717 2005-06-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3719         * call.c (convert_like_real): Add format attribute.
3720         * typeck.c (check_for_casting_away_constness,
3721         build_static_cast_1): Likewise.
3722         * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
3723         Likewise.
3725 2005-06-17  Geoffrey Keating  <geoffk@apple.com>
3727         PR c++/17413
3728         * pt.c (type_unification_real): Apply template type deduction even
3729         to procedure parameters that are not dependent on a template
3730         parameter.
3732 2005-06-16  Nathan Sidwell  <nathan@codesourcery.com>
3734         * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
3735         change.
3736         (create_pseudo_type_info): First parameter is an int.
3738 2005-06-15  Nathan Sidwell  <nathan@codesourcery.com>
3740         PR c++/20678
3741         * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
3742         null.
3744         * Make-lang.in: Reformat some long lines.
3745         (gt-cp-rtti.h): New target.
3746         (cp/rtti.o): Add dependency.
3747         * config-lang.in (gtfiles): Add cp/rtti.c.
3748         * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
3749         CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
3750         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
3751         CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
3752         CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
3753         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3754         ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
3755         class_desc_type_node, si_class_desc_type_node,
3756         vmi_class_desc_type_node, ptm_desc_type_node,
3757         base_desc_type_node): Remove.
3758         * decl.c: Adjust documentation of global trees.
3759         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
3760         TINFO_REAL_NAME): Remove.
3761         (struct tinfo_s): New.
3762         (enum tinfo_kind): New.
3763         (tinfo_descs): New.
3764         (get_tinfo_decl): Adjust use of tinfo descriptor.
3765         (tinfo_base_init, generic_initializer, ptr_initializer,
3766         ptm_initializer, class_initializer): Likewise.
3767         (get_pseudo_ti_init): Take descriptor index. Adjust.
3768         (create_pseudo_type_info): Likewise.
3769         (get_pseudo_ti_desc): Return descriptor index. Adjust.
3770         (create_tinfo_types): Adjust use of create_pseudo_type_info.
3771         (emit_tinfo_decl): Adjust use of tinfo descriptor.
3773 2005-06-14  Roger Sayle  <roger@eyesopen.com>
3775         * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
3777 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3779         * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
3780         (rule for installing g++.1 manpage): Does depend on installdirs.
3782 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
3784         PR c++/20789
3785         * decl.c (cp_finish_decl): Clear runtime runtime initialization if
3786         in-class decl's initializer is bad.
3788         PR c++/21929
3789         * parser.c (struct cp_parser): Document that scope could be
3790         error_mark.
3791         (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
3792         scope.
3793         (cp_parser_nested_name_specifier): Return NULL_TREE on error.
3794         (cp_parser_postfix_expression): Deal with null or error_mark
3795         scope.
3796         (cp_parser_elaborated_type_specifier): Adjust
3797         cp_parser_nested_name_specifier call.
3799         * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
3801 2005-06-12  Roger Sayle  <roger@eyesopen.com>
3803         PR c++/21930
3804         * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
3805         Treat CONVERT_EXPR identically to NOP_EXPR.
3807 2005-06-10  Aldy Hernandez  <aldyh@redhat.com>
3809         PR c++/10611
3810         * cvt.c (build_expr_type_conversion): Same.
3811         * typeck.c (build_binary_op): Handle vectors.
3812         (common_type): Same.
3813         (type_after_usual_arithmetic_conversions): Same.
3815 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3817         PR c++/19497
3818         * cp-tree.def (USING_DECL): Update documentation.
3819         * cp-tree.h (DECL_DEPENDENT_P): New.
3820         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
3821         * class.c (handle_using_decl): Move most of the processing to ...
3822         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
3823         (push_using_decl): Use USING_DECL_SCOPE.
3824         (cp_emit_debug_info_for_using): Make extern.
3825         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
3826         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
3827         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
3828         when tsubsting.
3829         (tsubst_expr): Use USING_DECL_SCOPE.
3830         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
3831         * semantics.c (finish_member_declaration): Likewise.
3833 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3835         PR c++/19894
3836         * pt.c (tsubst): Reject pointer-to-member of type void.
3838         PR c++/20563
3839         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
3840         identifiers.
3842 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3844         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
3845         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
3846         (struct tree_default_arg): Add instantiations member.
3847         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
3848         VEC.
3849         * pt.c (tsubst_arg_types): Likewise.
3851         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
3852         assert in previous patch.
3854 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3856         * error.c (locate_error): Use gmsgid instead of msgid for argument
3857         name.
3858         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
3860 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
3862         PR 21903
3863         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
3864         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
3865         argument to any early instantiations.
3866         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
3868         PR c++/20637
3869         * cp-tree.h (add_method): Add using_decl parameter.
3870         * class.c (add_method): Add using_decl parameter.  Adjust error
3871         messages.
3872         (handle_using_decl): Pass the using decl to add_method.
3873         (clone_function_decl): Adjust add_member calls.
3874         * decl2.c (check_classfn): Likewise.
3875         * method.c (lazily_declare_fn): Likewise.
3876         * semantics.c (finish_member_declaration): Likewise.
3878         * method.c (synthesize_method): Use inform, not warning.
3880 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
3882         * config-lang.in (target_libs): Remove target-gperf.
3884 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
3886         PR c++/21619
3887         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
3888         * parser.c (cp_parser_postfix_expression): Allow non-constant
3889         expressions as arguments to __builtin_constant_p.
3890         * tree.c (builtin_valid_in_constant_expr_p): Use
3891         DECL_IS_BUILTIN_CONSTANT_P.
3893 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
3895         PR c++/21853
3896         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
3897         the pointed-to type for a pointer-to-member.
3899         PR c++/21336
3900         * cp-tree.h (grok_op_properties): Remove friendp parameter.
3901         * decl.c (grokfndecl): Adjust call.
3902         (grok_op_properties): Determine the class of which the function is
3903         a member by looking at its DECL_CONTEXT, not current_class_type.
3904         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
3906 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
3908         * method.c (synthesize_method): Add addtional arg to warning call.
3910         PR c++/21280
3911         * Make-lang.in (method.o): Add diagnostic.h
3912         * decl.c (start_preparsed_function): Use decl's location for file
3913         info.
3914         * decl2.c (cp_finish_file): Set input_location before synthesizing
3915         a function.
3916         (mark_used): When deferring a synthesized function, save current
3917         location.  Do not set function's location when actually
3918         synthesizing it.
3919         * method.c: #include diagnostic.h.
3920         (synthesize_method): Set the functions source location.  Show
3921         needed location if errors are emitted.
3923         * decl.c (start_decl): Simplify specialization handling. Remove
3924         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
3925         * mangle.c (discriminator_for_local_entity): Use VEC_index.
3927         PR c++/20350
3928         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
3930         PR c++/21151
3931         * name-lookup.c (pushtag): Push local class even in a template.
3933 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
3935         PR c++/21165
3936         * init.c (integral_constant_value): Check the type of the
3937         initializer, not the decl.
3939 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
3941         PR c++/21784
3942         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
3943         functions, even when the used name is not a function.
3945 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
3947         * operators.def, optimize.c: Update copyright.
3949 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
3951         PR c++/21210
3952         * call.c (standard_conversion): Permit conversions to complex
3953         types if conversion to the corresponding scalar type would be
3954         permitted.
3956         PR c++/21340
3957         * method.c (implicitly_declare_fn): Clear processing_template_decl
3958         when generating implicit declaration.
3960 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
3962         PR c++/21614
3963         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
3964         conversions to base classes of incomplete types.
3966 2005-05-27  Ian Lance Taylor  <ian@airs.com>
3968         * semantics.c (add_stmt): Add C++ frontend specific version.
3969         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
3970         (stmts_are_full_exprs_p): Declare.
3972 2005-05-27  Roger Sayle  <roger@eyesopen.com>
3973             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3975         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
3976         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
3977         of CONVERT_EXPR.
3978         (cp_parser_unary_expression): Likewise.
3979         * typeck.c (build_unary_op): Likewise.
3980         * call.c (add_builtin_candidate, build_new_op): Likewise.
3981         * error.c (dump_expr): Likewise.
3982         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
3983         * decl.c (ambi_op_p, grok_op_properties): Likewise.
3984         * dump.c (dump_op): Likewise.
3985         * lex.c (init_operators): Likewise.
3986         * operators.def ("+"): Likewise.
3987         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
3988         conversion, if the result and argument types differ.
3989         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
3990         like a NOP_EXPR when !processing_template_decl.
3992         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
3993         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
3995 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
3997         PR c++/21455
3998         * typeck.c (get_delta_difference): Cope with incomplete but equal
3999         classes.  Reorder if.
4001         PR c++/21681
4002         * parser.c (cp_parser_late_parsing_for_member): Disable access
4003         checking for template functions.
4005 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4007         PR c++/21768
4008         * pt.c (redeclare_class_template): Change error message according
4009         to coding conventions.
4011 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4013         * call.c (build_op_delete_call): Fix quoting in error message.
4015 2005-05-25  Richard Henderson  <rth@redhat.com>
4017         PR libgcj/21692
4018         * cp-tree.h (make_alias_for): Declare.
4019         * decl2.c (build_java_method_aliases): New.
4020         (cp_finish_file): Call it.
4021         * method.c (make_alias_for): Split out from ...
4022         (make_alias_for_thunk): ... here.
4024 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4026         PR c++/21686
4027         * semantics.c (finish_id_expression): Fix quoting in error message.
4029 2005-05-25  DJ Delorie  <dj@redhat.com>
4031         * decl.c (duplicate_decls): Move warning control from if() to
4032         warning(OPT_*).
4033         * name-lookup.c (parse_using_directive): Likewise.
4034         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
4035         (cp_parser_init_declarator): Likewise.
4036         * tree.c (handle_com_interface_attribute): Likewise.
4038 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
4040         * class.c (layout_class_type): Do not issue C++ ABI warnings
4041         for ObjC structs.
4042         * decl.c (objc_mark_locals_volatile): Streamline by calling
4043         objc_volatilize_decl().
4044         * parser.c (cp_parser_objc_message_expression): Allow simple
4045         type specifiers (instead of merely type names) as message
4046         receivers.
4047         * pt.c (template_args_equal): Do not call objc_comptypes().
4048         * typeck.c (composite_pointer_type): If both pointers are
4049         ObjC-esque, arbitrarily choose the first; do not call
4050         objc_comptypes().
4051         (comptypes): Do not call objc_comptypes().
4052         (convert_for_assignment): Call objc_compare_types().
4053         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
4054         concluding that types do not match.
4056 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
4058         PR C++/21645
4059         * optimize.c (update_cloned_parm): Copy the TYPE also from the
4060         original one.
4062 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
4064         PR c++/21495
4065         * decl.c (grokdeclarator): Fix "storage class specified for"
4066         error reporting.
4068 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
4070         * parser.c: Fix comment typos.
4072 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
4074         * Make-lang.in (cc1plus-dummy): New.
4075         (cc1plus-checksum.c): New.
4076         (cc1plus-checksum.o): New.
4077         (cc1plus): Add cc1plus-checksum.o.
4079 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
4081         PR C++/19664
4082         * decl2.c (determine_visibility): Don't set visibility to
4083         hidden if it has been set explicitly by user.
4085 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
4086             Mike Stump  <mrs@apple.com>
4088         Yet more Objective-C++...
4090         * cp-objcp-common.h (cxx_get_alias_set): Move from
4091         here...
4092         (cxx_warn_unused_global_decl): Likewise.
4093         (cp_expr_size): Likewise.
4094         (cp_tree_size): Likewise.
4095         (cp_var_mod_type_p): Likewise.
4096         (cxx_initialize_diagnostics): Likewise.
4097         (cxx_types_compatible_p): Likewise.
4098         * cp-tree.h: to here.
4099         (do_poplevel): Add.
4100         * lex.c (D_OBJC): Add.
4101         (init_reswords): Add.
4102         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
4103         * parser.c: Add c-common.h include.
4104         * pt.c: Add c-common.h and cp-objcp-common.h includes.
4105         (template_args_equal): Use objc_comptypes as well.
4106         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
4107         * semantics.c (do_poplevel): Remove static.
4109         * decl.c (objc_mark_locals_volatile): Don't change decls that are
4110         already ok.
4111         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
4112         Objective C++ early enough.
4113         * lex.c (struct resword reswords): Add Objective-C++ support.
4114         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
4115         (cp_parser_objc_message_receiver): Add.
4116         (cp_parser_objc_message_args): Likewise.
4117         (cp_parser_objc_message_expression): Likewise.
4118         (cp_parser_objc_encode_expression): Likewise.
4119         (cp_parser_objc_defs_expression): Likewise.
4120         (cp_parser_objc_protocol_expression): Likewise.
4121         (cp_parser_objc_selector_expression): Likewise.
4122         (cp_parser_objc_expression): Likewise.
4123         (cp_parser_objc_visibility_spec): Likewise.
4124         (cp_parser_objc_method_type): Likewise.
4125         (cp_parser_objc_protocol_qualifiers): Likewise.
4126         (cp_parser_objc_typename): Likewise.
4127         (cp_parser_objc_selector_p): Likewise.
4128         (cp_parser_objc_selector): Likewise.
4129         (cp_parser_objc_method_keyword_params): Likewise.
4130         (cp_parser_objc_method_tail_params_opt): Likewise.
4131         (cp_parser_objc_interstitial_code): Likewise.
4132         (cp_parser_objc_method_signature): Likewise.
4133         (cp_parser_objc_method_prototype_list): Likewise.
4134         (cp_parser_objc_method_definition_list): Likewise.
4135         (cp_parser_objc_class_ivars): Likewise.
4136         (cp_parser_objc_identifier_list): Likewise.
4137         (cp_parser_objc_alias_declaration): Likewise.
4138         (cp_parser_objc_class_declaration): Likewise.
4139         (cp_parser_objc_protocol_declaration): Likewise.
4140         (cp_parser_objc_protocol_refs_opt): Likewise.
4141         (cp_parser_objc_superclass_or_category): Likewise.
4142         (cp_parser_objc_class_interface): Likewise.
4143         (cp_parser_objc_class_implementation): Likewise.
4144         (cp_parser_objc_end_implementation): Likewise.
4145         (cp_parser_objc_declaration): Likewise.
4146         (cp_parser_objc_try_catch_finally_statement): Likewise.
4147         (cp_parser_objc_synchronized_statement): Likewise.
4148         (cp_parser_objc_throw_statement): Likewise.
4149         (cp_parser_objc_statement): Likewise.
4150         (cp_parser_primary_expression): Add Objective-C++.
4151         (cp_parser_statement): Likewise.
4152         (cp_parser_declaration): Likewise.
4153         (cp_parser_simple_type_specifier): Likewise.
4154         (cp_parser_type_name): Likewise.
4155         (cp_parser_parameter_declaration_list): Likewise.
4156         (cp_parser_member_declaration) Likewise.
4157         * tree.c: Include debug.h.
4158         * typeck.c (composite_pointer_type): Add Objective-C++ support.
4159         (finish_class_member_access_expr): Likewise.
4160         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
4161         (build_modify_expr): Allow objc to generate write barriers.
4163         * Make-lang.in (cp/tree.o): Add debug.h.
4164         * tree.c (lvalue_p_1, case CONST_DECL): Add.
4166 2005-05-18  Jan Hubicka  <jh@suse.cz>
4168         * method.c: Include tree-pass.h
4169         (use_thunk): Lower body before expanding.
4171 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
4173         PR c++/21454
4174         * decl.c (maybe_deduce_size_from_array_init): Call
4175         cp_apply_type_quals_to_decl after completing array type.
4177 2005-05-16  Richard Henderson  <rth@redhat.com>
4179         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
4180         (build_library_fn): ... here.
4182 2005-05-12  Ian Lance Taylor  <ian@airs.com>
4184         * cp-tree.h (cp_stmt_codes): Don't define.
4185         (statement_code_p): Declare.
4186         (STATEMENT_CODE_P): Define.
4187         * lex.c (statement_code_p): Define.
4188         (cxx_init): Use actual codes in stmt_codes initializer, not
4189         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
4190         than using INIT_STATEMENT_CODES.
4192 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
4194         * typeck.c (build_unary_op): Do not resort to address arithmetic
4195         when taking the address of a COMPONENT_REF.
4197 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
4199         * class.c (vtbl_init_data_s): Change the type of fns to
4200         VEC(tree,gc)*.
4201         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
4202         Use VEC instead of VARRAY.
4204 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
4206         * mangle.c: Remove a reference to the MIPS -mint64 option.
4208 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
4210         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
4211         VARRAY.
4212         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
4213         * name-lookup.h (cp_binding_level): Change the type of
4214         static_decls to VEC(tree,gc)*.
4216         * mangle.c (globals): Change the type of substitutions to
4217         VEC(tree,gc)*.
4218         (dump_substitution_candidates, add_substitution,
4219         find_substitution, finish_mangling, init_mangle): Use VEC
4220         instead of VARRAY.
4222 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
4224         * decl2.c (spew_debug): Remove.
4226         * decl2.c (ssdf_decls, start_static_storage_duration_function,
4227         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
4229         * decl2.c (pending_statics, note_vague_linkage_var,
4230         cp_finish_file): Use VEC instead of VARRAY.
4231         (pending_statics_used): Remove.
4233 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
4235         * decl2.c (deferred_fns, note_vague_linkage_fn,
4236         cp_finish_file): Use VEC instead of VARRAY.
4238 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
4240         PR c++/21352
4241         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
4243 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
4245         * pt.c: Fix a comment typo.
4247 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
4249         * cp-tree.h (language_function): Change the type of
4250         x_local_names to VEC.
4251         * decl.c (push_local_name): Adjust uses of local_names.
4253 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
4255         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
4257 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
4259         * class.c (local_classes, init_class_processing): Use VEC
4260         instead of VARRAY.
4261         * cp-tree.h (local_classes): Likewise.
4262         * mangle.c (discriminator_for_local_entity): Likewise.
4263         * name-lookup.c (pushtag): Likewise.
4265         * class.c (current_lang_depth, push_lang_context,
4266         pop_lang_context): Use VEC instead of VARRAY.
4267         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
4268         VARRAY.
4269         * name-lookup.c (push_to_top_level): Use VEC instead of
4270         VARRAY.
4272 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
4274         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
4275         for BUILT_IN_MD built-ins.
4277 2005-05-02  Michael Matz  <matz@suse.de>
4279         PR c++/19542
4280         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
4281         common frontend.
4282         (null_node): Remove.
4283         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
4285 2005-04-25  Ian Lance Taylor  <ian@airs.com>
4287         * cp-tree.def: Add EXPR_STMT.
4288         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
4289         (EXPR_STMT_EXPR): Define.
4290         * cp-gimplify.c: Include "flags.h".
4291         (gimplify_expr_stmt): New static function.
4292         (cp_gimplify_expr): Handle EXPR_STMT.
4293         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
4294         rather than pp_expression.
4295         (pp_cxx_statement): Handle EXPR_STMT.
4296         * dump.c (cp_dump_tree): Handle EXPR_STMT.
4297         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
4298         initializer.
4300 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
4302         PR C++/21188
4303         * rtti.c (ifnonnull): Cast the zero comparison operand
4304         to the correct type.
4306 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
4308         PR middle-end/20991
4309         * class.c: Include cgraph.h.
4310         (cp_fold_obj_type_ref): Set node->local.vtable_method.
4311         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
4313 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
4315         * mangle.c (write_builtin_type): Handle integer types which are
4316         not one of the shared integer type nodes and emit a "vendor
4317         extended builtin type" with an encoding in the form of "u5int96".
4319 2005-04-24  Ian Lance Taylor  <ian@airs.com>
4321         * cp-tree.def (USING_STMT): Change class to tcc_statement.
4322         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
4323         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
4324         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
4326 2005-04-23  DJ Delorie  <dj@redhat.com>
4328         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
4329         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
4330         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
4331         callers.
4333 2005-04-22  Per Bothner  <per@bothner.com>
4335         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
4336         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
4338 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
4340         PR c++/21087
4341         * name-lookup.c (push_overloaded_decl): Do not overload with
4342         non-duplicate anticipated built-in.
4344 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
4346         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
4347         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
4349 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4351         * cp-tree.h: Adjust for new VEC API.
4352         Define VEC(tree_pair_s,gc).
4353         (struct save_scope): Adjust.
4354         (struct lang_type_class): Adjust.
4355         (unemitted_tinfo_decls): Adjust.
4356         * class.c (add_method, resort_type_method_vec,
4357         finish_struct_methods, struct find_final_overrider_data,
4358         dfs_find_final_overrider_pre, find_final_overrider,
4359         get_vcall_index, warn_hidden, walk_subobject_offsets,
4360         check_methods, fixup_inline_methods, end_of_class,
4361         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
4362         add_vcall_offset): Adjust.
4363         * decl.c (xref_basetypes, finish_method): Adjust.
4364         * decl2.c (check_classfn): Adjust.
4365         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
4366         * method.c (do_build_copy_constructor): Adjust.
4367         * name-lookup.c (new_class_binding, store_binding,
4368         store_bindings, store_class_bindings): Adjust.
4369         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
4370         VEC(cp_class_binding,gc).
4371         (struct cp_binding_level): Adjust.
4372         * parser.c: Define VEC(cp_token_position,heap).
4373         (struct cp_lexer): Adjust.
4374         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
4375         cp_lexer_save_tokens): Adjust.
4376         * pt.c (retrieve_specialization,
4377         check_explicit_specialization): Adjust.
4378         * rtti.c (unemitted_tinfo_decls): Adjust.
4379         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
4380         get_pseudo_ti_desc): Adjust.
4381         * search.c (dfs_access_in_type, lookup_conversion_operator,
4382         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
4383         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
4384         * semantics.c: Define VEC(deferred_access,gc).
4385         (push_deferring_access_checks): Adjust.
4386         * typeck2.c (abstract_virtuals_error): Adjust.
4388 2005-04-20  Ian Lance Taylor  <ian@airs.com>
4390         * cp-tree.def: Add STMT_EXPR.
4391         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
4392         (STMT_EXPR_STMT): Define.
4393         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4394         STMT_EXPR.
4395         (pp_cxx_expression): Likewise.
4396         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
4397         * dump.c (cp_dump_tree): Handle STMT_EXPR.
4399 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
4401         * decl.c (expand_static_init): Call build2 and build3 instead
4402         of build.
4404         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
4406 2005-04-17  Ian Lance Taylor  <ian@airs.com>
4408         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
4409         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
4410         ARROW_EXPR.
4411         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
4412         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
4413         ALIGNOF_EXPR.
4414         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
4415         c_sizeof_or_alignof_type for change in parameter type.
4417 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
4419         PR c++/21025
4420         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
4421         which sizeof/alignof is dependent, rather than just whether we are
4422         processing_template_decl.
4424 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
4426         * cp-tree.h (LOOKUP_GLOBAL): Remove.
4427         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
4428         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
4429         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
4430         their values.
4432 2005-04-15  Richard Henderson  <rth@redhat.com>
4434         PR middle-end/14311
4435         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
4437 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
4439         * cp-tree.h (lang_type_class): Remove redefined.  Move
4440         java_interface into where redefined was.  Increment the width
4441         of dummy.
4442         (TYPE_REDEFINED): Remove.
4444 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
4446         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
4447         CLASSTYPE_TEMPLATE_LEVEL): Remove.
4449 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
4451         * decl2.c (determine_visibility): Don't use export_class_data.
4452         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
4453         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
4455 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
4457         * cp-tree.h (cxx_alignof): Remove.
4459         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
4461         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
4462         CONV_STATIC_CAST): Remove.
4464         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
4466         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
4468         * cp-tree.h (cp_deprecated): Remove.
4470 2005-04-08  Ian Lance Taylor  <ian@airs.com>
4472         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
4473         CONTINUE_STMT, SWITCH_STMT.
4474         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
4475         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
4476         (WHILE_COND, WHILE_BODY): Define.
4477         (DO_COND, DO_BODY): Define.
4478         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
4479         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
4480         * cp-gimplify.c (enum bc_t): Define.
4481         (struct cp_gimplify_ctx, ctxp): Define.
4482         (push_context, pop_context): New static functions.
4483         (begin_bc_block, finish_bc_block): New static functions.
4484         (build_bc_goto): New static function.
4485         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
4486         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
4487         (gimplify_switch_stmt): Likewise.
4488         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
4489         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
4490         (cp_genericize): Call push_context and pop_context.
4491         * semantics.c (finish_break_stmt): Just call build_stmt
4492         (BREAK_STMT) rather than build_break_stmt.
4493         (finish_continue_stmt): Corresponding change.
4494         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
4495         parameters.
4496         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
4497         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
4498         * dump.c (cp_dump_tree): Likewise.
4500 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
4502         PR c++/20905
4503         * parser.c (cp_parser_type_specifier_seq): Add is_condition
4504         parameter.
4505         (cp_parser_new_type_id): Pass it.
4506         (cp_parser_condition): Likewise.
4507         (cp_parser_conversion_type_id): Likewise.
4508         (cp_parser_type_id): Likewise.
4509         (cp_parser_type_specifier_seq): In a condition, do not allow
4510         invalid type-specifier combinations.
4511         (cp_parser_exception_declaration): Adjust call to
4512         cp_parser_type_specifier_seq.
4514         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
4515         * cp-tree.h (struct tinst_level): Add in_system_header_p.
4516         (TINST_IN_SYSTEM_HEADER_P): New macro.
4517         (make_tinst_level): Remove.
4518         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
4519         the instantiated class.
4520         (push_tinst_level): Do not use make_tinst_level.  Set
4521         TINST_IN_SYSTEM_HEADER_P.
4522         (pop_tinst_level): Likewise.
4523         (instantiate_class_template): Set in_system_header.
4524         (instantiate_pending_templates): Likewise.
4525         * tree.c (make_tinst_level): Remove.
4527 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
4529         * decl.c (start_decl): Apply pending #pragma weak regardless of
4530         scope.
4532 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
4534         PR c++/20212
4535         * pt.c (regenerate_decl_from_template): Copy attributes for
4536         parameters from the pattern to the instantiation.
4538 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
4540         PR c++/20734
4541         * cp-tree.def (OFFSET_REF): Correct comments.
4542         * init.c (build_offset_ref): Remove misleading comment.
4543         * typeck.c (build_unary_op): Handle pointer-to-member creation
4544         here, rather than ...
4545         (unary_complex_lvalue): ... here.
4547 2005-04-06  Jason Merrill  <jason@redhat.com>
4549         PR c++/19312
4550         * tree.c (stabilize_init): Don't bother trying to stabilize
4551         something with no side-effects.
4553 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
4555         PR c++/20763
4556         * decl.c (grokdeclarator): Correct attribute handling.
4558 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
4560         PR c++/19159
4561         * decl2.c (import_export_decl): Use non-COMDAT external linkage
4562         for virtual tables, typeinfo, etc. that will be emitted in only
4563         one translation unit on systems without weak symbols.
4565 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
4567         PR c++/20679
4568         * parser.c (cp_parser_template_name): Fix thinko.
4570 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
4572         PR c++/20746
4573         * method.c (use_thunk): Protect covariant pointer return
4574         adjustments from NULL pointers.
4576 2005-04-04  Jan Hubicka  <jh@suse.cz>
4578         * decl2.c (finish_objects): Revert my previous patch.
4579         (cp_finish_file): Likewise.
4581 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
4583         * pt.c: Fix comment typos.
4585 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
4587         PR c++/20723
4588         * pt.c (more_specialized_fn): Member functions are unordered wrt
4589         non-members.  Conversion operators are unordered wrt other
4590         functions.
4592 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
4594         * call.c (add_template_candidates_real): Remove length parameter
4595         from fn_type_unification call.
4596         * class.c (resolve_address_of_overloaded_function): Likewise
4597         * cp-tree.h (fn_type_unification): Remove length parameter.
4598         * pt.c (get_bindings_overload): Remove.
4599         (get_bindings_real): Rename to ...
4600         (get_bindings): ... here.  Remove length and strict
4601         parameters. Change return type flag to boolean.  Remove original
4602         forwarding function.
4603         (determine_specialization): Adjust get_bindings call.
4604         (fn_type_unification): Remove length parameter.  Adjust.
4605         (type_unification_real): Remove length parameter.  Adjust.
4606         (resolve_overloaded_unification): Adjust get_bindings call.
4607         (try_one_overload): Simplify confusing cascaded if control flow.
4608         (unify): Remove length paramter from type_unification_real call.
4609         (most_specialized_instantiation): Adjust get_bindings calls.
4610         (most_specialized): Likewise.
4612 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
4614         PR c++/19203, implement DR 214
4615         * call.c (joust): Use more_specialized_fn.
4616         * cp-tree.h (DEDUCE_ORDER): Remove.
4617         (more_specialized): Replace with ...
4618         (more_specialized_fn): ... this.
4619         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
4620         case.
4621         (type_unification_real): Remove DEDUCE_ORDER case.
4622         (more_specialized): Replace with ...
4623         (more_specialized_fn): ... this.  Implement DR 214.
4624         (most_specialized_instantiation): Use get_bindings_real directly.
4626 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4628         PR c++/18644
4629         * call.c (build_new_op): Remove check for -Wsynth.
4631 2005-03-31  Jan Hubicka  <jh@suse.cz>
4633         * decl2.c (finish_objects): Mark ctor as needed.
4634         (cp_finish_file): Output variables only in nonunit-at-a-time.
4636 2005-03-29  Richard Henderson  <rth@redhat.com>
4638         PR c/20519
4639         * decl.c (cp_complete_array_type): Rename from complete_array_type.
4640         Use the new complete_array_type in c-common.c.  Update all callers.
4641         * cp-tree.h (cp_complete_array_type): Update to match.
4643 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
4645         * typeck.c (build_static_cast_1): Allow scalar_cast between
4646         any integral, floating, or enumeration type.
4648 2005-03-24  Steven Bosscher  <stevenb@suse.de>
4650         * typeck.c (comptypes): First determine if the types are compatible
4651         from a target-independent point of view.  Check target attributes
4652         last.
4654         * class.c (build_base_path):
4655         (build_vbase_offset_vtbl_entries):
4656         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
4657         * error.c (dump_expr): Likewise.
4658         * init.c (build_zero_init, expand_cleanup_for_base,
4659         build_vec_delete_1): Likewise.
4660         * mangle.c (write_integer_cst): Likewise.
4661         * method.c (thunk_adjust): Likewise.
4662         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
4663         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
4664         * typeck.c (build_ptrmemfunc_access_expr,
4665         (get_member_function_from_ptrfunc): Likewise.
4667 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
4669         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4671 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
4673         * cp-tree.h (perform_integral_promotions): Remove.
4674         (default_conversion): Add.
4676 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
4678         * parser.c (cp_parser_warn_min_max): New function.
4679         (cp_parser_binary_expression): Use it.
4680         (cp_parser_assignment_operator_opt): Likewise.
4681         (cp_parser_operator): Likewise.
4683 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4685         PR c++/19980
4686         * decl.c (start_preparsed_function): Robustify.
4688 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4690         PR c++/20499
4691         * parser.c (cp_parser_class_head): Return NULL_TREE when
4692         encountering a redefinition.
4694 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4696         PR c++/20465
4697         PR c++/20381
4698         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
4699         template.
4701 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
4703         PR c++/20461
4704         PR c++/20536
4705         * init.c (emit_mem_initializers): Don't crash on undefined
4706         types.
4708 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
4710         PR c++/20147
4711         * semantics.c (finish_stmt_expr_expr): Return immediately
4712         if error_operand_p (expr).
4714 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
4716         * cp-tree.h (lvalue_or_else, lvalue_p): New.
4717         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
4719 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4721         PR c++/20240
4722         * decl.c (decls_match): Compare context of VAR_DECL.
4724 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4726         PR c++/20333
4727         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
4728         Check the return value of cp_parser_nested_name_specifier.
4730 2005-03-18  Dale Johannesen <dalej@apple.com>
4732         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
4734 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
4736         PR c++/20463
4737         * parser.c (cp_parser_diagnose_invalid_type_name):
4738         Check TYPE_BINFO (current_class_type) before attempting
4739         to emit inform messages.
4741 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
4743         PR c++/19966
4744         * cp-tree.h (grok_op_properties): Change return type to void.
4745         * decl.c (grok_op_properties): Return early - don't check the
4746         arity - in case of a static member or an operator that cannot
4747         be non-member; tidy a bit.
4749 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
4751         PR c++/20186
4752         * pt.c (contains_dependent_cast_p): Remove.
4753         (fold_non_dependent_expr): Don't use it.
4754         (value_dependent_expression_p): Use a switch statement.
4755         reference_exprs can be dependent.
4757 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4759         PR c++/4403
4760         PR c++/9783, DR433
4761         * name-lookup.c (pushtag): Skip template parameter scope when
4762         scope is ts_global.  Don't push tag into template parameter
4763         scope.
4764         * pt.c (instantiate_class_template): Reorder friend class
4765         template substitution to handle non-dependent friend class
4766         that hasn't been previously declared.
4768 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4770         Friend class name lookup 5/n
4771         PR c++/1016
4772         * cp-tree.h (pushtag): Adjust declaration.
4773         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
4774         lookup_name fails.
4775         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
4776         (start_enum): Adjust call to pushtag.
4777         * name-lookup.c (ambiguous_decl): Ignore hidden names.
4778         (qualify_lookup): Change return type to bool.
4779         (hidden_name_p): New function.
4780         (lookup_namespace_name, unqualified_namespace_lookup,
4781         lookup_name_real): Use it.
4782         (lookup_type_scope): Update comments.
4783         (maybe_process_template_type_declaration): Change parameter name
4784         from globalize to is_friend.
4785         (pushtag): Change globalize parameter of type int to tag_scope.
4786         Hide name if introduced by friend declaration.
4787         * name-lookup.h (hidden_name_p): Add declaration.
4788         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
4789         here.
4790         * pt.c (push_template_decl_real): Make hidden class template
4791         visible.
4792         (lookup_template_class, instantiate_class_template): Adjust call
4793         to pushtag.
4794         * semantics.c (begin_class_definition): Likewise.
4795         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
4796         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
4797         ts_global.
4799 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
4801         PR c++/20157
4802         * pt.c (determine_specialization): Reject non-specializations.
4804 2005-03-11  Per Bothner  <per@bothner.com>
4806         * cp-tree.h (struct cp_declarator): New id_loc field.
4807         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
4808         location using c_lex_with_flags, instead of input_location.
4809         (cp_parser_direct_declarator): Set declarator's id_loc from
4810         cp_token's id_loc.
4812 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4814         PR c++/18384, c++/18327
4815         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
4816         and index.  Convert max_index to size_type_node if it isn't
4817         host_integerp (, 1).
4819 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
4821         PR c++/20208
4822         * pt.c (tsubst_decl): Apply array-to-pointer and
4823         function-to-pointer conversions to function arguments.
4824         (regenerate_decl_from_template): Likewise.
4826 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
4828         PR c++/16859
4829         * decl.c (complete_array_type): In pedantic mode, return
4830         3 for an empty initializer list as the initializer for an
4831         array of unknown bound (8.5.1/4).
4832         (maybe_deduce_size_from_array_init): Fix final test to use
4833         the above.
4835 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4837         PR c++/20186
4838         * pt.c (contains_dependent_cast_p): New.
4839         (fold_non_dependent_expr): Call it.
4841 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
4843         PR c++/20142
4844         * cp-tree.h (target_type): Remove.
4845         * decl.c (layout_var_decl): Remove #if 0'd code.
4846         (cp_finish_decl): Remove dead code.
4847         * init.c (build_vec_init): When determining whether or not the
4848         element type has an asignment operator, look through all array
4849         dimensions.
4850         * typeck.c (target_type): Remove.
4852 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
4854         * class.c (finish_struct_1): Do not warn about non-virtual
4855         destructors in Java classes.
4857 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4859         PR c++/19311
4860         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
4861         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
4862         for OFFSET_TYPE.
4863         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
4864         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
4865         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
4866         template.
4868 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
4870         * name-lookup.c (push_overloaded_decl): Don't error if the new
4871         decl matches the old one.
4872         * decl.c (redeclaration_error_message): Likewise.
4874 2005-03-01  Per Bothner  <per@bothner.com>
4876         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
4877         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
4879 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4881         PR c++/20232
4882         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
4883         covariancy.
4885         * cp-tree.g (THUNK_TARGET): Expand comment.
4886         * method.c (use_thunk): Make sure we also use the target, if that
4887         is a thunk.
4889 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
4891         PR c++/20206
4892         * decl.c (cxx_comdat_group): Put thunks for
4893         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
4894         comdat group as the thunk target.
4896 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4898         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
4899         parser.c: Fix comment typo(s).
4901 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
4903         PR c++/20175
4904         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
4905         initializes a char/wchar_t array.
4907 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
4909         PR c++/19878
4910         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
4911         with internal linkage.
4913 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
4915         * decl.c (grokvardecl): Don't exempt anonymous types from having
4916         linkage for variables that have linkage other than "C".
4918 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
4920         * cp-objcp-common.h, error.c: Update copyright.
4922 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
4924         PR c++/20073
4925         * decl.c (start_decl_1): Don't clear TREE_READONLY.
4926         (cp_finish_decl): Likewise.
4927         (complete_vars): Call cp_apply_type_quals_to_decl.
4928         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
4929         cases where that's not valid.
4931         PR c++/19991
4932         * init.c (integral_constant_value): Iterate if the value of a decl
4933         is itself a constant.
4935         PR c++/20152
4936         * parser.c (cp_parser_class_head): Check for redefintions here.
4937         * semantics.c (begin_class_definition): Not here.
4939         PR c++/20153
4940         * decl2.c (build_anon_union_vars): Add type parameter.
4941         (finish_anon_union): Pass it.
4943         PR c++/20148
4944         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
4945         Handle STATEMENT_LIST.
4947         PR c++/19883
4948         * parser.c (cp_parser_direct_declarator): Always complain about
4949         non-constant array bounds when in a function scope.
4950         * semantics.c (finish_id_expression): Do not mark dependent names
4951         as non-constant.
4953 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
4955         PR c++/19076
4956         PR c++/6628
4957         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
4958         * decl.c (grokdeclarator): Pedwarn about qualifying a function
4959         type.
4960         Add qualifiers when declaring a typedef of a function type.
4961         Member function pointers pick up the qualifiers of the typedef
4962         used to declare them.
4963         Don't complain about creating cv-qualified function types.
4964         Complain about qualified function typedefs that are used to
4965         declare non-static member functions or free functions.
4966         Use cp_apply_type_quals_to_decl.
4967         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
4968         (grokclassfn): Use cp_apply_type_quals_to_decl.
4969         * error.c (dump_type_suffix): Print qualifiers for function
4970         types.
4971         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
4972         (tsubst): When substituting a function type into a member
4973         pointer type, pass along the qualifiers.
4974         (unify): Unify member pointers to member function pointers.
4975         * tree.c (cp_build_qualified_type_real): Function types may be
4976         qualified. This includes restrict qualifiers.
4977         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
4978         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
4979         added to function types.
4981 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
4983         PR 18785
4984         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
4985         c_common_to_target_charset.  Delete bogus comment.
4987 2005-02-18  Richard Henderson  <rth@redhat.com>
4989         PR libstdc++/10606
4990         * except.c (do_get_exception_ptr): New.
4991         (expand_start_catch_block): Use it.
4993 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
4995         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
4996         if type is not error_mark_node.
4998 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5000         PR c++/19508
5001         * decl2.c (grokfield): Do not apply attributes to template parameters
5002         as they are ignored by tsubst anyway.
5004 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
5006         PR c++/19813
5007         * decl.c (start_decl_1): Clear TREE_READONLY flag if
5008         its type has TYPE_NEEDS_CONSTRUCTING.
5009         (complete_vars): Likewise.
5011 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
5013         PR c++/20028
5014         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
5015         template along with TYPE_SIZE.
5017         PR c++/20022
5018         * semantics.c (perform_deferred_access_checks): Use
5019         get_deferred_access_checks to get the top of the stack.
5021 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
5023         PR c++/17788
5024         * class.c (add_implicitly_declared_members, check_field_decl)
5025         (check_field_decls, check_bases): Remove arguments, tests and
5026         assignments of cant_have_default_ctor-related variables.
5028 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
5030         * decl2.c (mark_used): Set the source location of the used decl to
5031         the current input location here...
5032         * method.c (synthesize_method): ... not here.  Set input_location
5033         from the decl instead.
5035 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5037         PR c++/19608
5038         * parser.c (cp_parser_late_parsing_for_member): Use
5039         current_function_decl as scope to push to and from.
5041         PR c++/19884
5042         * pt.c (check_explicit_specialization): Make sure namespace
5043         binding lookup found an overloaded function.
5044         (lookup_template_function): Just assert FNS is an overloaded
5045         function.
5047         PR c++/19895
5048         * decl.c (grokdeclarator): Check for error mark node in ptrmem
5049         construction.
5051 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
5053         PR c++/17816
5054         * decl.c (redeclaration_error_message): Report redefinition of
5055         pure virtual function.
5057 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5059         PR c++/19891
5060         * class.c (build_simple_base_path): Build the component_ref
5061         directly.
5062         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
5063         rather than using lookup_base.
5064         * search.c (dfs_walk_once): Add non-recursive assert check.
5065         * typeck.c (build_class_member_access_expr): It is possible for
5066         the member type to be both const and volatile.
5068 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5070         PR c++/14479
5071         PR c++/19487
5072         * pt.c (maybe_check_template_type): Remove.
5073         * cp-tree.h (maybe_check_template_type): Remove prototype.
5074         * name-lookup.c (maybe_process_template_type_declaration): Don't
5075         use maybe_check_template_type.
5077 2005-02-11  Richard Henderson  <rth@redhat.com>
5079         PR c++/19632
5080         * pt.c (get_mostly_instantiated_function_type): Save and restore
5081         flag_access_control instead of push/pop_access_scope.
5083 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
5085         PR c++/19755
5086         * decl.c (reshape_init): Issue warnings about missing braces.
5088 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
5090         * cp-tree.def, except.c, ptree.c: Update copyright.
5092 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
5094         PR c++/19811
5095         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
5096         attempting name lookup.
5098         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
5100         PR c++/19787
5101         * call.c (initialize_reference): Robustify.
5103         PR ++/19732
5104         * decl.c (grokdeclarator): Check for invalid use of destructor
5105         names.
5107         PR c++/19762
5108         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
5109         names with invalid types.
5111         PR c++/19826
5112         * parser.c (cp_parser_direct_declarator): Allow type-dependent
5113         expressions as array bounds.
5115         PR c++/19739
5116         * parser.c (cp_parser_attributes_list): Allow empty lists.
5118 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
5120         PR c++/19733
5121         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
5122         (check_bases): Give warnings about a base class with a
5123         non-virtual destructor, even if it is implicit.
5124         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
5125         (maybe_warn_about_overly_private_class): Don't use
5126         TYPE_HAS_DESTRUCTOR.
5127         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
5128         (check_for_override): Give it external linkage.
5129         (add_implicitly_declared_members): Generate destructors lazily.
5130         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
5131         TYPE_HAS_DESTRUCTOR.
5132         (check_bases_and_members): Call check_methods before
5133         check_field_decls.
5134         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
5135         TYPE_HAS_DESTRUCTOR.
5136         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
5137         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
5138         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
5139         (lang_type_class): Add lazy_destructor.
5140         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
5141         (CLASSTYPE_DESTRUCTORS): Robustify.
5142         (TYPE_HAS_DESTRUCTOR): Remove.
5143         (check_for_override): Declare.
5144         (build_vbase_delete): Remove.
5145         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
5146         expressions.
5147         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
5148         * except.c (dtor_nothrow): Lazily create destructors if necessary.
5149         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5150         * init.c (build_delete): Lazily create destructors, if necessary.
5151         (build_vbase_delete): Remove.
5152         * method.c (locate_dtor): Simplify.
5153         (implicitly_declare_fn): Add support for destructors.
5154         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
5155         necessary.
5156         * pt.c (check_explicit_specialization): Don't use
5157         TYPE_HAS_DESTRUCTOR.
5158         (instantiate_class_template): Likewise.
5159         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
5160         * rtti.c (emit_support_tinfos): Robustify.
5161         * search.c (lookup_fnfields_1): Lazily create destructors.
5162         * typeck.c (build_class_member_access_expr): Remove
5163         PSEUDO_DTOR_EXPR handling.
5164         (lookup_destructor): Likewise.
5166 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
5168         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
5169         copyright.
5171 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
5173         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
5174         on boolean variables.
5175         (cp_lexer_stop_debugging): Likewise.
5177 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5179         PR c++/17401
5180         * parser.c (cp_parser_pure_specifier): Emit a specific error
5181         message with an invalid pure specifier.
5182         * decl2.c (grok_function_init): Remove.
5183         (grokfield): An initializer for a method is a always a pure
5184         specifier.
5186 2005-02-02  Matt Austern  <austern@apple.com>
5188         PR c++/19628
5189         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
5190         * parser.c (cp_parser_postfix_expression): Accept function call in
5191         constant expression if builtin_valid_in_constant_expr_p is true
5192         for that function.
5193         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
5194         * semantics.c (finish_id_expression): Accept function call in constant
5195         expression if builtin_valid_in_constant_expr_p is true for that
5196         function.
5197         * tree.c (builtin_valid_in_constant_expr_p): New.
5199 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5201         PR c++/17413
5202         * pt.c (check_instantiated_args): Improve error message.
5203         Fix logic when to print its second part.
5205 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5207         * cp-tree.h (complete_type_or_else): Remove macro.
5208         (complete_type_or_diagnostic): Rename to complete_type_or_else
5209         and remove last argument.
5210         * typeck.c (complete_type_or_diagnostic): Rename to
5211         complete_type_or_else and remove last argument.
5213 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5215         * cp-tree.h (commonparms): Remove prototype.
5216         (convert_arguments): Likewise.
5217         (PFN_FROM_PTRMEMFUNC): Remove.
5218         * typeck.c (commonparms): Make static.
5219         (convert_arguments): Add prototype. Make static.
5220         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
5222 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5224         * parser.c (cp_parser_primary_expression): Don't complain about
5225         floating-point literals in integral constant expressions when
5226         !pedantic.
5228 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
5230         * parser.c (cp_parser_template_id): Revert comment patch too.
5232         PR c++/18757
5233         PR c++/19366
5234         PR c++/19499
5235         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
5236         Issue an error when creating the template id.
5237         * pt.c (fn_type_unification): Return early if the explicit
5238         template arg list is an error_mark_node.
5240 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5242         * decl.c (build_enumerator): Do not issue duplicate error messages
5243         about invalid enumeration constants.
5244         * parser.c (cp_parser_non_integral_constant_expression): Always
5245         set parser->non_integral_constant_expression_p.
5246         (cp_parser_primary_expression): Add cast_p parameter.  Issue
5247         errors about invalid uses of floating-point literals in
5248         cast-expressions.
5249         (cp_parser_postfix_expression): Add cast_p parameter.
5250         (cp_parser_open_square_expression): Pass it.
5251         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
5252         (cp_parser_unary_expression): Likewise.
5253         (cp_parser_new_placement): Pass it.
5254         (cp_parser_direct_new_declarator): Likewise.
5255         (cp_parser_new_initializer): Likewise.
5256         (cp_parser_cast_expression): Add cast_p parameter.
5257         (cp_parser_binary_expression): Likewise.
5258         (cp_parser_question_colon_clause): Likewise.
5259         (cp_parser_assignment_expression): Likewise.
5260         (cp_parser_expression): Likewise.
5261         (cp_parser_constant_expression): If an integral constant
5262         expression is invalid, return error_mark_node.
5263         (cp_parser_expression_statement): Pass cast_p.
5264         (cp_parser_condition): Likewise.
5265         (cp_parser_iteration_statement): Likewise.
5266         (cp_parser_jump_statement): Likewise.
5267         (cp_parser_mem_initializer): Likewise.
5268         (cp_parser_template_argument): Likewise.
5269         (cp_parser_parameter_declaration): Likewise.
5270         (cp_parser_initializer): Likewise.
5271         (cp_parser_throw_expression): Likewise.
5272         (cp_parser_attribute_list): Likewise.
5273         (cp_parser_simple_cast_expression): Likewise.
5274         (cp_parser_functional_cast): Likewise.
5275         (cp_parser_late_parsing_default_args): Likewise.
5276         (cp_parser_sizeof_operand): Save/restore
5277         non_integral_constant_expression_p.
5279 2005-01-31  Mike Stump  <mrs@apple.com>
5281         * parser.c (cp_lexer_new_main): Get the first token, first, before
5282         doing anything.
5284 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5286         * decl.c (start_decl): Add missing parentheses.
5288 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
5290         PR c++/19555
5291         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
5292         * decl.c (duplicate_decls): Do not discard
5293         DECL_IMPLICIT_INSTANTIATION when merging declarations.
5294         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
5295         variables that do not have DECL_USE_TEMPLATE.
5297         PR c++/19395
5298         * decl.c (grokdeclarator): Refactor code so that qualified names
5299         are never allowed as the declarator in a typedef.
5301         PR c++/19367
5302         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
5303         builtin declarations.
5305         PR c++/19457
5306         * call.c (convert_like_real): Inline call to
5307         dubious_conversion_warnings here.
5308         * cp-tree.h (dubious_conversion_warnings): Remove.
5309         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
5310         setting TREE_NEGATED_INT.
5311         * typeck.c (dubious_conversion_warnings): Remove.
5313         PR c++/19349
5314         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
5315         memory.
5317 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
5319         PR c++/19253
5320         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
5321         tentative parses.
5323         PR c++/19667
5324         * pt.c (redeclare_class_template): Robustify.
5326 2005-01-27  Steven Bosscher  <stevenb@suse.de>
5328         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
5329         instead of SWITCH_EXPR ones.
5330         * pt.c (tsubst_expr): Likewise.
5331         * semantics.c (begin_switch_stmt, finish_switch_cond,
5332         finish_switch_stmt): Likewise.
5334 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
5336         PR c++/18370
5337         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
5339 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
5341         * class.c (abort_fndecl_addr): New variable.
5342         (build_vtbl_initializer): If we have a pure virtual function
5343         share the abort function's address.
5344         Include gt-cp-class.h at the end.
5345         * config-lang.in (gtfiles): Add cp/class.c.
5347 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5349         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
5350         (pp_cxx_function_definition): Make static.
5351         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
5352         (pp_cxx_function_definition): Likewise.
5354 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5356         * name-lookup.c (print_binding_level): Make static.
5357         (constructor_name_full): Make static inline.
5358         (current_decl_namespace): Make static.
5359         * name-lookup.h (constructor_name_full): Remove prototype.
5360         (print_binding_level): Likewise.
5361         (current_decl_namespace): Likewise.
5363 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5365         * decl.h (debug_bindings_indentation): Remove.
5367 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
5369         * typeck.c: Fix a comment typo.
5371 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5373         PR c++/19208
5374         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
5375         at least once.
5376         (tsubst): Use fold_decl_constant_value in place of a bare call to
5377         integral_constant_value.
5379 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
5381         * typeck.c (more_qualified_p): Remove.
5382         * cp-tree.h: Remove the corresponding prototype.
5384 2005-01-19  Matt Austern  <austern@apple.com>
5386         * typeck.c (comptypes): Handle return code from objc_comptypes
5387         correctly.
5389 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
5391         * cp-tree.h, name-lookup.h: Remove unused prototypes.
5393 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5395         PR c++/19375
5396         * semantics.c (finish_id_expression): Disable access checking for
5397         already lookuped FIELD_DECL.
5399 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
5401         * decl.c (delete_block): Remove.
5402         * cp-tree.h: Remove the corresponding prototype.
5404         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
5405         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
5406         Remove.
5407         * cp-tree.h: Remove the corresponding prototypes.
5409         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
5410         cp_update_decl_after_saving, name_p): Remove.
5411         * cp-tree.h: Remove the corresponding prototypes.
5413 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
5415         PR c/19472
5416         * semantics.c (finish_asm_stmt): Strip nops off
5417         input memory operands.
5419 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
5421         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
5422         typeck2.c: Update copyright.
5424 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
5426         * class.c (get_enclosing_class): Remove.
5427         * cp-tree.h: Remove the corresponding prototypes.
5429         * cvt.c (convert_lvalue): Remove.
5430         * cp-tree.h: Remove the corresponding prototype.
5432         * pt.c (tinst_for_decl): Remove.
5433         * cp-tree.h: Remove the corresponding prototypes.
5435         * tree.c (hash_chainon): Remove.
5436         * cp-tree.h: Remove the corresponding prototypes.
5438 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
5440         PR c++/19263
5441         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
5442         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
5444 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5446         * Make-lang.in (cp-warn): Don't append $(WERROR).
5448 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
5450         * cp-tree.h: Fix a comment typo.
5452 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
5454         PR c++/19298
5455         * pt.c (tsubst_qualified_id): Call convert_from_reference.
5457 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
5459         PR c++/19244
5460         * class.c (add_implicitly_declared_members): Remove dead code.
5461         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
5462         DECL_CONSTRUCTOR_P.
5463         (grokdeclarator): Adjust calls to grokfndecl.
5464         * method.c (implicitly_declare_fn): Improve documentation.
5465         * parser.c (cp_parser_direct_declarator): Do not consider a
5466         function to be a constructor if the containing class was
5467         originally anonymous.
5469 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5471         PR c++/17154
5472         * search.c (lookup_field_1): Handle using declaration in
5473         class template partial specialization.
5475 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5477         PR c++/19258
5478         * pt.c (push_access_scope): Handle friend defined in class.
5479         (pop_access_scope): Likewise.
5481 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5483         PR c++/19270
5484         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
5485         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
5486         array-new handling code.  Use build_x_binary_op.
5488 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5490         PR c++/19030
5491         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
5492         * name-lookup.h (push_scope): Return pushed scope, not flag.
5493         * name-lookup.c (push_scope): Return scope that should be popped,
5494         not a flag.
5495         * decl.c (start_decl): Adjust.
5496         (grokfndecl): Adjust scope push and pop.
5497         * decl2.c (check_classfn): Likewise.
5498         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
5499         cp_parser_init_declarator, cp_parser_direct_declarator,
5500         cp_parser_class_specifier, cp_parser_class_head,
5501         cp_parser_lookup_name,
5502         cp_parser_constructor_declarator_p): Likewise.
5503         * pt.c (instantiate_class_template,
5504         resolve_typename_type): Likewise.
5506 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5508         PR c++/14136
5509         * parser.c (cp_parser_unqualified_id): Do not issue error message
5510         for typedef-name as destructor declarator when performing an
5511         uncommitted tentative parse.
5513 2005-01-01  Steven Bosscher  <stevenb@suse.de>
5515         PR middle-end/17544
5516         * decl.c (finish_function): Fix comment.  Annotate the compiler
5517         generated return with the current file name and line 0.