OSDN Git Service

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