OSDN Git Service

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