OSDN Git Service

1b89a1d3ba4e2087c170d292648815f4f332c2b6
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2
3         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
4
5 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
6
7         PR c++/17473
8         * name-lookup.c (supplement_binding): Do not allow typedefs to be
9         redefined in class scope.
10
11         PR c++/18285
12         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
13         redefinitions of builtin types other that "bool" or "wchar_t".
14
15 2004-11-24  Steven Bosscher  <stevenb@suse.de>
16
17         * decl.c (cxx_init_decl_processing): Don't clear
18         flag_inline_functions.
19
20 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
21
22         * pt.c (tsubst_function_type): Do not permit function types which
23         return arrays or functions.
24
25         PR c++/18586
26         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
27
28         PR c++/18530
29         * cp-tree.h (CTOR_NAME): Remove.
30         (DTOR_NAME): Remove.
31         * decl.c (initialize_predefined_identifiers): Add spaces to the
32         end of constructor and destructor names.
33
34 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
35
36         PR c++/8929
37         * decl.c (start_decl): Check for invalid specialization headers.
38
39 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
40
41         PR c++/16882
42
43         * call.c (standard_conversion): Move check for conversions between
44         vector pointers...
45         * typeck.c (ptr_reasonably_similar): ... here.
46
47 2004-11-23  Ben Elliston  <bje@au.ibm.com>
48
49         * cp-tree.h (context_as_string): Remove extern.
50         * error.c (context_as_string): Remove.
51
52         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
53         * lex.c (cp_type_qual_from_rid): Remove.
54
55         * cp-tree.h (do_poplevel): Remove extern.
56         (check_multiple_declarators): Likewise.
57         * semantics.c (do_poplevel): Make static.
58         (check_multiple_declarators): Remove.
59
60         * cp-tree.h (check_final_overrider): Remove extern.
61         * search.c (check_final_overrider): Make static.
62
63         * cp-tree.h (build_artificial_parm): Remove extern.
64         * decl2.c (build_artificial_parm): Make static.
65
66 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
67
68         PR c++/18354
69         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
70         Make sure the result is always a rvalue.
71
72 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
73
74         * decl.c (start_preparsed_function): Call check_function_type even
75         in templates.
76         (require_complete_types_for_parms): Skip dependent types.
77         (check_function_type): Likewise.
78
79 2004-11-16  Steven Bosscher  <stevenb@suse.de>
80
81         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
82         * search.c: Don't include it.
83
84 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
85
86         * cp-gimplify.c: Include pointer-set.h
87         (cp_genericize_r): Use pointer_sets instead of a hashtable.
88         Also instert the new statement for CLEANUP_STMT.
89         (cp_genericize): Use pointer_sets instead of a hashtable.
90         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
91
92 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
93
94         Friend class name lookup 1/n, PR c++/18471
95         * decl.c (lookup_and_check_tag): New function.
96         (xref_tag, start_enum): Use it.
97         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
98         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
99         location.
100         * name-lookup.c (lookup_name_current_level): Rename to ...
101         (lookup_name_innermost_nonclass_level): ... this.
102         (lookup_type_scope): New function.
103         * name-lookup.h (lookup_name_current_level): Rename to ...
104         (lookup_name_innermost_nonclass_level): ... this.
105         (lookup_type_scope): Add declaration.
106
107 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
108
109         PR c++/17344
110         * pt.c (coerce_template_parms): Only emit error message about
111         invalid template argument when TF_ERROR.
112
113 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
114
115         PR c++/18389
116         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
117         error_mark_node to indicate errors.
118
119         PR c++/18429
120         * parser.c (cp_parser_direct_declarator): Disallow non-constant
121         array bounds when not inside a function.
122
123         PR c++/18436
124         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
125         unqualified name resolves to a member function.
126
127         PR c++/18407
128         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
129         derived class correctly.
130         
131         * decl2.c (import_export_decl): Fix typo in comment.
132         * tree.c (pod_type_p): Likewise.
133
134 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
135
136         * typeck.c (cxx_mark_addressable): Add braces around the first if.
137
138 2004-11-10  Adam Nemet  <anemet@lnxw.com>
139
140         PR middle-end/18160  
141         * typeck.c (cxx_mark_addressable): Issue an error if address of an
142         explicit register variable is requested.
143
144 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
145
146         PR c++/18143
147         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
148         (struct lang_decl_flags): Add thunk_p flag.
149         (struct lang_decl): Remove separate fixed_offset. Place
150         cloned_function and fixed_offset into union.
151         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
152         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
153         (THUNK_FIXED_OFFSET): Adjust.
154         * method.c (make_thunk): Adjust.
155
156 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
157
158         PR c++/18369
159         * init.c (build_new_1): Handle parenthesized type-ids that name an
160         array type.  Tidy.
161
162 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
163
164         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
165         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
166         quoting in diagnostics.
167         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
168         quoting in printf format.
169         * decl.c (duplicate_decls, start_decl): Use %qD instead of
170         unquoted %D.
171
172 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
173
174         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
175         search.c, typeck2.c: Fix comment formatting.
176
177 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
178         
179         PR tree-optimization/18184
180         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
181         of different modes or alias-all flags as equivalent.
182         * typeck.c (comptypes): Likewise.
183
184 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
185
186         DR 49, 100
187         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
188         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
189         TYPE_REFFN_P): Document.
190         (fold_decl_constant_value): New prototype.
191         * pt.c (convert_nontype_argument_function): Rewrite and extract
192         parts into...
193         (fold_decl_constant_value, convert_nontype_argument_function): New.
194         (lookup_template_class): Add comment about useless double call.
195         * mangle.c (write_expression): Strip conversions before lowering
196         pointer to members.
197         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
198         enum to enum conversion.
199
200 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
201
202         PR c++/18124
203         * parser.c (cp_parser_type_parameter): Robustify.
204
205         PR c++/18155
206         * parser.c (cp_parser_single_declaration): Disallow template
207         typedefs.
208
209         PR c++/18177
210         * typeck.c (build_const_cast): Use error_operand_p.
211
212 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
213
214         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
215         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
216         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
217         from cp-lang.c.
218         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
219         from cp-lang.c.
220         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
221
222 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
223
224         PR c++/18064
225         * search.c (check_final_overrider): Deprecate gnu covariant extension.
226
227 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
228
229         Convert diagnostics to use quoting flag q 9/n
230         * typeck.c (build_x_unary_op, convert_member_func_to_ptr, 
231         get_delta_difference):  Use new quotation style.
232         * repo.c (reopen_repo_file_for_write): Likewise.
233         * pt.c (do_type_instantiation): Likewise.
234         * parser.c (cp_parser_diagnose_invalid_type_name): 
235         * name-lookup.c (push_overloaded_decl, set_decl_namespace): 
236         * error.c (cp_print_error_function,
237         print_instantiation_full_context): Likewise.
238         * decl.c (define_label, grok_reference_init, 
239         maybe_deduce_size_from_array_init, revert_static_member_fn): 
240         * decl2.c (check_classfn): Likewise.
241         * class.c (add_method, check_field_decls, layout_class_type, 
242         resolve_address_of_overloaded_function): Likewise.
243         * call.c (build_x_va_arg, build_over_call): Likewise.
244
245 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
246
247         Convert diagnostics to use quoting flag q 8/n
248         * cvt.c (cp_convert_to_pointer, warn_ref_binding, 
249         convert_to_reference, ocp_convert, convert_to_void 
250         cp_convert_to_pointer): Use new quotation style.
251
252 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
253
254         PR c++/15172
255         * typeck2.c (store_init_value): Use split_nonconstant_init even
256         for types that require construction.
257         
258 1004-10-28  Matt Austern  <austern@apple.com>
259
260         PR c++/17542
261         * cp-tree.h (class_key_or_enum_as_string): Declare.
262         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
263         and remove static qualifier.
264         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
265         union/enum declaration.
266         
267 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
268
269         * pt.c: Fix a comment typo.
270
271 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
272
273         * typeck.c (composite_pointer_type): Remove comment about DR 195.
274         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
275         warning when being pedantic.
276         (build_reinterpet_cast, build_c_cast): Adjust.
277
278 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
279
280         PR c++/17695
281         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
282         appear in a constructor/destructor that will be cloned.
283
284 1004-10-28  Matt Austern  <austern@apple.com>
285
286         PR c++/14124
287         * decl.c (finish_enum): Handle packed attribute.
288         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
289         
290 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
291
292         PR c++/17132
293         * pt.c (instantiate_class_template): Increment
294         processing_template_decl when substituting into a member class
295         template.
296
297 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
298
299         PR c++/17435
300         * call.c (convert_like_real): Fix formatting.
301         (initialize_reference): When binding a temporary to a base class,
302         ensure that the nominal copy made is to the derived class, not the
303         base class.
304
305         PR c++/18140
306         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
307         include ">>".
308
309 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
310
311         * decl.c (bad_specifiers): Move the q after the %.
312
313 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
314
315         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
316         the %.
317
318 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
319
320         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
321         * search.c (current_scope): Fix prototype.
322
323         PR c++/18093
324         * search.c (current_scope): Return the innermost non-block scope,
325         not the innermost non-block, non-namespace scope.
326         (at_namespace_scope_p): Adjust accordingly.
327         (dfs_accessible_post): Do not pass namespaces to is_friend.
328         (dfs_walk_once_accessible_r): Likewise.
329         * decl.c (grokvardecl): Adjust call to current_scope.
330         (build_enumerator): Likewise.
331         * parser.c (cp_parser_using_declaration): Likewise.
332         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
333         current_scope.
334         (cp_parser_class_head): Adjust call to current_scope.
335         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
336         alias.
337
338         PR c++/18020
339         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
340         their underlying values.
341
342         PR c++/18161
343         * typeck.c (build_binary_op): Honor build_type, even when in a
344         template.
345
346 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
347
348         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
349         padding token checking.
350
351 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
352
353         PR c++/18121
354         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
355         layout_type as it is already done by create_array_type_for_decl.
356
357 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
358
359         PR c++/18095
360         * parser.c (eof_token): Make const, correctly initialize rid and
361         location fields.
362         (struct cp_lexer): Replace buffer_end pointer with buffer_length
363         count. Adjust.
364         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
365         zero it out.
366         (cp_lexer_new_from_tokens): Adjust.
367         (cp_lexer_grow_buffer): Remove.
368         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
369         cp_lexer_purge_token): Add const casts.
370
371 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
372
373         PR c++/18073
374         PR c++/10841
375         * cp-tree.h (convert_to_base): Change prototype.
376         (build_ptrmemfunc): Likewise.
377         (convert_ptrmem): New function.
378         * call.c (struct conversion): Adjust documentation for base_p.
379         (standard_conversion): Set base_p for ck_pmem conversions as
380         appropriate.
381         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
382         conversions.
383         * class.c (convert_to_base): Handle both pointers and objects.
384         Add nonnull parameter.
385         (build_vfield_ref): Adjust call to convert_to_base.
386         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
387         (convert_force): Likewise.
388         * typeck.c (build_unary_op): Likewise.
389         (convert_ptrmem): New function.
390         (build_static_cast_1): Use it.
391         (build_reinterpret_cast): Allow conversions to vector types.
392         (get_delta_difference): Add c_cast_p parameter.
393         (build_ptrmemfunc): Likewise.  Adjust calls to
394         get_delta_difference.
395
396 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
397
398         PR c++/13560
399         * error.c (cp_error_at): Output the context as it might be
400         different file as the other location.
401
402 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
403
404         * typeck.c: Fix a comment typo.
405
406 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
407
408         PR c++/13495
409         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
410         * cp-tree.h (make_unbound_class_template): Adjust prototype.
411         * parser.c (cp_parser_lookup_name): Adjust call to
412         make_unbound_class_template.
413         (cp_parser_single_declaration): Handle member class of class
414         template as template friend parsing correctly.
415         * friend.c (is_friend): Call is_specialization_of_friend for
416         template friend class.
417         (make_friend_class): Handle member class of class template as
418         template friend.
419         * pt.c (is_specialization_of_friend): Likewise.
420         (instantiate_class_template): Likewise.
421         (tsubst): Adjust call to make_unbound_class_template.
422
423 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
424
425         * typeck.c (composite_pointer_type): Add comment about DR 195
426         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
427         Allow function pointer conversions that DR195 suggests.
428         (build_reinterpret_cast, build_c_cast): Update
429         build_reinterpret_cast_1 calls. 
430
431 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
432
433         * call.c, typeck.c: Fix comment typos.
434
435 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
436
437         * parser.c (cp_token_position): New typedef. Define VEC thereof.
438         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
439         next_token and last_token cp_token_position. Make saved_tokens a
440         VEC(cp_token_position).
441         (eof_token): New static variable.
442         (CP_SAVED_TOKENS_SIZE): Rename to ...
443         (CP_SAVED_TOKEN_STACK): ... here.
444         (cp_lexer_new_main): Adjust main lexer creation and buffer
445         filling.
446         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
447         to the parent buffer.  Do not append eof token.
448         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
449         stack.
450         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
451         (cp_lexer_token_position, cp_lexer_token_at): New.
452         (cp_lexer_saving_tokens): Adjust. Make inline.
453         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
454         (cp_lexer_peek_token_emit_debug_info): Fold into ...
455         (cp_lexer_peek_token): ... here.
456         (cp_lexer_peek_nth_token): Don't peek past EOF.
457         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
458         EOF.
459         (cp_lexer_purge_token): Adjust eof setting.
460         (cp_lexer_purge_tokens_after): Likewise.
461         (cp_lexer_save_tokens): Push next_token directly.
462         (cp_lexer_commit_tokens): Adjust.
463         (cp_lexer_rollback_tokens): Pop next_token directly.
464         (cp_parser_check_for_invalid_template_id): Adjust token purging.
465         (cp_parser_translation_unit): Do not consume the EOF.
466         (cp_parser_nested_name_specifier_opt): Adjust token purging.
467         (cp_parser_template_id, cp_parser_template_name): Likewise.
468
469 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
470
471         PR c++/14035
472         * call.c (struct conversion): Add base_p.
473         (convert_like): Add c_cast_p argument.
474         (convert_like_with_conversion): Likewise.
475         (build_conv): Clear base_p.
476         (standard_conversion): Set it, for derived-to-base conversions.
477         (convert_like_real): Add c_cast_p parameter.  Handle pointer
478         conversions directly rather than relying on ocp_convert.
479         (perform_direct_initialization_if_possible): Add c_cast_p
480         parameter.
481         * cp-tree.h (perform_direct_initialization_if_possible): Change
482         prototype.
483         (convert_member_func_to_ptr): New function.
484         * typeck.c (check_for_casting_away_constness): Add diag_fn
485         parameter.
486         (build_static_cast_1): New function, split out from ...
487         (build_static_cast): ... here.  Use build_static_cast_1.
488         (build_reinterpret_cast_1): New function, split out from ...
489         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
490         (build_const_cast_1): New function, split out from ...
491         (build_const_cast): ... here.  Use build_const_cast_1.
492         (build_c_cast): Rewrite to use build_const_cast_1,
493         build_static_cast_1, and build_reinterpret_cast_1.
494         (convert_member_func_to_ptr): New function.
495
496 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
497
498         PR c++/18047
499         * parser.c (enum cp_parser_prec): Give relational expressions
500         a higher precedence than equality expressions.
501
502 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
503
504         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
505         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
506         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
507         (enum base_access): Reorganize.
508         (accessible_base_p, accessible_p): Add consider_local_p parameter.
509         * call.c (standard_conversion): Update comment about
510         DERIVED_FROM_P.
511         (enforce_access): Adjust accessible_p call.
512         (build_over_call): Adjust accessible_base_p call.
513         * class.c (convert_to_base): Adjust lookup_base call.
514         (build_vtbl_ref_1): Likewise.
515         (warn_about_ambiguous_bases): Likewise. Add early exit.
516         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
517         * search.c (accessible_base_p): Add consider_local_p parameter.
518         (lookup_base): Pass consider_local_p to accessible_base_p call.
519         (friend_accessible_p): Check whether scope is a class member.
520         Remove unnecessary class template check.
521         (accessible_p): Add consider_local_p parameter. Use it.
522         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
523         * tree.c (maybe_dummy_object): Likewise.
524         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
525         (build_class_member_access_expr): Adjust lookup_base call.
526         * typeck2.c (binfo_or_else): Likewise.
527         * rtti.c (build_dynamic_cast_1): Access can consider friendship
528         and current scope.
529
530 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
531
532         PR c++/17743
533         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
534
535 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
536
537         PR c++/10479
538         * parser.c (cp_parser_parenthesized_expression_list): Fold
539         non-dependent expressions in attribute lists.
540
541 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
542
543         PR c++/17042
544         * decl.c (declare_global_var): Use the return value from pushdecl.
545
546         PR c++/14667
547         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
548         type names if we have already found a valid type.
549         (cp_parser_member_declaration): Likewise.
550         
551         PR c++/17916
552         * parser.c (cp_parser_member_specification_opt): Handle
553         CPP_PRAGMA.
554
555 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
556
557         * dump.c, g++spec.c, repo.c: Update copyright.
558
559 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
560
561         * decl.c: Fix a comment typo.
562
563 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
564
565         PR c++/16301
566         * name-lookup.c (parse_using_directive): If we have a
567         error_mark_node, do not set the decl namespace associations
568         on it.
569
570 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
571
572         PR c++/17976
573         * decl.c (cp_finish_decl): Do not call expand_static_init more
574         than once for a single variable.
575
576 2004-10-14  Matt Austern  <austern@apple.com>
577
578         * Make-lang.in (pt.o): depends on pointer-set.h
579         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
580         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
581         (for_each_template_parm): Convert from htab_t to pointer_set_t.
582         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
583         
584 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
585
586         PR c++/17661
587         * semantics.c (finish_for_expr): Convert expression to void
588         so that we don't create temporaries for a?b:c.
589
590 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
591
592         * search.c: Fix a comment typo.
593
594 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
595
596         * class.c (dfs_modify_vtables): Simplify condition. Return
597         dfs_skip_bases as appropriate.
598         (modify_all_vtables): Walk in pre-order.
599         * search.c (dfs_walk_all, dfs_walk_once_r,
600         dfs_walk_once_accessible_r): Assert post order function never
601         returns dfs_skip_bases.
602
603         * search.c (struct lookup_base_data_s): New.
604         (lookup_base_r): Replace with ...
605         (dfs_lookup_base): ... this.
606         (lookup_base): Use dfs_walk_all.
607
608 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
609
610         * search.c: Fix comment typos.
611
612 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
613
614         PR c++/15786
615         * parser.c (cp_parser_declarator): Add member_p parameter. 
616         (cp_parser_condition): Adjust calls to cp_parser_declarator.
617         (cp_parser_explicit_instantiation): Likewise.
618         (cp_parser_init_declarator): Likewise.
619         (cp_parser_direct_declarator): Add member_p parameter.  Do not
620         parse tentatively when parsing the parameters to a member.
621         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
622         (cp_parser_parameter_declaration): Likewise.
623         (cp_parser_member_declaration): Likewise.
624         (cp_parser_exception_declaration): Likewise.
625
626         PR c++/17936
627         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
628         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
629         for members of partial or explicit specializations.
630
631         PR c++/17929
632         * decl2.c (finish_anon_union): Robustify.
633
634 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
635
636         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
637         (dcast_base_hint): ... here.
638         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
639         * search.c (struct dcast_data_s): New.
640         (dynamic_cast_base_recurse): Remove. Replace with ...
641         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
642         (get_dynamic_cast_base_type): Rename to ...
643         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
644         (accessible_r): Remove.
645         (dfs_accessible_post): New, broken out of accessible_r.
646         (accessible_p): Use dfs_walk_once_accessible.
647         (dfs_walk_once_accessible_r): New. From accessible_r.
648         (dfs_walk_once_accessible): New. From acessible_p.
649
650         * cp-tree.h (SAME_BINFO_TYPE_P): New.
651         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
652         binfo types.
653         (convert_to_base_statically, determine_primary_bases,
654         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
655         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
656         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
657         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
658         * init.c (expand_member_init): Likewise.
659         * search.c (lookup_base_r, dynamic_cast_base_recurse,
660         binfo_via_virtual, copied_binfo, binfo_for_vbase,
661         original_binfo): Likewise.
662         * tree.c (copy_binfo): Likewise.
663
664 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
665
666         * semantics.c: Fix comment typos.
667
668 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
669
670         PR c++/17554
671         part of c++/17657
672         middle-end/17703
673         * semantics.c (maybe_cleanup_point_expr): Call
674         fold_build_cleanup_point_expr.
675         (maybe_cleanup_point_expr_void): New function.
676         (add_decl_expr): Call maybe_cleanup_point_expr_void.
677         (finish_expr_stmt): Likewise.
678         (finish_return_stmt): Likewise.
679         (finish_for_expr): Likewise.
680         (finish_asm_stmt): Likewise.
681         * typeck.c (condition_conversion): Call
682         fold_build_cleanup_point_expr.
683
684 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
685
686         PR c++/17907
687         * semantics.c (add_decl_expr): If the decl has a size which
688         has side effects then the decl expression needs a cleanup point.
689
690 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
691
692         PR c++/17393
693         * decl.c (grokdeclarator): Robustify error-recovery on invalid
694         declarations.
695
696 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
697
698         Convert diagnostics to use quoting flag q 7/n
699         * typeck.c (composite_pointer_type_r, composite_pointer_type, 
700         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, 
701         string_conv_p, build_class_member_access_expr, 
702         build_class_member_access_expr, lookup_destructor, 
703         finish_class_member_access_expr, build_indirect_ref, 
704         get_member_function_from_ptrfunc, build_function_call, 
705         convert_arguments, build_binary_op, pointer_diff, build_unary_op, 
706         check_for_casting_away_constness, build_static_cast, 
707         build_reinterpret_cast, build_const_cast, build_c_cast, 
708         build_modify_expr, get_delta_difference, build_ptrmemfunc, 
709         dubious_conversion_warnings, convert_for_assignment, 
710         convert_for_initialization, 
711         maybe_warn_about_returning_address_of_local, check_return_expr): 
712         Use quoting marks.
713
714         * typeck2.c (error_not_base_type, readonly_error, 
715         abstract_virtuals_error, cxx_incomplete_type_diagnostic, 
716         store_init_value, digest_init, build_x_arrow, 
717         build_m_component_ref, require_complete_eh_spec_types): Likewise.
718
719         * tree.c (cp_build_qualified_type_real, 
720         handle_java_interface_attribute, handle_init_priority_attribute):
721         Likewise.
722
723         * semantics.c (finish_asm_stmt, finish_non_static_data_member, 
724         finish_pseudo_destructor_expr, 
725         check_template_template_default_arg, begin_class_definition, 
726         finish_base_specifier, qualified_name_lookup_error, 
727         finish_id_expression, finish_typeof): Likewise.
728
729         * search.c (lookup_base, check_final_overrider,
730         look_for_overrides_r): Likewise.
731
732         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
733
734 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
735
736         PR c++/17867
737         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
738         constructor.
739
740         PR c++/17670
741         * init.c (build_new): Correct comments.
742         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
743         the non-array case.
744
745         PR c++/17821
746         * parser.c (cp_parser_postfix_dot_deref_expression): If the
747         pseduo-destructor-name production does not work, fall back to the
748         ordinary production.
749
750         PR c++/17826
751         * tree.c (cp_tree_equal): Handle a BASELINK.
752
753         PR c++/17524
754         * cp-tree.h (check_var_type): New function.
755         * decl.c (check_var_type): New function, split out from ...
756         (grokdeclarator): ... here.
757         * pt.c (tsubst_decl): Use check_var_type.
758
759         PR c++/17685
760         * decl.c (grokdeclarator): Disallow declarations of operators as
761         non-functions.
762         
763 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
764
765         PR c++/17868
766         * error.c (dump_expr): Add missing case for RDIV_EXPR.
767
768 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
769
770         * pt.c, search.c: Fix comment typos.
771
772 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
773
774         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
775         unmarkedp): Remove.
776         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
777         * class.c (struct find_final_overrider_data): Remove most_derived,
778         vpath_list and vpath fields.  Add path field.
779         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
780         (dfs_find_final_overrider): Rename to ...
781         (dfs_find_final_overrider_pre): ... here. Adjust.
782         (dfs_find_final_overrider_post): Adjust.
783         (dfs_find_final_overrider_q): Fold into
784         dfs_find_final_overrider_pre.
785         (find_final_overrider): Adjust dfs searching.
786         (dfs_modify_vtables): Don't mark binfo here.
787         (modify_all_vtables): Use dfs_walk_once.
788         (build_vtt_inits): Likwise. Use dfs_walk_all.
789         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
790         Return dfs_skip_bases as appropriate.
791         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
792         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
793         appropriate. Don't mark binfo here.
794         (initialize_vtbl_ptrs): Use dfs_walk_once.
795         * search.c (struct vbase_info): Remove unused struct.
796         (access_in_type): Use dfs_walk_once.
797         (dfs_access_in_type): Don't mark binfo here.
798         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
799         Fold into ...
800         (accessible_r): ... here. New. Specialize dfs_walk_once.
801         (accessible_p): Use accessible_r.
802         (lookup_field_queue_p): Remove. Fold into ...
803         (lookup_field_r): ... here. Adjust.
804         (lookup_member): Use dfs_walk_all.
805         (dfs_walk_real, dfs_walk): Replace with ...
806         (dfs_walk_all, dfs_walk_once): ... these.
807         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
808         (dfs_unmark, unmarkedp, markedp): Remove.
809         (dfs_get_pure_virtuals): Don't mark binfo here.
810         (get_pure_virtuals): Use dfs_walk_once.
811         (dfs_debug_unmarked_p): Remove. Fold into ...
812         (dfs_debug_mark): ... here.
813         (note_debug_info_needed): Use dfs_walk_all.
814
815 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
816
817         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
818         CLEANUP_POINT_EXPR to get the asm expression.
819
820 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
821
822         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
823         (DECL_MEMBER_TEMPLATE_P): New macro.
824         (is_member_template): Remove.
825         (class_method_index_for_fn): New function.
826         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
827         * class.c (finish_struct_methods): Remove out-of-date comment.
828         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
829         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
830         class_method_index_for_fn.
831         * pt.c (is_member_template): Remove.
832         (is_member_template_class): Likewise.
833         (optimize_specialization_lookup_p): New function.
834         (retrieve_specialization): Optimize lookups for members that are
835         not member templates.
836         (register_specialization): Adjust accordingly.
837         (build_template_decl): Add member_template_p parameter.  Set
838         DECL_MEMBER_TEMPLATE_P.
839         (process_partial_specialization): Adjust call to
840         retrieve_specialization.
841         (push_template_decl_real): Determine whether the template is a
842         member template.
843         (lookup_template_class): Use retrieve_specialization.
844         (tsubst_decl): Adjust call to retrieve_specialization.
845         (tsubst_exception_specification): New function.
846         (tsubst): Use it.
847         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
848         (instantiate_template): Adjust call to retrieve_specialization.
849         (regenerate_decl_from_template): Do not actually generate a new
850         DECL.
851         (instantiate_decl): Adjust call to retrieve_specialization.
852         (class_method_index_for_fn): New method.
853
854 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
855
856         * parser.c (cp_parser_asm_definition): Look passed the
857         CLEANUP_POINT_EXPR to get the asm expression.
858
859 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
860
861         PR c++/17368
862         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
863         also.
864
865 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
866
867         Convert diagnostics to use quoting flag q 6/n
868         * pt.c (finish_member_template_decl, check_specialization_scope, 
869         maybe_process_partial_specialization, determine_specialization, 
870         check_explicit_specialization, maybe_check_template_type, 
871         process_partial_specialization, check_default_tmpl_args, 
872         push_template_decl_real, redeclare_class_template, 
873         convert_nontype_argument, coerce_template_parms, 
874         lookup_template_class, push_tinst_level, 
875         instantiate_class_template, tsubst_arg_types, 
876         tsubst_function_type, tsubst, tsubst_qualified_id, 
877         tsubst_copy_and_build, check_instantiated_args, 
878         do_decl_instantiation, do_type_instantiation, 
879         invalid_nontype_parm_type_p, check_specialization_namespace, 
880         convert_template_argument, determine_specialization, 
881         check_template_shadow, tsubst_decl 
882         instantiate_pending_templates): Use quoting marks.
883
884 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
885
886         PR c++/17829
887         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
888         unqualified lookup finds a member function.
889
890 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
891
892         Convert diagnostics to use quoting flag q 5/n
893         * parser.c (cp_parser_name_lookup_error, 
894         cp_parser_diagnose_invalid_type_name, 
895         cp_parser_primary_expression, cp_parser_unqualified_id, 
896         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 
897         cp_parser_jump_statement, cp_parser_simple_declaration, 
898         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 
899         cp_parser_type_parameter, cp_parser_template_id, 
900         cp_parser_template_name, cp_parser_direct_declarator, 
901         cp_parser_parameter_declaration_list, cp_parser_class_head, 
902         cp_parser_base_specifier, cp_parser_lookup_name, 
903         cp_parser_late_parsing_default_args, 
904         cp_parser_optional_template_keyword 
905         cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 
906         cp_parser_check_access_in_redeclaration): Use quoting marks.
907
908         * name-lookup.c (supplement_binding, pushdecl, 
909         check_for_out_of_scope_variable, validate_nonmember_using_decl, 
910         do_nonmember_using_decl, lookup_tag, set_decl_namespace, 
911         push_namespace, do_namespace_alias, do_using_directive, 
912         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
913
914         * method.c (use_thunk): Likewise.
915
916         * lex.c (unqualified_name_lookup_error, 
917         unqualified_fn_lookup_error): Likewise.
918
919 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
920
921         Convert diagnostics to use quoting flag q 4/n
922         * except.c (decl_is_java_type, build_throw, 
923         is_admissible_throw_operand, check_handlers_1, check_handlers): 
924         Use quoting formats.
925         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
926         * init.c (sort_mem_initializers, emit_mem_initializers, 
927         member_init_ok_or_else, expand_member_init, is_aggr_type, 
928         build_offset_ref, build_java_class_ref): Likewise.
929
930 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
931
932         Convert diagnostics to use quoting flag q 3/n
933         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
934         redeclaration_error_message, lookup_label, check_goto,
935         make_typename_type, make_unbound_class_template,
936         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 
937         grok_reference_init, layout_var_decl, maybe_commonize_var, 
938         check_for_uninitialized_const_var, reshape_init_array, 
939         reshape_init, check_initializer, cp_finish_decl,
940         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 
941         check_static_variable_definition, compute_array_index_type, 
942         create_array_type_for_decl, check_special_function_return_type, 
943         grokdeclarator, check_default_argument, grokparms, 
944         grok_ctor_properties, grok_op_properties, 
945         check_elaborated_type_specifier, xref_tag, finish_enum, 
946         build_enumerator, check_function_type, start_preparsed_function, 
947         store_parm_decls): Use quoting formats.
948         * decl2.c (grok_array_decl, delete_sanity, check_member_template, 
949         check_java_method, check_classfn, finish_static_data_member_decl, 
950         grokfield, grokbitfield, grok_function_init,
951         build_anon_union_vars, coerce_new_type, coerce_delete_type,
952         check_default_args): Likewise.
953         * parser.c (cp_parser_decl_specifier_seq): Likewise.
954
955 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
956
957         Convert diagnostics to use quoting flag q 2/n
958         * class.c (build_base_path, add_method, alter_access,
959         handle_using_decl, check_bases,
960         maybe_warn_about_overly_private_class, find_final_overrider,
961         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
962         check_bitfield_decl, check_field_decls, layout_empty_base,
963         build_base_field, check_methods, layout_virtual_bases,
964         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
965         resolve_address_of_overloaded_function, instantiate_type,
966         note_name_declared_in_class): Use format flag "q" for quoting.
967
968 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
969
970         Convert diagnostics to use quoting flag q 1/n
971         * error.c (locate_error): Ignore quoting flag q.
972         * call.c (build_user_type_conversion_1, build_operator_new_call,
973         build_object_call, op_error, build_conditional_expr,
974         build_new_op, build_op_delete_call, enforce_access,
975         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
976         convert_default_arg, build_over_call, build_new_method_call,
977         joust, perform_implicit_conversion, initialize_reference): Use the
978         quoting flag q.
979
980 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
981
982         PR c++/17797
983         * typeck.c (build_reinterpret_cast): Return if the inner type
984         is error_mark_node.
985
986 2004-10-01  Jan Hubicka  <jh@suse.cz>
987
988         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
989
990 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
991
992         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
993         turning operator_code and fixed_offset into bitfields.
994
995 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
996
997         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
998
999 2004-09-29  Jason Merrill  <jason@redhat.com>
1000
1001         PR tree-optimization/17697
1002         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1003
1004 2004-09-28  Jason Merrill  <jason@redhat.com>
1005
1006         PR middle-end/17525
1007         * class.c (build_base_field): Set TYPE_MODE.
1008
1009 2004-09-28  Roger Sayle  <roger@eyesopen.com>
1010
1011         PR driver/17537
1012         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1013         than -lc and -lm, may require linking against libstc++.
1014
1015 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
1016
1017         * tree.c: Fix a comment typo.
1018
1019 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
1020
1021         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1022         (struct secondary_vptr_vtt_init_data_s): New.
1023         (build_vtt_inits): Adjust dfs_walkers.
1024         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1025         secondary_vptr_vtt_init_data_s structure. Adjust.
1026         (dfs_ctor_vtable_bases_queue_p): Remove.
1027         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1028
1029         * pt.c (struct get_template_base_data_s): Remove.
1030         (get_template_base_r): Fold into get_template_base.
1031         (get_template_base): Walk base binfos directly in inheritance
1032         graph order.
1033
1034 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
1035
1036         PR c++/17642
1037         * cp-tree.h (fold_if_not_in_template): New function.
1038         * call.c (build_conditional_expr): Use fold_if_not_in_template.
1039         (build_cxx_call): Likewise.
1040         * cvt.c (convert_to_complex): Likewise.
1041         (ocp_convert): Likewise.
1042         (convert): Likewise.
1043         (convert_force): Likewise.
1044         * decl.c (compute_array_index_type): Clear
1045         processing_template_decl while folding array bounds.
1046         * pt.c (convert_nontype_argument): Clear
1047         processing_template_decl while processing non-type argument
1048         initialization.
1049         * tree.c (fold_if_not_in_template): New function.
1050         * typeck.c (build_class_member_access_expr): Use
1051         fold_if_not_in_template.
1052         (build_array_ref): Likewise.
1053         (build_binary_op): Likewise.  Do not try to optimize computations
1054         when processing templates.
1055         (cp_pointer_int_sum): Use fold_if_not_in_template.
1056         (pointer_diff): Likewise.
1057         (build_unary_op): Likewise.
1058         (build_reinterpret_cast): Likewise.
1059         (get_delta_difference): Likewise.
1060         (expand_ptrmemfunc_cst): Likewise.
1061         (dubious_conversion_warnings): Likewise.
1062
1063 2004-09-27  Matt Austern  <austern@apple.com>
1064
1065         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1066         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1067         tokens that come from headers that are implicitly extern "C".
1068         (struct cp_parser): new one-bit field, implicit_extern_c.
1069         (cp_parser_new): Set parser's implicit_extern_c to false.
1070         (cp_parser_translation_unit): Pop lang context if we were in a
1071         header that was implicitly extern "C".
1072         (cp_parser_declaration_seq_opt): Push/pop lang context as
1073         required by the token's and parser's implicit_extern_c.
1074         
1075 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
1076
1077         PR c++/17585
1078         * cp-tree.h (shared_member_p): Declare.
1079         * search.c (shared_member_p): Give it external linkage.
1080         * semantics.c (finish_qualified_id_expr): Use it.
1081         (finish_id_expression): Likewise.
1082
1083         PR c++/17585
1084         * semantics.c (finish_id_expression): Do not add "this->" to
1085         static member functions.
1086
1087 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
1088
1089         PR c++/17681
1090         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1091
1092         * class.c (struct count_depth_data): Remove.
1093         (dfs_depth_post, dfs_depth_q): Remove.
1094         (find_final_overrider): Use number of vbase classes as depth
1095         bound.
1096         
1097         * cp-tree.h (types_overlap_p): Remove.
1098         * search.c (struct overlap_info): Remove.
1099         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1100         
1101         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1102         (get_template_base_recursive): Remove. Replace with ...
1103         (get_template_base_r): ... this.
1104         (struct get_template_base_data_s): New.
1105         (get_template_base): Use get_template_base_r via dfs_walk.  Always
1106         return NULL on failure.
1107         (unify): Remove error_mark_node check from get_template_base result.
1108
1109 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
1110
1111         * parser.c (cp_parser_expression_stack): Clarify why it is
1112         an array of NUM_PREC_VALUES elements.
1113         (cp_parser_binary_expression): Clarify why we do not need to
1114         handle stack overflow.
1115
1116 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
1117
1118         PR c++/16889
1119         * search.c (lookup_field_queue_p): Correct check for hidden base.
1120
1121         * search.c (bfs_walk): Remove.
1122         (lookup_member): Use dfs_walk_real.
1123         (dfs_walk_real): Move and adjust documentation from bfs_walk.
1124
1125 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
1126
1127         * decl.c (grokfndecl): If ::main is found not to return int,
1128         correct it after issuing a diagnostic.
1129         (grokdeclarator): If the incoming type was error_mark_node, do
1130         not complain about declaring something with no type.
1131         (start_function): Change check for ::main not returning int to
1132         an assertion, as grokfndecl now catches this when the user did it.
1133         * init.c (perform_member_init, sort_mem_initializers)
1134         (emit_mem_initializers): Make most diagnostics be issued on
1135         the line of current_function_decl, not whatever the current
1136         input line is.
1137         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1138         definition and declaration with #ifdef ENABLE_CHECKING.
1139         Avoid unnecessary use of fprintf.
1140         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1141         definitions to avoid warnings.
1142         (cp_lexer_new_main): Add assertion that first token is not a
1143         padding token.
1144         (cp_lexer_new_from_token_array): Fold into ...
1145         (cp_lexer_new_from_tokens): ... here.  Add assertion that
1146         first token is not a padding token.
1147         (cp_lexer_set_source_position_from_token): Move nearer to callers.
1148         Remove unused lexer argument.
1149         (cp_lexer_peek_token): Just print debugging report (if enabled)
1150         and return lexer->next_token.
1151         (cp_lexer_skip_purged_tokens): Delete.
1152         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1153         inline, simplify bodies.
1154         (cp_lexer_peek_nth_token): Add debugging report a la
1155         cp_lexer_peek_token.
1156         (cp_lexer_consume_token): Correct commentary.  Advance over
1157         purged tokens here.  Set current source position here, from
1158         token to be returned.  Avoid unnecessary use of fprintf.
1159         (cp_lexer_purge_token): Advance next_token pointer over this and
1160         subsequent purged tokens.
1161         (cp_parser_error): Adjust source position to that of the
1162         peeked token.
1163         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1164         (cp_parser_string_literal): Remove some excessive cleverness.
1165         (cp_parser_enum_specifier): Call start_enum before consuming
1166         the opening brace.
1167         (cp_parser_member_declaration): Make the "extra semicolon"
1168         diagnostic consistently-worded with the other place this is
1169         diagnosed.  Explicitly set the diagnostic location to the
1170         location of the offending semicolon.
1171         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1172         in diagnostics.  Do not use cp_parser_require.  Set location
1173         of diagnostics about improper use of '>>' to location of
1174         offending token.
1175         (cp_parser_late_parsing_for_member):
1176         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1177         (cp_parser_late_parsing_default_args): Likewise.  Manually
1178         move some logic outside the loop.
1179
1180 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
1181
1182         PR c++/17618
1183         * cvt.c (cp_convert_to_pointer): Return early when the type is
1184         an error_mark_node.
1185
1186 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1187
1188         PR c++/13989
1189         PR c++/9844
1190         * decl.c (grokfndecl): Add new argument "attrlist", use it
1191         to call cplus_decl_attributes.
1192         (start_function): Remove call to cplus_decl_attributes.
1193         * cvt.c (ocp_convert): Add support to use type conversion
1194         function to vector type.
1195         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1196         to the parsed type.
1197
1198 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
1199
1200         PR c++/17596
1201
1202         * parser.c (cp_parser_token_tree_map_node,
1203         cp_parser_pm_expression, cp_parser_additive_expression,
1204         cp_parser_multiplicative_expression, cp_parser_shift_expression,
1205         cp_parser_relational_expression, cp_parser_equality_expression,
1206         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1207         cp_parser_inclusive_or_expression,
1208         cp_parser_logical_and_expression,
1209         cp_parser_logical_or_expression): Removed.
1210         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1211         binops, binops_by_token): New.
1212         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1213         (cp_parser_new): Initialize binops_by_token.
1214         (cp_parser_binary_expression): Rewritten.
1215         (N_CP_TTYPES): New.
1216
1217 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
1218
1219         * parser.c: Fix a comment typo.
1220
1221 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
1222
1223         PR c++/17620
1224         * decl.c (xref_basetypes): Look through typedefs before checking
1225         for duplicate base.
1226
1227 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
1228
1229         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1230         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1231         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1232         (init_rtti_processing): Initialize it to something realistic.
1233         (get_tinfo_decl): Adjust pushing the new decl.
1234
1235         * cp-tree.h (struct lang_type_class): Remove marked flags, add
1236         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
1237         (TYPE_MARKED_P): New.
1238         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1239         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1240         CLEAR_CLASSTYPE_MARKED_N): Remove.
1241         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1242         CLEAR_CLASSTYPE_MARKED_*): Remove.
1243         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1244         shaped and repeated base properties.
1245         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1246         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1247         class_hint_flags): Remove.
1248         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1249         CLASSTYPE_DIAMOND_SHAPED_P.
1250
1251 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
1252
1253         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1254         cp-objcp-common.h.
1255         (objcp_tsubst_copy_and_build): Reformat function signature.
1256         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1257         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1258
1259 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
1260
1261         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1262         Don't handle CPP_PRAGMA tokens specially.
1263         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
1264         purge the token; do clear token->value after processing.  Add
1265         assertion at beginning that token->value is nonzero.
1266         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1267         CPP_PRAGMA as a full statement or declaration in its own right.
1268
1269 2004-09-21  Matt Austern  <austern@apple.com>
1270
1271         PR c++/15049
1272         * decl.c (grokvardecl): Accept declarations of global variables
1273         using anonymous types.
1274
1275 2004-09-21  Roger Sayle  <roger@eyesopen.com>
1276
1277         PR c++/7503
1278         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
1279         if either operand has side-effects.
1280         * typeck.c (rationalize_conditional_expr): Assert that neither
1281         operand of MIN_EXPR or MAX_EXPR has side-effects.
1282         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
1283         Check that the "lhs" is a valid lvalue, i.e. that neither operand
1284         of a MIN_EXPR or MAX_EXPR has a side-effect.
1285
1286 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
1287
1288         * cp-tree.h (struct lang_type_header): Remove
1289         uses_multiple_inheritance field.
1290         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1291         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1292         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1293         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1294         (TYPE_CONTAINS_VPTR_P): Likewise.
1295         * call.c (add_template_candidate_real): Use
1296         CLASSTYPE_VBASECLASSES.
1297         (build_special_member_call): Likewise.
1298         * class.c (finish_struct_bits): Remove
1299         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1300         bookkeeping.
1301         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1302         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1303         bookkeeping.
1304         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1305         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1306         Likewise.
1307         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1308         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1309         bookkeeping.
1310         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1311         * decl2.c (maybe_retrofit_in_chrg): Likewise.
1312         * init.c (expand_member, push_base_cleanups): Likewise.
1313         * pt.c (instantiate_class_template): Remove
1314         TYPE_USES_MULTIPLE_INHERITANCE,
1315         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1316         bookkeeping.
1317         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1318         check.
1319         * typeck2.c (process_init_constructor): Replace some sorrys with
1320         asserts.
1321
1322 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
1323
1324         * decl.c (reshape_init_array): Initialize max_index_cst to fix
1325         bootstrap failure.
1326
1327 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
1328
1329         PR c++/17530
1330         * pt.c (tsubst): Fix parentheses to accomodate emacs.
1331         (tsubst_baselink): If we get a single function, mark it as used.
1332
1333 2004-09-20  Matt Austern <austern@apple.com>
1334             Zack Weinberg  <zack@codesourcery.com>
1335
1336         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1337         Apply lbasename to input_filename before passing to get_fileinfo.
1338         * semantics.c (begin_class_definition): Likewise.
1339         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1340         correct filename.  Rename variables to be less confusing.
1341         (handle_pragma_implementation): Likewise.  Disable "appears
1342         after file is included" diagnostic.
1343
1344         * parser.c (struct cp_token): Add in_system_header fiag.
1345         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1346         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1347         (CPP_NONE, cp_lexer_read_token): Delete.
1348         (struct cp_lexer): Remove first_token, string_tokens,
1349         main_lexer_p fields.  Clarify comments.
1350         (struct cp_token_cache): Now just a pair of pointers.
1351         (CP_LEXER_BUFFER_SIZE): New #define.
1352         (CPP_PURGED): New fake token type.
1353         (cp_lexer_new_from_token_array, cp_lexer_destroy)
1354         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1355         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1356         New functions.
1357         (cp_lexer_new_from_tokens): Now a simple wrapper around
1358         cp_lexer_new_from_token_array.
1359         (cp_lexer_set_source_position_from_token): Also update
1360         in_system_header.
1361         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1362         Don't wrap round.
1363         (cp_lexer_token_difference): Dont handle wrapping round.
1364         (cp_lexer_new_main): Enable pragma deferral and raw strings,
1365         read the entire translation unit through c_lex_with_flags into
1366         this lexer's buffer, then turn raw strings back off again.
1367         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1368         (cp_lexer_get_preprocessor_token): No need to handle not being
1369         the main lexer.  Set token->in_system_header too.
1370         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
1371         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
1372         (cp_lexer_peek_nth_token): Likewise.
1373         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1374         the other tokens down.
1375         (cp_lexer_purge_tokens_after): Likewise.
1376         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1377         about there being no tokens.
1378         (cp_lexer_print_token): Revise to give useful information on
1379         all tokens.
1380         (struct cp_parser): Add field translate_strings_p.
1381         (cp_parser_new): Initialize it.
1382         (cp_parser_translation_unit): Destroy the lexer when done.
1383         (cp_parser_parameter_declaration): Restructure saving of
1384         default arguments.
1385         (cp_parser_save_member_function_body): Likewise.
1386         (cp_parser_check_for_invalid_template_id)
1387         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1388         Adjust calls to cp_lexer_advance_token.
1389         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1390         No need to fiddle c_lex_string_translate.
1391         (cp_parser_primary_expression, cp_parser_linkage_specification)
1392         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1393         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1394         Use cp_parser_string_literal.
1395         (cp_parser_attribute_list): Save and restore
1396         parser->translate_strings_p, not c_lex_string_translate.
1397         (cp_parser_cache_group): Delete.
1398         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
1399         not take a cache argument.
1400
1401 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1402
1403         PR c++/14179
1404         * decl.c (reshape_init): Extract array handling into...
1405         (reshape_init_array): New function. Use integers instead of trees
1406         for indices. Handle out-of-range designated initializers.
1407
1408 2004-09-20  Steven Bosscher  <stevenb@suse.de>
1409
1410         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1411         to null_node.
1412
1413 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
1414
1415         * decl2.c (determine_visibility): Allow class visibility
1416         directives to override targetm.cxx.export_class_data.
1417
1418 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
1419
1420         * call.c, semantics.c: Follow spelling conventions.
1421         * class.c: Fix a comment typo.
1422
1423 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
1424
1425         PR pch/13361
1426         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1427         (handle_pragma_implementation): Likewise.
1428
1429 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
1430             Zack Weinberg  <zack@codesourcery.com>
1431
1432         * cp-tree.def: Use tree_code_class enumeration constants
1433         instead of code letters.
1434         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1435         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1436         Update for new tree-class enumeration constants.
1437
1438 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
1439
1440         PR c++/16002
1441         * parser.c (cp_parser_simple_declaration): Commit to tentative
1442         parses after seeing a decl-specifier.
1443         (cp_parser_simple_declaration): Eliminate spurious message.
1444         (cp_parser_init_declarator): Adjust error message.
1445
1446         PR c++/16029
1447         * lex.c (unqualified_name_lookup_error): Mark the dummy
1448         declaration as used.
1449
1450         PR c++/17501
1451         * parser.c (cp_parser_nested_name_specifier): Do not resolve
1452         typename types if the user explicitly said "typename".
1453
1454 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
1455
1456         * error.c (dump_decl): Make sure there is lang_specific info before
1457         checking for DTOR and CTOR decls.
1458
1459 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1460
1461         * class.c (copy_virtuals): Remove.
1462         (build_primary_vtable): Use copy_list directly.
1463         (build_secondary_vtable): Likewise.
1464         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1465         (create_vtable_ptr): Likewise.
1466
1467 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
1468
1469         * search.c: Follow spelling conventions.
1470
1471 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1472
1473         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1474         VEC(tree).
1475         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1476         comments.
1477         * call.c (build_new_method_call): Don't confirm a pure virtual is
1478         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
1479         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1480         (fixup_inline_methods, finish_struct): Likewise.
1481         * decl.c (finish_method): Likewise.
1482         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1483         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1484         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1485         vector to avoid repeating the list in error messages.
1486
1487 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
1488
1489         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1490         * cp-tree.h (cxx_comdat_group): Declare.
1491         * decl.c (cxx_comdat_group): New function.
1492
1493 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1494
1495         * search.c (get_pure_virtuals): Remove unused variables.
1496
1497         * cp-tree.h (struct lang_decl_flags): Remove
1498         needs_final_overrider.
1499         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1500         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1501         * class.c (finish_struct_bits): Correct comment about
1502         CLASSTYPE_PURE_VIRTUALS.
1503         * search.c (get_pure_virtuals): Remove useless loop.
1504
1505 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
1506
1507         PR c++/17324
1508         * mangle.c (partially_mangled_name): New variable.
1509         (partially_mangled_name_len): Likewise.
1510         (save_partially_mangled_name): New function.
1511         (restore_partially_mangled_name): Likewise.
1512         (write_encoding): Save and restore partially mangled names around
1513         calls to get_mostly_instantiated_function_type.
1514         (write_unqualified_name): Likewise.
1515
1516 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1517
1518         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1519
1520 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
1521
1522         PR c++/16162
1523         * parser.c (cp_parser_id_expression): Correct value for
1524         is_declarator.
1525         (cp_parser_nested_name_specifier_opt): Look through typenames as
1526         necessary.
1527         (cp_parser_template_name): Honor check_dependency_p.
1528
1529         PR c++/16716
1530         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1531         Robustify.
1532
1533         PR c++/17327
1534         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
1535         gcc_unreacable.
1536
1537 2004-09-12  Richard Henderson  <rth@redhat.com>
1538
1539         PR c++/16254
1540         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1541         * typeck.c (condition_conversion): Likewise.
1542
1543 2004-09-11  Richard Henderson  <rth@redhat.com>
1544
1545         PR c++/17404
1546         * pt.c (cur_stmt_expr): Move from tsubst_expr.
1547         (tsubst_expr) <case STMT_EXPR>: Move ...
1548         (tsubst_copy_and_build): ... here.
1549
1550 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
1551
1552         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1553         comment explaining them moved to c-common.h.
1554         * lex.c (interface_only, interface_unknown, extract_interface_info):
1555         Delete definitions.
1556         (cxx_finish): Don't reset interface_unknown.
1557         (handle_pragma_interface): Don't set interface_only and
1558         interface_unknown; just the like-named fields in finfo.
1559         (handle_pragma_implementation): Adjust comment.
1560         * decl2.c (cp_finish_file): Don't reset interface_only and
1561         interface_unknown.
1562         * method.c (synthesize_method): Don't reset interface_unknown or
1563         call extract_interface_info.
1564         * pt.c (pop_tinst_level): Don't call extract_interface_info.
1565         * decl.c (start_cleanup_fn): Don't save or restore interface_only
1566         and interface_unknown.
1567         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1568         and use the result instead of the interface_only/interface_unknown
1569         globals.
1570         (start_preparsed_function): Likewise.
1571         * lex.c (cxx_make_type): Likewise.
1572         * semantics.c (begin_class_definition): Likewise.
1573         (expand_body): Don't call extract_interface_info.
1574
1575 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
1576
1577         * decl.c (objc_mark_locals_volatile): Make description of
1578         routine more descriptive; only mark VAR_DECLs at each
1579         binding level.
1580
1581 2004-09-10  Richard Henderson  <rth@redhat.com>
1582
1583         PR c++/17386
1584         * call.c (build_vfield_ref): Move...
1585         * class.c (build_vfield_ref): ... here.  Convert datum to the
1586         primary base containing the vptr.
1587         (make_new_vtable): Simplify build_primary_vtable arguments.
1588         (finish_struct_1): Do not duplicate TYPE_VFIELD.
1589         * typeck.c (build_class_member_access_expr): Don't warn for
1590         null object access to base fields.
1591
1592 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
1593
1594         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1595         New functions, to be called from ObjC++.
1596
1597 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
1598
1599         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1600         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1601         comment typos.
1602
1603 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
1604
1605         * typeck.c (build_c_cast): Preserve the cast if casting
1606         to and from an Objective-C type.
1607
1608 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
1609
1610         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1611         * typeck.c: Include c-common.h.
1612         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1613         return the result if nonnegative.
1614
1615 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
1616
1617         * decl2.c (import_export_class)
1618         * lex.c (handle_pragma_interface):
1619         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1620
1621 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
1622
1623         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1624         * semantics.c: Include c-common.h.
1625         (finish_compound_stmt): Call objc_clear_super_receiver().
1626
1627 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
1628
1629         * cp-tree.h (do_poplevel): New prototype.
1630         * semantics.c (do_poplevel): Make externally visible.
1631
1632 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
1633
1634         * cp-tree.h (tree_pair_s): Define a GC'd vector.
1635         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1636         * semantics.c (deferred_access): Likewise.
1637
1638 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
1639
1640         * semantics.c (expand_body): Assert that we are not nested.
1641
1642 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
1643
1644         * decl.c (build_enumerator): Use add_double and int_fits_type_p
1645         instead of cp_build_binary_op, to avoid creating short-lived trees.
1646         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1647         lookahead instead of backtracking.  Move some code to avoid a
1648         conditional branch.
1649         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1650         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1651         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1652         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1653
1654 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1655
1656         * decl.c (grok_declarator): Remove a redundant semicolon.
1657
1658         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1659         Correct comments describing function parameters.
1660
1661 2004-09-03  Matt Austern  <austern@apple.com>
1662         Compile speed improvement.
1663         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1664         Otherwise define a stub macro that expands to nothing.
1665         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
1666         define a stub macro that expands to 0.
1667         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1668         (cp_lexer_stop_debugging): Likewise.
1669         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
1670         define a stub macro that expands to NULL.
1671         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1672         (cp_lexer_new_from_tokens): Likewise.
1673
1674 2004-09-03  Jan Hubicka  <jh@suse.cz>
1675
1676         * decl.c (finish_function): Clean out pointers we no longer need.
1677
1678 2004-09-03  Jan Beulich  <jbeulich@novell.com>
1679
1680         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1681         than "-lm".
1682
1683 2004-09-02  Paul Brook  <paul@codesourcery.com>
1684
1685         * decl2.c (determine_visibility): Only check data visibility
1686         for VAR_DECLS.
1687
1688 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
1689
1690         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1691         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1692         * decl2.c (determine_visibility): Honor
1693         TARGET_CXX_EXPORT_CLASS_DATA.
1694
1695         * class.c (key_method): Rename to ...
1696         (determine_key_method): ... this.
1697         (finish_struct_1): Adjust accordingly.
1698         * cp-tree.h (key_method): Declare.
1699         * decl2.c (maybe_emit_vtables): Determine the key method here if
1700         it has not already been done.
1701
1702 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
1703
1704         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1705         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1706         (cp/cp-decl.c): Do not depend on gtype-cp.h.
1707         (cp/cp-objcp-common.o): New target.
1708         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1709         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1710         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1711         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1712         respectively.
1713         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1714         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1715         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1716         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1717         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1718         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1719         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1720         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1721         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1722         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1723         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1724         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1725         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1726         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1727         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1728         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1729         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1730         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1731         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1732         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1733         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1734         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1735         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1736         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1737         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1738         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1739         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1740         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1741         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1742         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1743         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1744         hooks to cp-objcp-common.h.
1745         (finish_file): New function.
1746         * cp-objcp-common.c: New file.
1747         * cp-objcp-common.h: New file.
1748         * cp-tree.h (cp_finish_file): New prototype.
1749         * decl.c: Do not include gtype-cp.h.
1750         * decl2.c (finish_file): Rename to cp_finish_file.
1751
1752 2004-08-31  Richard Henderson  <rth@redhat.com>
1753
1754         PR c++/17221
1755         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1756         (tsubst_copy_and_build): ... here.
1757
1758 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
1759
1760         * cp-tree.h (initialize_artificial_var): Declare.
1761         * decl.c (initialize_artifical_var): New function.
1762         * class.c (initialize_array): Remove.
1763         (initialize_vtable): Use initialize_artificial_var.
1764         (build_vtt): Likewise.
1765         (build_ctor_vtbl_group): Likewise.
1766
1767 2004-08-30  Richard Henderson  <rth@redhat.com>
1768
1769         * class.c (build_base_path): Use build_address directly.
1770         * typeck.c (build_unary_op): Don't lower &a.b to pointer
1771         arithmetic directly.
1772         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1773         means !initializer_constant_valid_p.
1774
1775 2004-08-30  Richard Henderson  <rth@redhat.com>
1776
1777         * class.c (fixed_type_or_null): Use get_base_address before
1778         assuming an ADDR_EXPR is non-null.
1779
1780 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
1781
1782         * name-lookup.c (pop_binding, pushdecl,
1783         set_identifier_type_value_with_scope, push_overloaded_decl,
1784         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1785         * parser.c (cp_parser_diagnose_invalid_type_name,
1786         cp_parser_postfix_expression, cp_parser_unary_expression,
1787         cp_parser_check_declarator_template_para): Likewise.
1788         * pt.c (push_inline_template_parms_recursive,
1789         check_explicit_specialization, convert_nontype_argument,
1790         coerce_template_template_parms, uses_template_parms,
1791         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1792         tsubst_expr, instantiate_template,
1793         maybe_adjust_types_for_deduction, type_unification_real,
1794         resolve_overloaded_unification, template_decl_level,
1795         type_dependent_expression_p): Likewise.
1796         * search.c (lookup_base_r): Likewise.
1797         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1798         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1799         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1800         * typeck.c (common_type, get_member_function_from_ptrfunc,
1801         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1802         * typeck2.c (cxx_incomplete_type_diagnostic,
1803         split_nonconstant_init_1, store_init_value,
1804         process_init_constructor): Likewise.
1805
1806 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
1807
1808         * call.c (check_dtor_name): Replace abort with gcc_assert or
1809         gcc_unreachable.
1810         (build_call, add_builtin_candidate, build_new_op,
1811         convert_like_real, build_over_call, in_charge_arg_for_name,
1812         source_type, joust): Likewise.
1813         * class.c (build_simple_base_path, get_vcall_index,
1814         finish_struct_1, instantiate_type, get_enclosing_class,
1815         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1816         * cp-gimplify.c (cp_genericize): Likewise.
1817         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1818         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1819         * decl.c (poplevel, make_unbound_class_template, reshape_init,
1820         check_special_function_return_type, grokdeclarator,
1821         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1822         finish_function): Likewise.
1823         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1824         * error.c (dump_global_iord, dump_decl, dump_template_decl,
1825         language_to_string): Likewise.
1826         * except.c (choose_personality_routine): Likewise.
1827         * friend.c (do_friend): Likewise.
1828         * g++spec.c (lang_specific_driver): Likewise.
1829         * init.c (build_zero_init, expand_default_init, build_new_1,
1830         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1831         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1832         * mangle.c (add_substitution, write_unscoped_name,
1833         write_template_prefix, write_identifier,
1834         write_special_name_destructor, write_type, write_builtin_type,
1835         write_expression, write_template_param,
1836         write_java_integer_type_codes): Likewise.
1837         * method.c (implicitly_declare_fn): Likewise.
1838
1839 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
1840
1841         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1842         (BINFO_INDIRECT_PRIMARY_P): Remove.
1843         * class.c (determine_primary_base): Rename to ...
1844         (determine_primary_bases): ... here.  Set all primary bases.
1845         (set_primary_base): Remove.
1846         (mark_primary_bases): Remove.
1847         (build_simple_base_path, walk_subobject_offsets,
1848         propagate_binfo_offsets, end_of_class): Adjust.
1849         (layout_class_type): Rename determine_primary_base call.
1850         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1851         to type_as_string.
1852         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1853         build_rtti_vtbl_entries): Adjust.
1854         * init.c (build_vtbl_address): Adjust.
1855
1856         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1857
1858 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
1859
1860         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1861         CXX_AND_OBJCXX_OBJS.
1862         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1863         separately on the link line.
1864
1865 2004-08-28  Jason Merrill  <jason@redhat.com>
1866
1867         * decl.c (expand_static_init): Avoid bogus warnings.
1868
1869 2004-08-27  Jason Merrill  <jason@redhat.com>
1870
1871         PR c++/16851
1872         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1873
1874         PR c++/13684
1875         * decl.c (expand_static_init): Use thread-safety API.
1876         (register_dtor_fn): Return the call, don't expand it.
1877         * tree.c (add_stmt_to_compound): New fn.
1878         (stabilize_call): Use it.
1879
1880 2004-08-27  Richard Henderson  <rth@redhat.com>
1881
1882         * cp-tree.def (OFFSETOF_EXPR): New.
1883         * parser.c (cp_parser_builtin_offsetof): Either built an
1884         OFFSETOF_EXPR, or call fold_offsetof immediately.
1885         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1886
1887 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
1888
1889         * call.c (validate_conversion_obstack): Replace
1890         my_friendly_assert with gcc_assert or gcc_unreachable.
1891         (direct_reference_binding, merge_conversion_sequences,
1892         build_user_type_conversion_1, perform_overload_resolution,
1893         build_op_delete_call, enforce_access, call_builtin_trap,
1894         build_over_call, build_special_member_call, build_new_method_call,
1895         initialize_reference): Likewise.
1896         * class.c (build_base_path, build_primary_vtable, alter_access,
1897         check_bases, update_vtable_entry_for_fn, layout_empty_base,
1898         clone_function_decl, adjust_clone_args,
1899         type_requires_array_cookie, include_empty_classes,
1900         finish_struct_1, resolve_address_of_overloaded_function,
1901         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1902         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1903         accumulate_vtbl_inits, build_vtbl_initializer,
1904         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1905         * cvt.c (build_up_reference, convert_to_reference): Likewise.
1906         * decl.c (poplevel, duplicate_decls, make_typename_type,
1907         cxx_init_decl_processing, reshape_init, check_initializer,
1908         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1909         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1910         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1911         xref_basetypes, start_preparsed_function, save_function_data,
1912         finish_function, finish_method, maybe_register_incomplete_var,
1913         complete_vars): Likewise.
1914         * decl2.c (grok_array_decl, check_member_template,
1915         check_classfn, finish_static_data_member_decl, coerce_new_type,
1916         coerce_delete_type, import_export_class, decl_needed_p,
1917         determine_visibility, import_export_decl, build_cleanup,
1918         start_static_initialization_or_destructi, do_static_destruction,
1919         prune_vars_needing_no_initialization,
1920         build_offset_ref_call_from_tree): Likewise.
1921         * error.c (dump_decl, dump_expr): Likewise.
1922         * init.c (finish_init_stmts, build_zero_init,
1923         expand_virtual_init, expand_default_init, expand_aggr_init_1,
1924         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1925         Likewise.
1926         * mangle.c (write_method_parms, write_template_args,
1927         write_expression, write_template_arg): Likewise.
1928         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1929         * name-lookup.c (pop_binding, begin_scope, leave_scope,
1930         resume_scope, push_using_decl, validate_nonmember_using_decl,
1931         is_ancestor, poplevel_class, set_inherited_value_binding_p,
1932         push_class_level_binding, do_class_using_decl, push_namespace,
1933         pop_namespace, add_using_namespace, ambiguous_decl,
1934         lookup_namespace_name, lookup_type_current_level,
1935         maybe_process_template_type_declaration): Likewise.
1936         * parser.c (cp_lexer_peek_nth_token,
1937         cp_parser_parse_and_diagnose_invalid_typ,
1938         cp_parser_translation_unit, cp_parser_template_id,
1939         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1940         * pt.c (push_access_scope, finish_member_template_decl,
1941         push_inline_template_parms_recursive, add_outermost_template_args,
1942         get_innermost_template_args, begin_explicit_instantiation,
1943         end_explicit_instantiation, retrieve_specialization,
1944         is_specialization_of, is_specialization_of_friend,
1945         register_specialization, check_explicit_specialization,
1946         comp_template_parms, process_template_parm,
1947         process_partial_specialization, convert_nontype_argument,
1948         coerce_template_template_parms, coerce_template_parms,
1949         mangle_class_name_for_template, lookup_template_function,
1950         lookup_template_class, instantiate_class_template, tsubst_decl,
1951         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1952         instantiate_template, fn_type_unification, type_unification_real,
1953         get_template_base, regenerate_decl_from_template,
1954         template_for_substitution, instantiate_decl,
1955         get_mostly_instantiated_function_type, dependent_scope_ref_p,
1956         value_dependent_expression_p, resolve_typename_type): Likewise.
1957         * repo.c (repo_emit_p): Likewise.
1958         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1959         create_tinfo_types, emit_tinfo_decl): Likewise.
1960         * search.c (lookup_base_r, lookup_base, lookup_field_1,
1961         dfs_access_in_type, build_baselink, lookup_member,
1962         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1963         * semantics.c (perform_or_defer_access_check,
1964         finish_non_static_data_member, finish_stmt_expr_expr,
1965         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1966         finish_template_template_parm, finish_member_declaration,
1967         emit_associated_thunks): Likewise.
1968         * tree.c (build_target_expr_with_type, force_target_expr,
1969         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
1970         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
1971         cxx_sizeof_or_alignof_type, perform_integral_promotions,
1972         build_class_member_access_expr, finish_class_member_access_expr,
1973         build_ptrmemfunc_access_expr, build_unary_op,
1974         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
1975         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
1976         * typeck2.c (complete_type_check_abstract,
1977         abstract_virtuals_error, process_init_constructor,
1978         add_exception_specifier): Likewise.
1979
1980 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
1981
1982         * class.c (build_vtbl_initializer): Use ssize_int.
1983         * decl.c (complete_array_type): Likewise.
1984         * method.c (finish_thunk): Likewise.
1985         * search.c (get_dynamic_base_type): Likewise.
1986
1987 2004-08-26  Richard Henderson  <rth@redhat.com>
1988
1989         * cp-tree.h (DECL_FIELD_IS_BASE): New.
1990         * class.c (build_base_field): Set it.
1991         (build_simple_base_path): Use it.
1992         (fixed_type_or_null): Don't consider base fields definitive.
1993
1994 2004-08-25  Roger Sayle  <roger@eyesopen.com>
1995
1996         PR middle-end/16693
1997         PR tree-optimization/16372
1998         * decl.c (finish_enum): Make the precision of the enumerated type
1999         the same width as the underlying integer type.
2000
2001 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
2002
2003         PR c++/17155
2004         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2005         functions.
2006
2007         * mangle.c (get_identifier_nocopy): Add cast.
2008
2009         * cp-tree.h (mangle_type): Remove.
2010         * mangle.c (globals): GTY it.
2011         (mangle_obstack): New variable.
2012         (name_obstack): Likewise.
2013         (name_base): Likewise.
2014         (write_char): Adjust accordingly.
2015         (write_chars): Likewise.
2016         (write_string): Likewise.
2017         (start_mangling): Initialize G.substitutions only one.  Add
2018         ident_p parameter.
2019         (finish_mangling): Use VARRAY_CLEAR to reclaim
2020         storage in G.substitutions.  Use obstack_finish.
2021         (init_mangle): Adjust for changes to variable names above.
2022         Initialize G.substitutions.
2023         (mangle_decl_string): Adjust call to start_mangling.
2024         (get_identifier_nocopy): New function.
2025         (mangle_decl): Use it.
2026         (mangle_type_string): Adjust call to start_mangling.
2027         (mangle_special_for_type): Likewise.
2028         (mangle_vtt_for_type): Likewise.
2029         (mangle_ctor_vtbl_for_type): Likewise.
2030         (mangle_thunk): Likewise.
2031         (mangle_guard_variable): Likewise.
2032         (mangle_ref_init_variable): Likewise.
2033
2034 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2035
2036         PR c++/14428
2037         * pt.c (redeclare_class_template): Check the type of non-type and
2038         template template parameter.
2039
2040 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2041
2042         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2043         (build_user_type_conversion_1, convert_like_real,
2044         build_java_interface_fn_ref, build_special_member_call): Likewise.
2045         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2046         * cp-gimplify.c (cp_gimplify_expr): Likewise.
2047         * cvt.c (cp_convert_to_pointer): Likewise.
2048         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2049         * decl2.c (start_static_initialization_or_destruction,
2050         generate_ctor_or_dtor_function): Likewise.
2051         * except.c (build_throw): Likewise.
2052         * mangle.c (write_integer_cst): Likewise.
2053         * method.c (finish_thunk): Likewise.
2054         * rtti.c (build_headof, get_tinfo_decl_dynamic,
2055         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2056         get_pseudo_ti_init): Likewise.
2057         * search.c (get_dynamic_cast_base_type): Likewise.
2058
2059 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
2060
2061         * class.c, search.c: Remove references to DWARF_DEBUG.
2062
2063 2004-08-25  Adam Nemet  <anemet@lnxw.com>
2064
2065         * repo.c (extract_string): Reset backquote after one character.
2066         (get_base_filename): Fix indentation.
2067
2068 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2069
2070         * decl.c (cxx_init_decl_processing): Adjust
2071         build_common_tree_nodes call.
2072
2073 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2074
2075         PR c++/16889
2076         * (is_subobject_of_p): Resurrect & optimize.
2077         (lookup_field_r): Use it.
2078
2079 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2080
2081         PR c++/16706
2082         * search.c (friend_accessible_p): Increment processing_template_decl
2083         when deal with TEMPLATE_DECL of SCOPE.
2084
2085 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2086
2087         PR c++/17149
2088         * semantics.c (check_accessibility_of_qualified_id): Defer check
2089         if qualifying_type is a template parameter.
2090
2091 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
2092
2093         PR c++/17163
2094         * pt.c (instantiate_decl): Do not try to apply
2095         DECL_DECLARED_INLINED_P to a VAR_DECL.
2096
2097         * search.c (build_baselink): Fix typo in comment.
2098
2099 2004-08-22 Andrew Pinski  <apinski@apple.com>
2100
2101         Revert:
2102         2004-08-22  Andrew Pinski  <apinski@apple.com>
2103         PR c++/14029
2104         * typeck.c (build_unary_op): Use &a.b if the folded lowered
2105         expression is not constant.
2106
2107 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2108
2109         * name-lookup.c (pushdecl): Rename build_type_copy call.
2110         * tree.c (cp_build_qualified_type_real,
2111         build_exception_variant, handle_java_interface_attribute): Likewise.
2112
2113 2004-08-22  Andrew Pinski  <apinski@apple.com>
2114
2115         PR c++/14029
2116         * typeck.c (build_unary_op): Use &a.b if the folded lowered
2117         expression is not constant.
2118
2119 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
2120
2121         PR c++/17121
2122         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2123
2124 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2125
2126         PR c++/17120
2127         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2128         MODOP_EXPR.
2129
2130 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2131
2132         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2133         before calling comp_template_args.
2134
2135 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
2136
2137         * class.c (build_vtbl_initializer): Use build_int_cst for
2138         negative size types.
2139         * decl.c (complete_array_type): Likewise.
2140         * method.c (finish_thunk): Likewise.
2141
2142 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
2143
2144         * tree.c: Remove unused mark_local_for_remap_r.
2145
2146 2004-08-19  Eric Christopher  <echristo@redhat.com>
2147
2148         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2149         * tree.c (cxx_unsave_expr_now): Delete.
2150         (cp_unsave_r): Ditto.
2151
2152 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
2153
2154         PR c++/15890
2155         * pt.c (push_template_decl_real): Disallow template allocation
2156         functions with fewer than two parameters.
2157
2158 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2159
2160         * cp-tree.h (build_shared_int_cst): Remove.
2161         * tree.c (shared_int_cache): Remove.
2162         (build_shared_int_cst): Remove.
2163         * class.c (finish_struct_1): Use build_int_cst.
2164
2165 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2166
2167         * decl.c (finish_enum): Do not copy value node early, copy
2168         later.
2169         * lex.c (cxx_init): Force null_node to be unique.
2170
2171 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
2172
2173         PR c++/17041
2174         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2175         from input for MODOP_EXPR.
2176
2177 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
2178
2179         * pt.c (dependent_template_p): Fix typo in commment.
2180
2181         PR c++/17068
2182         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2183         dependent.
2184
2185 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
2186
2187         PR c++/16246
2188         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
2189         arguments have the same type as the corresponding parameter.
2190
2191         PR c++/16215
2192         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2193         is set use it for diagnostic purposes.
2194         (cp_parser_pseudo_destructor_name): Remove special-case error
2195         message.
2196
2197         PR c++/15871
2198         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2199
2200         PR c++/16965
2201         * cp-tree.h (qualified_name_lookup_error): Add parameter.
2202         * name-lookup.c (do_class_using_decl): Restrict set of entities
2203         passed to cp_emit_debug_info_for_using more carefully.
2204         (lookup_qualified_name): Allow lookup_member to return sets of
2205         ambiguous entries.
2206         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2207         (cp_parser_primary_expression): Handle ambiguous lookups.
2208         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2209         (cp_parser_template_argument): Likewise.
2210         (cp_parser_elaborate_type_specifier): Likewise.
2211         (cp_parser_namespace_name): Likewise.
2212         (cp_parser_class_name): Likewise.
2213         (cp_parser_lookup_name_simple): Likewise.
2214         * pt.c (tsubst_qualified_id): Handle ambiguous results.
2215         (tsubst_expr): Likewise.
2216         * semantics.c (qualified_name_lookup_error): Add decl paramter.
2217         For ambiguous lookups, print candidates.
2218
2219 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2220
2221         PR c++/6749
2222         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
2223         return anything.
2224         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2225         * decl2.c (finish_file): Adjust call to
2226         instantiate_pending_templates.
2227
2228 2004-08-15  Roger Sayle  <roger@eyesopen.com>
2229
2230         * call.c (build_vfield_ref, build_call, build_conditional_expr,
2231         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2232         build_java_interface_fn_ref, build_special_member_call,
2233         build_new_method_call, initialize_reference): Replace calls to
2234         build with calls to buildN.
2235         * class.c (build_base_path, convert_to_base_statically,
2236         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2237         build_vtbl_initializer): Likewise.
2238         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2239         gimplify_if_stmt, cp_genericize_r): Likewise.
2240         * cvt.c (convert_to_void): Likewise.
2241         * decl.c (check_initializer, finish_constructor_body,
2242         finish_destructor_body): Likewise.
2243         * error.c (dump_expr): Likewise.
2244         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2245         Likewise.
2246         * init.c (perform_member_init, expand_virtual_init,
2247         expand_cleanup_for_base, build_init, expand_default_init,
2248         build_offset_ref, decl_constant_value, build_new, build_new_1,
2249         build_vec_delete_1, build_vec_init, build_delete,
2250         push_base_cleanups, build_vec_delete): Likewise.
2251         * mangle.c (write_integer_cst): Likewise.
2252         * method.c (thunk_adjust, do_build_copy_constructor,
2253         do_build_assign_ref): Likewise.
2254         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2255         unify, build_non_dependent_expr): Likewise.
2256         * rtti.c (build_headof, build_typeid, ifnonnull,
2257         build_dyanmic_cast_1, tinfo_base_init): Likewise.
2258         * semantics.c (begin_compound_stmt, finish_call_expr,
2259         finish_pseudo_destructor_expr, finish_id_expression,
2260         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2261         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2262         array_type_nelts_total, stabilize_call): Likewise.
2263         * typeck.c (decay_conversion, build_class_member_access_expr,
2264         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2265         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2266         build_x_unary_op, build_unary_op, unary_complex_lvalue,
2267         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2268         check_return_expr): Likewise.
2269         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2270         split_nonconstant_init, store_init_value, build_m_component_ref):
2271         Likewise.
2272
2273 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2274
2275         * call.c (convert_class_to_reference,
2276         build_user_type_conversion_1, convert_like_real,
2277         build_java_interface_fn_ref, build_special_member_call): Use
2278         build_int_cst.
2279         * class.c (build_vtbl_initializer): Likewise.
2280         * cp-gimplify.c (cp_gimplify_expr): Likewise.
2281         * cvt.c (cp_convert_to_pointer): Likewise.
2282         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2283         * decl2.c (start_static_initialization_or_destruction,
2284         generate_ctor_or_dtor_function): Likewise.
2285         * except.c (build_throw): Likewise.
2286         * lex.c (cxx_init): Likewise.
2287         * mangle.c (write_integer_cst): Likewise.
2288         * rtti.c (build_headof, get_tinfo_decl_dynamic,
2289         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2290         get_pseudo_ti_init): Likewise.
2291         * search.c (get_dynamic_cast_base_type): Likewise.
2292         * tree.c (build_shared_int_cst): Likewise.
2293
2294 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
2295
2296         PR c++/16273
2297         * class.c (count_depth_data): New type.
2298         (dfs_depth_post): New function.
2299         (dfs_depth_q): Likewise.
2300         (find_final_overrider_data_s): Change type of vpath.
2301         Add vpath_list.
2302         (dfs_find_final_overrider_1): New function.
2303         (dfs_find_final_overrider): Use it.
2304         (dfs_find_final_overrider_q): Adjust use of vpath.
2305         (dfs_find_final_overrider_post): Likewise.
2306         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
2307         vpath_list.
2308
2309 2004-08-12 Jan Beulich <jbeulich@novell.com>
2310
2311         * parser.c (cp_parser_asm_definition): Properly consume scope operator
2312         tokens preceding the clobbers. Don't check for scope operator
2313         following inputs. Simplify inputs handling to match that now used for
2314         clobbers.
2315
2316 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
2317
2318         PR c++/16698
2319         * except.c (build_throw): Allocate cleanup_type and the function
2320         for __cxa_throw separately.
2321
2322         PR c++/16853
2323         * call.c (standard_conversion): Do not accept conversions between
2324         pointers to members if the class types are unrelated.
2325
2326         PR c++/16618
2327         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2328         char &" instead of just "char &".
2329
2330         PR c++/16870
2331         * pt.c (tsubst): Just return the unknown_type_node.
2332
2333 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
2334
2335         PR c++/16964
2336         * parser.c (cp_parser_class_specifier): Robustify.
2337
2338         PR c++/16904
2339         * pt.c (tsubst_copy_and_build): Complain about invalid
2340         qualification.
2341
2342         PR c++/16929
2343         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2344         current_class_ref while tsubsting.
2345
2346 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
2347
2348         PR c++/16971
2349         * parser.c (cp_parser_init_declarator): Robustify.
2350
2351 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
2352
2353         * typeck2.c (process_init_constructor): Guard the missing field warning
2354         with warn_missing_field_initializers rather than extra_warnings.
2355
2356 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
2357
2358         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2359
2360 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
2361
2362         * decl.c (start_preparsed_function): Move determine_visibility
2363         call.
2364         * decl2.c (determine_visibility): Incorporate dllexport testing.
2365
2366 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
2367
2368         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2369         means that libstdc++ is needed.
2370
2371 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
2372
2373         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2374
2375 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
2376
2377         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2378         than passing it as a parameter to rest_of_decl_compilation.
2379         * decl2.c (grokfield): Use set_user_assembler_name.
2380
2381 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2382
2383         * decl.c (complete_array_type): Don't gratuitously copy
2384         maxindex. Its type is always set.
2385
2386 2004-08-04  Paul Brook  <paul@codesourcery.com>
2387
2388         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2389         * cp-tree.h (struct language_function): Rename x_dtor_label to
2390         x_cdtor_label.
2391         (dtor_label): Rename ...
2392         (cdtor_label): ... to this.
2393         * decl.c (begin_constructor_body): Remove.
2394         (check_special_function_return_type): Maybe change the return type.
2395         (grokdeclarator): Pass the class type.
2396         (start_preparsed_function): Constructors may need a return label.
2397         (finish_constructor_body, finish_destructor_body): Set the return
2398         value.
2399         (begin_function_body): Don't call begin_constructor_body.
2400         (finish_function): Don't warn for constructors or destructors.
2401         (implicitly_declare_fn): Maybe change the return type.
2402         * optimize.c: Include target.h.
2403         (maybe_clone_body): Remap the function result.
2404         * semantics.c: Include target.h.
2405         (finish_return_stmt): Maybe jump to return label for constructors.
2406
2407 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
2408
2409         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2410         (check_field_decls): Or here.
2411         (check_methods): Or here.
2412         (initialize_array): Don't mess with DECL_CONTEXT.
2413         * cp-tree.h (start_decl): Adjust prototype.
2414         (determine_visibility): New function.
2415         * decl.c (duplicate_decls): Remove checks for hidden "operator
2416         new".
2417         (build_library_fn_1): Give all library functions default
2418         visibility.
2419         (start_decl): Add pop_scope_p parameter.  Tidy.
2420         (cp_finish_decl): Do not pop scopes here.  Call
2421         determine_visibility for variable definitions.
2422         (start_preparsed_function): Call determine_visibility.
2423         * decl2.c (determine_visibility): New function.
2424         * method.c (use_thunk): Fix formatting.
2425         * parser.c (cp_parser_condition): Adjust calls to start_decl.
2426         (cp_parser_init_declarator): Likewise.
2427         * pt.c (instantiate_decl): Always call pop_nested_class.
2428         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2429         (tinfo_base_init): Likewise.
2430
2431 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
2432
2433         PR c++/16707
2434         * name-lookup.c (validate_nonmember_using_decl): Robustify.
2435
2436 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
2437
2438         PR c++/16224
2439         * name-lookup.c (decl_namespace): Remove.
2440         (current_decl_namespace): Use decl_namespace_context instead of
2441         decl_namespace.
2442         (push_decl_namespace): Likewise.
2443         (arg_assoc_class): Likewise.
2444         (arg_assoc_type): Likewise.
2445         * pt.c (check_specialization_namespace): New function.
2446         (maybe_process_partial_specialization): Use it.
2447         (register_specialization): Likewise.
2448
2449         PR c++/16489
2450         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2451         * call.c (null_ptr_cst_p): Handle variables with constant
2452         initializers.
2453         * pt.c (convert_nontype_argument): Use
2454         DECL_INTEGRAL_CONSTANT_VAR_P.
2455         * semantics.c (finish_id_expression): Likewise.
2456
2457         PR c++/16529
2458         * decl.c (duplicate_decls): Reject duplicate namespace
2459         declarations.
2460
2461         PR c++/16810
2462         * typeck.c (build_ptrmemfunc): Loosen assertion.
2463
2464 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2465
2466         * call.c (z_candidate::template_decl): Rename from template.
2467         (add_template_candidate_real): Adjust member reference.
2468         (joust): Likewise.
2469
2470 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
2471
2472         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2473         (lang_decl_flags): Narrow the width of "languages".  Add
2474         repo_available_p.
2475         (DECL_NEEDED_P): Remove.
2476         (FOR_EACH_CLONE): New macro.
2477         (DECL_REPO_AVAILABLE_P): Likewise.
2478         (DECL_TINFO_P): Likewise.
2479         (set_linkage_according_to_type): Declare.
2480         (import_export_vtable): Remove.
2481         (import_export_tinfo): Likewise.
2482         (mark_needed): New function.
2483         (decl_needed_p): Likewise.
2484         (note_vauge_linkage_fn): Likewise.
2485         (init_repo): Change prototype.
2486         (repo_template_used): Remove.
2487         (repo_template_instantiated): Likewise.
2488         (repo_emit_p): New function.
2489         (repo_export_class_p): Likewise.
2490         (no_linkage_check): Change prototype.
2491         * class.c (set_linkage_according_to_type): New function.
2492         (build_vtable): Use it.  Do not call import_export_vtable.  Set
2493         DECL_IGNORED_P if appropriate.
2494         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2495         (make_rtL_for_nonlocal_decls): Check for template instantiations
2496         explicitly.
2497         (grokfndecl): Adjust call to no_linkage_check.
2498         (set_linkage_for_static_data_member): New function.
2499         (grokvardecl): Use it.  Adjust call to no_linkage_check.
2500         (grokdeclarator): Use set_linkage_for_static_data_member.
2501         * decl2.c (note_vague_linkage_fn): New function.
2502         (note_vague_linkage_var): Likewise.
2503         (finish_static_data_member_decl): Use it.
2504         (import_export_vtable): Remove.
2505         (import_export_class): Use repo_export_class_p.
2506         (var_finalized_p): Simplify.
2507         (maybe_emit_vtables): Simplify.
2508         (mark_needed): New function.
2509         (decl_needed_p): Likewise.
2510         (import_export_decl): Add documentation and consistency checks.
2511         Use repo_emit_p.  Handle virtual tables and RTTI information
2512         here.
2513         (import_export_tinfo): Remove.
2514         (write_out_vars): Call import_export_decl.
2515         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2516         whenever one is.
2517         (finish_file): Use decl_needed_p.  Do not call import_export_decl
2518         for undefined static data members.  Do not warn about undefined
2519         inlines when using a repository.
2520         (mark_used): Use note_vague_linkage_fn.  Always defer template
2521         instantiations.
2522         * lex.c (cxx_init): Adjust call to init_repo.  Always set
2523         flag_unit_at_a-time.
2524         * method.c (synthesize_method): Remove unncessary
2525         import_export_decl call.
2526         (implicitly_declare_fn): Use set_linkage_according_to_type.
2527         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2528         * pt.c (instantiate_class_template): Don't redundantly add classes
2529         to keyed_classes.  Don't call repo_template_used.
2530         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2531         templates with internal linkage.
2532         (check_instantiated_args): Adjust call to no_linkage_check.
2533         (instantiate_template): Use FOR_EACH_CLONE.
2534         (mark_definable): New function.
2535         (mark_decl_instantiated): Use it.
2536         (do_decl_instantiation): Adjust tests for explicit instantiation
2537         after "extern template".
2538         (instantiate_class_member): Do not use repo_template_instantiated.
2539         (do_type_instantiation): Simplify.
2540         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
2541         Simplify.
2542         * repo.c (repo_get_id): Remove.
2543         (original_repo): Remove.
2544         (IDENTIFIER_REPO_USED): Remove.
2545         (IDENTIFIER_REPO_CHOSEN): Remove.
2546         Remove all #if 0'd code.
2547         (repo_template_used): Remove.
2548         (repo_template_instantiated): Remove.
2549         (temporary_obstack_initialized_p): New variable.
2550         (init_repo): Register with lang_post_pch_load.  Avoid creating
2551         identifiers unnecessarily.  Don't use original_repo.  Close the
2552         file here.
2553         (reopen_repo_file_for_write): Not here.
2554         (finish_repo): Always write out a new repository file.
2555         (repo_emit_p): New function.
2556         (repo_export_class_p): Likewise.
2557         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2558         (involves_incomplete_p): New function.
2559         (tinfo_base_init): Use it.
2560         (ptr_initializer): Remove non_public_ptr parameter.
2561         (ptm_initializer): Likewise.
2562         (get_pseudo_ti_init): Likewise.
2563         (unemitted_tinfo_decl_p): Remove.
2564         (emit_tinfo_decl): Use import_export_decl.
2565         * semantics.c (expand_body): Move updates of static_ctors and
2566         static_dtors to ...
2567         (expand_or_defer_fn): ... here.
2568         * tree.c (no_linkage_check): Add relaxed_p parameter.
2569
2570 2004-07-28  Eric Christopher  <echristo@redhat.com>
2571
2572         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2573
2574 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2575
2576         * cp-tree.h (struct tree_pair_s): New.
2577         (typedef tree_pair_p): New.
2578         (DEF_VEC_O(tree_pair_s)): New.
2579         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2580         (CLASSTYPE_VCALL_INDICES): Update documentation.
2581         * class.c (get_vcall_index): Adjust.
2582         (add_vcall_offset): Adjust.
2583
2584 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
2585
2586         * pt.c, typeck.c: Remove spurious carriage returns.
2587
2588 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2589
2590         PR c++/14429
2591         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2592         when the type of ARG is not dependent.
2593
2594 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
2595
2596         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2597         (lang_specific_driver): If the C++ or math library options don't
2598         start with '-l', don't count them as added libraries.
2599
2600 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2601
2602         * decl.c (xref_basetypes): Adjust base access vector creation.
2603         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2604         access accesses.
2605         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2606
2607 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
2608             Brian Ryner  <bryner@brianryner.com>
2609
2610         PR c++/15000
2611         PR c++/9283
2612         * class.c (check_field_decls): Apply hidden visibility if
2613         -fvisibility-inlines-hidden and inlined unless otherwise specified
2614         (build_vtable): Set vtable visibility to class visibility.
2615         (check_field_decls): Default static member visibility to class
2616         visibility.
2617         (check_methods): Default method visibility to class visibility.
2618         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2619         CLASSTYPE_VISIBILITY_SPECIFIED macro.
2620         * decl.c (duplicate_decls): New logic for merging definition decls
2621         with declaration decls. Added ignore & warning when non default
2622         applied to global operator new or delete.
2623         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2624         wherever VISIBILITY was changed
2625         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2626         visibility.
2627         (tinfo_base_init): Set typeinfo name visibility to class visibility.
2628
2629 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
2630
2631         * decl.c: Rename all identifiers named `class' to `cl'.
2632         * cp-tree.h: Likewise.
2633
2634 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2635
2636         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2637         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2638         * name-lookup.c (binding_entry_make): Use GGC_NEW.
2639         (binding_table_construct): Use GGC_CNEWVEC.
2640         (binding_table_new): Use GGC_NEW.
2641         (cxx_binding_make): Likewise.
2642         (begin_scope): Likewise.
2643         (push_to_top_level): Use GCC_CNEW.
2644         * parser.c (cp_token_cache_new): Likewise.
2645         (cp_token_cache_push_token): Likewise.
2646         (cp_lexer_new_main): Likewise.
2647         (cp_lexer_new_from_tokens): Likewise.
2648         (cp_parser_context_new): Likewise.
2649         (cp_parser_new): Likewise.
2650         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2651         * lex.c (cxx_make_type): Use GGC_CNEW.
2652         (retrofit_lang_decl): Use GGC_NEWVAR.
2653         (cxx_dup_lang_specific_decl): Likewise.
2654         (copy_lang_type): Likewise.
2655         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2656         (save_function_data): Likewise.
2657         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2658         (cxx_push_function_context): Likewise.
2659
2660 2004-07-25  Richard Henderson  <rth@redhat.com>
2661
2662         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2663         DECL_IGNORED_P on RESULT_DECL.
2664         * semantics.c (finalize_nrv): Copy them too.
2665
2666 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2667
2668         * search.c (lookup_conversion_operator): Avoid two loops.
2669         (add_conversions): Remove.
2670         (check_hidden_convs, split_conversions,
2671         lookup_conversions_r):  New.
2672         (lookup_conversions): Use lookup_conversions_r.
2673
2674 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2675
2676         * pt.c (get_template_base): Check type is completable.
2677
2678 2004-07-21  Eric Christopher  <echristo@redhat.com>
2679
2680         * decl.c (poplevel): Inline unused variable checking.
2681         Change formatting.
2682
2683 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
2684
2685         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2686         integer vectors.
2687
2688 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2689
2690         PR c++/14497
2691         * pt.c (check_explicit_specialization): Remove extension to accept
2692         specializations without template headers. Fall-through to normal
2693         processing.
2694
2695 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2696
2697         PR c++/509
2698         * pt.c (determine_specialization): New parameter template_count.
2699         Disambiguate between member templates and member functions counting
2700         the template headers.
2701         (check_explicit_specialization): Update caller.
2702         (tsubst_friend_function): Likewise.
2703
2704 2004-07-20  Steven Bosscher  <stevenb@suse.de>
2705
2706         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2707         * cp-tree.h (tinst_level_t): New tree type.
2708         (union lang_tree_node): Handle it.
2709         (TINST_LOCATION): New accessor macro.
2710         (make_tinst_level): New prototype.
2711         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2712         * decl.c (cp_tree_node_structure): Likewise.
2713         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2714         (print_instantiation_partial_context): Likewise.
2715         * pt.c (pop_tinst_level): Likewise.
2716          (push_tinst_level): Use make_tinst_level.
2717         * tree.c (make_tinst_level): New function.
2718         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2719
2720 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
2721
2722         * parser.c (cp_parser_simple_type_specifier): Fix typo.
2723
2724         PR c++/16637
2725         * parser.c (cp_parser_simple_type_specifier): Do not record usage
2726         of globally-qualified names.
2727
2728 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2729
2730         PR c++/16175
2731         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2732         cv qualifier.
2733
2734 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
2735
2736         PR c++/16623
2737         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2738         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2739         * class.c (add_implicitly_declared_members): Use
2740         CLASSTYPE_LAZY_ASSIGNMENT_OP.
2741         * method.c (lazily_declare_fn): Clear
2742         CLASSTYPE_LAZY_ASSIGNMENT_OP.
2743         * search.c (lookup_fnfields_1): Check it.
2744
2745 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2746
2747         * cp-tree.h (vec_binfo_member): Remove.
2748         * tree.c (vec_binfo_member): Remove.
2749
2750         * cp-tree.h (struct lang_type_class): Remove vfields field.
2751         (CLASSTYPE_VFIELDS): Remove.
2752         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2753         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2754         handling.
2755         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2756         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2757         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2758
2759 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2760
2761         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2762         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2763         Moved to common.
2764         (BINFO_LANG_SLOTS): Remove.
2765         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2766         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2767         * class.c (check_bases): Adjust BINFO accessors.
2768         (determine_primary_base, finish_struct_bits,
2769         maybe_warn_about_overly_private_class, warn_hidden,
2770         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2771         warn_about_ambiguous_bases, get_vfield_name,
2772         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2773         add_vcall_offset_vtbl_entries_r): Likewise.
2774         * dump.c (cp_dump_tree): Likewise.
2775         * init.c (sort_mem_initializers, expand_member_init, build_delete,
2776         push_base_cleanups): Likewise.
2777         * method.c (do_build_copy_constructor, do_build_assign_ref,
2778         synthesize_exception_spec): Likewise.
2779         name-lookup.c (arg_assoc_class): Likewise.
2780         * pt.c (instantiate_class_template,
2781         get_template_base_recursive): Likewise.
2782         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2783         * typeck2.c (process_init_constructor): Likewise.
2784         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2785         dfs_access_in_type, dfs_walk_real, look_for_overrides,
2786         types_overlap_p, copied_binfo, original_binfo): Likewise.
2787         (binfo_for_vtable): Remove
2788
2789 2004-07-20  Steven Bosscher  <stevenb@suse.de>
2790
2791         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2792         thunk_alias, and the access and virtual_offset fields.
2793         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2794         * decl.c (finish_case_label): Update c_add_case_node call.
2795
2796 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
2797
2798         Revert patch for PR c++/16623.
2799
2800 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
2801
2802         * except.c: Remove two spurious carriage returns.
2803
2804 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
2805
2806         PR c++/16623
2807         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2808         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2809         * class.c (add_implicitly_declared_members): Use
2810         CLASSTYPE_LAZY_ASSIGNMENT_OP.
2811         * method.c (lazily_declare_fn): Clear
2812         CLASSTYPE_LAZY_ASSIGNMENT_OP.
2813         * search.c (lookup_fnfields_1): Check it.
2814
2815 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
2816
2817         * class.c (add_method): Delay adding the slot until the end.
2818         (determine_primary_base): Adjust VEC_iterate invokation.
2819         (resort_type_method_vec, finish_struct_methods, warn_hidden,
2820         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2821         build_vtbl_initializer): Likewise.
2822         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2823         build_vbase_delete): Likewise.
2824         * method.c (do_build_copy_constructor): Likewise.
2825         * name-lookup.c (new_class_binding, print_binding_level,
2826         poplevel_class, store_class_bindings, push_to_top_level,
2827         pop_from_top_level): Likewise.
2828         * pt.c (check_explicit_specialization): Likewise.
2829         * search.c (lookup_conversion_operator, lookup_fnfields_1,
2830         get_pure_virtuals, add_conversions, dfs_check_overlap,
2831         binfo_for_vbase): Likewise.
2832
2833 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2834
2835         PR c++/12170
2836         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2837         innermost set of template arguments during deduction.  Simplify.
2838
2839 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
2840
2841         * typeck.c (build_modify_expr, build_x_modify_expr): Set
2842         TREE_NO_WARNING on assignments with an operator other than '='.
2843
2844 2004-07-10  Steven Bosscher  <stevenb@suse.de>
2845             Joseph S. Myers  <jsm@polyomino.org.uk>
2846
2847         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2848         * decl2.c (grokfield): Don't check current_class_depth via
2849         unused TREE_COMPLEXITY.
2850         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2851         to avoid the missing parentheses warning.
2852         Don't set C_SET_EXP_ORIGINAL_CODE.
2853
2854 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
2855
2856         * tree.c (no_linkage_helper): Remove.
2857         (no_linkage_check): Don't use walk_tree_without_duplicates.
2858
2859         * mangle.c (write_expression): Issue a sorry for zero-operand
2860         functional casts.
2861
2862 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2863
2864         PR c++/13092
2865         * init.c (build_offset_ref): Build SCOPE_REF with non-null
2866         TREE_TYPE for non-dependent names.
2867         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2868         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2869         unknown_type_node as its TREE_TYPE.
2870         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2871         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2872         (dump_expr) <SCOPE_REF case>: Likewise.
2873
2874 2004-07-17  Jason Merrill  <jason@redhat.com>
2875
2876         PR c++/16115
2877         * call.c (type_passed_as): Make the invisible reference type
2878         __restrict.
2879         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2880         cp_genericize_r.  Handle invisible reference lowering.
2881         (is_invisiref_parm): New fn.
2882         (cp_genericize): Adjust the types of invisible reference parms.
2883         Don't repeat the walk for clones.
2884         * decl.c (store_parm_decls): Don't generate any code for clones.
2885
2886 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
2887
2888         * cp-tree.h (builtin_function): Declare.
2889
2890 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
2891
2892         * class.c (finish_struct_methods): Remove unncessary code.
2893         (add_implicitly_declared_members): Create declarations for default
2894         constructors and copy constructors lazily.
2895         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2896         lazy_copy_ctor.
2897         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2898         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2899         * decl2.c (check_classfn): Robustify.
2900         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2901         (locate_ctor): Handle lazy default constructors.
2902         (locate_copy): Handle lazy copy constructors.
2903         (implicitly_declare_fn): Make sure we're looking at the
2904         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
2905         set TYPE_HAS_CONSTRUCTOR.
2906         (lazily_declare_fn): New function.
2907         * name-lookup.c (constructor_name_full): Simplify.
2908         * search.c (lookup_fnfields_1): Lazily create methods, as
2909         necessary.
2910         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2911
2912 2004-07-16  Steven Bosscher  <stevenb@suse.de>
2913
2914         * cp-tree.h (struct lang_type): Don't have three GTY options on a
2915         single bit GTY desc.
2916
2917 2004-07-16  Richard Henderson  <rth@redhat.com>
2918
2919         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2920         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2921         * tree.c (cp_copy_res_decl_for_inlining): Remove.
2922
2923 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
2924
2925         * class.c (finish_struct_bits): Use for loop.
2926         (propagate_binfo_offsets): Do primary binfo outside of loop.
2927
2928         PR c++/16583
2929         * dump.c (cp_dump_tree): Don't dump the bases if there's no
2930         binfo.
2931
2932         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2933
2934 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
2935
2936         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2937         has_abstract_assign_ref.  Make methods a VEC(tree) *.
2938         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2939         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2940         (CLASSTYPE_DESTRUCTORS): Likewise.
2941         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2942         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2943         (add_method): Change prototoype.
2944         * class.c (add_method): Remove error_p parameter.  Adjust for
2945         changes to CLASSTYPE_METHOD_VEC.
2946         (handle_using_decl): Adjust call to add_method.
2947         (maybe_warn_about_overly_private_class): Adjust for
2948         changes to CLASSTYPE_METHOD_VEC.
2949         (resort_type_method_vec): Likewise.
2950         (finish_struct_methods): Likewise.
2951         (check_for_override): Likewise.
2952         (warn_hidden): Likewise.
2953         (add_implicitly_declared_members): Defer creation of assignment
2954         operators.  Adjust call to add_method.
2955         (clone_function_decl): Adjust call to add_method.
2956         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2957         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2958         * decl.c (grok_special_member_properties): Don't set
2959         TYPE_HAS_ABSTRACT_ASSIGN_REF.
2960         * decl2.c (check_classfn): Adjust for
2961         changes to CLASSTYPE_METHOD_VEC.
2962         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2963         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2964         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2965         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
2966         cp_finish_decl.
2967         * pt.c (check_explicit_specialization): Adjust for
2968         changes to CLASSTYPE_METHOD_VEC.
2969         (instantiate_class_template): Do not set
2970         TYPE_HAS_ABSTRACT_ASSIGN_REF.
2971         * ptree.c (cxx_print_type): Don't try to print
2972         CLASSTYPE_METHOD_VEC.
2973         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
2974         * search.c (lookup_field_r): Adjust for
2975         changes to CLASSTYPE_METHOD_VEC.
2976         (lookup_fnfields): Likewise.
2977         (lookup_conversion_operator): Likewise.
2978         (lookup_fnfields_1): Likewise.  Create assignment operators
2979         lazily.
2980         (look_for_overrides_here): Adjust for
2981         changes to CLASSTYPE_METHOD_VEC.
2982         (add_conversions): Likewise.
2983         * semantics.c (finish_member_declaration): Adjust call to add_method.
2984
2985 2004-07-15  Jason Merrill  <jason@redhat.com>
2986
2987         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
2988         references and pointers are compatible.
2989
2990 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
2991
2992         * decl.c (xref_basetypes): Refactor.
2993         * tree.c (copy_base_binfos): Replace with ...
2994         (copy_binfo): ... this. Deep copy the given binfo, (not the just
2995         bases of the given base).
2996         * cp-tree.h (copy_base_binfo): Remove.
2997         (copy_binfo): Declare.
2998
2999 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
3000
3001         * name-lookup.c (set_inherited_value_binding_p): Add class_type
3002         parameter.
3003         (get_class_binding): Adjust.
3004         (push_class_level_binding): Don't use set_inherited_value_binding_p.
3005
3006 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
3007
3008         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3009         * decl.c (xref_basetypes): Set it here.
3010
3011         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3012         Don't check for incomplete base.
3013         (get_vfield_name): Simplify while loop.
3014         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3015
3016 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
3017
3018         * lex.c (cxx_make_type): Remove call to get_pointer_type.
3019
3020         * cp-tree.h (IDENTIFIER_VALUE): Remove.
3021         (BINFO_PUSHDECLS_MARKED): Likewise.
3022         (maybe_inject_for_scope_var): Likewise.
3023         (push_class_decls): Likewise.
3024         * name-lookup.h (push_class_binding): Remove.
3025         (innermost_non_namespace_value): New function.
3026         (outer_binding): Likewise.
3027         * class.c (add_method): Push bindings before adding to
3028         TYPE_METHODS.
3029         (restore_class_cache): Do not restore class_shadowed.
3030         (pushclass): Do not add USING_DECLs.  Do not call
3031         push_class_decls.
3032         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3033         * decl.c (pushdecl): Use outer_binding.
3034         (poplevel): Set the scope for an out-of-scope for-loop declaration
3035         appropriately.
3036         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3037         * name-lookup.c (new_class_binding): New function.
3038         (push_binding): Use it.
3039         (pushdecl): Use innermost_non_namespace_value.
3040         (maybe_inject_for_scope_var): Remove.
3041         (push_class_binding): Remove.
3042         (set_inherited_value_binding_p): New function.
3043         (get_class_binding): New function.
3044         (push_class_level_binding): Assert that the current_class_type is
3045         being defined.
3046         (outer_binding): New function.
3047         (innermost_non_namespace_value): Likewise.
3048         (lookup_name_real): Use outer_binding.
3049         (lookup_name_current_level): Ignore out-of-scope variables.
3050         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3051         (lookup_template_class): Likewise.
3052         * search.c (dfs_push_type_decls): Remove.
3053         (dfs_push_decls): Likewise.
3054         (setup_class_bindings): Likewise.
3055         (lookup_field_1): Handle USING_DECLs from dependent scopes.
3056         (marked_pushdecls_p): Remove.
3057         (unmarked_pushdecls_p): Remove.
3058         (marked_identifiers): Remove.
3059         (setup_class_bindings): Remove.
3060         (dfs_push_type_decls): Remove.
3061         (dfs_push_decls): Remove.
3062         (push_class_decls): Remove.
3063
3064 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
3065
3066         PR c++/16518
3067         PR c++/16337
3068         * decl.c (grokvardecl): Make declspecs parameter const.
3069         (grokdeclarator): Likewise.  Adjust accordingly.
3070         * decl.h (grokdeclarator): Adjust declaration.
3071         * parser.c (cp_parser_init_declarator): Do not clear
3072         decl_specifiers->attributes.
3073
3074         * cp-tree.h (lang_identifier): Remove class_value.
3075         (IDENTIFIER_CLASS_VALUE): Remove.
3076         (pop_class_decls): Likewise.
3077         (init_search_processing): Likewise.
3078         * class.c (handle_using_decl): Use lookup_member, not
3079         IDENTIFIER_CLASS_VALUE.
3080         (restore_class_cache): New function, split out from ...
3081         (pushclass): ... here.  Do not call clear_identifier_class_values.
3082         (invalidate_class_lookup_cache): Do not clear
3083         IDENTIFIER_CLASS_VALUE.
3084         (popclass): Do not call pop_class_decls.
3085         (maybe_note_name_used_in_class): Do not save names looked up after
3086         the class is complete.  Use lookup_member, not
3087         IDENTIFIER_CLASS_VALUE.
3088         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3089         * decl.c (cxx_init_decl_processing): Do not call
3090         init_search_processing.
3091         * method.c (do_build_copy_constructor): Remove unnecessary code.
3092         (do_build_assign_ref): Likewise.
3093         * name-lookup.c (pushdecl): Use lookup_member, not
3094         IDENTIFIER_CLASS_VALUE.
3095         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3096         type_shadowed list.
3097         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3098         (push_class_binding): Do not set it.
3099         (clear_identifier_class_values): Remove.
3100         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3101         (store_binding): Do not save it.
3102         (pop_from_top_level): Do not restore it.
3103         * name-lookup.h (cxx_saved_binding): Remove class_value.
3104         (clear_identifier_class_values): Remove.
3105         * ptree.c (cxx_print_identifier): Do not print
3106         IDENTIFIER_CLASS_VALUE.
3107         * search.c (search_obstack): Remove.
3108         (push_stack_level): Remove.
3109         (pop_stack_level): Remove.
3110         (search_level): Remove.
3111         (search_stack): Remove.
3112         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3113         (setup_class_bindings): Use IDENTIFIER_MARKED, not
3114         IDENTIFIER_CLASS_VALUE.
3115         (marked_identifiers): New variable.
3116         (push_class_decls): Clear IDENTIFIER_MARKED.
3117         (pop_class_decls): Don't call pop_search_level.
3118         (init_search_processing): Remove.
3119
3120 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
3121
3122         * cp-tree.h (get_aggr_typedef): Remove.
3123         * init.c (get_aggr_typedef): Likewise.
3124
3125         * name-lookup.c (push_class_level_binding): Simplify.
3126
3127 2004-07-12  Andrew Pinski  <apinski@apple.com>
3128
3129         PR c++/16475
3130         Revert:
3131         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
3132                 PR c++/16276
3133                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3134                 is not public.
3135
3136 2004-07-12  Eric Christopher  <echristo@redhat.com>
3137
3138         * parser.c (cp_parser_class_head): Remove unused variable.
3139
3140 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3141
3142         * decl.c (grok_op_properties): Reject [de-]allocation functions
3143         declared in a namespace, or declared as static.
3144
3145 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
3146
3147         * cp-tree.h (make_binfo): Remove.
3148         * decl.c (xref_basetypes): Use make_tree_binfo directly.
3149         * tree.h (copy_base_binfos): Likewise.
3150         (make_binfo): Remove.
3151
3152         * call.c (build_user_type_conversion_1, build_new_op,
3153         check_constructor_callable, build_temp,
3154         perform_direct_initialization_of_possible): Pass type directly to
3155         lookup_fnfields & build_special_member_call.
3156         (build_special_member_call): Accept a type, and complete it.
3157         * class.c (finish_stuct_bits): Copy the BINFOs here.
3158         * cvt.c (ocp_convert): Pass type directly to
3159         build_special_member_call.
3160         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3161         (xref_basetypes): Allocate the binfo here. Adjust.
3162         * init.c (build_init, build_new_1): Pass type directly to
3163         build_special_member_call.
3164         * lex.c (cxx_make_type): Do not allocate binfo here.
3165         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3166         * parser.c (cp_parser_class_head): Always call xref_basetypes.
3167         * pt.c (instantiate_class_template): Likewise. Inhibit access
3168         checking for template friends.
3169         * ptree.c (cxx_print_type): Adjust record printing.
3170         * search.c (lookup_base): When taking a type, complete it before
3171         looking for a binfo.
3172         (lookup_member): Delay completing a type.
3173         (push_class_decls): Don't walk an incomplete type.
3174         (lookup_conversions): Likewise.
3175         * semantics.c (finish_stmt_expr_expr): Pass type directly to
3176         build_special_member_call.
3177         * tree.c (copy_base_binfos): Adjust.
3178         (make_binfo): Likewise.
3179         * typeck.c (build_modify_expr): Pass type directly to
3180         build_special_member_call.
3181         * typeck2.c (process_init_constructor): Check a binfo exists.
3182         (build_m_component_ref): Allow accessing an incomplete type.
3183         (build_functional_cast): Pass type directly to
3184         build_special_member_call.
3185
3186 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3187
3188         PR c++/2204
3189         * config-lang.in (gtfiles): Add typeck2.c.
3190         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3191         gt-cp-typeck2.h.
3192         * cp-tree.h: Declare complete_type_check_abstract.
3193         * typeck2.c (pat_calc_hash, pat_compare,
3194         complete_type_check_abstract): New functions.
3195         (abstract_virtuals_error): If the type is abstract, register the
3196         declaration within abstract_pending_vars for further checks.
3197         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3198         * decl.c (cp_finish_decl): Do not strip array types.
3199         (create_array_type_for_decl): Check for abstractness of the element
3200         type.
3201         (complete_vars): Call complete_type_check_abstract.
3202         * class.c (finish_struct): Prepare a list of virtual functions for
3203         template types, and call complete_vars on it to check for abstractness.
3204
3205 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
3206
3207         PR tree-optimization/14107
3208         * decl.c (finish_function): Remove temporary band-aid.
3209
3210 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
3211
3212         * call.c (build_operator_new_call): Avoid using push_to_top_level.
3213         (build_new_op): Adjust call to lookup_function_nonclass.
3214         * name-lookup.c (identifier_type_value): Adjust call to
3215         lookup_name_real.
3216         (lookup_name_real): Add block_p parameter.
3217         (lookup_name_nonclass): Adjust call to lookup_name_real.
3218         (lookup_function_nonclass): Likewise.
3219         (lookup_name): Likewise.
3220         * name-lookup.h (lookup_name_real): Change prototype.
3221         (lookup_name_nonclass): Likewise.
3222         * parser.c (cp_parser_lookup_name): Likewise.
3223
3224         * cp-tree.h (saved_scope): Make old_bindings a vector.
3225         (unuse_fields): Remove.
3226         * name-lookup.h (cxx_saved_binding): Define it.
3227         * class.c (pushclass): Don't use unuse_fields.
3228         * name-lookup.c (cxx_saved_binding_make): Remove.
3229         (store_binding): Add new bindings to a vector, using an
3230         accumulator style, rather than adding them to a list.
3231         (store_bindings): Adjust accordingly.
3232         (store_class_bindings): Likewise.
3233         (push_to_top_level): Likewise.
3234         (pop_from_top_level): Likewise.
3235         * optimize.c (maybe_clone_body): Must push_to_top_level and
3236         pop_from_top_level calls outside of loop.
3237         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3238         calls here from cp_parser_late_parsing_default_args.
3239         (cp_parser_save_default_args): Record the class type in which the
3240         function is declared.
3241         (cp_parser_late_parsing_default_args): Do not call
3242         push_nested_class/pop_nested_class.
3243         * search.c (dfs_unuse_fields): Remove.
3244         (unuse_fields): Remove.
3245
3246 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3247
3248         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3249         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3250         * cp-tree.h (poplevel): Declare.
3251         (set_block): Remove.
3252         * decl.c (set_block): Remove.
3253
3254 2004-07-10  Mike Stump  <mrs@apple.com>
3255
3256         * decl2.c (import_export_class): Never export/import vtables
3257         with inline key functions.
3258
3259 2004-07-09  Steven Bosscher  <stevenb@suse.de>
3260
3261         * typeck.c (c_expand_asm_operands): Remove.
3262
3263 2004-07-09  Mike Stump  <mrs@apple.com>
3264
3265         * typeck.c (build_class_member_access_expr): Skip null deref
3266         warning when we don't dereference it.
3267
3268 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3269
3270         PR c++/8211
3271         PR c++/16165
3272         * class.c (check_field_decls): Improve -Weffc++ warning: do not
3273         warn for pointers to functions/members, or for classes without
3274         destructors.
3275
3276 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
3277
3278         * name-lookup.h (struct cp_binding_level): Update documentation
3279         for class_shadowed.
3280
3281 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3282
3283         PR c++/16169
3284         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3285         returning CALL_EXPR, and non-reference return type.
3286
3287 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
3288
3289         * name-lookup.c (push_binding): Use VEC_reserve.
3290
3291 2004-07-08  Richard Henderson  <rth@redhat.com>
3292
3293         * cp-tree.h (expand_eh_spec_block): Remove.
3294
3295 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
3296
3297         * cp-tree.h (saved_scope): Remove x_previous_class_type and
3298         x_previous_class_values; add x_previous_class_level.
3299         (previous_class_type): Remove.
3300         (previous_class_values): Remove.
3301         (previous_class_level): New macro.
3302         * class.c (pushclass): Restore the identifier cache more
3303         expeditiously.
3304         (invalidate_class_lookup_cache): Use vector for class_shadowed and
3305         previous_class_values.
3306         * decl.c (poplevel): Likewise.
3307         * name-lookup.c (cxx_binding_init): New function.
3308         (cxx_binding_make): Use it.
3309         (push_binding): For a binding in a class level, use a vector of
3310         cp_class_binding nodes.
3311         (push_binding_level): New function.
3312         (begin_scope): Use it.
3313         (leave_scope): Do not put class binding levels on the free list.
3314         (print_binding_level): Adjust for the fact that class_shadowed is
3315         a vector.
3316         (poplevel_class): Likewise.
3317         (clear_identifier_class_values): Likewise.
3318         (push_class_level_binding): Likewise.
3319         (set_class_shadows): Remove.
3320         (store_binding): New function.
3321         (store_class_bindings): New function.
3322         (push_to_top_level): Use store_class_bindings as appropriate.
3323         (pop_from_top_level): Use previous_class_level, not
3324         previous_class_type.
3325         * name-lookup.h (cp_class_binding): New type.
3326         (cp_binding_level): Use a vector object for class_shadowed.
3327         (push_binding_level): Declare.
3328         (set_class_shadows): Remove.
3329
3330 2004-07-07  Andrew Pinski  <apinski@apple.com>
3331
3332         * class.c (instantiate_type): BUFFER_REF is dead.
3333         * lex.c (init_operators): IN_EXPR is dead.
3334
3335 2004-07-07  Jason Merrill  <jason@redhat.com>
3336
3337         PR c++/16334
3338         * call.c (build_new_op): Give overload warnings for built-in
3339         candidates.
3340
3341 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
3342
3343         PR c++/16276
3344         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3345         is not public.
3346
3347 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3348
3349         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3350         * class.c (build_primary_vtable, check_bases,
3351         determine_primary_base, finish_struct_bits,
3352         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3353         get_basefndecls, warn_hidden, walk_subobject_offsets,
3354         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3355         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3356         finish_struct_1, get_vfield_name, contains_empty_class_p,
3357         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3358         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3359         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3360         BINFO macros.
3361         * decl.c (xref_basetypes): Likewise.
3362         * dump.c (cp_dump_tree): Likewise.
3363         * error.c (dump_expr): Likewise.
3364         * init.c (sort_mem_initializers, expand_member_init,
3365         push_base_cleanups): Likewise.
3366         * method.c (do_build_copy_constructor, do_build_assign_reg,
3367         synthesize_exception_spec): Likewise.
3368         * name-lookup.c (arg_assoc_class): Likewise.
3369         * pt.c (instantiate_class_template, tsubst,
3370         get_template_base_recursive): Likewise.
3371         * ptree.c (cxx_print_type): Likewise.
3372         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3373         * search.c (lookup_base_r, dynamic_cast_base_recurse,
3374         dfs_access_in_type, access_in_type, lookup_field_queue_p,
3375         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3376         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3377         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3378         binfo_for_vtable, copied_binfo, original_binfo): Likewise
3379         * tree.c (copy_base_binfos, make_binfo): Likewise.
3380         * typeck.c (commmon_base_type): Likewise
3381         * typeck2.c (process_init_constructor): Likewise
3382
3383 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
3384
3385         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3386
3387 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3388
3389         PR c++/3671
3390         * pt.c (convert_nontype_argument): Disallow conversions between
3391         different enumeration types.
3392
3393 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3394
3395         * cp-tree.h (BINFO_MARKED): Remove.
3396         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3397         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3398         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3399         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3400         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3401         (mark_primary_bases, determine_primary_base, base_derived_from,
3402         dfs_find_final_overrider, dfs_find_final_overrider_q,
3403         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3404         dfs_modify_vtables, walk_subobject_offsets,
3405         layout_nonempty_base_or_field, build_base_field,
3406         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3407         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3408         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3409         build_ctor_vtbl_group, accumulate_vtble_inits,
3410         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3411         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3412         add_vcall_offset_vtbl_entries_1): Likewise.
3413         * decl.c (xref_basetypes): Incomming virtual base indicated by
3414         TREE_TYPE. Adjust.
3415         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3416         * init.c (finish_init_stmts, sort_mem_initializers,
3417         emit_mem_initializers, build_vtble_address, expand_member_init,
3418         push_base_cleanups): Likewise.
3419         * method.c (do_build_copy_constructor): Likewise.
3420         * pt.c (instantiate_class_template,
3421         get_template_base_recursive): Likewise.
3422         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3423         get_pseudo_ti_desc): Likewise.
3424         * search.c (lookup_base_r, dynamic_cast_base_recurse,
3425         binfo_from_vbase, binfo_via_virtual, copied_binfo,
3426         original_binfo): Likewise.
3427         * semantics.c (finish_base_specifier): Virtualness is indicated
3428         by TREE_TYPE.
3429         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3430
3431 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
3432
3433         Revert:
3434         2004-06-24  Jason Merrill  <jason@redhat.com>
3435         PR c++/16115
3436         * decl.c (grokparms): Give the PARM_DECL reference type if the
3437         parameter is passed by invisible reference.
3438
3439 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3440
3441         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3442         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3443         * pt.c (check_instantiated_args, unify): Likewise.
3444
3445 2004-07-05  Phil Edwards  <phil@codesourcery.com>
3446
3447         * Make-lang.in (check-c++, lang_checks):  Add some comments.
3448
3449 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
3450
3451         * cp-mudflap.c: Delete file.
3452         * Makefile.in: Remove all references to cp-mudflap.o.
3453
3454 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
3455
3456         * decl.c (cxx_init_decl_processing): Call
3457         build_common_tree_nodes before creating the global NAMESPACE_DECL.
3458
3459 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3460
3461         PR c++/2518
3462         * call.c (build_operator_new_call): Look only at global scope.
3463
3464 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3465
3466         * call.c (enforce_access): Expect TREE_BINFO.
3467         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3468         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3469         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3470         Adjust.
3471         (BINFO_LANG_ELTS): Remove.
3472         (BINFO_LANG_SLOTS): New.
3473         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3474         (CLASSTYPE_TEMPLATE_INFO): Adjust.
3475         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3476         * search.c (lookup_member): Check TREE_BINFO.
3477         * semantics.c (perform_or_defer_access_check): Likewise.
3478         (check_accessibility_of_qualified_id): Check
3479         deferred_access_no_check.
3480         * tree.c (make_binfo): Use make_tree_binfo.
3481
3482 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
3483
3484         * method.c (implicitly_declare_fn): Set linkage of generated
3485         functions.
3486
3487 2004-07-04  Richard Henderson  <rth@redhat.com>
3488
3489         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3490
3491 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
3492
3493         PR c++/3761
3494         * name-lookup.c (push_class_level_binding): Don't pass a
3495         TREE_LIST of ambiguous names to check_template_shadow as it
3496         only handles declarations. Instead, pull the declaration
3497         out and pass that.
3498
3499 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3500
3501         PR c++/14971
3502         * pt.c (check_explicit_specialization): Clarify error message.
3503
3504 2004-07-02  Richard Henderson  <rth@redhat.com>
3505
3506         * tree.c (cp_unsave_r): Update remap_save_expr call.
3507
3508 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
3509
3510         PR c++/16240
3511         * mangle.c (write_template_arg): Correct mangling.
3512
3513         PR c++/16297
3514         * decl.c (grokdeclarator): Robustify.
3515
3516 2004-07-01  Richard Henderson  <rth@redhat.com>
3517
3518         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3519         * method.c (synthesize_method): Don't clear_last_expr.
3520         * name-lookup.c (maybe_push_cleanup_level): Likewise.
3521
3522 2004-07-01  Nick Clifton  <nickc@redhat.com>
3523
3524         * decl2.c (import_export_class): Invoke the
3525         import_export_class field in the gcc_target structure if it is not
3526         empty.
3527
3528 2004-06-30  Richard Henderson  (rth@redhat.com>
3529
3530         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3531         * method.c (use_thunk): Likewise.
3532
3533 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
3534
3535         * call.c (build_over_call), typeck.c (build_function_call): Call
3536         check_function_arguments instead of check_function_format.
3537
3538 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
3539
3540         * call.c (build_over_call), typeck.c (build_function_call): Update
3541         calls to check_function_format.
3542
3543 2004-06-30  Richard Henderson  <rth@redhat.com>
3544
3545         * call.c (build_over_call): Use __builtin_memcpy for copying
3546         CLASS_AS_BASE rather than funny casting.
3547
3548 2004-06-30  Richard Henderson  <rth@redhat.com>
3549
3550         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3551         TYPE_SIZE_UNIT of full_type.
3552
3553 2004-06-30  Per Bothner  <per@bothner.com>
3554
3555         Conditionally compile support for --enable-mapped_location.
3556         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
3557         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
3558         adjustments - which I don't understand.
3559         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
3560         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
3561         (print_instantiation_partial_context):  Use expand_location.
3562         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
3563         * name-lookup.c:  Likewise.
3564         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
3565         * name-lookup.c:  Use input_line macro.
3566         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
3567         (cp_parser_statement):  Rename locaal variable statement_locus to
3568         statement_location and use SET_EXPR_LOCATION macro.
3569         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
3570         * tree.c (cp_walk_subtrees):  Likewise.
3571
3572 2004-06-29  Per Bothner  <per@bothner.com>
3573
3574         * tree.c (build_min_nt, build_min, build_min_non_dep):
3575         Don't set TREE_COMPLEXITY from input_line.
3576
3577 2004-06-29  Paul Brook  <paul@codesourcery.com>
3578
3579         * init.c: Include target.h.
3580         (get_cookie_size): Remove and replace with target hook.
3581         Update callers.
3582         (build_new_1): Store the element size in the cookie.
3583
3584 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3585
3586         PR c++/16260
3587         * parser.c (cp_parser_template_declaration_after_export): Disable
3588         access checks here ...
3589         (cp_parser_class_specifier): ... not here.
3590
3591 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3592
3593         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3594         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3595         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3596         TREE_CHECK macro.
3597
3598 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3599
3600         * cp-tree.h (struct deferred_access): Move to ...
3601         * semantics.c (struct deferred_access): ... here. Adjust.
3602         (deferred_access_stack): Make a VEC(deferred_access),
3603         (deferred_access_free_list): Remove.
3604         (deferred_access_no_check): New.
3605         (push_deferring_access_checks, resume_deferring_access_checks,
3606         stop_deferring_access_checks, pop_deferring_access_checks,
3607         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3608         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3609
3610 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3611
3612         PR c++/16174
3613         * call.c (build_temp): Declare.
3614         (check_constructor_callable): New.
3615         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3616         CONSTRUCTOR_CALLABLE.
3617         (convert_like_real, initialize_reference): Use
3618         check_constructor_callable.
3619         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3620         (LOOKUP_*): Renumber.
3621
3622 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3623
3624         * friend.c (add_friend): Only perform access checks when context
3625         is a class.
3626         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3627         * parser.c (cp_parser_class_specifier): Disable access checks here
3628         when parsing the body of a templated class.
3629         * semantics.c (perform_or_defer_access_checks): Reorder to allow
3630         NULL binfos when not checking access.
3631
3632 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3633
3634         Use vector API for vbase list.
3635         * cp-tree.h: Include vec.h
3636         (DEF_VEC_P (tree)): New type.
3637         (struct lang_type_class): Change vbase's member type.
3638         (binfo_for_vbase): Declare.
3639         * class.c (determine_primary_base, base_derived_from,
3640         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3641         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3642         build_vtbl_initializer): Adjust.
3643         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3644         vbases.
3645         * init.c (sort_mem_initializers, expand_member_init,
3646         push_base_cleanups): Adjust.
3647         * method.c (do_build_copy_constructor): Adjust.
3648         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3649         (binfo_for_vbase): New.
3650         * tree.c (copy_base_binfos): Adjust.
3651
3652 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
3653
3654         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3655
3656 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3657
3658         PR c++/14123
3659         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3660         paranthesis in case of pointers to array members.
3661         * error.c (dump_type_prefix): Likewise.
3662         (dump_type_suffix): Maybe issue a whitespace when printing
3663         ARRAY_TYPE.
3664
3665 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
3666
3667         PR c++/16193
3668         * parser.c (cp_parser_set_decl_spec_type): Refine test for
3669         redefinition of built-in types.
3670
3671 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3672
3673         * error.c (pp_template_argument_list_start): Remove.
3674         (pp_template_argument_list_end): Likewise.
3675         (pp_separate_with_comma): Use pp_cxx_separate_with.
3676         (reinit_global_formatting_buffer): Remove.
3677         (pp_non_consecutive_character): Likewise.
3678         (dump_scope): Use pp_cxx_colon_colon.
3679         (dump_template_parameter): Use pp_cxx_identifier,
3680         pp_cxx_tree_identifier and pp_cxx_whitespace.
3681         (dump_templat_bindings): Replace use of pp_string with sequence
3682         of pp_cxx_whitespace and pp_equal.
3683         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3684         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
3685         padding here.
3686         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3687         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
3688         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3689         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3690         pp_cxx_right_bracket, pp_cxx_identifier throughout,
3691         (dump_decl): Likewise.
3692         (dump_template_decl): Likewise.
3693         (dump_function_decl): Likewise.  Set padding as appropriate.
3694         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3695         pp_cxx_right_paren.
3696         (dump_exception_spec): Likewise.
3697         (dump_function_name): Use pp_cxx_tree_identifier and
3698         pp_cxx_identifier.
3699         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3700         pp_cxx_end_template_argument_list.
3701         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3702         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3703         pp_cxx_whitespace throughout.
3704         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3705         pp_cxx_right_paren.
3706         (dump_unary_op): Likewise.
3707         (reinit_cxx_pp): New function.
3708         (type_as_string); Use it.
3709         (expr_as_string): Likewise.
3710         (decl_as_string); Likewise.
3711         (context_as_string): Likewise.
3712         (lang_decl_name): Likewise.
3713         (decl_to_string): Likewise.
3714         (expr_to_string): Likewise.
3715         (parm_to_string): Likewise.
3716         (type_to_string): Likewise.
3717         (args_to_string): Likewise.
3718         (cv_to_string): Likewise.
3719
3720 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
3721
3722         * cp-tree.h (cp_cv_quals): New type.
3723         (cp_declarator): Use it instead of "tree" as appropriate.
3724         (grok_method_quals): Adjust prototype.
3725         (grokclassfn): Likewise.
3726         (do_friend): Likewise.
3727         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3728         (grokdeclarator): Likewise.
3729         * decl2.c (grok_method_quals): Likewise.
3730         (grokclassfn): Likewise.
3731         * friend.c (do_friend): Likewise.
3732         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3733         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3734         (make_pointer_declarator): Likewise.
3735         (make_reference_declarator): Likewise.
3736         (make_ptrmem_declarator): Likewise.
3737         (cp_parser_ptr_operator): Likewise.
3738         (cp_parser_cv_qualifier_seq_opt): Likewise.
3739         (cp_parser_cv_qualifier_opt): Remove.
3740         (cp_parser_new_declarator_opt): Adjust call to
3741         cp_parser_ptr_operator.
3742         (cp_parser_conversion_declaration_opt): Likewise.
3743         (cp_parser_declarator): Use cp_cv_quals, not tree.
3744         (cp_parser_direct_declarator): Likewise.
3745
3746 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3747
3748         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3749         Rename DECL_STMT to DECL_EXPR.
3750         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3751         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3752         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3753
3754 2004-06-26  Jan Hubicka  <jh@suse.cz>
3755
3756         PR C++/14865
3757         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
3758         reachability analysis.
3759
3760 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
3761
3762         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3763         2004-06-23 change.
3764
3765 2004-06-25  Paul Brook  <paul@codesourcery.com>
3766
3767         * decl2.c (get_guard): Call targetm.cxx.guard_type.
3768         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3769
3770 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
3771
3772         * decl.c (grokdeclarator): Restore error messages about __thread.
3773         * parser.c (cp_parser_decl_specifier_seq): Likewise.
3774
3775 2004-06-24  Jason Merrill  <jason@redhat.com>
3776
3777         PR c++/16115
3778         * decl.c (grokparms): Give the PARM_DECL reference type if the
3779         parameter is passed by invisible reference.
3780
3781 2004-06-24  Andreas Schwab  <schwab@suse.de>
3782
3783         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3784
3785 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
3786
3787         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3788         (cp/decl.o): Likewise.
3789         (cp/decl2.o): Likewise.
3790         (cp/pt.o): Likewise.
3791         (cp/semantics.o): Likewise.
3792         * config-lang.in (gtfiles): Do not reference cp/lex.h.
3793         * class.c: Do not include lex.h.
3794         (add_implicitly_declared_members): Do not use
3795         adding_implicit_members.
3796         (check_bases_and_members): Do not talk about grok_x_components.
3797         * cp/cp-tree.h (adding_implicit_members): Remove.
3798         (cp_storage_class): New type.
3799         (cp_decl_spec): Likewise.
3800         (cp_decl_specifier_seq): Likewise.
3801         (cp_parameter_declarator): Use it for the decl_specifiers field.
3802         (check_tag_decl): Adjust prototype.
3803         (shadow_tag): Likewise.
3804         (groktypename): Likewise.
3805         (start_decl): Likewise.
3806         (start_function): Likewise.
3807         (start_method): Likewise.
3808         (grok_x_components): Remove.
3809         (grokfield): Adjust prototype.
3810         (grokbitfield): Likewise.
3811         (finish_member_class_template): Remove.
3812         * decl.c: Do not include lex.h.
3813         (adding_implicit_members): Do not define.
3814         (check_tag_decl): Do not use trees to represent decl-specifiers.
3815         (shadow_tag): Likewise.
3816         (groktypename): Likewise.
3817         (start_decl): Likewise.
3818         (grokvardecl): Likewise.
3819         (grokdeclarator): Likewise.
3820         (grokparms): Likewise.
3821         (start_function): Likewise.
3822         (start_method): Likewise.
3823         * decl.h (grokdeclarator): Adjust prototype.
3824         * decl2.c: Do not include lex.h.
3825         (grok_x_components): Remove.
3826         (grokfield): Do not use trees to represent decl-specifiers.
3827         (grokbitfield): Likewise.
3828         * lex.c: Do not include lex.h.
3829         * lex.h: Remove.
3830         * parser.c: Include target.h.
3831         (clear_decl_specs): New function.
3832         (cp_parser_translation_unit): Do not use trees to represent
3833         decl-specifiers.
3834         (cp_parser_postfix_expression): Likewise.
3835         (cp_parser_new_type_id): Likewise.
3836         (cp_parser_condition): Likewise.
3837         (cp_parser_simple_declaration): Likewise.
3838         (cp_parser_decl_specifier_seq): Likewise.
3839         (cp_parser_function_specifier_opt): Likewise.
3840         (cp_parser_conversion_type_id): Likewise.
3841         (cp_parser_template_parameter): Likewise.
3842         (cp_parser_explicit_instantiation): Likewise.
3843         (cp_parser_type_specifier): Likewise.
3844         (cp_parser_simple_type_specifier): Likewise.
3845         (cp_parser_init_declarator): Likewise.
3846         (cp_parser_type_id): Likewise.
3847         (cp_parser_type_specifier_seq): Likewise.
3848         (cp_parser_parameter_declaration): Likewise.
3849         (cp_parser_member_declaration): Likewise.
3850         (cp_parser_exception_declaration): Likewise.
3851         (cp_parser_function_definition_from_specifiers_and_declarator):
3852         Likewise.
3853         (cp_parser_single_declaration): Likewise.
3854         (cp_parser_save_member_function_body): Likewise.
3855         (cp_parser_friend_p): Likewise.
3856         (cp_parser_set_storage_class): New function.
3857         (cp_parser_set_decl_spec_type): Likewise.
3858         * pt.c: Do not include lex.h.
3859         * semantics.c: Likewise.
3860         (finish_member_class_template): Remove.
3861
3862 2004-06-23  Roger Sayle  <roger@eyesopen.com>
3863
3864         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
3865         longer take both "args" and "convert_args" as arguments.
3866         (build_op_delete_call): Update call to build_cxx_call.
3867         (build_over_call): Likewise, update call to build_cxx_call.
3868         * cp-tree.h (build_cxx_call): Update funtion prototype.
3869         * typeck.c (build_function_call): Don't call expand_tree_builtin.
3870         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3871         (throw_bad_typeid): Likewise.
3872         (build_dynamic_cast_1): Likewise.
3873
3874 2004-06-22  Richard Henderson  <rth@redhat.com>
3875
3876         * class.c (build_vfn_ref): Take a pointer not object.  Build
3877         an OBJ_TYPE_REF.
3878         (cp_fold_obj_type_ref): New.
3879         * call.c (build_over_call): Update build_vfn_ref call.
3880         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3881         * cp-tree.h (cp_fold_obj_type_ref): Declare.
3882
3883 2004-06-21  Jason Merrill  <jason@redhat.com>
3884
3885         PR c++/16112
3886         * cp-gimplify.c (cp_gimplify_init_expr): Look through
3887         CLEANUP_POINT_EXPR.
3888
3889 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
3890
3891         * cp-tree.def (NEW_EXPR): Add a fourth slot.
3892         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3893         (TREE_PARMLIST): Likewise.
3894         (CALL_DECLARATOR_PARMS): Likewise.
3895         (CALL_DECLARATOR_QUALS): Likewise.
3896         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3897         (cp_declarator_kind): New type.
3898         (cp_parameter_declarator): Likewise.
3899         (cp_declarator): Likewise.
3900         (cp_error_declarator): Likewise.
3901         (no_parameters): Likewise.
3902         (groktypename): Change prototype.
3903         (start_decl): Likewise.
3904         (start_handler_parms): Likewise.
3905         (get_scope_of_declarator): Likewise.
3906         (start_function): Likewise.
3907         (start_preparsed_function): New function.
3908         (start_function): Change prototype.
3909         (start_method): Likewise.
3910         (grokfield): Likewise.
3911         (grokbitfield): Likewise.
3912         (build_new): Likewise.
3913         (make_pointer_declarator): Remove.
3914         (make_reference_declarator): Likewise.
3915         (make_call_declarator): Likewise.
3916         (set_quals_and_spec): Likewise.
3917         (process_template_parm): Change prototype.
3918         (begin_function_definition): Remove.
3919         (finish_parmlist): Remove.
3920         * decl.c (groktypename): Do not use trees to represent
3921         declarators.
3922         (start_decl): Likewise.
3923         (start_handler_parms): Remove.
3924         (get_scope_of_declarator): Reimplement.
3925         (grokdeclarator): Do not use trees to represent declarators.
3926         (grokparms): Likewise.
3927         (start_function): Likewise.
3928         (start_method): Likewise.
3929         (build_void_list_mode): Do not use TREE_PARMLIST.
3930         * decl.h (grokdeclarator): Change prototype.
3931         * decl2.c (grok_method_quals): Robustify.
3932         (grok_x_components): Do not use trees to represent declarators.
3933         (grokfield): Likewise.
3934         (grokbitfield): Likewise.
3935         (start_objects): Build FUNCTION_DECLs, not declarators.
3936         (start_static_storage_duration_function): Likewise.
3937         * init.c (build_new): Simplify.
3938         * lex.c (make_pointer_declarator): Remove.
3939         (make_reference_declarator): Likewise.
3940         (make_call_declarator): Likewise.
3941         (set_quals_and_spec): Likewise.
3942         * method.c (use_thunk): Use start_preparsed_function.
3943         (synthesize_method): Likewise.
3944         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3945         * optimize.c (maybe_clone_body): Use start_preparsed_function.
3946         * parser.c (cp_error_declarator): New variable.
3947         (declarator_obstack): Likewise.
3948         (alloc_declarator): New function.
3949         (make_declarator): Likewise.
3950         (make_id_declarator): Likewise.
3951         (make_pointer_declarator): Likewise.
3952         (make_reference_declarator): Likewise.
3953         (make_ptrmem_declarator): Likewise.
3954         (make_call_declarator): Likewise.
3955         (make_array_declarator): Likewise.
3956         (no_parameters): New variable.
3957         (make_parameter_declarator): Likewise.
3958         (cp_parser_check_for_definition_in_return_type): Do not use trees
3959         to represent declarators.
3960         (cp_parser_translation_unit): Likewise.
3961         (cp_parser_new_expression): Likewise.
3962         (cp_parser_new_type_id): Likewise.
3963         (cp_parser_new_declarator_opt): Likewise.
3964         (cp_parser_direct_new_declarator): Likewise.
3965         (cp_parser_condition): Likewise.
3966         (cp_parser_declaration_statement): Likewise.
3967         (cp_parser_declaration): Likewise.
3968         (cp_parser_conversion_type_id): Likewise.
3969         (cp_parser_conversion_declarator_opt): Likewise.
3970         (cp_parser_template_parameter_list): Likewise.
3971         (cp_parser_template_parameter): Likewise.
3972         (cp_parser_explicit_instantiation): Likewise.
3973         (cp_parser_init_declarator): Likewise.
3974         (cp_parser_declarator): Likewise.
3975         (cp_parser_direct_declarator): Likewise.
3976         (cp_parser_type_id): Likewise.
3977         (cp_parser_parameter_declaration_clause): Likewise.
3978         (cp_parser_parameter_declaration_list): Likewise.
3979         (cp_parser_parameter_declaration): Likewise.
3980         (cp_parser_member_declaration): Likewise.
3981         (cp_parser_exception_declaration): Likewise.
3982         (cp_parser_check_declarator_template_parameters): Likewise.
3983         (cp_parser_function_definition_from_specifiers_and_declarator):
3984         Likewise.
3985         (cp_parser_save_member_function_body): Likewise.
3986         * pt.c (process_template_parm): Add is_non_type parameter.
3987         (convert_template_argument): Adjust call to groktypename.
3988         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
3989         (tsubst): Do not expect declarators.
3990         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
3991         argument.
3992         (instantiate_decl): Use start_preparsed_function.
3993         * semantics.c (begin_function_definition): Remove.
3994         (finish_parmlist): Remove.
3995         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
3996         declarators.
3997
3998 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3999
4000         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4001         (build_new_method_call): Likewise.
4002         * decl.c (local_variable_p_walkfn): Don't walk into types.
4003         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4004         (build_anon_union_vars): Add new operand for COMPONENT_REF.
4005         * init.c (buld_new): Add new operand for ARRAY_REF.
4006         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4007         (do_build_assign_ref): Likewise.
4008         * parser.c (cp_parser_direct_new_declarator): Add new operands
4009         for ARRAY_REF.
4010         (cp_parser_direct_declarator): Likewise.
4011         * pt.c (tsubst): Likewise.
4012         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4013         for COMPONENT_REF.
4014         * semantics.c (finish_non_static_data_member): Add new operand
4015         for COMPONENT_REF.
4016         * typeck.c (build_class_member_access_expr): Likewise.
4017         (build_class_member_access_expr, finish_class_member_access_expr):
4018         Likewise.
4019         (build_ptrmemfunc_access_expr): Likewise.
4020         (build_array_ref): Add new operands for ARRAY_REF.
4021         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4022         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4023
4024 2004-06-21  Richard Henderson  <rth@redhat.com>
4025
4026         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4027         * parser.c (cp_parser_jump_statement): Update commentary.
4028         * pt.c (tsubst_expr): Use RETURN_EXPR.
4029         * semantics.c (finish_return_stmt): Likewise.
4030         (finalize_nrv_r): Likewise.
4031         * typeck.c, typeck2.c: Update file start commentary.
4032
4033 2004-06-21  Richard Henderson  <rth@redhat.com>
4034
4035         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4036
4037 2004-06-20  Richard Henderson  <rth@redhat.com>
4038
4039         * cp-tree.h (add_decl_stmt): Declare.
4040         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4041         * semantics.c (maybe_cleanup_point_expr): New.
4042         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4043         finish_for_expr, finish_switch_cond): Use it.
4044         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
4045
4046 2004-06-20  Richard Henderson  <rth@redhat.com>
4047
4048         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4049         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4050         (cp_gimplify_expr): Call it.
4051         (gimplify_cleanup_stmt): Move from c-gimplify.c.
4052         (cp_genericize): New.
4053         * decl.c (finish_function): Call it.
4054         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4055         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4056         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4057         (cp_genericize): Declare.
4058         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4059         * dump.c (cp_dump_tree): Likewise.
4060         * semantics.c (push_cleanup): Move from c-semantics.c.
4061
4062 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
4063
4064         * cp-lang.c (has_c_linkage): Implement.
4065
4066         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4067         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4068         (builtin_function_1): Don't call make_decl_rtl.
4069         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4070         (grokvardecl): Don't call mangle_decl.
4071         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4072         DECL_ASSEMBLER_NAME.
4073         * method.c (set_mangled_name_for_decl): Delete.
4074         * name-lookup.c (pushdecl): When a local extern shadows a
4075         file-scope declaration of the same object, give both DECLs the
4076         same DECL_UID.
4077         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4078         on DECL_ASSEMBLER_NAME.
4079
4080 2004-06-19  Richard Henderson  <rth@redhat.com>
4081
4082         * cp-gimplify.c: Remove unnecessary prototypes.
4083         (cp_gimplify_stmt): Merge into ...
4084         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
4085         stmts_are_full_exprs_p frobbing.
4086         * cp-tree.h (cp_gimplify_stmt): Remove.
4087         * pt.c (tsubst_expr): Merge prep_stmt and unify.
4088         * tree.c (init_tree): Don't set lang_gimplify_stmt.
4089
4090 2004-06-18  Richard Henderson  <rth@redhat.com>
4091
4092         PR c++/16034
4093         * semantics.c (begin_cond): New.
4094         (finish_cond): Rewrite to handle template DECL_STMTs specially.
4095         Assume that non-template decls go land before the conditional.
4096         (simplify_loop_decl_cond): Likewise.
4097         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4098         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4099         begin_switch_stmt, finish_switch_cond): Update to match.
4100
4101 2004-06-17  Jason Merrill  <jason@redhat.com>
4102
4103         PR c++/16015
4104         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4105         (finish_stmt_expr_expr): Update type after conversions.
4106         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4107         Handle void initializer.
4108         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4109
4110 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
4111
4112         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4113         * cp-tree.h (defer_fn): Delete.
4114         * decl2.c (defer_fn): Delete.
4115         (finish_file): Simplify deferred_fns loops; check that
4116         only used inline functions get into deferred_fns.
4117         (mark_used): Inline previous contents of defer_fn.
4118
4119 2004-06-16  Richard Henderson  <rth@redhat.com>
4120
4121         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4122         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4123         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4124         of CTOR_INITIALIZER ...
4125         (pp_cxx_statement): ... here.
4126         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4127         (finish_function): Use alloc_stmt_list to zap entire function.
4128         * parser.c (cp_parser_compound_statement): Update commentary.
4129         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4130         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4131         (finish_stmt_expr): Don't look through COMPOUND_STMT.
4132
4133 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
4134
4135         * pt.c (mark_decl_instantiated): Don't call defer_fn.
4136
4137 2004-06-16  Richard Henderson  <rth@redhat.com>
4138
4139         * parser.c (cp_parser_labeled_statement): Update commentary.
4140         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4141         * tree.c (mark_local_for_remap_r): Likewise.
4142
4143 2004-06-16  Richard Henderson  <rth@redhat.com>
4144
4145         * parser.c (cp_parser_asm_definition): Update commentary.
4146         * pt.c (tsubst_expr): Use ASM_EXPR.
4147         * semantics.c (finish_asm_stmt): Likewise.
4148
4149 2004-06-16  Richard Henderson  <rth@redhat.com>
4150
4151         * decl.c (finish_destructor_body): Use LABEL_EXPR.
4152         * parser.c (cp_parser_statement): Update commentary.
4153         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4154         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4155         * tree.c (mark_local_for_remap_r): Likewise.
4156
4157 2004-06-16  Richard Henderson  <rth@redhat.com>
4158
4159         PR c++/16012
4160         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4161         statement in FOR_INIT_STMT for templates.
4162
4163 2004-06-15  Richard Henderson  <rth@redhat.com>
4164
4165         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4166         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4167         (genericize_try_block): Use gimplify_stmt.
4168         (genericize_catch_block, genericize_eh_spec_block): Likewise.
4169         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4170         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4171         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4172         (cp_tree_chain_matters_p): Remove.
4173         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4174         (COMPOUND_STMT_BODY_BLOCK): New.
4175         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4176         (EXPR_STMT_STMT_EXPR_RESULT): New.
4177         (building_stmt_tree): Check cur_stmt_list.
4178         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4179         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4180         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4181         (cp_finish_decl): Use push_cleanup.
4182         (start_function, finish_function): Use statement lists.
4183         (finish_stmt): Do nothing.
4184         * except.c (begin_eh_spec_block): Use statement lists.
4185         (check_handlers_1, check_handlers): Likewise.
4186         * init.c (construct_virtual_base): Don't add extra compound stmts.
4187         (build_vec_init): Likewise.
4188         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4189         * name-lookup.h (struct cp_binding_level): Add statement_list.
4190         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4191         (cp_parser_labeled_statement, cp_parser_expression_statement,
4192         cp_parser_statement_seq_opt): Likewise.
4193         (cp_parser_compound_statement): Likewise.  Take bool for try block.
4194         (cp_parser_selection_statement): Tidy if processing.
4195         (cp_parser_already_scoped_statement): Rewrite to do what it says.
4196         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4197         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
4198         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4199         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4200         (finish_cond): New, rewritten from FINISH_COND.
4201         (simplify_loop_decl_cond): New.
4202         (finish_expr_stmt): Avoid nested EXPR_STMTs.
4203         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4204         begin_else_clause, finish_else_clause, finish_if_stmt,
4205         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4206         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4207         finish_for_cond, finish_for_stmt, begin_switch_stmt,
4208         finish_switch_cond, finish_switch_stmt, begin_try_block,
4209         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4210         finish_handler_sequence, finish_function_handler_sequence,
4211         begin_handler, finish_handler_parms, finish_handler,
4212         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4213         using statement lists.
4214         (begin_compound_stmt): Replace has_no_scope argument with flags.
4215         Update all callers.  Use statement lists.
4216         (finish_compound_stmt): Likewise.
4217         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4218         (current_scope_stmt_stack): Remove.
4219         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4220         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4221         Rewrite with statement lists.
4222
4223 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
4224
4225         * parser.c: Change all assignments of c_lex_string_translate
4226         to true and false to 1 and 0.
4227         (cp_lexer_read_token): Convert type of the translated string.
4228         (cp_parser_skip_to_closing_parentheses): Preserve original
4229         value of c_lex_string_translate, and set it to -1 while
4230         running.
4231         (cp_parser_cache_group): Likewise.
4232         (cp_parser_cache_group_1): Renamed.
4233         (cp_parser_asm_operand_list): Remove redundant setting of
4234         c_lex_string_translate.
4235         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4236         Handle chained strings.
4237
4238 2004-06-12  Andrew Pinski  <apinski@apple.com>
4239
4240         PR c++/14639
4241         Revert:
4242         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
4243
4244                 * cp-tree.h: Fix typo.
4245
4246                 * cp-tree.h: Include cgraph.h
4247                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4248                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4249
4250 2004-06-12  Jason Merrill  <jason@redhat.com>
4251
4252         PR tree-optimization/14107
4253         * decl.c (finish_function): Warn about no return in all functions.
4254
4255 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4256
4257         * cp-tree.h (struct language_function): Remove cannot_inline.
4258         * decl.c (save_function_data): cannot_inline is no more.
4259         (cxx_push_function_context): Likewise.
4260         * decl2.c (start_objects, start_static_storage_duration_function):
4261         Reset DECL_INLINE, set DECL_UNINLINABLE.
4262
4263 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4264
4265         PR c++/15967
4266         * search.c (lookup_field): Propagate the ambiguity list.
4267         (lookup_fnfields): Likewise.
4268
4269 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4270
4271         PR c++/15947
4272         * parser.c (cp_parser_template_name): Ctors/dtors never need a
4273         template keyword to disambiguate.
4274
4275 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
4276
4277         PR c++/15096
4278         * decl.c (grokdeclarator): Ignore pointer-to-members when
4279         computing template depth.
4280
4281         PR c++/14930
4282         * name-lookup.c (pushtag): Do not try to put class declarations in
4283         explicit specialization scopes.
4284
4285 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
4286
4287         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4288
4289 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
4290
4291         PR c++/15862
4292         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4293         bindings for undeclared built-ins.
4294
4295 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4296
4297         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4298         appear at the correct location.
4299
4300 2004-06-10  Jason Merrill  <jason@redhat.com>
4301
4302         PR c++/15875
4303         Revert:
4304         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4305         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4306         TREE_TYPE for non-dependent names.
4307         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4308         unknown_type_node as its TREE_TYPE.
4309         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4310         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4311         (dump_expr) <SCOPE_REF case>: Likewise.
4312
4313 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
4314
4315         PR c++/15227
4316         * parser.c (cp_parser_direct_declarator): Robustify.
4317
4318         PR c++/15877
4319         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4320         constants in non-dependent contexts.
4321
4322         PR c++/14211
4323         PR c++/15076
4324         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4325         necessary.
4326
4327 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
4328
4329         PR c++/14791
4330         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4331         specially.
4332
4333 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
4334
4335         Revert:
4336         PR c++/15815
4337         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
4338         * lex.c (handle_pragma_interface): Deprecate.
4339         (handle_pragma_implementation): Likewise.
4340
4341 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
4342
4343         * g++spec.c (lang_specific_driver): Remove check for -lm
4344         and -lmath when check it see if it was the math library.
4345
4346 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4347
4348         PR c++/7841
4349         * parser.c (cp_parser_direct_declarator): Reject constructor named
4350         as qualified template-id.
4351
4352 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
4353
4354         PR c++/15815
4355         * lex.c (handle_pragma_interface): Deprecate.
4356         (handle_pragma_implementation): Likewise.
4357
4358 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
4359
4360         PR c++/15766
4361         * parser.c (cp_parser_iteration_statement): Fix typo in error
4362         message.
4363
4364         PR c++/14777
4365         * pt.c (tsubst_default_argument): Do not defer access checks
4366         while substituting into the default argument.
4367
4368         PR c++/15554
4369         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4370         constant in a non-dependent context.
4371
4372         PR c++/15057
4373         * except.c (build_throw): Ensure that temp_expr has been
4374         initialized.
4375
4376 2004-06-06  Roger Sayle  <roger@eyesopen.com>
4377
4378         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4379
4380 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4381
4382         PR c++/15503
4383         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4384         'typename', and accept 'template'.
4385
4386 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
4387             Jan Hubicka  <jh@suse.cz>
4388
4389         PR c++/14639
4390         * method.c (use_think): Do not mark thunk as referenced.
4391
4392 2004-06-03  Matt Austern  <austern@apple.com>
4393
4394         PR c++/15428
4395         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4396         is nonzero, and if we see a noninline definition of a key method,
4397         make the vtables nonweak.
4398
4399 2004-06-02  Matt Austern  <austern@apple.com>
4400
4401         * cp-tree.h (instantiate_decl): new boolean parameter,
4402         undefined_ok. Current behavior is equivalent to its being 0.
4403         * decl2.c (mark_used): Add new argument when calling instantiate_decl
4404         * pt.c (mark_decl_instantiated): Unconditionally make
4405         instantiations explicit unconditionally
4406         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4407         since mark_decl_instantiated now does it.
4408         (instantiate_class_member): New.  Instantiate a member of an
4409         explicitly instantiated class template.
4410         (do_type_instantiation): Explicitly instantiate members of an
4411         explicitly instantiated class template.
4412         (instantiate_decl): if undefined_ok is nonzero, and if we're
4413         trying to explicitly instantiated a template with no definition,
4414         change it to an implicit instantiation.
4415         (instantiate_pending_templates): Add new argument to instantiate_decl.
4416         * tree.c (cp_cannot_inline_tree_fn): Likewise.
4417
4418 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
4419
4420         * cp-tree.h: Fix typo.
4421
4422         * cp-tree.h: Include cgraph.h
4423         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4424         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4425
4426 2004-06-01  Jason Merrill  <jason@redhat.com>
4427
4428         PR c++/15142
4429         * call.c (call_builtin_trap): Remove type parm.
4430         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4431         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4432
4433 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4434
4435         PR c++/13092
4436         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4437         TREE_TYPE for non-dependent names.
4438         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4439         unknown_type_node as its TREE_TYPE.
4440         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4441         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4442         (dump_expr) <SCOPE_REF case>: Likewise.
4443
4444 2004-06-01  Richard Henderson  <rth@redhat.com>
4445             Andrew Pinski  <pinskia@physics.uc.edu>
4446
4447         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4448         * parser.c (struct cp_parser): Remove in_offsetof.
4449         (cp_parser_new): Don't set it.
4450         (cp_parser_unary_expression): Don't check it.
4451         (cp_parser_postfix_open_square_expression): Split out from ...
4452         (cp_parser_postfix_expression): ... here.
4453         (cp_parser_postfix_dot_deref_expression): Likewise.
4454         (cp_parser_builtin_offsetof): New.
4455         (cp_parser_primary_expression): Use it.
4456
4457 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4458
4459         PR c++/14932
4460         * parser.c (cp_parser_postfix_expression): Allow subscript
4461         operator in offsetof.
4462
4463 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
4464
4465         PR c++/15701
4466         * friend.c (add_friend): Do not try to perform access checks for
4467         functions from dependent classes.
4468
4469 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4470
4471         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4472         (pp_cxx_begin_template_argument_list): Turn into a function.
4473         (pp_cxx_end_template_argument_list): Likewise.
4474         (pp_cxx_separate_with): Define.
4475         (pp_cxx_unqualified_id): Tidy.
4476         (pp_cxx_primary_expression): Likewise.
4477         (pp_cxx_postfix_expression): Likewise.
4478         (pp_cxx_expression): Likewise.
4479         (pp_cxx_simple_type_specifier): Likewise.
4480         (pp_cxx_type_specifier_seq): Likewise.
4481         (pp_cxx_parameter_declaration_clause): Likewise.
4482         (pp_cxx_exception_specification): Likewise.
4483         (pp_cxx_direct_declarator): Likewise.
4484         (pp_cxx_type_id): Likewise.
4485         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4486         cxx-pretty-print.c.
4487         (pp_cxx_left_paren): Likewise.
4488         (pp_cxx_right_paren): Likewise.
4489         (pp_cxx_left_brace): Likewise.
4490         (pp_cxx_right_brace): Likewise.
4491         (pp_cxx_left_bracket): Likewise.
4492         (pp_cxx_right_bracket): Likewise.
4493         (pp_cxx_dot): Likewise.
4494         (pp_cxx_identifier): Likewise.
4495         (pp_cxx_tree_identifier): Likewise.
4496         (pp_cxx_ampersand): New macro.
4497         (pp_cxx_star): Likewise.
4498         (pp_cxx_arrow): Likewise.
4499         (pp_cxx_semicolon): Likewise.
4500         (pp_cxx_complement): Likewise.
4501         (pp_cxx_begin_template_argument_list): Declaree.
4502         (pp_cxx_end_template_argument_list): Likewise.
4503         (pp_cxx_colon_colon): likewise.
4504
4505 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
4506
4507         * parser.c (cp_parser_simple_type_specifier): Explicitly test
4508         against NULL_TREE.
4509
4510 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
4511
4512         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4513         typeck.c: Fix comment formatting.
4514
4515 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
4516
4517         * cp-lang.c (cp_expand_decl): Remove.
4518         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4519
4520 2004-05-30  Andreas Jaeger  <aj@suse.de>
4521
4522         * lang-specs.h: Add missing initializers for .ii.
4523
4524 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
4525
4526         * decl.c (cp_make_fname_decl): Free return value from
4527         fname_as_string.
4528
4529 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
4530
4531         PR c++/15083
4532         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4533         even in a templat.e
4534         * init.c (build_new): Likewise.
4535
4536         PR c++/15640
4537         * name-lookup.c (arg_assoc): Robustify.
4538
4539         PR c++/15471
4540         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4541         when determining the scope to use for a pointer to member.
4542         (lookup_anon_field): Give it external linkage.
4543         * cp-tree.h (lookup_anon_field): Declare it.
4544         * expr.c (cplus_expand_constant): Use it.
4545
4546 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
4547
4548         PR c++/14668
4549         * parser.c (cp_parser_simple_type_specifier): Call
4550         maybe_note_name_used_in_class.
4551
4552 2004-05-28  Tom Marshall  <tmarshall@real.com>
4553
4554         PR c++/15214
4555         * class.c (finish_struct_1): Warn only if the dtor is non-private or
4556         the class has friends.
4557
4558 2004-05-27  Adam Nemet  <anemet@lnxw.com>
4559
4560         PR c++/12883
4561         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4562         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4563
4564 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
4565
4566         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4567         if it might be needed.
4568         * pt.c (mark_decl_instantiated): Only call defer_fn if
4569         the function actually needs processing in finish_file.
4570         * decl2.c (finish_file): Add check that elements in
4571         deferred_fns_used are really needed there.  Remove unnecessary
4572         test of DECL_SAVED_TREE.
4573
4574 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4575
4576         * Make-lang.in: No need to specify $(LIBCPP).
4577
4578 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
4579
4580         PR c++/15044
4581         * parser.c (cp_parser_class_head): Robustify.
4582
4583         PR c++/15317
4584         * parser.c (cp_parser_decl_specifier_seq): Correct error in
4585         comment.
4586         (cp_parser_constructor_declarator_p): Treat attributes
4587         as decl-specifiers.
4588
4589         PR c++/15329
4590         * typeck.c (build_unary_op): Do not attempt to resolve casts to
4591         base classes in templates.
4592
4593 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
4594
4595         PR c++/15165
4596         * pt.c (instantiate_template): Robustify.
4597
4598 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
4599
4600         PR c++/15025
4601         * decl.c (xref_tag): Issue errors about redeclaring template
4602         classes as non-template classes.
4603
4604 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
4605
4606         PR c++/14821
4607         * name-lookup.c (supplement_binding): Allow redefinitions of
4608         namespace aliases.
4609
4610         PR c++/14883
4611         * parser.c (cp_parser_template_argument): Robustify.
4612
4613 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4614
4615         * class.c (alter_access): Use %E format specifier to print an
4616         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
4617         (push_lang_context): Likewise.
4618         * decl.c (lookup_label): Likewise.
4619         (grokdeclarator): Likewise.
4620         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4621         * pt.c (do_type_instantiation): Likewise.
4622         * tree.c (handle_java_interface_attribute): Likewise.
4623         (handle_com_interface_attribute): Likewise.
4624         (handle_init_priority_attribute): Likewise.
4625
4626 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
4627
4628         PR c++/15285
4629         PR c++/15299
4630         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4631         recognized as overloaded functions.
4632
4633 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
4634
4635         PR c++/15507
4636         * class.c (layout_nonempty_base_or_field): Do not try to avoid
4637         layout conflicts for unions.
4638
4639         PR c++/15542
4640         * typeck.c (build_x_unary_op): Instantiate template class
4641         specializations before looking for "operator &".
4642
4643         PR c++/15427
4644         * typeck.c (complete_type): Layout non-dependent array types, even
4645         in templates.
4646
4647         PR c++/15287
4648         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4649         template.
4650
4651 2004-05-22  Roger Sayle  <roger@eyesopen.com>
4652
4653         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4654         returning when TREE_TYPE is error_mark_node.
4655         * typeck.c (require_complete_type): Return error_mark_node if
4656         value's type is an error_mark_node.
4657
4658 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
4659
4660         * optimize.c (calls_setjmp_r): Remove.
4661         (calls_setjmp_p): Remove.
4662         * cp-tree.c (calls_setjmp_p): Remove.
4663         * decl.c (finish_function): Do not call calls_setjmp_p.
4664
4665 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
4666
4667         * decl.c (cp_finish_decl): Use mark_decl_referenced.
4668         * decl2.c (maybe_make_one_only): Likewise.
4669         * method.c (use_thunk): Likewise.
4670
4671 2004-05-18  Jason Merrill  <jason@redhat.com>
4672
4673         * class.c (build_base_path): Tidy a bit.
4674
4675 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
4676
4677         * name-lookup.c (struct scope_binding): New.
4678         (EMPTY_SCOPE_BINDING): New.
4679         (lookup_using_namespace): Take a scope_binding instead of a
4680         cxx_binding.
4681         (qualified_lookup_using_namespace): Likewise.
4682         (cxx_binding_clear): Delete.
4683         (do_nonmember_using_decl): Use a scope_binding instead of a
4684         cxx_binding.
4685         (lookup_tag): Don't call select_decl.
4686         (ambiguous_decl): Don't return anything (and change callers to match).
4687         Take a scope_binding as the second parameter.
4688         (lookup_namespace_name): Use a scope_binding instead of a
4689         cxx_binding.
4690         (unqualified_namespace_lookup): Likewise.
4691         (lookup_qualified_name): Likewise.
4692         (select_decl): Take a scope_binding instead of a cxx_binding.
4693         Use macros rather than hand-coding tests for type-ness.
4694
4695 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4696
4697         * cp-gimplify.c: Rename from cp-simplify.c.
4698         * Make-lang.in, optimize.c: Update.
4699
4700 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4701
4702         Merge from tree-ssa-20020619-branch.  See
4703         ChangeLog.tree-ssa for details.
4704
4705         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4706         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4707         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4708         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4709         Merged.
4710         * cp-mudflap.c: New file.
4711         * cp-simplify.c:: New file.
4712
4713 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4714
4715         PR c++/14389
4716         * decl2.c (check_classfn): For member templates, compare also the
4717         template parameters to match the declaration.
4718         * cp-tree.h: Adjust declaration of check_classfn.
4719         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4720         * friend.c (do_friend): Likewise.
4721         * pt.c (tsubst_friend_function): Likewise.
4722
4723 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
4724
4725         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4726         Instead, dig into the representation type to find the array bound.
4727
4728 2004-04-30  Jason Merrill  <jason@redhat.com>
4729
4730         Refer to base members using COMPONENT_REFs where possible.
4731         * class.c (build_simple_base_path): New fn.
4732         (build_base_path): Use it for non-virtual base references.
4733         (layout_class_type): Change base fields to their real type
4734         after layout is done.
4735         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4736         * cp-lang.c (cxx_get_alias_set): Use it.
4737
4738 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
4739
4740         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4741         comment typos.
4742
4743 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4744
4745         PR c++/15064
4746         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4747         used in integral constant expressions.
4748
4749 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
4750
4751         * init.c (build_aggr_init): Fix accidental use of C99 construct in
4752         previous change.
4753
4754         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4755         braced initializer.
4756         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4757         * decl.c (reshape_init): Use it.
4758         * init.c (perform_member_init): Remove redundant condition.
4759         (build_aggr_init): Adjust to handle brace-enclosed initializers
4760         correctly.
4761         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4762
4763         * parser.c (cp_parser_initializer_clause): Do not set
4764         TREE_HAS_CONSTRUCTOR on the initializer.
4765         * rtti.c (tinfo_base_init): Likewise.
4766         (generic_initializer): Likewise.
4767         (ptr_initializer): Likewise.
4768         (ptm_initializer): Likewise.
4769         (class_initializer): Likewise.
4770         (get_pseudo_ti_init): Likewise.
4771         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4772
4773 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
4774
4775         * name-lookup.c (anonymous_namespace_name): Make static.
4776
4777 2004-04-19  Roger Sayle  <roger@eyesopen.com>
4778
4779         PR middle-end/14531
4780         * class.c (build_base_path): Call fold whilst building the NULL
4781         pointer check expression trees.
4782
4783 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4784
4785         * init.c (build_new_1): Don't use type size argument for Java
4786         _Jv_AllocObject call.
4787
4788 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
4789
4790         * method.c (make_alias_for_thunk): Remove preprocessor guard on
4791         declaration and definition.
4792
4793 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
4794
4795         PR c++/14808
4796         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4797         than ASM_OUTPUT_DEF.
4798
4799 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4800
4801         * decl2.c (mark_used): Don't segfault if cfun != NULL but
4802         current_function_decl == NULL.
4803
4804 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
4805
4806         PR c++/3518
4807         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4808         level.
4809
4810 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4811
4812         * init.c (decl_constant_value): Don't look at DECL_INITIAL
4813         of PARM_DECL.
4814         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4815         or TREE_SIDE_EFFECTS of a type.
4816
4817 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
4818
4819         PR c++/14007
4820         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4821         cv-qualifier unification.
4822         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4823
4824 2004-04-02  Jan Hubicka  <jh@suse.cz>
4825
4826         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4827         * cp-tree.h (cp_update_decl_after_saving): Declare.
4828         * tree.c (cp_update_decl_after_saving): Define.
4829
4830 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
4831
4832         PR c++/14803
4833         * typeck.c (get_delta_difference): Call fold before returning the
4834         value.
4835
4836 2004-04-01  Richard Henderson  <rth@redhat.com>
4837
4838         PR c++/14804
4839         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4840         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4841
4842 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
4843
4844         PR c++/14810
4845         * name-lookup.c (maybe_push_cleanup_level): Robustify.
4846
4847 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4848
4849         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4850
4851 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4852
4853         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4854         * class.c (check_bitfield_decl): Likewise.
4855         * cvt.c (type_promotes_to): Likewise.
4856         * decl.c (finish_enum): Likewise.
4857         * mangle.c (write_builtin_type): Likewise.
4858         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4859         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4860         (build_binary_op): Likewise.
4861
4862 2004-03-31  Jan Hubicka  <jh@suse.cz>
4863
4864         * tree.h (optimize_function): Kill prototype.
4865         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4866         * semantics.c (expand_body): Kill.
4867
4868 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
4869
4870         PR c++/14724
4871         * decl.c (start_decl_1): Do not decide whether or not to create a
4872         new cleanup level until after the type has been completed.
4873
4874         PR c++/14763
4875         * pt.c (tsubst_default_argument): Clear current_function_decl.
4876
4877 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4878
4879         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4880
4881 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
4882
4883         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4884         is null, just print the literal name and return.
4885
4886 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
4887
4888         * cxx-pretty-print.c: Fix comment typos.
4889
4890 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
4891
4892         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4893         Update copyright.
4894
4895 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
4896
4897         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4898         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4899         target hook.
4900
4901 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
4902
4903         PR 12267, 12391, 12560, 13129, 14114, 14133
4904         * cp-lang.c (c_reset_state): Delete.
4905         (push_file_scope, pop_file_scope): New stubs.
4906         * parser.c (c_parse_file): Call sorry() here if called more than once.
4907
4908 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4909
4910         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4911         for INTEGER_CST.
4912
4913 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4914
4915         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4916
4917 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4918
4919         * error.c (enum pad): Remove.
4920         (dump_qualifiers): Likewise.
4921         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4922         (dump_aggr_type): Likewise.
4923         (dump_type_suffix): Likewise.
4924         (dump_simple_decl): Likewise.
4925         (dump_function_decl): Likewise.
4926         (cv_to_string): Likewise.
4927         (dump_type_prefix): Likewise.  Adjust return void.
4928         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4929         cxx_pretty_print.h.
4930         (pp_cxx_template_keyword_if_needed): Document.
4931         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
4932         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4933         MUST_NOT_THROW_EXPR.
4934
4935 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
4936
4937         PR c++/14616
4938         * decl.c (cp_finish_decl): Compute the size of arrays declared in
4939         templates, if their type is non-dependent.
4940
4941 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
4942
4943         * call.c (build_op_delete_call): Do not forget the placement
4944         arguments when iterating through mutiple delete operators.
4945
4946         * cp-tree.h (svaed_scope): Remove last_parms.
4947         (NEW_DELETE_OPNAME_P): New macro.
4948         (last_function_parms): Remove.
4949         (do_friend): Adjust prototype.
4950         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4951         using last_function_parms.
4952         (grokfndecl): Take the PARM_DECLs as an argument, rather than
4953         using last_function_parms.
4954         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
4955         for class-specific operator new and operator delete.
4956         (grok_op_properties): Do not look for allocation functions with
4957         METHOD_TYPEs.
4958         (start_function): Use DECL_ARGUMENTS instead of
4959         last_function_parms.
4960         * decl.h (last_function_parms): Do not declare.
4961         * decl2.c (grokclassfn): Do not use last_function_parms.
4962         * friend.c (do_friend): Remove parmdecls parameter.
4963         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4964         (pop_from_top_level): Do not restore it.
4965         * pt.c (check_explicit_specialization): Do not adjust
4966         last_function_parms.
4967
4968         * name-lookup.c (do_local_using_decl): Create a local binding for
4969         types brought in via using declarations.
4970
4971         * name-lookup.c (lookup_arg_dependent): Handle block-scope
4972         function declarations correctly.
4973
4974         * semantics.c (finish_id_expression): Correct handling of
4975         conversion operators to dependent types.
4976
4977         * typeck.c (lookup_destructor): Allow the use of destructors from
4978         base classes.
4979
4980 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4981
4982         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
4983         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
4984         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
4985         the field is named TEMPLATE_TYPE_PARM_INDEX.
4986
4987 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4988
4989         PR c++/14545
4990         * parser.c (cp_parser_functional_cast): A cast to anything
4991         but integral or enumaration type is not an integral constant
4992         expression.
4993         * pt.c (value_dependent_expression_p): Handle cast expressions
4994         without operands (such as "int()").
4995
4996 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
4997
4998         * semantics.c (finish_pseudo_destructor_expr): Allow differing
4999         cv-qualification between the type named by the
5000         pseudo-destructor-name and the object-type.
5001
5002         * search.c (accessible_base_p): Handle non-proper bases.
5003
5004         * name-lookup.c (do_nonmember_using_decl): If a using declaration
5005         refers to a single overloaded function, set the type of the
5006         function.
5007         * tree.c (lvalue_type): Simplify.
5008         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5009         unknown type.
5010         (build_unary_op): Handle OVERLOADs with known types.
5011
5012         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5013         function templates.
5014
5015         * parser.c (cp_parser_postfix_expression): Handle the use of
5016         "typename" in non-dependent contexts.  Convert appropriately when
5017         when using a qualified name after "->" or ".".
5018
5019         * call.c (conditional_conversion): Honor the requirement that some
5020         conversions refer to the original object.
5021
5022 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
5023
5024         * call.c (build_conditional_expr): Do not call force_rvalue for
5025         operands of void_type when the conditional expression itself has
5026         void type.
5027         * name-lookup.c (pushdecl): Don't consider a declaration of a
5028         function named "main" to be an overload of a type named "main".
5029         * parser.c (cp_parser_template_name): Perform name lookup when the
5030         template name is proceeded by "template" if the qualifying scope
5031         is non-dependent.
5032         * typeck.c (composite_pointer_type_r): Correctly handle
5033         pointer-to-member types.
5034         (build_const_cast): Likewise.
5035
5036 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5037
5038         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5039         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5040         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5041         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5042         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5043         (TYPEOF_TYPE_EXPR): New macro.
5044         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5045         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5046         * pt.c (tsubst): Likewise.
5047         * semantics.c (finish_typeof): Likewise.
5048         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5049         and TEMPLATE_TYPE_PARM.
5050         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5051         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5052
5053 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
5054
5055         PR c++/14586
5056         * cp-tree.h (build_new_op): Change prototype.
5057         (build_x_binary_op): Likewise.
5058         * call.c (build_new_op): Add overloaded_p parameter.
5059         * decl2.c (grok_array_decl): Adjust call to build_new_op.
5060         * parser.c (cp_parser_binary_expression): Note that uses of
5061         overloaded operators prevents an expression from being considered
5062         an integral constant.
5063         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5064         build_x_binary_op.
5065         * semantics.c (finish_call_expr): Likewise.
5066         * typeck.c (rationalize_conditional_expr): Likewise.
5067         (build_x_indirect_ref): Likewise.
5068         (build_x_binary_op): Likewise.
5069         (build_x_unary_op): Likewise.
5070         (build_x_compound_expr): Likewise.
5071         (build_modify_expr): Likewise.
5072         * typeck2.c (build_x_arrow): Likewise.
5073
5074 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
5075
5076         * cp-lang.c, ptree.c: Update copyright.
5077
5078 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
5079
5080         PR c++/14550
5081         * parser.c (cp_parser_non_integral_constant_expression): Encode
5082         more of the idiom that surrounded calls to this function within
5083         the function itself
5084         (cp_parser_primary_expression): Adjust accordingly.
5085         (cp_parser_postfix_expression): Likewise.
5086         (cp_parser_unary_expression): Likewise.
5087         (cp_parser_cast_expression): Likewise.
5088         (cp_parser_assignment_expression): Likewise.
5089         (cp_parser_expression): Likewise.
5090         (cp_parser_new_expression): Note that new-expressions are not
5091         allowed in integral constant expressions.
5092         (cp_parser_delete_expression): Likewise.
5093
5094 2004-03-12  Matt Austern  <austern@apple.com>
5095
5096         * decl2.c (maybe_make_one_only): Look at
5097         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5098         to make an explicit instantiation weak.
5099         * method.c (use_thunk): Make sure we call comdat_linkage
5100         when appropriate.
5101         * pt.c (do_type_instantiation): On systems where weak symbols
5102         don't go in a static archive's TOC, explicit instantiation of a
5103         class must imply *explicit* instantiation of its memeber.
5104
5105 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
5106
5107         * call.c, cp-tree.h, pt.c: Fix comment typos.
5108
5109 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
5110
5111         PR c++/14510
5112         * decl.c (xref_tag): Disregard non-type declarations when
5113         looking up a tagged type.
5114
5115 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
5116
5117         PR c++/14397
5118         * call.c (convert_like_real): Build a const qualified temporary,
5119         when testing ctor access.
5120
5121 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
5122
5123         * call.c (initialize_reference): Fix typo.
5124
5125 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5126
5127         PR c++/14409
5128         * pt.c (determine_specialization): For member templates, match also
5129         constness.
5130
5131         PR c++/14448
5132         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5133         non-dependent.
5134         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5135
5136 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
5137
5138         PR c++/14230
5139         * call.c (initialize_reference): Handle initializers that are
5140         class-member access expressions applies to rvalues.
5141
5142 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
5143
5144         PR c++/14432
5145         * name-lookup.c (supplement_binding): Ignore functions that are
5146         marked DECL_ANTICIPATED.
5147
5148 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
5149
5150         PR c++/14401
5151         * class.c (check_field_decls): Complain about non-static data
5152         members of reference type in unions.  Propagate
5153         CLASSTYPE_REF_FIELDS_NEED_INIT and
5154         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5155         data members.
5156         * init.c (perform_member_init): Complain about mbmers with const
5157         type that are not explicitly initialized.
5158
5159 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
5160
5161         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5162         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5163         (lang_identifier): Remove implicit_decl and error_locus.
5164         (IDENTIFIER_IMPLICIT_DECL): Remove.
5165         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5166         (IDENTIFIER_ERROR_LOCUS): Likewise.
5167         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5168         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5169         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5170         (implicitly_declare): Remove.
5171         * decl.c (warn_extern_redeclared_static): Remove check of
5172         IDENTIFIER_IMPLICIT_DECL.
5173         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5174         (implicitly_declare): Remove.
5175         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5176         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5177         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5178         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5179         in the innermost scope, rather than at namespace scope.
5180         * name-lookup.c (push_local_binding): Give it external linkage.
5181         (pushdecl): Remove dead code.
5182         * name-lookup.h (push_local_binding): Declare it.
5183         * ptree.c (cxx_print_identifier): Don't print
5184         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5185         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5186         not IDENTIFIER_ERROR_LOCUS.
5187         * typeck.c (build_function_call): Remove dead code.
5188
5189 2004-03-08  Jason Merrill  <jason@redhat.com>
5190
5191         PR c++/13170
5192         * decl.c (xref_tag): Remove attribute handling.
5193         * cp-tree.h: Adjust prototype.
5194         * decl.c, parser.c, rtti.c: Adjust callers.
5195         * parser.c (cp_parser_class_head): Pass back attributes in the
5196         class head.
5197         (cp_parser_class_specifier): Adjust.
5198
5199 2004-03-08  Matt Austern  <austern@apple.com>
5200
5201         PR debug/14079
5202         * name-lookup.c (add_decl_to_level): Add extern variables, as well
5203         as static, to static_decls array.
5204
5205 2004-03-05  Jason Merrill  <jason@redhat.com>
5206
5207         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5208
5209 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
5210
5211         * decl.c (grokfndecl): Update old incorrect comment.
5212         (grokvardecl): Diagnose C++ variables of type with no linkage.
5213
5214 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
5215
5216         PR c++/14369
5217         * pt.c (build_non_dependent_expr): Do not create a
5218         NON_DEPENDENT_EXPR for a THROW_EXPR.
5219
5220 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5221
5222         PR c++/14369
5223         * error.c (dump_expr): Handle THROW_EXPR.
5224
5225 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
5226
5227         PR c++/14360
5228         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5229         lookup if ordinary name-lookup finds a non-function.
5230         * pt.c (tsubst_copy_and_build): Likewise.
5231
5232         PR c++/14361
5233         * parser.c (cp_parser_late_parsing_default_args): Check that there
5234         are no extra tokens after the end of the default-argument
5235         expression.
5236
5237 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
5238
5239         PR c++/14324
5240         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5241         having C++ linkage for name-mangling purposes.
5242
5243         PR c++/14260
5244         * parser.c (cp_parser_direct_declarator): Recognize constructor
5245         declarators that use a template-id to name the class being
5246         constructed.
5247
5248         PR c++/14337
5249         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5250         (tsubst_expr): Do not call tsubst_copy, even when
5251         processing_template_decl.
5252
5253 2004-03-01  Jeff Law  <law@redhat.com>
5254
5255         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5256         the proper type.
5257
5258 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
5259
5260         PR c++/14138
5261         * name-lookup.h (push_scope): Change prototype.
5262         * name-lookup.c (push_scope): Do not reenter the current class
5263         scope.
5264         * decl.c (grokfndecl): Check return code from push_scope before
5265         calling pop_scope.
5266         * decl2.c (check_classfn): Likewise.
5267         * parser.c (cp_parser_conversion_function_id): Likewise.
5268         (cp_parser_init_declarator): Likewise.
5269         (cp_parser_direct_declarator): Likewise.
5270         (cp_parser_class_specifier): Likewise.
5271         (cp_parser_class_head): Likewise.
5272         (cp_parser_lookup_name): Likewise.
5273         (cp_parser_constructor_declarator_p): Likewise.
5274         * pt.c (instantiate_class_template): Likewise.
5275         (resolve_typename_type): Likewise.
5276
5277 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
5278
5279         PR c++/14267
5280         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5281         extension.
5282
5283         PR debug/12103
5284         * class.c (update_vtable_entry_for_fn): Do not go through
5285         covariance machinery if the type returned by an overrider is the
5286         same as the original.
5287
5288 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
5289
5290         * call.c: Fix a comment typo.
5291
5292 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
5293
5294         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5295
5296 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
5297
5298         PR c++/14278
5299         * parser.c (cp_parser_parameter_declaration_list): Commit
5300         to fewer tentative parses.
5301
5302 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5303
5304         PR c++/14284
5305         * pt.c (dependent_type_p_r): A template template parameter is a
5306         dependent type.
5307
5308 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5309
5310         PR c++/14246
5311         * mangle.c (write_template_arg_literal): Don't rely on identity for
5312         boolean constants.
5313
5314 2004-02-24  Jason Merrill  <jason@redhat.com>
5315
5316         * tree.c (build_exception_variant): Use check_qualified_type.
5317
5318 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
5319             Kazu Hirata  <kazu@cs.umass.edu>
5320
5321         * decl.c (cxx_init_decl_processing): Don't check
5322         flag_writable_strings.
5323
5324 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
5325
5326         PR c++/14156
5327         * typeck.c (maybe_warn_about_returning_address_of_location):
5328         Change check for VAR_DECL to use DECL_P instead.
5329
5330 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5331
5332         PR c++/14250
5333         * cvt.c (build_expr_type_conversion): Type must be complete before
5334         looking up for conversions.
5335
5336 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5337
5338         PR c++/14143
5339         * name-lookup.c (arg_assoc_class): Don't look into template
5340         arguments if it is not a primary template.
5341
5342 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5343
5344         PR c++/12007
5345         * method.c (use_thunk): Always clone function argument tree.
5346
5347 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
5348
5349         PR c++/14199
5350         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5351
5352         PR c++/14173
5353         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5354         for all type variants.
5355
5356 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
5357
5358         PR c++/13927
5359         * decl.c (duplicate_decls): Return error_mark_node for invalid
5360         redeclarations.
5361         * name-lookup.c (push_namespace): Ignore the return value from
5362         pushdecl.
5363         * pt.c (push_template_decl_real): Robustify.
5364
5365         PR c++/14186
5366         * name-lookup.c (push_class_level_binding): Do not complain about
5367         adding a binding for a member whose name is the same as the
5368         enclosing class if the member is located in a base class of the
5369         current class.
5370
5371 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5372
5373         PR c++/14181
5374         * parser.c (cp_parser_new_expression): Parse an ill-formed
5375         direct-new-declarator after a parenthesized type-id to emit good
5376         diagnostic.
5377
5378 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
5379
5380         * cp-tree.def, cvt.c: Update copyright.
5381
5382 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
5383
5384         PR c++/11326
5385         * cp-tree.h (abi_version_at_least): Remove.
5386         * mangle.c: Include flags.h.
5387
5388 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
5389
5390         PR c++/13971
5391         * call.c (build_conditional_expr): Handle conversions between
5392         class types which result in differently cv-qualified type
5393         variants.
5394
5395         PR c++/14086
5396         * class.c (delete_duplicate_fields_1): Remove.
5397         (delete_duplicate_fields): Likewise.
5398         (finish_struct_anon): Remove check for members with the same name
5399         as their enclosing class.
5400         (check_field_decls): Do not call duplicate_fields.
5401         * decl.c (grokdeclarator): Remove check for static data members
5402         with the same name as their enclosing class.
5403         * name-lookup.c (push_class_level_binding): Check for members with
5404         the same name as their enclosing class.
5405
5406 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5407
5408         PR c++/14085
5409         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5410
5411 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5412
5413         PR c++/13635
5414         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5415         has full set of arguments.
5416
5417 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5418
5419         PR c++/13927
5420         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5421
5422 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
5423
5424         PR c++/14122
5425         * cp-tree.h (delete_sanity): Change prototype.
5426         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5427         Remove dead code.  Adjust code to warn about deleting an array.
5428         * typekc.c (decay_conversion): Use build_address and build_nop.
5429
5430         PR c++/14108
5431         * search.c (accessible_p): Do not check access in thunks.
5432
5433         PR c++/14083
5434         * call.c (build_conditional_expr): Call force_rvalue on the
5435         non-void operand in the case that one result is a throw-expression
5436         and the other is not.
5437
5438 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
5439
5440         PR c++/9851
5441         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5442         the type name and look ahead for ::~, and bail out early with a
5443         better error message if the parse is going to fail.
5444
5445 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
5446
5447         * call.c (conversion_kind): New type.
5448         (conversion_rank): Likewise.
5449         (conversion): Likewise.
5450         (CONVERSION_RANK): New macro.
5451         (conversion_obstack): New variable.
5452         (obstack_initialized): Likewise.
5453         (z_candidate): Change type of convs and second_conv.
5454         (candidate_warning): New type.
5455         (IDENTITY_RANK): Remove.
5456         (EXACT_RANK): Likewise.
5457         (PROMO_RANK): Likewise.
5458         (STD_RANK): Likewise.
5459         (PBOOL_RANK): Likewise.
5460         (USER_RANK): Likewise.
5461         (ELLIPSIS_RANK): Likewise.
5462         (BAD_RANK): Likewise.
5463         (ICS_RANK): Likewise.
5464         (ICS_STD_RANK): Likewise.
5465         (ICS_USER_FLAG): Likewise.
5466         (ICS_ELLIPSIS_FLAG): Likewise.
5467         (ICS_THIS_FLAG): Likewise.
5468         (ICS_BAD_FLAG): Likewise.
5469         (NEED_TEMPORARY_P): Likewise.
5470         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5471         (USER_CONV_CAND): Likewise.
5472         (USER_CONV_FN): Likewise.
5473         (conversion_obstack_alloc): New function.
5474         (alloc_conversion): Likewise.
5475         (validate_conversion_obstack): Likewise.
5476         (alloc_conversions): Likewise.
5477         (build_conv): Adjust to deal with new conversion data structures.
5478         (build_identity_conv): New function.
5479         (build_ambiguous_conv): Likewise.
5480         (standard_conversion): Adjust to deal with new conversion data
5481         structures.
5482         (convert_class_to_reference): Likewise.
5483         (direct_reference_binding): Likewise.
5484         (reference_binding): Likewise.
5485         (implicit_conversion): Likewise.
5486         (add_candidate): Likewise.
5487         (add_function_candidate): Likewise.
5488         (add_conv_candidate): Likewise.
5489         (build_builtin_candidate): Likewise.
5490         (print_z_candidate): Likewise.
5491         (merge_conversion_sequences): Likewise.
5492         (build_user_type_conversion_1): Likewise.
5493         (build_user_type_conversion): Likewise.
5494         (build_new_function_call): Likewise.
5495         (build_object_call): Likewise.
5496         (conditional_conversion): Likewise.
5497         (build_conditional_expr): Likewise.
5498         (build_new_op): Likewise.
5499         (build_op_delete_call): Likewise.
5500         (convert_like_real): Likewise.
5501         (build_over_call): Likewise.
5502         (build_new_method_call): Likewise.
5503         (is_subseq): Likewise.
5504         (maybe_handle_implicit_object): Likewise.
5505         (maybe_handle_ref_bind): Likewise.
5506         (compare_ics): Likewise.
5507         (source_type): Likewise.
5508         (add_warning): Likewise.
5509         (joust): Likewise.
5510         (can_convert_arg): Likewise.
5511         (can_convert_arg_bad): Likewise.
5512         (perform_implicit_conversion): Likewise.
5513         (perform_direct_initialization_if_possible): Likewise.
5514         (initialize_reference): Likewise.
5515         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5516         * cp-tree.def (WRAPPER): Likewise.
5517         (IDENTITY_CONV): Remove.
5518         (LVALUE_CONV): Likewise.
5519         (QUAL_CONV): Likewise.
5520         (STD_CONV): Likewise.
5521         (PTR_CONV): Likewise.
5522         (PMEM_CONV): Likewise.
5523         (BASE_CONV): Likewise.
5524         (REF_BIND): Likewise.
5525         (USER_CONV): Likewise.
5526         (AMBIG_CONV): Likewise.
5527         (RVALUE_CONV): Likewise.
5528         * cp-tree.h (tree_wrapper): Remove.
5529         (WRAPPER_ZC): Remove.
5530         (lang_tree_node): Remove wrapper.
5531         (LOOKUP_SPECULATIVELY): Remove.
5532         (build_op_delete_call): Adjust prototype.
5533         (validate_conversion_obstack): Declare.
5534         (build_zc_wrapper): Remove.
5535         * cvt.c (convert_to_reference): Remove dead code.
5536         (ocp_convert): Likewise.
5537         * decl.c (redeclaration_error_message): Correct handling of
5538         templates.
5539         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5540         (cp_tree_node_structure): Remove WRAPPER case.
5541         * decl2.c (finish_file): Call validate_conversion_obstack.
5542         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5543         (build_op_delete_call): Likewise.
5544         (build_x_delete): Likewise.
5545         (build_delete): Adjust call to build_op_delete_call.
5546         * pt.c (tsubst_friend_declaration): Adjust code to determine
5547         whether or not a friend template is a definition.
5548         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5549         * tree.c (build_zc_wrapper): Remove.
5550
5551 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
5552
5553         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5554         * cp-tree.h: Don't declare cxx_builtin_type_decls.
5555         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5556         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5557
5558 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
5559
5560         * typeck.c (lookup_destructor): Fix typo in error message.
5561
5562 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
5563
5564         * call.c, parser.c, tree.c: Fix comment typos.
5565
5566 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
5567
5568         Bug 13856
5569         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5570         * decl.c (duplicate_decls, start_function): Likewise.
5571
5572 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
5573
5574         * name-lookup.c (pushdecl): Issue shadow warnings directly.
5575         * parser.c (free_parser_stacks): Delete.
5576
5577 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
5578
5579         * rtti.c: Update copyright.
5580
5581 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5582
5583         PR c++/14033
5584         * decl.c (require_complete_types_for_parms): Do not insert
5585         error_mark_node in the parameter list.
5586
5587 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5588
5589         PR c++/14028
5590         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5591         error when terminator can not be found.
5592
5593 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5594
5595         Make-lang.in (po-generated):  Delete.
5596
5597 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5598
5599         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5600         targetm.calls.promote_prototypes.
5601
5602 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5603
5604         PR middle-end/13750
5605         Revert:
5606         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
5607         PR pch/13361
5608         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5609         (handle_pragma_implementation): Likewise.
5610
5611 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
5612
5613         PR c++/13714
5614         * typeck.c (lookup_destructor): Tweak error message.
5615
5616 2004-02-05  Jan Hubicka  <jh@suse.cz>
5617
5618         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
5619         functions.
5620
5621 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5622
5623         PR c++/14008
5624         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5625         code, only emits the diagnostic now. Added lookup of the identifier
5626         and support for qualified ids.
5627         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5628         Parse an (invalid) type name as id-expression within a declarator.
5629         (cp_parser_simple_declaration): Use it.
5630         (cp_parser_member_declaration): Likewise.
5631         (cp_parser_make_typename_type): New function. Handle errors through
5632         cp_parser_diagnose_invalid_typename.
5633         (cp_parser_elaborated_type_specifier): Use it.
5634
5635 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
5636
5637         PR c++/13932
5638         * call.c (convert_like_real): Use "converting" rather than
5639         "argument" as the descriptive keyword to
5640         dubious_conversion_warnings.
5641         * typeck.c (convert_for_assignment): Do not call
5642         dubious_conversion_warnings.
5643
5644 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5645
5646         PR c++/13086
5647         * init.c (build_delete): Emit a more informative error message in
5648         case of an incomplete type, and on the correct source line.
5649
5650 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5651
5652         * error.c, search.c: Update copyright.
5653
5654 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
5655
5656         PR c++/9941
5657         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5658         linkage for the typeinfo name string.
5659
5660 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
5661
5662         PR c++/13969
5663         * cp-tree.h (fold_non_dependent_expr): New function.
5664         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5665         (cp_parser_template_argument): Use fold_non_dependent_expr.
5666         (cp_parser_direct_declarator): Likewise.
5667         * pt.c (fold_non_dependent_expr): New function.
5668         (convert_nontype_argument): Use it.
5669         (tsubst_qualified_id): Simplify.
5670         (tsubst_copy_and_build): Likewise.
5671
5672 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
5673
5674         * decl.c (cxx_push_function_context): Do not set
5675         current_function_is_thunk.
5676         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5677         actual function.
5678
5679 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5680
5681         PR c++/13997
5682         * pt.c (more_specialized_class): Increase processing_template_decl
5683         while partial ordering.
5684
5685 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
5686
5687         PR c++/13925
5688         * decl.c (start_function): Do not call pushdecl for any
5689         instantiation or specialization of a primary template.
5690
5691 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
5692
5693         PR c++/13950
5694         * parser.c (cp_parser_class_name): Robustify.
5695
5696         PR c++/13970
5697         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5698
5699         PR c++/14002
5700         * semantics.c (finish_id_expression): Do not return an
5701         IDENTIFIER_NODE when lookup finds a PARM_DECL.
5702
5703 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
5704
5705         PR c++/13978
5706         * pt.c (build_non_dependent_expr): Do not build
5707         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5708
5709         PR c++/13968
5710         * semantics.c (finish_id_expression): Do not return an
5711         IDENTIFIER_NODE when lookup finds a VAR_DECL.
5712
5713         PR c++/13975
5714         * parser.c (cp_parser_simple_declaration): When skipping to the
5715         end of the statement swallow the terminating semicolon.
5716
5717 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
5718
5719         PR c++/13113
5720         * init.c (build_offset_ref): Improve error recovery for invalid
5721         uses of non-static member functions.
5722
5723         PR c++/13854
5724         * cp-tree.h (cp_build_type_attribute_variant): New function.
5725         * class.c (build_clone): Use cp_build_type_attribute_variant.
5726         * decl.c (duplicate_decls): Likewise.
5727         * pt.c (copy_default_args_to_explicit_spec): Likewise.
5728         (tsubst_function_type): Likewise.
5729         * tree.c (build_exception_variant): Check attributes before
5730         concluding that two types are the same.
5731         (cp_build_type-attribute_variant): New method.
5732         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5733
5734         PR c++/13907
5735         * call.c (convert_class_to_reference): Keep better track of
5736         pedantically invalid user-defined conversions.
5737
5738 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5739
5740         PR c++/13957
5741         * pt.c (tsubst_qualified_id): Improved error message when a type
5742         is expected but not found.
5743
5744 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
5745
5746         * class.c: Fix comment typos.
5747         * decl.c: Likewise.
5748         * error.c: Likewise.
5749         * parser.c: Likewise.
5750         * pt.c: Likewise.
5751         * search.c: Likewise.
5752         * typeck.c: Likewise.
5753
5754 2004-01-30  Richard Henderson  <rth@redhat.com>
5755
5756         PR c++/13693
5757         * method.c (use_thunk): Don't force_target_expr for void thunks.
5758         * tree.c (build_target_expr_with_type): Assert non-void type.
5759         (force_target_expr): Likewise.
5760
5761 2004-01-30  Michael Matz  <matz@suse.de>
5762
5763         * parser.c (cp_parser_labeled_statement): Accept case ranges.
5764
5765 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5766
5767         DR206
5768         PR c++/13813
5769         * decl.c (grokdeclarator): Check immediatly type completeness for
5770         non-dependent types.
5771
5772 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5773
5774         PR c++/13683
5775         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5776         a sizeof expression.block
5777
5778 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
5779
5780         PR c++/13883
5781         * mangle.c (write_encoding): Correct encoding of member template
5782         constructors.
5783
5784 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5785
5786         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5787         template name as it was `<::' (digraph typo).
5788         (cp_parser_nth_token_starts_template_argument_list_p): New function.
5789         (cp_parser_id_expression): Use it.
5790         (cp_parser_nested_name_specifier_opt): Likewise.
5791         (cp_parser_template_name): Likewise.
5792         (cp_parser_class_name): Likewise.
5793         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5794
5795 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
5796
5797         PR c++/13791
5798         * typeck.c (merge_types): Do not merge attributes into
5799         TYPENAME_TYPEs.
5800
5801         PR c++/13736
5802         * parser.c (cp_parser_direct_declarator): Do not prevent
5803         backtracking inside a parenthesized declarator.
5804         (cp_parser_parameter_declaration): Fix typo in comment.
5805
5806 2004-01-28  Jan Hubicka  <jh@suse.cz>
5807
5808         * semantics.c (expand_body)  Do emit_associated_thunks before
5809         expansion.
5810
5811 2004-01-27  Devang Patel  <dpatel@apple.com>
5812
5813         * name-lookup.c: Include "debug.h"
5814         (do_namespace_alias): Invoke debug_hooks to emit debug info
5815         for namespace alias.
5816         (do_local_using_decl): Invoke debug_hooks to emit debug info
5817         for using decl.
5818         (do_class_using_decl): Same.
5819         (do_toplevel_using_decl): Same.
5820         (do_using_directive): Same.
5821         (cp_emit_debug_info_for_using): New function.
5822         * Make-lang.in (cp/parser.o): Depend on debug.h
5823         (cp/name-lookup.o): Same.
5824
5825 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5826
5827         * cp-tree.h (language_function, lang_type_header): Use
5828         BOOL_BITFIELD.
5829         * name-lookup.h (cp_binding_level): Likewise.
5830
5831 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
5832
5833         PR c++/13663
5834         * semantics.c (finish_for_expr): Check for unresolved overloaded
5835         functions.
5836
5837         * class.c (add_method): Just check processing_template_decl to
5838         determine whether or not we are within a template.
5839         * decl2.c (maybe_retrofit_in_chrg): Likewise.
5840         * init.c (decl_constant_value): Check the type of the declaration,
5841         not TREE_READONLY.
5842         * name-lookup.c (maybe_push_to_top_level): Rename to ...
5843         (push_to_top_level): ... this.
5844         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5845         * pt.c (push_template_decl_real): Reorder condition for speed.
5846         (convert_template_argument): Use dependency-checking functions in
5847         place of uses_template_parms.
5848         (lookup_template_class): Avoid calling uses_template_parms more
5849         than once.
5850         (uses_template_parms): Reimplement, using dependency-checking
5851         functions.
5852         (instantiate_class_template): Use push_to_top_level, not
5853         maybe_push_to_top_level.
5854         (type_unification_real): Simplify.
5855         (type_dependent_expression_p): Handle OFFSET_REFs and
5856         TEMPLATE_DECLs.
5857         (any_dependent_template_arguments_p): Handle multiple levels of
5858         template argument.
5859         * semantics.c (expand_or_defer_fn): Do not check
5860         uses_template_parms for template instantiations.
5861         * typeck.c (comptypes): Avoid calling cp_type_quals.
5862
5863 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
5864
5865         PR c++/13833
5866         * call.c (build_over_call): Do not convert arguments when
5867         processing a template.
5868         * pt.c (build_non_dependent_expr): Do not build a
5869         NON_DEPENDENT_EXPR for arithmetic constants.
5870
5871 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5872
5873         PR c++/13810
5874         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5875         returns a TYPE_DECL. no further lookup is required.
5876         * semantics.c (check_template_template_default_arg): A TYPE_DECL
5877         is invalid. Rework to give better diagnostics.
5878
5879 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5880
5881         PR c++/13797
5882         * pt.c (instantiate_class_template): Add an error_mark_node
5883         check.
5884         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5885
5886 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
5887
5888         PR c++/13701
5889         * decl.c (finish_function): Move the call to
5890         finish_fname_decls below the call to
5891         finish_eh_spec_block.
5892
5893 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
5894
5895         * optimize.c, typeck2.c: Update copyright.
5896
5897 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
5898
5899         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5900         init.c, mangle.c, typeck.c: Update copyright.
5901
5902 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5903
5904         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5905
5906 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5907
5908         * Make-lang.in: Replace $(docdir) with doc.
5909         (c++.info, c++.srcinfo): Dummy entry.
5910         (c++.man, c++.srcman): New rules.
5911         (c++.install-man): Revamp rule.
5912
5913 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5914
5915         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5916         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5917         immediate $(shell) instead of deferred backquote.
5918
5919 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
5920
5921         PR c++/13651
5922         * parser.c (cp_parser_postfix_expression): When encountering
5923         incomplete type on left-hand side of "->" or ".", treat the entire
5924         expression as erroneous.
5925
5926         PR c++/13592
5927         * call.c (build_field_call): Remove.
5928         (n_build_method_call): Likewise.
5929         (build_method_call): Likewise.
5930         (build_new_method_call): Do not call build_field_call.
5931         * class.c (n_build_method_call): Remove.
5932         (print_class_statistics): Do not print it.
5933         * cp-tree.h (build_method_call): Remove declaration.
5934         (finish_object_call_expr): Likewise.
5935         (build_new_1): Do not use build_method_call.
5936         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5937         when the function appearing on the right-hand-side of "." or "->"
5938         is not actually a function.
5939         * pt.c (tsubst_copy_and_build): Likewise.
5940         * semantics.c (finish_object_call_expr): Remove.
5941
5942 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
5943
5944         PR c++/13710
5945         * pt.c (tsubst): Use finish_typeof.
5946
5947 2004-01-18  Jason Merrill  <jason@redhat.com>
5948
5949         PR c++/11725
5950         * except.c (build_throw): In a template, set
5951         current_function_returns_abnormally.
5952
5953 2004-01-17  Fred Fish  <fnf@intrinsity.com>
5954
5955         PR c++/11895
5956         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5957         except don't call array_type_nelts() with a VECTOR_TYPE.
5958
5959 2004-01-16  Jan Hubicka  <jh@suse.cz>
5960
5961         * mangle.c (write_mangled_name): Remove inline modifier.
5962
5963 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
5964
5965         PR c++/13574
5966         * decl.c (compute_array_index_type): Fix grammar in comment.
5967         * init.c (build_zero_init): Handle zero-sized arrays correctly.
5968
5969         PR c++/13178
5970         * call.c (name_as_c_string): Print conversion operator names
5971         correctly.
5972
5973         PR c++/13478
5974         * call.c (initialize_reference): Pass -1 for inner parameter to
5975         convert_like_real.
5976
5977 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5978
5979         PR c++/13407
5980         * parser.c (cp_parser_base_specifier): Check for an invalid
5981         keyword `typename' and emit an user-friendly error message.
5982
5983 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
5984
5985         PR pch/13361
5986         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5987         (handle_pragma_implementation): Likewise.
5988
5989 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5990
5991         PR c++/9259
5992         * typeck.c (build_class_member_access_expr): Allow to access members
5993         of the currently open class.
5994         (finish_class_member_access_expr): Likewise.
5995
5996 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
5997
5998         PR c++/13659
5999         * name-lookup.c (validate_nonmember_using_decl): Take scope and
6000         name by value, instead of computing them.
6001         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6002         arguments.  Pass them to validate_nonmember_using_decl.
6003         * name-lookup.h (do_local_using_decl): Adjust.
6004         (do_toplevel_using_decl): Likewise.
6005         * parser.c (cp_parser_using_declaration): Likewise.
6006         * pt.c (tsubst_expr): Likewise.
6007
6008 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
6009
6010         PR c++/13594
6011         PR c++/13658
6012         * name-lookup.c (qualified_lookup_using_namespace): Search
6013         strongly-associated namespaces first, and only then try other
6014         namespaces.
6015
6016 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6017
6018         * Make-lang.in (c++.srcextra): Dummy entry.
6019
6020 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6021
6022         PR c++/8856
6023         * parser.c (cp_parser_template_name): Don't try to parse a
6024         conversion-function-id, as it cannot be a template-name.
6025         (cp_parser_simple_type_specifier): Check for invalid template-ids
6026         even after a built-in type.
6027
6028 2004-01-14  Jan Hubicka  <jh@suse.cz>
6029
6030         PR c++/12850
6031         * pt.c (instantiate_decl):  Do not increase function_depth.
6032
6033 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
6034
6035         PR c++/9021
6036         PR c++/11005
6037         * parser.c (cp_parser_elaborated_type_specifier): Warn about
6038         attributes and discard.
6039         * decl.c (xref_tag): Don't overwite existing attributes with
6040         NULL_TREE.
6041
6042 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6043
6044         PR c++/12335
6045         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6046         is no destructor while looking up a BIT_NOT_EXPR.
6047
6048 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
6049
6050         * cxxfilt.c: Remove unused file.
6051
6052 2004-01-14  Jan Hubicka  <jh@suse.cz>
6053
6054         Partial fix to PR c++/12850
6055         * decl2.c (mark_used): Do not proactively instantiate templates
6056         when compiling in unit-at-a-time or not optimizing.
6057         * optimize.c (maybe_clone_body): Do not increase function depth.
6058
6059 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6060
6061         PR c++/13474
6062         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6063
6064 2004-01-12  Steven Bosscher  <stevenb@suse.de>
6065
6066         PR c++/13558
6067         * parser.c (cp_parser_member_declaration): Any non-type is also
6068         not a class or a function.
6069
6070 2004-01-12  Jason Merrill  <jason@redhat.com>
6071
6072         PR c++/12815
6073         * class.c (build_base_path): Do not mark vtable references as
6074         TREE_CONSTANT.
6075         (build_vtbl_ref_1): Likewise.
6076
6077 2004-01-12  Richard Henderson  <rth@redhat.com>
6078
6079         PR opt/10776
6080         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6081         (store_init_value): Use it.
6082         * decl.c (check_initializer): Expect full initialization code
6083         from store_init_value.
6084         * init.c (expand_aggr_init_1): Likewise.
6085         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6086
6087 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
6088
6089         * class.c (layout_class_type): For non-POD class types, also copy
6090         the DECL_SIZE and DECL_MODE of fields to the base class type.
6091
6092 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6093
6094         PR c++/13289
6095         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6096         calling regenerate_decl_from_template.
6097
6098 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
6099
6100         PR c++/4100
6101         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6102         decl-specifier occurring along with a class definition.
6103
6104 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
6105
6106         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6107         clauses to comments describing declares_class_or_enum.
6108         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6109         false.
6110
6111 2004-01-12  Jan Hubicka  <jh@suse.cz>
6112
6113         * pt.c (for_each_template_parm): Do not check for duplicates.
6114         (for_each_template_parm): Use walk_tree duplicate checking code.
6115
6116 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
6117
6118         PR c++/3478
6119         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6120         is error_mark_node, don't add any more decl_specs.
6121         (cp_parser_init_declarator): After committing to a declaration, if
6122         the decl_specifiers start with error_mark_node, issue an error and
6123         change the type to "int".
6124
6125 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6126
6127         PR bootstrap/7817
6128         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6129
6130 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6131
6132         DR 337
6133         PR c++/9256
6134         * pt.c (tsubst): Substitution must fail if we are attempting to
6135         create an array with element type that is an abstract class type.
6136         * decl.c (cp_finish_decl): Strip pointers and array types recursively
6137         before calling abstract_virtuals_error.
6138
6139 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
6140
6141         * name-lookup.c (qualified_lookup_using_namespace): Consider
6142         strong using directives even if we've already found a binding.
6143
6144 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6145
6146         * cp-tree.h (cxx_expand_expr): Change prototype.
6147         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6148
6149 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6150
6151         PR c++/12573
6152         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6153         looking into them recursively. They can be there because of the
6154         new __offsetof__ extension.
6155
6156 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
6157
6158         * parser.c (cp_parser_save_member_function_body): Mark the
6159         definition static.
6160
6161 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
6162
6163         PR c++/13057
6164         * class.c (build_clone): Copy type attributes from the original
6165         function to the clone.
6166
6167         PR c++/12815
6168         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6169         references as constant.
6170
6171         PR c++/12132
6172         * parser.c (cp_parser_explicit_instantiation): Improve error
6173         recovery.
6174         (cp_parser_require): Improve indication of the error location.
6175
6176         PR c++/13451
6177         * parser.c (cp_parser_class_head): Reorder logic to check for
6178         invalid qualification.
6179
6180 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
6181
6182         PR c++/13157
6183         * name-lookup.c (lookup_using_namespace): Remove spacesp
6184         parameter.
6185         (unqualified_namespace_lookup): Likewise.
6186         (lookup_qualified_name): Adjust accordingly.
6187         (lookup_name_real): Likewise.
6188         (lookup_arg_dependent): Do not eliminate the namespace of the
6189         functions found by unqualified name lookup unless that is the
6190         current namespace.
6191
6192 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
6193
6194         * semantics.c (push_deferring_access_checks): Fix format.
6195         (resume_deferring_access_checks): Likewise.
6196         (stop_deferring_access_checks): Likewise.
6197         (pop_deferring_access_checks): Likewise.
6198         (get_deferred_access_checks): Likewise.
6199         (pop_to_parent_deferring_access_checks): Likewise.
6200         (perform_deferred_access_checks): Likewise.
6201         (perform_or_defer_access_check): Likewise.
6202
6203 2004-01-04  Richard Henderson  <rth@redhat.com>
6204
6205         * call.c (build_over_call): Don't create a save_expr of an
6206         aggregate, but rather its address.
6207
6208 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
6209
6210         PR c++/13529
6211         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6212         an offsetof expression.
6213
6214         * parser.c (cp_parser_parameter_declaration): Fix comment.
6215
6216         PR c++/12226
6217         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6218         (reference_binding): Set it when appropriate.
6219         (build_temp): New function, split out from ...
6220         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
6221         (initialize_reference): Likewise.
6222
6223         PR c++/13536
6224         * parser.c (cp_parser): Add in_type_id_in_expr_p.
6225         (cp_parser_new): Initialize it.
6226         (cp_parser_postfix_expression): Set it.
6227         (cp_parser_sizeof_operand): Likewise.
6228         (cp_parser_parameteR_declaration): Do not commit early to tenative
6229         parsers when in_type_id_in_expr_p is set.
6230
6231 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6232
6233         PR c++/13094
6234         * parser.c (cp_parser_template_argument): Don't call
6235         make_unbound_class_template directly.
6236         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6237         UNBOUND_CLASS_TEMPLATE tree node.
6238
6239 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
6240
6241         PR target/12729
6242         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6243
6244 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6245
6246         PR c++/13520
6247         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6248         (DECL_FUNCTION_TEMPLATE_P): Use it.
6249         (DECL_CLASS_TEMPLATE_P): Likewise.
6250         * parser.c (cp_parser_lookup_name): Add is_template parameter.
6251         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6252         (cp_parser_template_name): Likewise.
6253         (cp_parser_elaborated_type_specifier): Likewise.
6254         (cp_parser_namespace_name): Likewise.
6255         (cp_parser_class_name): Likewise.
6256         (cp_parser_lookup_name_simple): Likewise.
6257
6258 See ChangeLog.3 for earlier changes.