OSDN Git Service

2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
2             Jan Hubicka  <jh@suse.cz>
3
4         PR c++/14639
5         * method.c (use_think): Do not mark thunk as referenced.
6
7 2004-06-03  Matt Austern  <austern@apple.com>
8
9         PR c++/15428
10         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
11         is nonzero, and if we see a noninline definition of a key method,
12         make the vtables nonweak.
13         
14 2004-06-02  Matt Austern  <austern@apple.com>
15
16         * cp-tree.h (instantiate_decl): new boolean parameter,
17         undefined_ok. Current behavior is equivalent to its being 0.
18         * decl2.c (mark_used): Add new argument when calling instantiate_decl
19         * pt.c (mark_decl_instantiated): Unconditionally make
20         instantiations explicit unconditionally
21         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
22         since mark_decl_instantiated now does it.
23         (instantiate_class_member): New.  Instantiate a member of an
24         explicitly instantiated class template.
25         (do_type_instantiation): Explicitly instantiate members of an
26         explicitly instantiated class template.
27         (instantiate_decl): if undefined_ok is nonzero, and if we're
28         trying to explicitly instantiated a template with no definition,
29         change it to an implicit instantiation.
30         (instantiate_pending_templates): Add new argument to instantiate_decl.
31         * tree.c (cp_cannot_inline_tree_fn): Likewise.
32         
33 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
34
35         * cp-tree.h: Fix typo.
36
37         * cp-tree.h: Include cgraph.h
38         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
39         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
40
41 2004-06-01  Jason Merrill  <jason@redhat.com>
42
43         PR c++/15142
44         * call.c (call_builtin_trap): Remove type parm.
45         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
46         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
47
48 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
49
50         PR c++/13092
51         * init.c (build_offset_ref): Build SCOPE_REF with non-null
52         TREE_TYPE for non-dependent names.
53         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
54         unknown_type_node as its TREE_TYPE.
55         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
56         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
57         (dump_expr) <SCOPE_REF case>: Likewise.
58
59 2004-06-01  Richard Henderson  <rth@redhat.com>
60             Andrew Pinski  <pinskia@physics.uc.edu>
61
62         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
63         * parser.c (struct cp_parser): Remove in_offsetof.
64         (cp_parser_new): Don't set it.
65         (cp_parser_unary_expression): Don't check it.
66         (cp_parser_postfix_open_square_expression): Split out from ...
67         (cp_parser_postfix_expression): ... here.
68         (cp_parser_postfix_dot_deref_expression): Likewise.
69         (cp_parser_builtin_offsetof): New.
70         (cp_parser_primary_expression): Use it.
71
72 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
73
74         PR c++/14932
75         * parser.c (cp_parser_postfix_expression): Allow subscript
76         operator in offsetof.
77
78 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
79
80         PR c++/15701
81         * friend.c (add_friend): Do not try to perform access checks for
82         functions from dependent classes.
83
84 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
85
86         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
87         (pp_cxx_begin_template_argument_list): Turn into a function.
88         (pp_cxx_end_template_argument_list): Likewise.
89         (pp_cxx_separate_with): Define.
90         (pp_cxx_unqualified_id): Tidy.
91         (pp_cxx_primary_expression): Likewise.
92         (pp_cxx_postfix_expression): Likewise.
93         (pp_cxx_expression): Likewise.
94         (pp_cxx_simple_type_specifier): Likewise.
95         (pp_cxx_type_specifier_seq): Likewise.
96         (pp_cxx_parameter_declaration_clause): Likewise.
97         (pp_cxx_exception_specification): Likewise.
98         (pp_cxx_direct_declarator): Likewise.
99         (pp_cxx_type_id): Likewise.
100         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
101         cxx-pretty-print.c.
102         (pp_cxx_left_paren): Likewise.
103         (pp_cxx_right_paren): Likewise.
104         (pp_cxx_left_brace): Likewise.
105         (pp_cxx_right_brace): Likewise.
106         (pp_cxx_left_bracket): Likewise.
107         (pp_cxx_right_bracket): Likewise.
108         (pp_cxx_dot): Likewise.
109         (pp_cxx_identifier): Likewise.
110         (pp_cxx_tree_identifier): Likewise.
111         (pp_cxx_ampersand): New macro.
112         (pp_cxx_star): Likewise.
113         (pp_cxx_arrow): Likewise.
114         (pp_cxx_semicolon): Likewise.
115         (pp_cxx_complement): Likewise.
116         (pp_cxx_begin_template_argument_list): Declaree.
117         (pp_cxx_end_template_argument_list): Likewise.
118         (pp_cxx_colon_colon): likewise.
119
120 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
121
122         * parser.c (cp_parser_simple_type_specifier): Explicitly test
123         against NULL_TREE.
124
125 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
126
127         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
128         typeck.c: Fix comment formatting.
129
130 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
131
132         * cp-lang.c (cp_expand_decl): Remove.
133         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
134
135 2004-05-30  Andreas Jaeger  <aj@suse.de>
136
137         * lang-specs.h: Add missing initializers for .ii.
138
139 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
140
141         * decl.c (cp_make_fname_decl): Free return value from
142         fname_as_string.
143
144 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
145
146         PR c++/15083
147         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
148         even in a templat.e
149         * init.c (build_new): Likewise.
150
151         PR c++/15640
152         * name-lookup.c (arg_assoc): Robustify.
153
154         PR c++/15471
155         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
156         when determining the scope to use for a pointer to member.
157         (lookup_anon_field): Give it external linkage.
158         * cp-tree.h (lookup_anon_field): Declare it.
159         * expr.c (cplus_expand_constant): Use it.
160
161 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
162
163         PR c++/14668
164         * parser.c (cp_parser_simple_type_specifier): Call
165         maybe_note_name_used_in_class.
166
167 2004-05-28  Tom Marshall  <tmarshall@real.com>
168
169         PR c++/15214
170         * class.c (finish_struct_1): Warn only if the dtor is non-private or
171         the class has friends.
172
173 2004-05-27  Adam Nemet  <anemet@lnxw.com>
174
175         PR c++/12883
176         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
177         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
178
179 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
180
181         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
182         if it might be needed.
183         * pt.c (mark_decl_instantiated): Only call defer_fn if
184         the function actually needs processing in finish_file.
185         * decl2.c (finish_file): Add check that elements in
186         deferred_fns_used are really needed there.  Remove unnecessary
187         test of DECL_SAVED_TREE.
188
189 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
190
191         * Make-lang.in: No need to specify $(LIBCPP).
192
193 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
194
195         PR c++/15044
196         * parser.c (cp_parser_class_head): Robustify.
197
198         PR c++/15317
199         * parser.c (cp_parser_decl_specifier_seq): Correct error in
200         comment.
201         (cp_parser_constructor_declarator_p): Treat attributes
202         as decl-specifiers.
203
204         PR c++/15329
205         * typeck.c (build_unary_op): Do not attempt to resolve casts to
206         base classes in templates.
207
208 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
209
210         PR c++/15165
211         * pt.c (instantiate_template): Robustify.
212
213 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
214
215         PR c++/15025
216         * decl.c (xref_tag): Issue errors about redeclaring template
217         classes as non-template classes.
218
219 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
220
221         PR c++/14821
222         * name-lookup.c (supplement_binding): Allow redefinitions of
223         namespace aliases.
224
225         PR c++/14883
226         * parser.c (cp_parser_template_argument): Robustify.
227
228 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
229
230         * class.c (alter_access): Use %E format specifier to print an
231         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
232         (push_lang_context): Likewise.
233         * decl.c (lookup_label): Likewise.
234         (grokdeclarator): Likewise.
235         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
236         * pt.c (do_type_instantiation): Likewise.
237         * tree.c (handle_java_interface_attribute): Likewise.
238         (handle_com_interface_attribute): Likewise.
239         (handle_init_priority_attribute): Likewise.
240
241 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
242
243         PR c++/15285
244         PR c++/15299
245         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
246         recognized as overloaded functions.
247
248 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
249
250         PR c++/15507
251         * class.c (layout_nonempty_base_or_field): Do not try to avoid
252         layout conflicts for unions.
253
254         PR c++/15542
255         * typeck.c (build_x_unary_op): Instantiate template class
256         specializations before looking for "operator &".
257
258         PR c++/15427
259         * typeck.c (complete_type): Layout non-dependent array types, even
260         in templates.
261
262         PR c++/15287
263         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
264         template.
265
266 2004-05-22  Roger Sayle  <roger@eyesopen.com>
267
268         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
269         returning when TREE_TYPE is error_mark_node.
270         * typeck.c (require_complete_type): Return error_mark_node if
271         value's type is an error_mark_node.
272
273 2005-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
274
275         * optimize.c (calls_setjmp_r): Remove.
276         (calls_setjmp_p): Remove.
277         * cp-tree.c (calls_setjmp_p): Remove.
278         * decl.c (finish_function): Do not call calls_setjmp_p.
279
280 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
281
282         * decl.c (cp_finish_decl): Use mark_decl_referenced.
283         * decl2.c (maybe_make_one_only): Likewise.
284         * method.c (use_thunk): Likewise.
285
286 2004-05-18  Jason Merrill  <jason@redhat.com>
287
288         * class.c (build_base_path): Tidy a bit.
289
290 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
291
292         * name-lookup.c (struct scope_binding): New.
293         (EMPTY_SCOPE_BINDING): New.
294         (lookup_using_namespace): Take a scope_binding instead of a
295         cxx_binding.
296         (qualified_lookup_using_namespace): Likewise.
297         (cxx_binding_clear): Delete.
298         (do_nonmember_using_decl): Use a scope_binding instead of a
299         cxx_binding.
300         (lookup_tag): Don't call select_decl.
301         (ambiguous_decl): Don't return anything (and change callers to match).
302         Take a scope_binding as the second parameter.
303         (lookup_namespace_name): Use a scope_binding instead of a
304         cxx_binding.
305         (unqualified_namespace_lookup): Likewise.
306         (lookup_qualified_name): Likewise.
307         (select_decl): Take a scope_binding instead of a cxx_binding.
308         Use macros rather than hand-coding tests for type-ness.
309
310 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
311
312         * cp-gimplify.c: Rename from cp-simplify.c.
313         * Make-lang.in, optimize.c: Update.
314
315 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
316
317         Merge from tree-ssa-20020619-branch.  See
318         ChangeLog.tree-ssa for details.
319
320         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
321         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
322         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
323         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
324         Merged.
325         * cp-mudflap.c: New file.
326         * cp-simplify.c:: New file.
327
328 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
329
330         PR c++/14389
331         * decl2.c (check_classfn): For member templates, compare also the
332         template parameters to match the declaration.
333         * cp-tree.h: Adjust declaration of check_classfn.
334         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
335         * friend.c (do_friend): Likewise.
336         * pt.c (tsubst_friend_function): Likewise.
337
338 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
339
340         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
341         Instead, dig into the representation type to find the array bound.
342
343 2004-04-30  Jason Merrill  <jason@redhat.com>
344
345         Refer to base members using COMPONENT_REFs where possible.
346         * class.c (build_simple_base_path): New fn.
347         (build_base_path): Use it for non-virtual base references.
348         (layout_class_type): Change base fields to their real type
349         after layout is done.
350         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
351         * cp-lang.c (cxx_get_alias_set): Use it.
352
353 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
354
355         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
356         comment typos.
357
358 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
359
360         PR c++/15064
361         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
362         used in integral constant expressions.
363
364 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
365
366         * init.c (build_aggr_init): Fix accidental use of C99 construct in
367         previous change.
368
369         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
370         braced initializer.
371         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
372         * decl.c (reshape_init): Use it.
373         * init.c (perform_member_init): Remove redundant condition.
374         (build_aggr_init): Adjust to handle brace-enclosed initializers
375         correctly.
376         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
377
378         * parser.c (cp_parser_initializer_clause): Do not set
379         TREE_HAS_CONSTRUCTOR on the initializer.
380         * rtti.c (tinfo_base_init): Likewise.
381         (generic_initializer): Likewise.
382         (ptr_initializer): Likewise.
383         (ptm_initializer): Likewise.
384         (class_initializer): Likewise.
385         (get_pseudo_ti_init): Likewise.
386         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
387
388 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
389
390         * name-lookup.c (anonymous_namespace_name): Make static.
391
392 2004-04-19  Roger Sayle  <roger@eyesopen.com>
393
394         PR middle-end/14531
395         * class.c (build_base_path): Call fold whilst building the NULL
396         pointer check expression trees.
397
398 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
399
400         * init.c (build_new_1): Don't use type size argument for Java
401         _Jv_AllocObject call.
402
403 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
404
405         * method.c (make_alias_for_thunk): Remove preprocessor guard on
406         declaration and definition.
407
408 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
409
410         PR c++/14808
411         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
412         than ASM_OUTPUT_DEF.
413
414 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
415
416         * decl2.c (mark_used): Don't segfault if cfun != NULL but
417         current_function_decl == NULL.
418
419 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
420
421         PR c++/3518
422         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
423         level.
424
425 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
426
427         * init.c (decl_constant_value): Don't look at DECL_INITIAL
428         of PARM_DECL.
429         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
430         or TREE_SIDE_EFFECTS of a type.
431
432 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
433
434         PR c++/14007
435         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
436         cv-qualifier unification.
437         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
438
439 2004-04-02  Jan Hubicka  <jh@suse.cz>
440
441         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
442         * cp-tree.h (cp_update_decl_after_saving): Declare.
443         * tree.c (cp_update_decl_after_saving): Define.
444
445 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
446
447         PR c++/14803
448         * typeck.c (get_delta_difference): Call fold before returning the
449         value.
450
451 2004-04-01  Richard Henderson  <rth@redhat.com>
452
453         PR c++/14804
454         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
455         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
456
457 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
458
459         PR c++/14810
460         * name-lookup.c (maybe_push_cleanup_level): Robustify.
461
462 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
463
464         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
465
466 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
467
468         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
469         * class.c (check_bitfield_decl): Likewise.
470         * cvt.c (type_promotes_to): Likewise.
471         * decl.c (finish_enum): Likewise.
472         * mangle.c (write_builtin_type): Likewise.
473         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
474         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
475         (build_binary_op): Likewise.
476
477 2004-03-31  Jan Hubicka  <jh@suse.cz>
478
479         * tree.h (optimize_function): Kill prototype.
480         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
481         * semantics.c (expand_body): Kill.
482
483 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
484
485         PR c++/14724
486         * decl.c (start_decl_1): Do not decide whether or not to create a
487         new cleanup level until after the type has been completed.
488
489         PR c++/14763
490         * pt.c (tsubst_default_argument): Clear current_function_decl.
491
492 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
493
494         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
495
496 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
497
498         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
499         is null, just print the literal name and return.
500
501 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
502
503         * cxx-pretty-print.c: Fix comment typos.
504
505 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
506
507         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
508         Update copyright.
509
510 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
511
512         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
513         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
514         target hook.
515
516 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
517
518         PR 12267, 12391, 12560, 13129, 14114, 14133
519         * cp-lang.c (c_reset_state): Delete.
520         (push_file_scope, pop_file_scope): New stubs.
521         * parser.c (c_parse_file): Call sorry() here if called more than once.
522
523 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
524
525         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
526         for INTEGER_CST.
527
528 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
529
530         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
531
532 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
533
534         * error.c (enum pad): Remove.
535         (dump_qualifiers): Likewise.
536         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
537         (dump_aggr_type): Likewise.
538         (dump_type_suffix): Likewise.
539         (dump_simple_decl): Likewise.
540         (dump_function_decl): Likewise.
541         (cv_to_string): Likewise.
542         (dump_type_prefix): Likewise.  Adjust return void.
543         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
544         cxx_pretty_print.h.
545         (pp_cxx_template_keyword_if_needed): Document.
546         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
547         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
548         MUST_NOT_THROW_EXPR.
549
550 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
551
552         PR c++/14616
553         * decl.c (cp_finish_decl): Compute the size of arrays declared in
554         templates, if their type is non-dependent.
555
556 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
557
558         * call.c (build_op_delete_call): Do not forget the placement
559         arguments when iterating through mutiple delete operators.
560
561         * cp-tree.h (svaed_scope): Remove last_parms.
562         (NEW_DELETE_OPNAME_P): New macro.
563         (last_function_parms): Remove.
564         (do_friend): Adjust prototype.
565         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
566         using last_function_parms.
567         (grokfndecl): Take the PARM_DECLs as an argument, rather than
568         using last_function_parms.
569         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
570         for class-specific operator new and operator delete.
571         (grok_op_properties): Do not look for allocation functions with
572         METHOD_TYPEs.
573         (start_function): Use DECL_ARGUMENTS instead of
574         last_function_parms.
575         * decl.h (last_function_parms): Do not declare.
576         * decl2.c (grokclassfn): Do not use last_function_parms.
577         * friend.c (do_friend): Remove parmdecls parameter.
578         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
579         (pop_from_top_level): Do not restore it.
580         * pt.c (check_explicit_specialization): Do not adjust
581         last_function_parms.
582
583         * name-lookup.c (do_local_using_decl): Create a local binding for
584         types brought in via using declarations.
585
586         * name-lookup.c (lookup_arg_dependent): Handle block-scope
587         function declarations correctly.
588
589         * semantics.c (finish_id_expression): Correct handling of
590         conversion operators to dependent types.
591
592         * typeck.c (lookup_destructor): Allow the use of destructors from
593         base classes.
594
595 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
596
597         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
598         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
599         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
600         the field is named TEMPLATE_TYPE_PARM_INDEX.
601
602 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
603
604         PR c++/14545
605         * parser.c (cp_parser_functional_cast): A cast to anything
606         but integral or enumaration type is not an integral constant
607         expression.
608         * pt.c (value_dependent_expression_p): Handle cast expressions
609         without operands (such as "int()").
610
611 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
612
613         * semantics.c (finish_pseudo_destructor_expr): Allow differing
614         cv-qualification between the type named by the
615         pseudo-destructor-name and the object-type.
616
617         * search.c (accessible_base_p): Handle non-proper bases.
618
619         * name-lookup.c (do_nonmember_using_decl): If a using declaration
620         refers to a single overloaded function, set the type of the
621         function.
622         * tree.c (lvalue_type): Simplify.
623         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
624         unknown type.
625         (build_unary_op): Handle OVERLOADs with known types.
626
627         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
628         function templates.
629
630         * parser.c (cp_parser_postfix_expression): Handle the use of
631         "typename" in non-dependent contexts.  Convert appropriately when
632         when using a qualified name after "->" or ".".
633
634         * call.c (conditional_conversion): Honor the requirement that some
635         conversions refer to the original object.
636
637 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
638
639         * call.c (build_conditional_expr): Do not call force_rvalue for
640         operands of void_type when the conditional expression itself has
641         void type.
642         * name-lookup.c (pushdecl): Don't consider a declaration of a
643         function named "main" to be an overload of a type named "main".
644         * parser.c (cp_parser_template_name): Perform name lookup when the
645         template name is proceeded by "template" if the qualifying scope
646         is non-dependent.
647         * typeck.c (composite_pointer_type_r): Correctly handle
648         pointer-to-member types.
649         (build_const_cast): Likewise.
650
651 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
652
653         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
654         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
655         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
656         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
657         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
658         (TYPEOF_TYPE_EXPR): New macro.
659         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
660         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
661         * pt.c (tsubst): Likewise.
662         * semantics.c (finish_typeof): Likewise.
663         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
664         and TEMPLATE_TYPE_PARM.
665         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
666         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
667
668 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
669
670         PR c++/14586
671         * cp-tree.h (build_new_op): Change prototype.
672         (build_x_binary_op): Likewise.
673         * call.c (build_new_op): Add overloaded_p parameter.
674         * decl2.c (grok_array_decl): Adjust call to build_new_op.
675         * parser.c (cp_parser_binary_expression): Note that uses of
676         overloaded operators prevents an expression from being considered
677         an integral constant.
678         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
679         build_x_binary_op.
680         * semantics.c (finish_call_expr): Likewise.
681         * typeck.c (rationalize_conditional_expr): Likewise.
682         (build_x_indirect_ref): Likewise.
683         (build_x_binary_op): Likewise.
684         (build_x_unary_op): Likewise.
685         (build_x_compound_expr): Likewise.
686         (build_modify_expr): Likewise.
687         * typeck2.c (build_x_arrow): Likewise.
688
689 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
690
691         * cp-lang.c, ptree.c: Update copyright.
692
693 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
694
695         PR c++/14550
696         * parser.c (cp_parser_non_integral_constant_expression): Encode
697         more of the idiom that surrounded calls to this function within
698         the function itself
699         (cp_parser_primary_expression): Adjust accordingly.
700         (cp_parser_postfix_expression): Likewise.
701         (cp_parser_unary_expression): Likewise.
702         (cp_parser_cast_expression): Likewise.
703         (cp_parser_assignment_expression): Likewise.
704         (cp_parser_expression): Likewise.
705         (cp_parser_new_expression): Note that new-expressions are not
706         allowed in integral constant expressions.
707         (cp_parser_delete_expression): Likewise.
708
709 2004-03-12  Matt Austern  <austern@apple.com>
710
711         * decl2.c (maybe_make_one_only): Look at
712         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
713         to make an explicit instantiation weak.
714         * method.c (use_thunk): Make sure we call comdat_linkage
715         when appropriate.
716         * pt.c (do_type_instantiation): On systems where weak symbols
717         don't go in a static archive's TOC, explicit instantiation of a
718         class must imply *explicit* instantiation of its memeber.
719
720 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
721
722         * call.c, cp-tree.h, pt.c: Fix comment typos.
723
724 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
725
726         PR c++/14510
727         * decl.c (xref_tag): Disregard non-type declarations when
728         looking up a tagged type.
729
730 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
731
732         PR c++/14397
733         * call.c (convert_like_real): Build a const qualified temporary,
734         when testing ctor access.
735
736 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
737
738         * call.c (initialize_reference): Fix typo.
739
740 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
741
742         PR c++/14409
743         * pt.c (determine_specialization): For member templates, match also
744         constness.
745
746         PR c++/14448
747         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
748         non-dependent.
749         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
750
751 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
752
753         PR c++/14230
754         * call.c (initialize_reference): Handle initializers that are
755         class-member access expressions applies to rvalues.
756
757 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
758
759         PR c++/14432
760         * name-lookup.c (supplement_binding): Ignore functions that are
761         marked DECL_ANTICIPATED.
762
763 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
764
765         PR c++/14401
766         * class.c (check_field_decls): Complain about non-static data
767         members of reference type in unions.  Propagate
768         CLASSTYPE_REF_FIELDS_NEED_INIT and
769         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
770         data members.
771         * init.c (perform_member_init): Complain about mbmers with const
772         type that are not explicitly initialized.
773
774 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
775
776         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
777         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
778         (lang_identifier): Remove implicit_decl and error_locus.
779         (IDENTIFIER_IMPLICIT_DECL): Remove.
780         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
781         (IDENTIFIER_ERROR_LOCUS): Likewise.
782         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
783         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
784         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
785         (implicitly_declare): Remove.
786         * decl.c (warn_extern_redeclared_static): Remove check of
787         IDENTIFIER_IMPLICIT_DECL.
788         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
789         (implicitly_declare): Remove.
790         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
791         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
792         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
793         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
794         in the innermost scope, rather than at namespace scope.
795         * name-lookup.c (push_local_binding): Give it external linkage.
796         (pushdecl): Remove dead code.
797         * name-lookup.h (push_local_binding): Declare it.
798         * ptree.c (cxx_print_identifier): Don't print
799         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
800         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
801         not IDENTIFIER_ERROR_LOCUS.
802         * typeck.c (build_function_call): Remove dead code.
803
804 2004-03-08  Jason Merrill  <jason@redhat.com>
805
806         PR c++/13170
807         * decl.c (xref_tag): Remove attribute handling.
808         * cp-tree.h: Adjust prototype.
809         * decl.c, parser.c, rtti.c: Adjust callers.
810         * parser.c (cp_parser_class_head): Pass back attributes in the
811         class head.
812         (cp_parser_class_specifier): Adjust.
813
814 2004-03-08  Matt Austern  <austern@apple.com>
815
816         PR debug/14079
817         * name-lookup.c (add_decl_to_level): Add extern variables, as well
818         as static, to static_decls array.
819
820 2004-03-05  Jason Merrill  <jason@redhat.com>
821
822         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
823
824 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
825
826         * decl.c (grokfndecl): Update old incorrect comment.
827         (grokvardecl): Diagnose C++ variables of type with no linkage.
828
829 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
830
831         PR c++/14369
832         * pt.c (build_non_dependent_expr): Do not create a
833         NON_DEPENDENT_EXPR for a THROW_EXPR.
834
835 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
836
837         PR c++/14369
838         * error.c (dump_expr): Handle THROW_EXPR.
839
840 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
841
842         PR c++/14360
843         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
844         lookup if ordinary name-lookup finds a non-function.
845         * pt.c (tsubst_copy_and_build): Likewise.
846
847         PR c++/14361
848         * parser.c (cp_parser_late_parsing_default_args): Check that there
849         are no extra tokens after the end of the default-argument
850         expression.
851
852 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
853
854         PR c++/14324
855         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
856         having C++ linkage for name-mangling purposes.
857
858         PR c++/14260
859         * parser.c (cp_parser_direct_declarator): Recognize constructor
860         declarators that use a template-id to name the class being
861         constructed.
862
863         PR c++/14337
864         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
865         (tsubst_expr): Do not call tsubst_copy, even when
866         processing_template_decl.
867
868 2004-03-01  Jeff Law  <law@redhat.com>
869
870         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
871         the proper type.
872
873 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
874
875         PR c++/14138
876         * name-lookup.h (push_scope): Change prototype.
877         * name-lookup.c (push_scope): Do not reenter the current class
878         scope.
879         * decl.c (grokfndecl): Check return code from push_scope before
880         calling pop_scope.
881         * decl2.c (check_classfn): Likewise.
882         * parser.c (cp_parser_conversion_function_id): Likewise.
883         (cp_parser_init_declarator): Likewise.
884         (cp_parser_direct_declarator): Likewise.
885         (cp_parser_class_specifier): Likewise.
886         (cp_parser_class_head): Likewise.
887         (cp_parser_lookup_name): Likewise.
888         (cp_parser_constructor_declarator_p): Likewise.
889         * pt.c (instantiate_class_template): Likewise.
890         (resolve_typename_type): Likewise.
891
892 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
893
894         PR c++/14267
895         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
896         extension.
897
898         PR debug/12103
899         * class.c (update_vtable_entry_for_fn): Do not go through
900         covariance machinery if the type returned by an overrider is the
901         same as the original.
902
903 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
904
905         * call.c: Fix a comment typo.
906
907 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
908
909         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
910
911 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
912
913         PR c++/14278
914         * parser.c (cp_parser_parameter_declaration_list): Commit
915         to fewer tentative parses.
916
917 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
918
919         PR c++/14284
920         * pt.c (dependent_type_p_r): A template template parameter is a
921         dependent type.
922
923 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
924
925         PR c++/14246
926         * mangle.c (write_template_arg_literal): Don't rely on identity for
927         boolean constants.
928
929 2004-02-24  Jason Merrill  <jason@redhat.com>
930
931         * tree.c (build_exception_variant): Use check_qualified_type.
932
933 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
934             Kazu Hirata  <kazu@cs.umass.edu>
935
936         * decl.c (cxx_init_decl_processing): Don't check
937         flag_writable_strings.
938
939 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
940
941         PR c++/14156
942         * typeck.c (maybe_warn_about_returning_address_of_location):
943         Change check for VAR_DECL to use DECL_P instead.
944
945 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
946
947         PR c++/14250
948         * cvt.c (build_expr_type_conversion): Type must be complete before
949         looking up for conversions.
950
951 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
952
953         PR c++/14143
954         * name-lookup.c (arg_assoc_class): Don't look into template
955         arguments if it is not a primary template.
956
957 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
958
959         PR c++/12007
960         * method.c (use_thunk): Always clone function argument tree.
961
962 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
963
964         PR c++/14199
965         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
966
967         PR c++/14173
968         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
969         for all type variants.
970
971 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
972
973         PR c++/13927
974         * decl.c (duplicate_decls): Return error_mark_node for invalid
975         redeclarations.
976         * name-lookup.c (push_namespace): Ignore the return value from
977         pushdecl.
978         * pt.c (push_template_decl_real): Robustify.
979
980         PR c++/14186
981         * name-lookup.c (push_class_level_binding): Do not complain about
982         adding a binding for a member whose name is the same as the
983         enclosing class if the member is located in a base class of the
984         current class.
985
986 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
987
988         PR c++/14181
989         * parser.c (cp_parser_new_expression): Parse an ill-formed
990         direct-new-declarator after a parenthesized type-id to emit good
991         diagnostic.
992
993 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
994
995         * cp-tree.def, cvt.c: Update copyright.
996
997 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
998
999         PR c++/11326
1000         * cp-tree.h (abi_version_at_least): Remove.
1001         * mangle.c: Include flags.h.
1002
1003 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
1004
1005         PR c++/13971
1006         * call.c (build_conditional_expr): Handle conversions between
1007         class types which result in differently cv-qualified type
1008         variants.
1009
1010         PR c++/14086
1011         * class.c (delete_duplicate_fields_1): Remove.
1012         (delete_duplicate_fields): Likewise.
1013         (finish_struct_anon): Remove check for members with the same name
1014         as their enclosing class.
1015         (check_field_decls): Do not call duplicate_fields.
1016         * decl.c (grokdeclarator): Remove check for static data members
1017         with the same name as their enclosing class.
1018         * name-lookup.c (push_class_level_binding): Check for members with
1019         the same name as their enclosing class.
1020
1021 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1022
1023         PR c++/14085
1024         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1025
1026 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1027
1028         PR c++/13635
1029         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1030         has full set of arguments.
1031
1032 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1033
1034         PR c++/13927
1035         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1036
1037 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
1038
1039         PR c++/14122
1040         * cp-tree.h (delete_sanity): Change prototype.
1041         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1042         Remove dead code.  Adjust code to warn about deleting an array.
1043         * typekc.c (decay_conversion): Use build_address and build_nop.
1044
1045         PR c++/14108
1046         * search.c (accessible_p): Do not check access in thunks.
1047
1048         PR c++/14083
1049         * call.c (build_conditional_expr): Call force_rvalue on the
1050         non-void operand in the case that one result is a throw-expression
1051         and the other is not.
1052
1053 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
1054
1055         PR c++/9851
1056         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1057         the type name and look ahead for ::~, and bail out early with a
1058         better error message if the parse is going to fail.
1059
1060 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
1061
1062         * call.c (conversion_kind): New type.
1063         (conversion_rank): Likewise.
1064         (conversion): Likewise.
1065         (CONVERSION_RANK): New macro.
1066         (conversion_obstack): New variable.
1067         (obstack_initialized): Likewise.
1068         (z_candidate): Change type of convs and second_conv.
1069         (candidate_warning): New type.
1070         (IDENTITY_RANK): Remove.
1071         (EXACT_RANK): Likewise.
1072         (PROMO_RANK): Likewise.
1073         (STD_RANK): Likewise.
1074         (PBOOL_RANK): Likewise.
1075         (USER_RANK): Likewise.
1076         (ELLIPSIS_RANK): Likewise.
1077         (BAD_RANK): Likewise.
1078         (ICS_RANK): Likewise.
1079         (ICS_STD_RANK): Likewise.
1080         (ICS_USER_FLAG): Likewise.
1081         (ICS_ELLIPSIS_FLAG): Likewise.
1082         (ICS_THIS_FLAG): Likewise.
1083         (ICS_BAD_FLAG): Likewise.
1084         (NEED_TEMPORARY_P): Likewise.
1085         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1086         (USER_CONV_CAND): Likewise.
1087         (USER_CONV_FN): Likewise.
1088         (conversion_obstack_alloc): New function.
1089         (alloc_conversion): Likewise.
1090         (validate_conversion_obstack): Likewise.
1091         (alloc_conversions): Likewise.
1092         (build_conv): Adjust to deal with new conversion data structures.
1093         (build_identity_conv): New function.
1094         (build_ambiguous_conv): Likewise.
1095         (standard_conversion): Adjust to deal with new conversion data
1096         structures.
1097         (convert_class_to_reference): Likewise.
1098         (direct_reference_binding): Likewise.
1099         (reference_binding): Likewise.
1100         (implicit_conversion): Likewise.
1101         (add_candidate): Likewise.
1102         (add_function_candidate): Likewise.
1103         (add_conv_candidate): Likewise.
1104         (build_builtin_candidate): Likewise.
1105         (print_z_candidate): Likewise.
1106         (merge_conversion_sequences): Likewise.
1107         (build_user_type_conversion_1): Likewise.
1108         (build_user_type_conversion): Likewise.
1109         (build_new_function_call): Likewise.
1110         (build_object_call): Likewise.
1111         (conditional_conversion): Likewise.
1112         (build_conditional_expr): Likewise.
1113         (build_new_op): Likewise.
1114         (build_op_delete_call): Likewise.
1115         (convert_like_real): Likewise.
1116         (build_over_call): Likewise.
1117         (build_new_method_call): Likewise.
1118         (is_subseq): Likewise.
1119         (maybe_handle_implicit_object): Likewise.
1120         (maybe_handle_ref_bind): Likewise.
1121         (compare_ics): Likewise.
1122         (source_type): Likewise.
1123         (add_warning): Likewise.
1124         (joust): Likewise.
1125         (can_convert_arg): Likewise.
1126         (can_convert_arg_bad): Likewise.
1127         (perform_implicit_conversion): Likewise.
1128         (perform_direct_initialization_if_possible): Likewise.
1129         (initialize_reference): Likewise.
1130         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1131         * cp-tree.def (WRAPPER): Likewise.
1132         (IDENTITY_CONV): Remove.
1133         (LVALUE_CONV): Likewise.
1134         (QUAL_CONV): Likewise.
1135         (STD_CONV): Likewise.
1136         (PTR_CONV): Likewise.
1137         (PMEM_CONV): Likewise.
1138         (BASE_CONV): Likewise.
1139         (REF_BIND): Likewise.
1140         (USER_CONV): Likewise.
1141         (AMBIG_CONV): Likewise.
1142         (RVALUE_CONV): Likewise.
1143         * cp-tree.h (tree_wrapper): Remove.
1144         (WRAPPER_ZC): Remove.
1145         (lang_tree_node): Remove wrapper.
1146         (LOOKUP_SPECULATIVELY): Remove.
1147         (build_op_delete_call): Adjust prototype.
1148         (validate_conversion_obstack): Declare.
1149         (build_zc_wrapper): Remove.
1150         * cvt.c (convert_to_reference): Remove dead code.
1151         (ocp_convert): Likewise.
1152         * decl.c (redeclaration_error_message): Correct handling of
1153         templates.
1154         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1155         (cp_tree_node_structure): Remove WRAPPER case.
1156         * decl2.c (finish_file): Call validate_conversion_obstack.
1157         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1158         (build_op_delete_call): Likewise.
1159         (build_x_delete): Likewise.
1160         (build_delete): Adjust call to build_op_delete_call.
1161         * pt.c (tsubst_friend_declaration): Adjust code to determine
1162         whether or not a friend template is a definition.
1163         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1164         * tree.c (build_zc_wrapper): Remove.
1165
1166 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
1167
1168         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1169         * cp-tree.h: Don't declare cxx_builtin_type_decls.
1170         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1171         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1172
1173 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
1174
1175         * typeck.c (lookup_destructor): Fix typo in error message.
1176
1177 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
1178
1179         * call.c, parser.c, tree.c: Fix comment typos.
1180
1181 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
1182
1183         Bug 13856
1184         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1185         * decl.c (duplicate_decls, start_function): Likewise.
1186
1187 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
1188
1189         * name-lookup.c (pushdecl): Issue shadow warnings directly.
1190         * parser.c (free_parser_stacks): Delete.
1191
1192 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
1193
1194         * rtti.c: Update copyright.
1195
1196 2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1197
1198         PR c++/14033
1199         * decl.c (require_complete_types_for_parms): Do not insert
1200         error_mark_node in the parameter list.
1201
1202 2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1203
1204         PR c++/14028
1205         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1206         error when terminator can not be found.
1207
1208 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
1209
1210         Make-lang.in (po-generated):  Delete.
1211
1212 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
1213
1214         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1215         targetm.calls.promote_prototypes.
1216
1217 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1218
1219         PR middle-end/13750
1220         Revert:
1221         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
1222         PR pch/13361
1223         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1224         (handle_pragma_implementation): Likewise.
1225
1226 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
1227
1228         PR c++/13714
1229         * typeck.c (lookup_destructor): Tweak error message.
1230
1231 2004-02-05  Jan Hubicka  <jh@suse.cz>
1232
1233         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
1234         functions.
1235
1236 2003-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1237
1238         PR c++/14008
1239         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1240         code, only emits the diagnostic now. Added lookup of the identifier
1241         and support for qualified ids.
1242         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1243         Parse an (invalid) type name as id-expression within a declarator.
1244         (cp_parser_simple_declaration): Use it.
1245         (cp_parser_member_declaration): Likewise.
1246         (cp_parser_make_typename_type): New function. Handle errors through
1247         cp_parser_diagnose_invalid_typename.
1248         (cp_parser_elaborated_type_specifier): Use it.
1249
1250 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1251
1252         PR c++/13932
1253         * call.c (convert_like_real): Use "converting" rather than
1254         "argument" as the descriptive keyword to
1255         dubious_conversion_warnings.
1256         * typeck.c (convert_for_assignment): Do not call
1257         dubious_conversion_warnings.
1258
1259 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1260
1261         PR c++/13086
1262         * init.c (build_delete): Emit a more informative error message in
1263         case of an incomplete type, and on the correct source line.
1264
1265 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
1266
1267         * error.c, search.c: Update copyright.
1268
1269 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1270
1271         PR c++/9941
1272         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1273         linkage for the typeinfo name string.
1274
1275 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1276
1277         PR c++/13969
1278         * cp-tree.h (fold_non_dependent_expr): New function.
1279         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1280         (cp_parser_template_argument): Use fold_non_dependent_expr.
1281         (cp_parser_direct_declarator): Likewise.
1282         * pt.c (fold_non_dependent_expr): New function.
1283         (convert_nontype_argument): Use it.
1284         (tsubst_qualified_id): Simplify.
1285         (tsubst_copy_and_build): Likewise.
1286
1287 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1288
1289         * decl.c (cxx_push_function_context): Do not set
1290         current_function_is_thunk.
1291         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1292         actual function.
1293
1294 2003-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1295
1296         PR c++/13997
1297         * pt.c (more_specialized_class): Increase processing_template_decl
1298         while partial ordering.
1299
1300 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1301
1302         PR c++/13925
1303         * decl.c (start_function): Do not call pushdecl for any
1304         instantiation or specialization of a primary template.
1305
1306 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1307
1308         PR c++/13950
1309         * parser.c (cp_parser_class_name): Robustify.
1310
1311         PR c++/13970
1312         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1313
1314         PR c++/14002
1315         * semantics.c (finish_id_expression): Do not return an
1316         IDENTIFIER_NODE when lookup finds a PARM_DECL.
1317
1318 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1319
1320         PR c++/13978
1321         * pt.c (build_non_dependent_expr): Do not build
1322         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1323
1324         PR c++/13968
1325         * semantics.c (finish_id_expression): Do not return an
1326         IDENTIFIER_NODE when lookup finds a VAR_DECL.
1327
1328         PR c++/13975
1329         * parser.c (cp_parser_simple_declaration): When skipping to the
1330         end of the statement swallow the terminating semicolon.
1331
1332 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
1333
1334         PR c++/13113
1335         * init.c (build_offset_ref): Improve error recovery for invalid
1336         uses of non-static member functions.
1337
1338         PR c++/13854
1339         * cp-tree.h (cp_build_type_attribute_variant): New function.
1340         * class.c (build_clone): Use cp_build_type_attribute_variant.
1341         * decl.c (duplicate_decls): Likewise.
1342         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1343         (tsubst_function_type): Likewise.
1344         * tree.c (build_exception_variant): Check attributes before
1345         concluding that two types are the same.
1346         (cp_build_type-attribute_variant): New method.
1347         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1348
1349         PR c++/13907
1350         * call.c (convert_class_to_reference): Keep better track of
1351         pedantically invalid user-defined conversions.
1352
1353 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1354
1355         PR c++/13957
1356         * pt.c (tsubst_qualified_id): Improved error message when a type
1357         is expected but not found.
1358
1359 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
1360
1361         * class.c: Fix comment typos.
1362         * decl.c: Likewise.
1363         * error.c: Likewise.
1364         * parser.c: Likewise.
1365         * pt.c: Likewise.
1366         * search.c: Likewise.
1367         * typeck.c: Likewise.
1368
1369 2004-01-30  Richard Henderson  <rth@redhat.com>
1370
1371         PR c++/13693
1372         * method.c (use_thunk): Don't force_target_expr for void thunks.
1373         * tree.c (build_target_expr_with_type): Assert non-void type.
1374         (force_target_expr): Likewise.
1375
1376 2004-01-30  Michael Matz  <matz@suse.de>
1377
1378         * parser.c (cp_parser_labeled_statement): Accept case ranges.
1379
1380 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1381
1382         DR206
1383         PR c++/13813
1384         * decl.c (grokdeclarator): Check immediatly type completeness for
1385         non-dependent types.
1386
1387 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1388
1389         PR c++/13683
1390         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1391         a sizeof expression.block
1392
1393 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
1394
1395         PR c++/13883
1396         * mangle.c (write_encoding): Correct encoding of member template
1397         constructors.
1398
1399 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1400
1401         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1402         template name as it was `<::' (digraph typo).
1403         (cp_parser_nth_token_starts_template_argument_list_p): New function.
1404         (cp_parser_id_expression): Use it.
1405         (cp_parser_nested_name_specifier_opt): Likewise.
1406         (cp_parser_template_name): Likewise.
1407         (cp_parser_class_name): Likewise.
1408         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1409
1410 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
1411
1412         PR c++/13791
1413         * typeck.c (merge_types): Do not merge attributes into
1414         TYPENAME_TYPEs.
1415
1416         PR c++/13736
1417         * parser.c (cp_parser_direct_declarator): Do not prevent
1418         backtracking inside a parenthesized declarator.
1419         (cp_parser_parameter_declaration): Fix typo in comment.
1420
1421 2004-01-28  Jan Hubicka  <jh@suse.cz>
1422
1423         * semantics.c (expand_body)  Do emit_associated_thunks before
1424         expansion.
1425
1426 2004-01-27  Devang Patel  <dpatel@apple.com>
1427
1428         * name-lookup.c: Include "debug.h"
1429         (do_namespace_alias): Invoke debug_hooks to emit debug info
1430         for namespace alias.
1431         (do_local_using_decl): Invoke debug_hooks to emit debug info
1432         for using decl.
1433         (do_class_using_decl): Same.
1434         (do_toplevel_using_decl): Same.
1435         (do_using_directive): Same.
1436         (cp_emit_debug_info_for_using): New function.
1437         * Make-lang.in (cp/parser.o): Depend on debug.h
1438         (cp/name-lookup.o): Same.
1439
1440 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1441
1442         * cp-tree.h (language_function, lang_type_header): Use
1443         BOOL_BITFIELD.
1444         * name-lookup.h (cp_binding_level): Likewise.
1445
1446 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
1447
1448         PR c++/13663
1449         * semantics.c (finish_for_expr): Check for unresolved overloaded
1450         functions.
1451
1452         * class.c (add_method): Just check processing_template_decl to
1453         determine whether or not we are within a template.
1454         * decl2.c (maybe_retrofit_in_chrg): Likewise.
1455         * init.c (decl_constant_value): Check the type of the declaration,
1456         not TREE_READONLY.
1457         * name-lookup.c (maybe_push_to_top_level): Rename to ...
1458         (push_to_top_level): ... this.
1459         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1460         * pt.c (push_template_decl_real): Reorder condition for speed.
1461         (convert_template_argument): Use dependency-checking functions in
1462         place of uses_template_parms.
1463         (lookup_template_class): Avoid calling uses_template_parms more
1464         than once.
1465         (uses_template_parms): Reimplement, using dependency-checking
1466         functions.
1467         (instantiate_class_template): Use push_to_top_level, not
1468         maybe_push_to_top_level.
1469         (type_unification_real): Simplify.
1470         (type_dependent_expression_p): Handle OFFSET_REFs and
1471         TEMPLATE_DECLs.
1472         (any_dependent_template_arguments_p): Handle multiple levels of
1473         template argument.
1474         * semantics.c (expand_or_defer_fn): Do not check
1475         uses_template_parms for template instantiations.
1476         * typeck.c (comptypes): Avoid calling cp_type_quals.
1477
1478 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
1479
1480         PR c++/13833
1481         * call.c (build_over_call): Do not convert arguments when
1482         processing a template.
1483         * pt.c (build_non_dependent_expr): Do not build a
1484         NON_DEPENDENT_EXPR for arithmetic constants.
1485
1486 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1487
1488         PR c++/13810
1489         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1490         returns a TYPE_DECL. no further lookup is required.
1491         * semantics.c (check_template_template_default_arg): A TYPE_DECL
1492         is invalid. Rework to give better diagnostics.
1493
1494 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1495
1496         PR c++/13797
1497         * pt.c (instantiate_class_template): Add an error_mark_node
1498         check.
1499         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
1500
1501 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
1502
1503         PR c++/13701
1504         * decl.c (finish_function): Move the call to
1505         finish_fname_decls below the call to
1506         finish_eh_spec_block.
1507
1508 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
1509
1510         * optimize.c, typeck2.c: Update copyright.
1511
1512 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
1513
1514         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
1515         init.c, mangle.c, typeck.c: Update copyright.
1516
1517 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1518
1519         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
1520
1521 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
1522
1523         * Make-lang.in: Replace $(docdir) with doc.
1524         (c++.info, c++.srcinfo): Dummy entry.
1525         (c++.man, c++.srcman): New rules.
1526         (c++.install-man): Revamp rule.
1527
1528 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
1529
1530         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
1531         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
1532         immediate $(shell) instead of deferred backquote.
1533
1534 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
1535
1536         PR c++/13651
1537         * parser.c (cp_parser_postfix_expression): When encountering
1538         incomplete type on left-hand side of "->" or ".", treat the entire
1539         expression as erroneous.
1540
1541         PR c++/13592
1542         * call.c (build_field_call): Remove.
1543         (n_build_method_call): Likewise.
1544         (build_method_call): Likewise.
1545         (build_new_method_call): Do not call build_field_call.
1546         * class.c (n_build_method_call): Remove.
1547         (print_class_statistics): Do not print it.
1548         * cp-tree.h (build_method_call): Remove declaration.
1549         (finish_object_call_expr): Likewise.
1550         (build_new_1): Do not use build_method_call.
1551         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
1552         when the function appearing on the right-hand-side of "." or "->"
1553         is not actually a function.
1554         * pt.c (tsubst_copy_and_build): Likewise.
1555         * semantics.c (finish_object_call_expr): Remove.
1556
1557 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
1558
1559         PR c++/13710
1560         * pt.c (tsubst): Use finish_typeof.
1561
1562 2004-01-18  Jason Merrill  <jason@redhat.com>
1563
1564         PR c++/11725
1565         * except.c (build_throw): In a template, set
1566         current_function_returns_abnormally.
1567
1568 2004-01-17  Fred Fish  <fnf@intrinsity.com>
1569
1570         PR c++/11895
1571         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
1572         except don't call array_type_nelts() with a VECTOR_TYPE.
1573
1574 2004-01-16  Jan Hubicka  <jh@suse.cz>
1575
1576         * mangle.c (write_mangled_name): Remove inline modifier.
1577
1578 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
1579
1580         PR c++/13574
1581         * decl.c (compute_array_index_type): Fix grammar in comment.
1582         * init.c (build_zero_init): Handle zero-sized arrays correctly.
1583
1584         PR c++/13178
1585         * call.c (name_as_c_string): Print conversion operator names
1586         correctly.
1587
1588         PR c++/13478
1589         * call.c (initialize_reference): Pass -1 for inner parameter to
1590         convert_like_real.
1591
1592 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1593
1594         PR c++/13407
1595         * parser.c (cp_parser_base_specifier): Check for an invalid
1596         keyword `typename' and emit an user-friendly error message.
1597
1598 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
1599
1600         PR pch/13361
1601         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1602         (handle_pragma_implementation): Likewise.
1603
1604 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1605
1606         PR c++/9259
1607         * typeck.c (build_class_member_access_expr): Allow to access members
1608         of the currently open class.
1609         (finish_class_member_access_expr): Likewise.
1610
1611 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
1612
1613         PR c++/13659
1614         * name-lookup.c (validate_nonmember_using_decl): Take scope and
1615         name by value, instead of computing them.
1616         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
1617         arguments.  Pass them to validate_nonmember_using_decl.
1618         * name-lookup.h (do_local_using_decl): Adjust.
1619         (do_toplevel_using_decl): Likewise.
1620         * parser.c (cp_parser_using_declaration): Likewise.
1621         * pt.c (tsubst_expr): Likewise.
1622
1623 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
1624
1625         PR c++/13594
1626         PR c++/13658
1627         * name-lookup.c (qualified_lookup_using_namespace): Search
1628         strongly-associated namespaces first, and only then try other
1629         namespaces.
1630
1631 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
1632
1633         * Make-lang.in (c++.srcextra): Dummy entry.
1634
1635 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1636
1637         PR c++/8856
1638         * parser.c (cp_parser_template_name): Don't try to parse a
1639         conversion-function-id, as it cannot be a template-name.
1640         (cp_parser_simple_type_specifier): Check for invalid template-ids
1641         even after a built-in type.
1642
1643 2004-01-14  Jan Hubicka  <jh@suse.cz>
1644
1645         PR c++/12850
1646         * pt.c (instantiate_decl):  Do not increase function_depth.
1647
1648 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
1649
1650         PR c++/9021
1651         PR c++/11005
1652         * parser.c (cp_parser_elaborated_type_specifier): Warn about
1653         attributes and discard.
1654         * decl.c (xref_tag): Don't overwite existing attributes with
1655         NULL_TREE.
1656
1657 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1658
1659         PR c++/12335
1660         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
1661         is no destructor while looking up a BIT_NOT_EXPR.
1662
1663 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
1664
1665         * cxxfilt.c: Remove unused file.
1666
1667 2004-01-14  Jan Hubicka  <jh@suse.cz>
1668
1669         Partial fix to PR c++/12850
1670         * decl2.c (mark_used): Do not proactively instantiate templates
1671         when compiling in unit-at-a-time or not optimizing.
1672         * optimize.c (maybe_clone_body): Do not increase function depth.
1673
1674 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1675
1676         PR c++/13474
1677         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
1678
1679 2003-01-12  Steven Bosscher  <stevenb@suse.de>
1680
1681         PR c++/13558
1682         * parser.c (cp_parser_member_declaration): Any non-type is also
1683         not a class or a function.
1684
1685 2004-01-12  Jason Merrill  <jason@redhat.com>
1686
1687         PR c++/12815
1688         * class.c (build_base_path): Do not mark vtable references as
1689         TREE_CONSTANT.
1690         (build_vtbl_ref_1): Likewise.
1691
1692 2004-01-12  Richard Henderson  <rth@redhat.com>
1693
1694         PR opt/10776
1695         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1696         (store_init_value): Use it.
1697         * decl.c (check_initializer): Expect full initialization code
1698         from store_init_value.
1699         * init.c (expand_aggr_init_1): Likewise.
1700         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1701
1702 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
1703
1704         * class.c (layout_class_type): For non-POD class types, also copy
1705         the DECL_SIZE and DECL_MODE of fields to the base class type.
1706
1707 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1708
1709         PR c++/13289
1710         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1711         calling regenerate_decl_from_template.
1712
1713 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
1714
1715         PR c++/4100
1716         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1717         decl-specifier occurring along with a class definition.
1718
1719 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
1720
1721         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1722         clauses to comments describing declares_class_or_enum.
1723         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1724         false.
1725
1726 2004-01-12  Jan Hubicka  <jh@suse.cz>
1727
1728         * pt.c (for_each_template_parm): Do not check for duplicates.
1729         (for_each_template_parm): Use walk_tree duplicate checking code.
1730
1731 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
1732
1733         PR c++/3478
1734         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1735         is error_mark_node, don't add any more decl_specs.
1736         (cp_parser_init_declarator): After committing to a declaration, if
1737         the decl_specifiers start with error_mark_node, issue an error and
1738         change the type to "int".
1739
1740 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1741
1742         PR bootstrap/7817
1743         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1744
1745 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1746
1747         DR 337
1748         PR c++/9256
1749         * pt.c (tsubst): Substitution must fail if we are attempting to
1750         create an array with element type that is an abstract class type.
1751         * decl.c (cp_finish_decl): Strip pointers and array types recursively
1752         before calling abstract_virtuals_error.
1753
1754 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
1755
1756         * name-lookup.c (qualified_lookup_using_namespace): Consider
1757         strong using directives even if we've already found a binding.
1758
1759 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
1760
1761         * cp-tree.h (cxx_expand_expr): Change prototype.
1762         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1763
1764 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1765
1766         PR c++/12573
1767         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1768         looking into them recursively. They can be there because of the
1769         new __offsetof__ extension.
1770
1771 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
1772
1773         * parser.c (cp_parser_save_member_function_body): Mark the
1774         definition static.
1775
1776 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
1777
1778         PR c++/13057
1779         * class.c (build_clone): Copy type attributes from the original
1780         function to the clone.
1781
1782         PR c++/12815
1783         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1784         references as constant.
1785
1786         PR c++/12132
1787         * parser.c (cp_parser_explicit_instantiation): Improve error
1788         recovery.
1789         (cp_parser_require): Improve indication of the error location.
1790
1791         PR c++/13451
1792         * parser.c (cp_parser_class_head): Reorder logic to check for
1793         invalid qualification.
1794
1795 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
1796
1797         PR c++/13157
1798         * name-lookup.c (lookup_using_namespace): Remove spacesp
1799         parameter.
1800         (unqualified_namespace_lookup): Likewise.
1801         (lookup_qualified_name): Adjust accordingly.
1802         (lookup_name_real): Likewise.
1803         (lookup_arg_dependent): Do not eliminate the namespace of the
1804         functions found by unqualified name lookup unless that is the
1805         current namespace.
1806
1807 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
1808
1809         * semantics.c (push_deferring_access_checks): Fix format.
1810         (resume_deferring_access_checks): Likewise.
1811         (stop_deferring_access_checks): Likewise.
1812         (pop_deferring_access_checks): Likewise.
1813         (get_deferred_access_checks): Likewise.
1814         (pop_to_parent_deferring_access_checks): Likewise.
1815         (perform_deferred_access_checks): Likewise.
1816         (perform_or_defer_access_check): Likewise.
1817
1818 2004-01-04  Richard Henderson  <rth@redhat.com>
1819
1820         * call.c (build_over_call): Don't create a save_expr of an
1821         aggregate, but rather its address.
1822
1823 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
1824
1825         PR c++/13529
1826         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1827         an offsetof expression.
1828
1829         * parser.c (cp_parser_parameter_declaration): Fix comment.
1830
1831         PR c++/12226
1832         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1833         (reference_binding): Set it when appropriate.
1834         (build_temp): New function, split out from ...
1835         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
1836         (initialize_reference): Likewise.
1837
1838         PR c++/13536
1839         * parser.c (cp_parser): Add in_type_id_in_expr_p.
1840         (cp_parser_new): Initialize it.
1841         (cp_parser_postfix_expression): Set it.
1842         (cp_parser_sizeof_operand): Likewise.
1843         (cp_parser_parameteR_declaration): Do not commit early to tenative
1844         parsers when in_type_id_in_expr_p is set.
1845
1846 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1847
1848         PR c++/13094
1849         * parser.c (cp_parser_template_argument): Don't call
1850         make_unbound_class_template directly.
1851         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1852         UNBOUND_CLASS_TEMPLATE tree node.
1853
1854 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
1855
1856         PR target/12729
1857         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1858
1859 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1860
1861         PR c++/13520
1862         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1863         (DECL_FUNCTION_TEMPLATE_P): Use it.
1864         (DECL_CLASS_TEMPLATE_P): Likewise.
1865         * parser.c (cp_parser_lookup_name): Add is_template parameter.
1866         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1867         (cp_parser_template_name): Likewise.
1868         (cp_parser_elaborated_type_specifier): Likewise.
1869         (cp_parser_namespace_name): Likewise.
1870         (cp_parser_class_name): Likewise.
1871         (cp_parser_lookup_name_simple): Likewise.
1872
1873 See ChangeLog.3 for earlier changes.