OSDN Git Service

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