OSDN Git Service

3c41c9a2585d486b401fda84c50b9896b6d018c8
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/13478
4         * call.c (convert_like_real): Do not perform an additional
5         direct-initialization when binding to a reference.
6
7 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8
9         PR c++/13407
10         * parser.c (cp_parser_base_specifier): Check for an invalid
11         keyword `typename' and emit an user-friendly error message.
12
13 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
14
15         PR pch/13361
16         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
17         (handle_pragma_implementation): Likewise.
18
19 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
20
21         PR c++/9259
22         * typeck.c (build_class_member_access_expr): Allow to access members
23         of the currently open class.
24         (finish_class_member_access_expr): Likewise.
25
26 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
27
28         PR c++/13659
29         * name-lookup.c (validate_nonmember_using_decl): Take scope and
30         name by value, instead of computing them.
31         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
32         arguments.  Pass them to validate_nonmember_using_decl.
33         * name-lookup.h (do_local_using_decl): Adjust.
34         (do_toplevel_using_decl): Likewise.
35         * parser.c (cp_parser_using_declaration): Likewise.
36         * pt.c (tsubst_expr): Likewise.
37
38 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
39
40         PR c++/13594
41         PR c++/13658
42         * name-lookup.c (qualified_lookup_using_namespace): Search
43         strongly-associated namespaces first, and only then try other
44         namespaces.
45
46 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
47
48         * Make-lang.in (c++.srcextra): Dummy entry.
49
50 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
51
52         PR c++/8856
53         * parser.c (cp_parser_template_name): Don't try to parse a 
54         conversion-function-id, as it cannot be a template-name.
55         (cp_parser_simple_type_specifier): Check for invalid template-ids
56         even after a built-in type.
57
58 2004-01-14  Jan Hubicka  <jh@suse.cz>
59
60         PR c++/12850
61         * pt.c (instantiate_decl):  Do not increase function_depth.
62
63 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
64
65         PR c++/9021
66         PR c++/11005
67         * parser.c (cp_parser_elaborated_type_specifier): Warn about
68         attributes and discard.
69         * decl.c (xref_tag): Don't overwite existing attributes with
70         NULL_TREE.
71
72 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
73
74         PR c++/12335
75         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
76         is no destructor while looking up a BIT_NOT_EXPR.
77
78 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
79
80         * cxxfilt.c: Remove unused file.
81
82 2004-01-14  Jan Hubicka  <jh@suse.cz>
83
84         Partial fix to PR c++/12850
85         * decl2.c (mark_used): Do not proactively instantiate templates
86         when compiling in unit-at-a-time or not optimizing.
87         * optimize.c (maybe_clone_body): Do not increase function depth.
88
89 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
90
91         PR c++/13474
92         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
93
94 2003-01-12  Steven Bosscher  <stevenb@suse.de>
95
96         PR c++/13558
97         * parser.c (cp_parser_member_declaration): Any non-type is also
98         not a class or a function.
99
100 2004-01-12  Jason Merrill  <jason@redhat.com>
101
102         PR c++/12815
103         * class.c (build_base_path): Do not mark vtable references as
104         TREE_CONSTANT.
105         (build_vtbl_ref_1): Likewise.
106
107 2004-01-12  Richard Henderson  <rth@redhat.com>
108
109         PR opt/10776
110         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
111         (store_init_value): Use it.
112         * decl.c (check_initializer): Expect full initialization code
113         from store_init_value.
114         * init.c (expand_aggr_init_1): Likewise.
115         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
116
117 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
118
119         * class.c (layout_class_type): For non-POD class types, also copy
120         the DECL_SIZE and DECL_MODE of fields to the base class type.
121
122 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
123
124         PR c++/13289
125         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
126         calling regenerate_decl_from_template.
127
128 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
129
130         PR c++/4100
131         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
132         decl-specifier occurring along with a class definition.
133
134 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
135
136         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
137         clauses to comments describing declares_class_or_enum.
138         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
139         false.
140
141 2004-01-12  Jan Hubicka  <jh@suse.cz>
142
143         * pt.c (for_each_template_parm): Do not check for duplicates.
144         (for_each_template_parm): Use walk_tree duplicate checking code.
145
146 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
147
148         PR c++/3478
149         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
150         is error_mark_node, don't add any more decl_specs.
151         (cp_parser_init_declarator): After committing to a declaration, if
152         the decl_specifiers start with error_mark_node, issue an error and
153         change the type to "int".
154
155 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
156
157         PR bootstrap/7817
158         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
159
160 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
161
162         DR 337
163         PR c++/9256
164         * pt.c (tsubst): Substitution must fail if we are attempting to 
165         create an array with element type that is an abstract class type.
166         * decl.c (cp_finish_decl): Strip pointers and array types recursively
167         before calling abstract_virtuals_error.
168
169 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
170
171         * name-lookup.c (qualified_lookup_using_namespace): Consider
172         strong using directives even if we've already found a binding.
173
174 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
175
176         * cp-tree.h (cxx_expand_expr): Change prototype.
177         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
178
179 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
180
181         PR c++/12573
182         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
183         looking into them recursively. They can be there because of the
184         new __offsetof__ extension.
185
186 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
187
188         * parser.c (cp_parser_save_member_function_body): Mark the
189         definition static.
190
191 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
192
193         PR c++/13057
194         * class.c (build_clone): Copy type attributes from the original
195         function to the clone.
196
197         PR c++/12815
198         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
199         references as constant.
200
201         PR c++/12132
202         * parser.c (cp_parser_explicit_instantiation): Improve error
203         recovery.
204         (cp_parser_require): Improve indication of the error location.
205
206         PR c++/13451
207         * parser.c (cp_parser_class_head): Reorder logic to check for
208         invalid qualification.
209
210 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
211
212         PR c++/13157
213         * name-lookup.c (lookup_using_namespace): Remove spacesp
214         parameter.
215         (unqualified_namespace_lookup): Likewise.
216         (lookup_qualified_name): Adjust accordingly.
217         (lookup_name_real): Likewise.
218         (lookup_arg_dependent): Do not eliminate the namespace of the
219         functions found by unqualified name lookup unless that is the
220         current namespace.
221
222 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
223
224         * semantics.c (push_deferring_access_checks): Fix format.
225         (resume_deferring_access_checks): Likewise.
226         (stop_deferring_access_checks): Likewise.
227         (pop_deferring_access_checks): Likewise.
228         (get_deferred_access_checks): Likewise.
229         (pop_to_parent_deferring_access_checks): Likewise.
230         (perform_deferred_access_checks): Likewise.
231         (perform_or_defer_access_check): Likewise.
232
233 2004-01-04  Richard Henderson  <rth@redhat.com>
234
235         * call.c (build_over_call): Don't create a save_expr of an
236         aggregate, but rather its address.
237
238 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
239
240         PR c++/13529
241         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
242         an offsetof expression.
243
244         * parser.c (cp_parser_parameter_declaration): Fix comment.
245
246         PR c++/12226
247         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
248         (reference_binding): Set it when appropriate.
249         (build_temp): New function, split out from ...
250         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
251         (initialize_reference): Likewise.
252
253         PR c++/13536
254         * parser.c (cp_parser): Add in_type_id_in_expr_p.
255         (cp_parser_new): Initialize it.
256         (cp_parser_postfix_expression): Set it.
257         (cp_parser_sizeof_operand): Likewise.
258         (cp_parser_parameteR_declaration): Do not commit early to tenative
259         parsers when in_type_id_in_expr_p is set.
260
261 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
262
263         PR c++/13094
264         * parser.c (cp_parser_template_argument): Don't call
265         make_unbound_class_template directly.
266         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
267         UNBOUND_CLASS_TEMPLATE tree node.
268
269 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
270
271         PR target/12729
272         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
273
274 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
275
276         PR c++/13520
277         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
278         (DECL_FUNCTION_TEMPLATE_P): Use it.
279         (DECL_CLASS_TEMPLATE_P): Likewise.
280         * parser.c (cp_parser_lookup_name): Add is_template parameter.
281         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
282         (cp_parser_template_name): Likewise.
283         (cp_parser_elaborated_type_specifier): Likewise.
284         (cp_parser_namespace_name): Likewise.
285         (cp_parser_class_name): Likewise.
286         (cp_parser_lookup_name_simple): Likewise.
287
288 See ChangeLog.3 for earlier changes.