a463df6d813e5b36b0cbf3e3c1b33d3a3b3cad99
[gcc.git] / gcc / cp / ChangeLog
1 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2
3 PR c++/13833
4 * call.c (build_over_call): Do not convert arguments when
5 processing a template.
6 * pt.c (build_non_dependent_expr): Do not build a
7 NON_DEPENDENT_EXPR for arithmetic constants.
8
9 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
10
11 PR c++/13810
12 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
13 returns a TYPE_DECL. no further lookup is required.
14 * semantics.c (check_template_template_default_arg): A TYPE_DECL
15 is invalid. Rework to give better diagnostics.
16
17 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
18
19 PR c++/13797
20 * pt.c (instantiate_class_template): Add an error_mark_node
21 check.
22 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
23
24 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
25
26 PR c++/13701
27 * decl.c (finish_function): Move the call to
28 finish_fname_decls below the call to
29 finish_eh_spec_block.
30
31 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
32
33 * optimize.c, typeck2.c: Update copyright.
34
35 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
36
37 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
38 init.c, mangle.c, typeck.c: Update copyright.
39
40 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
41
42 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
43
44 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
45
46 * Make-lang.in: Replace $(docdir) with doc.
47 (c++.info, c++.srcinfo): Dummy entry.
48 (c++.man, c++.srcman): New rules.
49 (c++.install-man): Revamp rule.
50
51 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
52
53 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
54 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
55 immediate $(shell) instead of deferred backquote.
56
57 2004-01-19 Mark Mitchell <mark@codesourcery.com>
58
59 PR c++/13651
60 * parser.c (cp_parser_postfix_expression): When encountering
61 incomplete type on left-hand side of "->" or ".", treat the entire
62 expression as erroneous.
63
64 PR c++/13592
65 * call.c (build_field_call): Remove.
66 (n_build_method_call): Likewise.
67 (build_method_call): Likewise.
68 (build_new_method_call): Do not call build_field_call.
69 * class.c (n_build_method_call): Remove.
70 (print_class_statistics): Do not print it.
71 * cp-tree.h (build_method_call): Remove declaration.
72 (finish_object_call_expr): Likewise.
73 (build_new_1): Do not use build_method_call.
74 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
75 when the function appearing on the right-hand-side of "." or "->"
76 is not actually a function.
77 * pt.c (tsubst_copy_and_build): Likewise.
78 * semantics.c (finish_object_call_expr): Remove.
79
80 2004-01-18 Mark Mitchell <mark@codesourcery.com>
81
82 PR c++/13710
83 * pt.c (tsubst): Use finish_typeof.
84
85 2004-01-16 Jason Merrill <jason@redhat.com>
86
87 PR c++/11725
88 * except.c (build_throw): In a template, set
89 current_function_returns_abnormally.
90
91 2004-01-17 Fred Fish <fnf@intrinsity.com>
92
93 PR c++/11895
94 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
95 except don't call array_type_nelts() with a VECTOR_TYPE.
96
97 2004-01-16 Jan Hubicka <jh@suse.cz>
98
99 * mangle.c (write_mangled_name): Remove inline modifier.
100
101 2004-01-16 Mark Mitchell <mark@codesourcery.com>
102
103 PR c++/13574
104 * decl.c (compute_array_index_type): Fix grammar in comment.
105 * init.c (build_zero_init): Handle zero-sized arrays correctly.
106
107 PR c++/13178
108 * call.c (name_as_c_string): Print conversion operator names
109 correctly.
110
111 PR c++/13478
112 * call.c (initialize_reference): Pass -1 for inner parameter to
113 convert_like_real.
114
115 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
116
117 PR c++/13407
118 * parser.c (cp_parser_base_specifier): Check for an invalid
119 keyword `typename' and emit an user-friendly error message.
120
121 2004-01-15 Geoffrey Keating <geoffk@apple.com>
122
123 PR pch/13361
124 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
125 (handle_pragma_implementation): Likewise.
126
127 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
128
129 PR c++/9259
130 * typeck.c (build_class_member_access_expr): Allow to access members
131 of the currently open class.
132 (finish_class_member_access_expr): Likewise.
133
134 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
135
136 PR c++/13659
137 * name-lookup.c (validate_nonmember_using_decl): Take scope and
138 name by value, instead of computing them.
139 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
140 arguments. Pass them to validate_nonmember_using_decl.
141 * name-lookup.h (do_local_using_decl): Adjust.
142 (do_toplevel_using_decl): Likewise.
143 * parser.c (cp_parser_using_declaration): Likewise.
144 * pt.c (tsubst_expr): Likewise.
145
146 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
147
148 PR c++/13594
149 PR c++/13658
150 * name-lookup.c (qualified_lookup_using_namespace): Search
151 strongly-associated namespaces first, and only then try other
152 namespaces.
153
154 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
155
156 * Make-lang.in (c++.srcextra): Dummy entry.
157
158 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
159
160 PR c++/8856
161 * parser.c (cp_parser_template_name): Don't try to parse a
162 conversion-function-id, as it cannot be a template-name.
163 (cp_parser_simple_type_specifier): Check for invalid template-ids
164 even after a built-in type.
165
166 2004-01-14 Jan Hubicka <jh@suse.cz>
167
168 PR c++/12850
169 * pt.c (instantiate_decl): Do not increase function_depth.
170
171 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
172
173 PR c++/9021
174 PR c++/11005
175 * parser.c (cp_parser_elaborated_type_specifier): Warn about
176 attributes and discard.
177 * decl.c (xref_tag): Don't overwite existing attributes with
178 NULL_TREE.
179
180 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
181
182 PR c++/12335
183 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
184 is no destructor while looking up a BIT_NOT_EXPR.
185
186 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
187
188 * cxxfilt.c: Remove unused file.
189
190 2004-01-14 Jan Hubicka <jh@suse.cz>
191
192 Partial fix to PR c++/12850
193 * decl2.c (mark_used): Do not proactively instantiate templates
194 when compiling in unit-at-a-time or not optimizing.
195 * optimize.c (maybe_clone_body): Do not increase function depth.
196
197 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
198
199 PR c++/13474
200 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
201
202 2003-01-12 Steven Bosscher <stevenb@suse.de>
203
204 PR c++/13558
205 * parser.c (cp_parser_member_declaration): Any non-type is also
206 not a class or a function.
207
208 2004-01-12 Jason Merrill <jason@redhat.com>
209
210 PR c++/12815
211 * class.c (build_base_path): Do not mark vtable references as
212 TREE_CONSTANT.
213 (build_vtbl_ref_1): Likewise.
214
215 2004-01-12 Richard Henderson <rth@redhat.com>
216
217 PR opt/10776
218 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
219 (store_init_value): Use it.
220 * decl.c (check_initializer): Expect full initialization code
221 from store_init_value.
222 * init.c (expand_aggr_init_1): Likewise.
223 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
224
225 2004-01-12 Mark Mitchell <mark@codesourcery.com>
226
227 * class.c (layout_class_type): For non-POD class types, also copy
228 the DECL_SIZE and DECL_MODE of fields to the base class type.
229
230 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
231
232 PR c++/13289
233 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
234 calling regenerate_decl_from_template.
235
236 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
237
238 PR c++/4100
239 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
240 decl-specifier occurring along with a class definition.
241
242 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
243
244 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
245 clauses to comments describing declares_class_or_enum.
246 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
247 false.
248
249 2004-01-12 Jan Hubicka <jh@suse.cz>
250
251 * pt.c (for_each_template_parm): Do not check for duplicates.
252 (for_each_template_parm): Use walk_tree duplicate checking code.
253
254 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
255
256 PR c++/3478
257 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
258 is error_mark_node, don't add any more decl_specs.
259 (cp_parser_init_declarator): After committing to a declaration, if
260 the decl_specifiers start with error_mark_node, issue an error and
261 change the type to "int".
262
263 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
264
265 PR bootstrap/7817
266 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
267
268 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
269
270 DR 337
271 PR c++/9256
272 * pt.c (tsubst): Substitution must fail if we are attempting to
273 create an array with element type that is an abstract class type.
274 * decl.c (cp_finish_decl): Strip pointers and array types recursively
275 before calling abstract_virtuals_error.
276
277 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
278
279 * name-lookup.c (qualified_lookup_using_namespace): Consider
280 strong using directives even if we've already found a binding.
281
282 2004-01-09 Mark Mitchell <mark@codesourcery.com>
283
284 * cp-tree.h (cxx_expand_expr): Change prototype.
285 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
286
287 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
288
289 PR c++/12573
290 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
291 looking into them recursively. They can be there because of the
292 new __offsetof__ extension.
293
294 2004-01-07 Zack Weinberg <zack@codesourcery.com>
295
296 * parser.c (cp_parser_save_member_function_body): Mark the
297 definition static.
298
299 2004-01-05 Mark Mitchell <mark@codesourcery.com>
300
301 PR c++/13057
302 * class.c (build_clone): Copy type attributes from the original
303 function to the clone.
304
305 PR c++/12815
306 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
307 references as constant.
308
309 PR c++/12132
310 * parser.c (cp_parser_explicit_instantiation): Improve error
311 recovery.
312 (cp_parser_require): Improve indication of the error location.
313
314 PR c++/13451
315 * parser.c (cp_parser_class_head): Reorder logic to check for
316 invalid qualification.
317
318 2004-01-04 Mark Mitchell <mark@codesourcery.com>
319
320 PR c++/13157
321 * name-lookup.c (lookup_using_namespace): Remove spacesp
322 parameter.
323 (unqualified_namespace_lookup): Likewise.
324 (lookup_qualified_name): Adjust accordingly.
325 (lookup_name_real): Likewise.
326 (lookup_arg_dependent): Do not eliminate the namespace of the
327 functions found by unqualified name lookup unless that is the
328 current namespace.
329
330 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
331
332 * semantics.c (push_deferring_access_checks): Fix format.
333 (resume_deferring_access_checks): Likewise.
334 (stop_deferring_access_checks): Likewise.
335 (pop_deferring_access_checks): Likewise.
336 (get_deferred_access_checks): Likewise.
337 (pop_to_parent_deferring_access_checks): Likewise.
338 (perform_deferred_access_checks): Likewise.
339 (perform_or_defer_access_check): Likewise.
340
341 2004-01-04 Richard Henderson <rth@redhat.com>
342
343 * call.c (build_over_call): Don't create a save_expr of an
344 aggregate, but rather its address.
345
346 2004-01-04 Mark Mitchell <mark@codesourcery.com>
347
348 PR c++/13529
349 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
350 an offsetof expression.
351
352 * parser.c (cp_parser_parameter_declaration): Fix comment.
353
354 PR c++/12226
355 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
356 (reference_binding): Set it when appropriate.
357 (build_temp): New function, split out from ...
358 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
359 (initialize_reference): Likewise.
360
361 PR c++/13536
362 * parser.c (cp_parser): Add in_type_id_in_expr_p.
363 (cp_parser_new): Initialize it.
364 (cp_parser_postfix_expression): Set it.
365 (cp_parser_sizeof_operand): Likewise.
366 (cp_parser_parameteR_declaration): Do not commit early to tenative
367 parsers when in_type_id_in_expr_p is set.
368
369 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
370
371 PR c++/13094
372 * parser.c (cp_parser_template_argument): Don't call
373 make_unbound_class_template directly.
374 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
375 UNBOUND_CLASS_TEMPLATE tree node.
376
377 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
378
379 PR target/12729
380 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
381
382 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
383
384 PR c++/13520
385 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
386 (DECL_FUNCTION_TEMPLATE_P): Use it.
387 (DECL_CLASS_TEMPLATE_P): Likewise.
388 * parser.c (cp_parser_lookup_name): Add is_template parameter.
389 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
390 (cp_parser_template_name): Likewise.
391 (cp_parser_elaborated_type_specifier): Likewise.
392 (cp_parser_namespace_name): Likewise.
393 (cp_parser_class_name): Likewise.
394 (cp_parser_lookup_name_simple): Likewise.
395
396 See ChangeLog.3 for earlier changes.