OSDN Git Service

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