OSDN Git Service

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