PR c++/14122
[official-gcc.git] / gcc / cp / ChangeLog
blob572b774f7aa2345a0c50ab62c7481de2269233e7
1 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
3         PR c++/14122
4         * cp-tree.h (delete_sanity): Change prototype.
5         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6         Remove dead code.  Adjust code to warn about deleting an array.
7         * typekc.c (decay_conversion): Use build_address and build_nop.
9         PR c++/14108
10         * search.c (accessible_p): Do not check access in thunks.
12         PR c++/14083
13         * call.c (build_conditional_expr): Call force_rvalue on the
14         non-void operand in the case that one result is a throw-expression
15         and the other is not.
17 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
19         PR c++/9851
20         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
21         the type name and look ahead for ::~, and bail out early with a
22         better error message if the parse is going to fail.
24 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
26         * call.c (conversion_kind): New type.
27         (conversion_rank): Likewise.
28         (conversion): Likewise.
29         (CONVERSION_RANK): New macro.
30         (conversion_obstack): New variable.
31         (obstack_initialized): Likewise.
32         (z_candidate): Change type of convs and second_conv.
33         (candidate_warning): New type.
34         (IDENTITY_RANK): Remove.
35         (EXACT_RANK): Likewise.
36         (PROMO_RANK): Likewise.
37         (STD_RANK): Likewise.
38         (PBOOL_RANK): Likewise.
39         (USER_RANK): Likewise.
40         (ELLIPSIS_RANK): Likewise.
41         (BAD_RANK): Likewise.
42         (ICS_RANK): Likewise.
43         (ICS_STD_RANK): Likewise.
44         (ICS_USER_FLAG): Likewise.
45         (ICS_ELLIPSIS_FLAG): Likewise.
46         (ICS_THIS_FLAG): Likewise.
47         (ICS_BAD_FLAG): Likewise.
48         (NEED_TEMPORARY_P): Likewise.
49         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
50         (USER_CONV_CAND): Likewise.
51         (USER_CONV_FN): Likewise.
52         (conversion_obstack_alloc): New function.
53         (alloc_conversion): Likewise.
54         (validate_conversion_obstack): Likewise.
55         (alloc_conversions): Likewise.
56         (build_conv): Adjust to deal with new conversion data structures.
57         (build_identity_conv): New function.
58         (build_ambiguous_conv): Likewise.
59         (standard_conversion): Adjust to deal with new conversion data
60         structures.
61         (convert_class_to_reference): Likewise.
62         (direct_reference_binding): Likewise.
63         (reference_binding): Likewise.
64         (implicit_conversion): Likewise.
65         (add_candidate): Likewise.
66         (add_function_candidate): Likewise.
67         (add_conv_candidate): Likewise.
68         (build_builtin_candidate): Likewise.
69         (print_z_candidate): Likewise.
70         (merge_conversion_sequences): Likewise.
71         (build_user_type_conversion_1): Likewise.
72         (build_user_type_conversion): Likewise.
73         (build_new_function_call): Likewise.
74         (build_object_call): Likewise.
75         (conditional_conversion): Likewise.
76         (build_conditional_expr): Likewise.
77         (build_new_op): Likewise.
78         (build_op_delete_call): Likewise.
79         (convert_like_real): Likewise.
80         (build_over_call): Likewise.
81         (build_new_method_call): Likewise.
82         (is_subseq): Likewise.
83         (maybe_handle_implicit_object): Likewise.
84         (maybe_handle_ref_bind): Likewise.
85         (compare_ics): Likewise.
86         (source_type): Likewise.
87         (add_warning): Likewise.
88         (joust): Likewise.
89         (can_convert_arg): Likewise.
90         (can_convert_arg_bad): Likewise.
91         (perform_implicit_conversion): Likewise.
92         (perform_direct_initialization_if_possible): Likewise.
93         (initialize_reference): Likewise.
94         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
95         * cp-tree.def (WRAPPER): Likewise.
96         (IDENTITY_CONV): Remove.
97         (LVALUE_CONV): Likewise.
98         (QUAL_CONV): Likewise.
99         (STD_CONV): Likewise.
100         (PTR_CONV): Likewise.
101         (PMEM_CONV): Likewise.
102         (BASE_CONV): Likewise.
103         (REF_BIND): Likewise.
104         (USER_CONV): Likewise.
105         (AMBIG_CONV): Likewise.
106         (RVALUE_CONV): Likewise.
107         * cp-tree.h (tree_wrapper): Remove.
108         (WRAPPER_ZC): Remove.
109         (lang_tree_node): Remove wrapper.
110         (LOOKUP_SPECULATIVELY): Remove.
111         (build_op_delete_call): Adjust prototype.
112         (validate_conversion_obstack): Declare.
113         (build_zc_wrapper): Remove.
114         * cvt.c (convert_to_reference): Remove dead code.
115         (ocp_convert): Likewise.
116         * decl.c (redeclaration_error_message): Correct handling of
117         templates.
118         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
119         (cp_tree_node_structure): Remove WRAPPER case.
120         * decl2.c (finish_file): Call validate_conversion_obstack.
121         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
122         (build_op_delete_call): Likewise.
123         (build_x_delete): Likewise.
124         (build_delete): Adjust call to build_op_delete_call.
125         * pt.c (tsubst_friend_declaration): Adjust code to determine
126         whether or not a friend template is a definition.
127         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
128         * tree.c (build_zc_wrapper): Remove.
129         
130 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
132         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
133         * cp-tree.h: Don't declare cxx_builtin_type_decls.
134         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
135         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
137 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
139         * typeck.c (lookup_destructor): Fix typo in error message.
141 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
143         * call.c, parser.c, tree.c: Fix comment typos.
145 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
147         Bug 13856
148         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
149         * decl.c (duplicate_decls, start_function): Likewise.
151 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
153         * name-lookup.c (pushdecl): Issue shadow warnings directly.
154         * parser.c (free_parser_stacks): Delete.
156 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
158         * rtti.c: Update copyright.
160 2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
162         PR c++/14033
163         * decl.c (require_complete_types_for_parms): Do not insert
164         error_mark_node in the parameter list.
166 2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
168         PR c++/14028
169         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
170         error when terminator can not be found.
172 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
174         Make-lang.in (po-generated):  Delete.
176 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
178         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
179         targetm.calls.promote_prototypes.
181 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
183         PR middle-end/13750
184         Revert:
185         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
186         PR pch/13361
187         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
188         (handle_pragma_implementation): Likewise.
190 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
192         PR c++/13714
193         * typeck.c (lookup_destructor): Tweak error message.
195 2004-02-05  Jan Hubicka  <jh@suse.cz>
197         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
198         functions.
200 2003-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
202         PR c++/14008
203         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
204         code, only emits the diagnostic now. Added lookup of the identifier
205         and support for qualified ids.
206         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
207         Parse an (invalid) type name as id-expression within a declarator.
208         (cp_parser_simple_declaration): Use it.
209         (cp_parser_member_declaration): Likewise.
210         (cp_parser_make_typename_type): New function. Handle errors through
211         cp_parser_diagnose_invalid_typename.
212         (cp_parser_elaborated_type_specifier): Use it.
214 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
216         PR c++/13932
217         * call.c (convert_like_real): Use "converting" rather than
218         "argument" as the descriptive keyword to
219         dubious_conversion_warnings.
220         * typeck.c (convert_for_assignment): Do not call
221         dubious_conversion_warnings.
223 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
225         PR c++/13086
226         * init.c (build_delete): Emit a more informative error message in
227         case of an incomplete type, and on the correct source line.
229 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
231         * error.c, search.c: Update copyright.
233 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
235         PR c++/9941
236         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
237         linkage for the typeinfo name string.
239 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
241         PR c++/13969
242         * cp-tree.h (fold_non_dependent_expr): New function.
243         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
244         (cp_parser_template_argument): Use fold_non_dependent_expr.
245         (cp_parser_direct_declarator): Likewise.
246         * pt.c (fold_non_dependent_expr): New function.
247         (convert_nontype_argument): Use it.
248         (tsubst_qualified_id): Simplify.
249         (tsubst_copy_and_build): Likewise.
251 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
253         * decl.c (cxx_push_function_context): Do not set
254         current_function_is_thunk.
255         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
256         actual function.
258 2003-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
260         PR c++/13997
261         * pt.c (more_specialized_class): Increase processing_template_decl
262         while partial ordering.
264 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
266         PR c++/13925
267         * decl.c (start_function): Do not call pushdecl for any
268         instantiation or specialization of a primary template.
270 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
272         PR c++/13950
273         * parser.c (cp_parser_class_name): Robustify.
275         PR c++/13970
276         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
278         PR c++/14002
279         * semantics.c (finish_id_expression): Do not return an
280         IDENTIFIER_NODE when lookup finds a PARM_DECL.
282 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
284         PR c++/13978
285         * pt.c (build_non_dependent_expr): Do not build
286         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
288         PR c++/13968
289         * semantics.c (finish_id_expression): Do not return an
290         IDENTIFIER_NODE when lookup finds a VAR_DECL.
292         PR c++/13975
293         * parser.c (cp_parser_simple_declaration): When skipping to the
294         end of the statement swallow the terminating semicolon.
296 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
298         PR c++/13113
299         * init.c (build_offset_ref): Improve error recovery for invalid
300         uses of non-static member functions.
302         PR c++/13854
303         * cp-tree.h (cp_build_type_attribute_variant): New function.
304         * class.c (build_clone): Use cp_build_type_attribute_variant.
305         * decl.c (duplicate_decls): Likewise.
306         * pt.c (copy_default_args_to_explicit_spec): Likewise.
307         (tsubst_function_type): Likewise.
308         * tree.c (build_exception_variant): Check attributes before
309         concluding that two types are the same.
310         (cp_build_type-attribute_variant): New method.
311         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
313         PR c++/13907
314         * call.c (convert_class_to_reference): Keep better track of
315         pedantically invalid user-defined conversions.
317 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
319         PR c++/13957
320         * pt.c (tsubst_qualified_id): Improved error message when a type
321         is expected but not found.
323 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
325         * class.c: Fix comment typos.
326         * decl.c: Likewise.
327         * error.c: Likewise.
328         * parser.c: Likewise.
329         * pt.c: Likewise.
330         * search.c: Likewise.
331         * typeck.c: Likewise.
333 2004-01-30  Richard Henderson  <rth@redhat.com>
335         PR c++/13693
336         * method.c (use_thunk): Don't force_target_expr for void thunks.
337         * tree.c (build_target_expr_with_type): Assert non-void type.
338         (force_target_expr): Likewise.
340 2004-01-30  Michael Matz  <matz@suse.de>
342         * parser.c (cp_parser_labeled_statement): Accept case ranges.
344 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
346         DR206
347         PR c++/13813
348         * decl.c (grokdeclarator): Check immediatly type completeness for
349         non-dependent types.
351 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
353         PR c++/13683
354         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
355         a sizeof expression.block
357 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
359         PR c++/13883
360         * mangle.c (write_encoding): Correct encoding of member template
361         constructors.
363 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
365         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
366         template name as it was `<::' (digraph typo).
367         (cp_parser_nth_token_starts_template_argument_list_p): New function.
368         (cp_parser_id_expression): Use it.
369         (cp_parser_nested_name_specifier_opt): Likewise.
370         (cp_parser_template_name): Likewise.
371         (cp_parser_class_name): Likewise.
372         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
374 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
376         PR c++/13791
377         * typeck.c (merge_types): Do not merge attributes into
378         TYPENAME_TYPEs.
380         PR c++/13736
381         * parser.c (cp_parser_direct_declarator): Do not prevent
382         backtracking inside a parenthesized declarator.
383         (cp_parser_parameter_declaration): Fix typo in comment.
385 2004-01-28  Jan Hubicka  <jh@suse.cz>
387         * semantics.c (expand_body)  Do emit_associated_thunks before
388         expansion.
390 2004-01-27  Devang Patel  <dpatel@apple.com>
392         * name-lookup.c: Include "debug.h"
393         (do_namespace_alias): Invoke debug_hooks to emit debug info
394         for namespace alias.
395         (do_local_using_decl): Invoke debug_hooks to emit debug info
396         for using decl.
397         (do_class_using_decl): Same.
398         (do_toplevel_using_decl): Same.
399         (do_using_directive): Same.
400         (cp_emit_debug_info_for_using): New function.
401         * Make-lang.in (cp/parser.o): Depend on debug.h
402         (cp/name-lookup.o): Same.
404 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
406         * cp-tree.h (language_function, lang_type_header): Use
407         BOOL_BITFIELD.
408         * name-lookup.h (cp_binding_level): Likewise.
410 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
412         PR c++/13663
413         * semantics.c (finish_for_expr): Check for unresolved overloaded
414         functions.
416         * class.c (add_method): Just check processing_template_decl to
417         determine whether or not we are within a template.
418         * decl2.c (maybe_retrofit_in_chrg): Likewise.
419         * init.c (decl_constant_value): Check the type of the declaration,
420         not TREE_READONLY.
421         * name-lookup.c (maybe_push_to_top_level): Rename to ...
422         (push_to_top_level): ... this.
423         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
424         * pt.c (push_template_decl_real): Reorder condition for speed.
425         (convert_template_argument): Use dependency-checking functions in
426         place of uses_template_parms.
427         (lookup_template_class): Avoid calling uses_template_parms more
428         than once.
429         (uses_template_parms): Reimplement, using dependency-checking
430         functions.
431         (instantiate_class_template): Use push_to_top_level, not
432         maybe_push_to_top_level.
433         (type_unification_real): Simplify.
434         (type_dependent_expression_p): Handle OFFSET_REFs and
435         TEMPLATE_DECLs.
436         (any_dependent_template_arguments_p): Handle multiple levels of
437         template argument.
438         * semantics.c (expand_or_defer_fn): Do not check
439         uses_template_parms for template instantiations.
440         * typeck.c (comptypes): Avoid calling cp_type_quals.
442 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
444         PR c++/13833
445         * call.c (build_over_call): Do not convert arguments when
446         processing a template.
447         * pt.c (build_non_dependent_expr): Do not build a
448         NON_DEPENDENT_EXPR for arithmetic constants.
450 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
452         PR c++/13810
453         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
454         returns a TYPE_DECL. no further lookup is required.
455         * semantics.c (check_template_template_default_arg): A TYPE_DECL
456         is invalid. Rework to give better diagnostics.
458 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
460         PR c++/13797
461         * pt.c (instantiate_class_template): Add an error_mark_node
462         check.
463         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
465 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
467         PR c++/13701
468         * decl.c (finish_function): Move the call to
469         finish_fname_decls below the call to
470         finish_eh_spec_block.
472 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
474         * optimize.c, typeck2.c: Update copyright.
476 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
478         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
479         init.c, mangle.c, typeck.c: Update copyright.
481 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
483         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
485 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
487         * Make-lang.in: Replace $(docdir) with doc.
488         (c++.info, c++.srcinfo): Dummy entry.
489         (c++.man, c++.srcman): New rules.
490         (c++.install-man): Revamp rule.
492 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
494         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
495         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
496         immediate $(shell) instead of deferred backquote.
498 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
500         PR c++/13651
501         * parser.c (cp_parser_postfix_expression): When encountering
502         incomplete type on left-hand side of "->" or ".", treat the entire
503         expression as erroneous.
505         PR c++/13592
506         * call.c (build_field_call): Remove.
507         (n_build_method_call): Likewise.
508         (build_method_call): Likewise.
509         (build_new_method_call): Do not call build_field_call.
510         * class.c (n_build_method_call): Remove.
511         (print_class_statistics): Do not print it.
512         * cp-tree.h (build_method_call): Remove declaration.
513         (finish_object_call_expr): Likewise.
514         (build_new_1): Do not use build_method_call.
515         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
516         when the function appearing on the right-hand-side of "." or "->"
517         is not actually a function.
518         * pt.c (tsubst_copy_and_build): Likewise.
519         * semantics.c (finish_object_call_expr): Remove.
521 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
523         PR c++/13710
524         * pt.c (tsubst): Use finish_typeof.
526 2004-01-16  Jason Merrill  <jason@redhat.com>
528         PR c++/11725
529         * except.c (build_throw): In a template, set
530         current_function_returns_abnormally.
532 2004-01-17  Fred Fish  <fnf@intrinsity.com>
534         PR c++/11895
535         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
536         except don't call array_type_nelts() with a VECTOR_TYPE.
538 2004-01-16  Jan Hubicka  <jh@suse.cz>
540         * mangle.c (write_mangled_name): Remove inline modifier.
542 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
544         PR c++/13574
545         * decl.c (compute_array_index_type): Fix grammar in comment.
546         * init.c (build_zero_init): Handle zero-sized arrays correctly.
548         PR c++/13178
549         * call.c (name_as_c_string): Print conversion operator names
550         correctly.
552         PR c++/13478
553         * call.c (initialize_reference): Pass -1 for inner parameter to
554         convert_like_real.
556 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
558         PR c++/13407
559         * parser.c (cp_parser_base_specifier): Check for an invalid
560         keyword `typename' and emit an user-friendly error message.
562 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
564         PR pch/13361
565         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
566         (handle_pragma_implementation): Likewise.
568 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
570         PR c++/9259
571         * typeck.c (build_class_member_access_expr): Allow to access members
572         of the currently open class.
573         (finish_class_member_access_expr): Likewise.
575 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
577         PR c++/13659
578         * name-lookup.c (validate_nonmember_using_decl): Take scope and
579         name by value, instead of computing them.
580         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
581         arguments.  Pass them to validate_nonmember_using_decl.
582         * name-lookup.h (do_local_using_decl): Adjust.
583         (do_toplevel_using_decl): Likewise.
584         * parser.c (cp_parser_using_declaration): Likewise.
585         * pt.c (tsubst_expr): Likewise.
587 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
589         PR c++/13594
590         PR c++/13658
591         * name-lookup.c (qualified_lookup_using_namespace): Search
592         strongly-associated namespaces first, and only then try other
593         namespaces.
595 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
597         * Make-lang.in (c++.srcextra): Dummy entry.
599 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
601         PR c++/8856
602         * parser.c (cp_parser_template_name): Don't try to parse a
603         conversion-function-id, as it cannot be a template-name.
604         (cp_parser_simple_type_specifier): Check for invalid template-ids
605         even after a built-in type.
607 2004-01-14  Jan Hubicka  <jh@suse.cz>
609         PR c++/12850
610         * pt.c (instantiate_decl):  Do not increase function_depth.
612 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
614         PR c++/9021
615         PR c++/11005
616         * parser.c (cp_parser_elaborated_type_specifier): Warn about
617         attributes and discard.
618         * decl.c (xref_tag): Don't overwite existing attributes with
619         NULL_TREE.
621 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
623         PR c++/12335
624         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
625         is no destructor while looking up a BIT_NOT_EXPR.
627 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
629         * cxxfilt.c: Remove unused file.
631 2004-01-14  Jan Hubicka  <jh@suse.cz>
633         Partial fix to PR c++/12850
634         * decl2.c (mark_used): Do not proactively instantiate templates
635         when compiling in unit-at-a-time or not optimizing.
636         * optimize.c (maybe_clone_body): Do not increase function depth.
638 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
640         PR c++/13474
641         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
643 2003-01-12  Steven Bosscher  <stevenb@suse.de>
645         PR c++/13558
646         * parser.c (cp_parser_member_declaration): Any non-type is also
647         not a class or a function.
649 2004-01-12  Jason Merrill  <jason@redhat.com>
651         PR c++/12815
652         * class.c (build_base_path): Do not mark vtable references as
653         TREE_CONSTANT.
654         (build_vtbl_ref_1): Likewise.
656 2004-01-12  Richard Henderson  <rth@redhat.com>
658         PR opt/10776
659         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
660         (store_init_value): Use it.
661         * decl.c (check_initializer): Expect full initialization code
662         from store_init_value.
663         * init.c (expand_aggr_init_1): Likewise.
664         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
666 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
668         * class.c (layout_class_type): For non-POD class types, also copy
669         the DECL_SIZE and DECL_MODE of fields to the base class type.
671 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
673         PR c++/13289
674         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
675         calling regenerate_decl_from_template.
677 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
679         PR c++/4100
680         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
681         decl-specifier occurring along with a class definition.
683 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
685         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
686         clauses to comments describing declares_class_or_enum.
687         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
688         false.
690 2004-01-12  Jan Hubicka  <jh@suse.cz>
692         * pt.c (for_each_template_parm): Do not check for duplicates.
693         (for_each_template_parm): Use walk_tree duplicate checking code.
695 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
697         PR c++/3478
698         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
699         is error_mark_node, don't add any more decl_specs.
700         (cp_parser_init_declarator): After committing to a declaration, if
701         the decl_specifiers start with error_mark_node, issue an error and
702         change the type to "int".
704 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
706         PR bootstrap/7817
707         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
709 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
711         DR 337
712         PR c++/9256
713         * pt.c (tsubst): Substitution must fail if we are attempting to
714         create an array with element type that is an abstract class type.
715         * decl.c (cp_finish_decl): Strip pointers and array types recursively
716         before calling abstract_virtuals_error.
718 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
720         * name-lookup.c (qualified_lookup_using_namespace): Consider
721         strong using directives even if we've already found a binding.
723 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
725         * cp-tree.h (cxx_expand_expr): Change prototype.
726         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
728 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
730         PR c++/12573
731         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
732         looking into them recursively. They can be there because of the
733         new __offsetof__ extension.
735 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
737         * parser.c (cp_parser_save_member_function_body): Mark the
738         definition static.
740 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
742         PR c++/13057
743         * class.c (build_clone): Copy type attributes from the original
744         function to the clone.
746         PR c++/12815
747         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
748         references as constant.
750         PR c++/12132
751         * parser.c (cp_parser_explicit_instantiation): Improve error
752         recovery.
753         (cp_parser_require): Improve indication of the error location.
755         PR c++/13451
756         * parser.c (cp_parser_class_head): Reorder logic to check for
757         invalid qualification.
759 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
761         PR c++/13157
762         * name-lookup.c (lookup_using_namespace): Remove spacesp
763         parameter.
764         (unqualified_namespace_lookup): Likewise.
765         (lookup_qualified_name): Adjust accordingly.
766         (lookup_name_real): Likewise.
767         (lookup_arg_dependent): Do not eliminate the namespace of the
768         functions found by unqualified name lookup unless that is the
769         current namespace.
771 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
773         * semantics.c (push_deferring_access_checks): Fix format.
774         (resume_deferring_access_checks): Likewise.
775         (stop_deferring_access_checks): Likewise.
776         (pop_deferring_access_checks): Likewise.
777         (get_deferred_access_checks): Likewise.
778         (pop_to_parent_deferring_access_checks): Likewise.
779         (perform_deferred_access_checks): Likewise.
780         (perform_or_defer_access_check): Likewise.
782 2004-01-04  Richard Henderson  <rth@redhat.com>
784         * call.c (build_over_call): Don't create a save_expr of an
785         aggregate, but rather its address.
787 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
789         PR c++/13529
790         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
791         an offsetof expression.
793         * parser.c (cp_parser_parameter_declaration): Fix comment.
795         PR c++/12226
796         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
797         (reference_binding): Set it when appropriate.
798         (build_temp): New function, split out from ...
799         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
800         (initialize_reference): Likewise.
802         PR c++/13536
803         * parser.c (cp_parser): Add in_type_id_in_expr_p.
804         (cp_parser_new): Initialize it.
805         (cp_parser_postfix_expression): Set it.
806         (cp_parser_sizeof_operand): Likewise.
807         (cp_parser_parameteR_declaration): Do not commit early to tenative
808         parsers when in_type_id_in_expr_p is set.
810 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
812         PR c++/13094
813         * parser.c (cp_parser_template_argument): Don't call
814         make_unbound_class_template directly.
815         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
816         UNBOUND_CLASS_TEMPLATE tree node.
818 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
820         PR target/12729
821         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
823 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
825         PR c++/13520
826         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
827         (DECL_FUNCTION_TEMPLATE_P): Use it.
828         (DECL_CLASS_TEMPLATE_P): Likewise.
829         * parser.c (cp_parser_lookup_name): Add is_template parameter.
830         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
831         (cp_parser_template_name): Likewise.
832         (cp_parser_elaborated_type_specifier): Likewise.
833         (cp_parser_namespace_name): Likewise.
834         (cp_parser_class_name): Likewise.
835         (cp_parser_lookup_name_simple): Likewise.
837 See ChangeLog.3 for earlier changes.