OSDN Git Service

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