OSDN Git Service

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