]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
* mn10300.md (bset, bclr): Operand 0 is a read/write operand.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
1caa11d3
MM
11998-12-15 Mark Mitchell <mark@markmitchell.com>
2
3 * decl.c (finish_function): Undo inadvertant change in previous
4 patch.
5
d8f8dca1
MM
61998-12-14 Mark Mitchell <mark@markmitchell.com>
7
8 * class.c (pushclass): Tweak handling of class-level bindings.
9 (resolve_address_of_overloaded_function): Update pointer-to-member
10 handling.
11 (instantiate_type): Likewise.
12 * cvt.c (cp_convert_to_pointer): Likewise.
13 * decl.c (pop_binding): Take the DECL to pop, not just the name.
14 Deal with `struct stat' hack.
15 (binding_level): Add to documentation.
16 (push_binding): Clear BINDING_TYPE.
17 (add_binding): New function.
18 (push_local_binding): Use it.
19 (push_class_binding): Likewise.
20 (poplevel): Adjust calls to pop_binding.
21 (poplevel_class): Likewise.
22 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
23 declarations to current binding level.
24 (push_class_level_binding): Likewise.
25 (push_overloaded_decl): Adjust handling of OVERLOADs in local
26 bindings.
27 (lookup_namespace_name): Don't crash when confronted with a
28 TEMPLATE_DECL.
29 (lookup_name_real): Do `struct stat' hack in local binding
30 contexts.
31 (build_ptrmemfunc_type): Adjust documentation.
32 (grokdeclarator): Don't avoid building real array types when
33 processing templates unless really necessary.
34 (finish_method): Adjust calls to pop_binding.
35 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
36 not reparse_decl_as_expr.
37 (build_expr_from_tree): Deal with a template-id as the function to
38 call in a METHOD_CALL_EXPR.
39 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
40 (maybe_adjust_types_For_deduction): Don't do peculiar things with
41 METHOD_TYPEs here.
42 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
43 pointer-to-member types where necessary.
44 * tree.c (build_cplus_array_type_1): Don't avoid building real
45 array types when processing templates unless really necessary.
46 (build_exception_variant): Compare the exception lists correctly.
47
f181d4ae
MM
481998-12-13 Mark Mitchell <mark@markmitchell.com>
49
50 * cp-tree.def (CPLUS_BINDING): Update documentation.
51 * cp-tree.h (LOCAL_BINDING_P): New macro.
52 (lang_identifier): Rename local_value to bindings.
53 (tree_binding): Make `scope' of type `void*', not `tree'.
54 (BINDING_SCOPE): Update documentation.
55 (IDENTIFIER_LOCAL_VALUE): Remove.
56 (IDENTIFIER_CLASS_VALUE): Document.
57 (IDENTIFIER_BINDING): New macro.
58 (IDENTIFIER_VALUE): Likewise.
59 (TIME_IDENTIFIER_TIME): Likewise.
60 (TIME_IDENTIFIER_FILEINFO): Likewise.
61 (IMPLICIT_TYPENAME_P): Likewise.
62 (set_identifier_local_value): Remove.
63 (push_local_binding): New function.
64 (push_class_binding): Likewise.
65 * class.c (pushclass): Update comments; use push_class_binding.
66 * decl.c (set_identifier_local_value_with_scope): Remove.
67 (set_identifier_local_value): Likewise.
68 (push_binding): New function.
69 (pop_binding): Likewise.
70 (binding_level): Update documentation. Remove shadowed.
71 (BINDING_LEVEL): New macro.
72 (free_binding_nodes): New variable.
73 (poplevel): Adjust for new name-lookup scheme. Don't mess up
74 BLOCK_VARs when doing for-scope extension. Remove effectively
75 dead code.
76 (pushlevel_class): Tweak formatting.
77 (poplevel_class): Adjust for new name-lookup scheme.
78 (print_binding_level): Likewise.
79 (store_bindings): Likewise.
80 (pushdecl): Likewise.
81 (pushdecl_class_level): Likewise.
82 (push_class_level_binding): Likewise.
83 (push_overloaded_decl): Update comments. Adjust for new
84 name-lookup scheme.
85 (lookup_name_real): Likewise.
86 (lookup_name_current_level): Likewise.
87 (cp_finish_decl): Likewise.
88 (require_complete_types_for_parms): Likewise. Remove misleading
89 #if 0'd code.
90 (grok_parms): Likewise. Don't call
91 require_complete_types_for_parms here.
92 (grok_ctor_properties): Don't treat templates as copy
93 constructors.
94 (grop_op_properties): Or as assignment operators.
95 (start_function): Document. Adjust for new name-lookup scheme.
96 (finish_function): Likewise.
97 * decl2.c (do_local_using_decl): Use push_local_binding.
98 * lex.c (begin_definition_of_inclass_inline): New function, split
99 out from ...
100 (do_pending_inlines): Here, and ...
101 (process_next_inline): Here.
102 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
103 (init_filename_times): Likewise.
104 (extract_interface_info): Likewise.
105 (ste_typedecl_interface_info): Likewise.
106 (check_newline): Likewise.
107 (dump_time_statistics): Likewise.
108 (handle_cp_pragma): Likewise.
109 (do_identifier): Adjust for new name-lookup scheme.
110 * parse.y (function_try_block): Return ctor_initializer_opt value.
111 (fndef): Use it.
112 (fn.defpen): Pass appropriate values to start_function.
113 (pending_inline): Use functor_try_block value, and pass
114 appropriate values to finish_function.
115 * pt.c (is_member_template): Update documentation; remove handling
116 of FUNCTION_DECLs. As per name, this function should deal only in
117 TEMPLATE_DECLs.
118 (decl_template_parm_p): Change name of olddecl parameter to decl.
119 (check_template_shadow): Adjust for new name-lookup scheme.
120 (lookup_template_class): Likewise.
121 (tsubst_decl): Tweak so as not to confuse member templates with
122 copy constructors and assignment operators.
123 (unify): Handle UNION_TYPEs.
124 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
125 (lang_print_xnode): Adjust for new name-lookup scheme.
126 * typeck.c (mark_addressable): Likewise.
127 (c_expand_return): Likewise.
128
4d7614e9
JM
1291998-12-08 Jason Merrill <jason@yorick.cygnus.com>
130
131 * decl.c (grokdeclarator): Allow field with same name as class
132 in extern "C".
133
134 * decl.c (lookup_name_real): Don't limit field lookup to types.
135 * class.c (check_member_decl_is_same_in_complete_scope): No error
136 if icv and x are the same.
137 * lex.c (do_identifier): Tweak error message.
138
ea585788
MM
1391998-12-10 Mark Mitchell <mark@markmitchell.com>
140
141 * decl.c (start_enum): Use push_obstacks, not
142 end_temporary_allocation.
143 (finish_enum): Call pop_obstacks.
144
513e9d13
MM
1451998-12-10 Mark Mitchell <mark@markmitchell.com>
146
147 * class.c (instantiate_type): Return error_mark_node rather than
148 junk.
149
104bf76a
MM
1501998-12-09 Mark Mitchell <mark@markmitchell.com>
151
152 * cp-tree.h (most_specialized_instantiation): New function.
153 (print_candidates): Likewise.
154 * class.c (validate_lhs): Remove.
155 (resolve_address_of_overloaded_function): New function, split out
156 and then substantially reworked, from ...
157 (instantiate_type): Use it. Simplify.
158 * cvt.c (convert_to_reference): Complain when caller has indicated
159 that's the right thing to do. Don't crash if instantiate_type
160 fails.
161 * pt.c: Substitute `parameters' for `paramters' throughout.
162 (print_candidates): Don't make it static.
163 (most_specialized_instantiation): Split out from ...
164 (most_specialized): Here.
165
dfb0fb1d
DB
166Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
167
168 * lex.c (lang_init_options): Initialize cpplib.
169 * decl2.c (parse_options,cpp_initialized): Removed.
170 (lang_decode_option): Move initialization of cpplib to
171 lang_init_options.
172
33964bf4
MM
1731998-12-09 Mark Mitchell <mark@markmitchell.com>
174
175 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
176 well as the TYPE_DECL, when a typedef name is assigned to a
177 previously anonymous type.
178
e6cfb550
AM
1791998-12-08 Andrew MacLeod <amacleod@cygnus.com>
180
181 * cp/except.c (call_eh_info): use __start_cp_handler instead of
182 __cp_eh_info for getting the eh info pointer. Add table_index to
183 field list.
184 (push_eh_cleanup): Don't increment 'handlers' data field.
185 (process_start_catch_block): Don't set the 'caught' field.
186
187 * cp/exception.cc (CP_EH_INFO): New macro for getting the
188 exception info pointer within library routines.
189 (__cp_eh_info): Use CP_EH_INFO.
190 (__start_cp_handler): Get exception info pointer, set caught field,
191 and increment the handlers field. Avoids this being done by handlers.
192 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
193 (uncaught_exception): Use CP_EH_INFO macro.
194
f454109f
JL
195Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
196
197 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
198
069f7cf2
MS
199Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
200
201 * lex.c (check_newline): Add support for \ as `natural'
202 characters in file names in #line to be consistent with #include
203 handling. We support escape prcessing in the # 1 "..." version of
204 the command. See also support in cp/lex.c.
205
3a5ac29d
ZW
2061998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
207
208 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
209 structure.
210
2642b9bf
JM
2111998-12-07 Jason Merrill <jason@yorick.cygnus.com>
212
213 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
214
215 * error.c (dump_simple_decl): Also print namespace context.
216 (dump_function_decl): Likewise.
217
218 * decl2.c (ambiguous_decl): Don't print old value if it's
219 error_mark_node.
220
221 * decl.c (lookup_name_real): Fix handling of local types shadowed
222 by a non-type decl. Remove obsolete code.
223 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
224
225 * lang-options.h: Add -fpermissive.
226 * decl2.c: Likewise.
227 * cp-tree.h: Add flag_permissive.
228 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
229 were specified, set flag_pedantic_errors.
230 * call.c (build_over_call): Turn dropped qualifier messages
231 back into pedwarns.
232 * cvt.c (convert_to_reference): Likewise.
233 * typeck.c (convert_for_assignment): Likewise.
234
ee996e9e
JM
2351998-12-05 Jason Merrill <jason@yorick.cygnus.com>
236
237 * decl2.c (coerce_new_type): Use same_type_p.
238 (coerce_delete_type): Likewise.
239
240 * call.c (check_dtor_name): Return 1, not error_mark_node.
241
f3400fe2
JM
2421998-12-04 Jason Merrill <jason@yorick.cygnus.com>
243
053a61cb
JM
244 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
245 if MULTIPLE_SYMBOL_SPACES.
246
f3400fe2
JM
247 * pt.c (check_template_shadow): New fn.
248 * decl2.c (grokfield): Use it.
249 * decl.c (pushdecl): Likewise.
250 (pushdecl_class_level): Likewise.
251 (start_method): Likewise.
252 (xref_tag): Don't try to use 't' if we're defining.
253
254 * call.c (check_dtor_name): Just return an error_mark_node.
255 * pt.c (lookup_template_class): Complain about using non-template here.
256 * parse.y (apparent_template_type): Not here.
257
258 * pt.c (check_explicit_specialization): Complain about specialization
259 with C linkage.
260
261 * lang-options.h: Add -f{no-,}implicit-inline-templates.
262
263 * pt.c (convert_nontype_argument): Don't assume that any integer
264 argument is intended to be a constant-expression.
265
2036a15c
MM
2661998-12-03 Mark Mitchell <mark@markmitchell.com>
267
268 * class.c (handle_using_decl): Fix comment. Don't lookup
269 constructors in base classes.
270 (validate_lhs): Fix typo in comment.
271 * search.c (lookup_field_1): Don't return a USING_DECL.
272
273 * cp-tree.h (DECL_ACCESS): Improve documentation.
274
275 * decl.c (expand_static_init): Don't set the initialization-done
276 flag until the initialization is done.
277
066b4a1c
MM
2781998-12-02 Mark Mitchell <mark@markmitchell.com>
279
280 * decl2.c (validate_nonmember_using_decl): Complain about using
281 declarations for class members.
282
9f3d9e46
JM
2831998-11-29 Jason Merrill <jason@yorick.cygnus.com>
284
7e2067ca
JM
285 * typeck2.c (process_init_constructor): Use same_type_p.
286
287 * decl.c (check_tag_decl): Don't warn about null decl inside a
288 class.
289
9f3d9e46
JM
290 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
291 UNIFY_ALLOW_NONE.
292 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
293 (resolve_overloaded_unification): Strip baselinks.
294
9d483bc4
KG
295Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
296
297 * g++spec.c: Don't prototype xmalloc.
298
08b24bda
JM
2991998-11-25 Jason Merrill <jason@yorick.cygnus.com>
300
301 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
302
303 * decl.c (check_tag_decl): Do complain about null friend decl at
304 file scope.
305
32201ce4
AS
3061998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
307
308 * lex.c (make_lang_type): Clear the whole struct lang_type, not
309 only the first multiple of sizeof (int).
310
83f660b7
JM
3111998-11-24 Jason Merrill <jason@yorick.cygnus.com>
312
84e6233f
JM
313 * decl.c (start_decl): An explicit specialization of a static data
314 member is only a definition if it has an initializer.
315
c37dc68e
JM
316 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
317 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
318 cp_finish_decl.
319 * init.c (expand_default_init): Check for DIRECT_BIND instead of
320 DECL_ARTIFICIAL.
321
322 * call.c (build_over_call): Use build_decl.
323
324 * except.c (expand_throw): Just use convert, not
325 build_reinterpret_cast.
326
83f660b7
JM
327 * lex.c (handle_generic_pragma): Use token_buffer.
328
329 * decl.c (check_tag_decl): Don't complain about null friend decl.
330
3311998-11-24 Dave Pitts <dpitts@cozx.com>
332
333 * Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the
334 first position.
335 * lex.c (check_newline): Use ISALPHA.
336 (readescape): Use ISGRAPH.
337 (yyerror): Use ISGRAPH.
338
3391998-11-24 Nathan Sidwell <nathan@acm.org>
340
341 * search.c (get_abstract_virtuals): Do not use initial
342 CLASSTYPE_ABSTRACT_VIRTUALS.
343 * typeck2.c (abstract_virtuals_error): Show location of abstract
344 declaration.
345 * call.c (build_new_method_call): Use
346 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
347 * class.c (finish_struct_bits): Don't bother working out whether
348 get_abstract_virtuals will do anything, just do it.
349
333a9f0a
JM
3501998-11-24 Graham <grahams@rcp.co.uk>
351
352 * typeck.c (build_component_ref): Remove unused statement.
353
37b6eb34
JM
3541998-11-24 Jason Merrill <jason@yorick.cygnus.com>
355
333a9f0a
JM
356 * class.c (add_method): Catch invalid overloads.
357
37b6eb34
JM
358 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
359 * search.c (lookup_conversions): Handle getting real OVERLOADs.
360 (add_conversions): Likewise. Revert last change.
361 * call.c (add_conv_candidate): Pass totype to add_candidate instead
362 of fn. Don't add a new candidate if the last one was for the same
363 type.
364 (print_z_candidates): Handle getting a type as a function.
365 (joust): If we got two conversion candidates to the same type,
366 just pick one.
367 (build_object_call): Lose 'templates'.
368 (build_user_type_conversion_1): Handle getting real OVERLOADs.
369
e6267549
JM
3701998-11-23 Jason Merrill <jason@yorick.cygnus.com>
371
372 * typeck2.c (process_init_constructor): If there are elements
373 that don't have initializers and they need to have constructors
374 run, supply them with initializers.
375
376 * class.c (finish_struct_1): A class with a 0-width bitfield is
377 still empty.
378
6bdb985f
MM
3791998-11-23 Mark Mitchell <mark@markmitchell.com>
380
381 * pt.c (instantiate_class_template): Don't try to figure out what
382 specialization to use for a partial instantiation. Correct
383 typos in a couple of comments. Avoid calling uses_template_parms
384 multiple times.
385
388022e0
BK
3861998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
387
388 * method.c (process_overload_item): Add call to
389 build_mangled_C9x_name for intTI_type_nodes.
390 (build_mangled_C9x_name): Add prototype, define.
391 * decl.c (init_decl_processing): Add names for
392 TImode_type_node.
393
72a93143
JM
3941998-11-23 Jason Merrill <jason@yorick.cygnus.com>
395
57cfc5dd
JM
396 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
397
72a93143
JM
398 * class.c (finish_struct_1): Set things up for 0-width bitfields
399 like we do for others.
400
401 * decl.c (check_tag_decl): New fn.
402 (shadow_tag): Split out from here.
403 * decl2.c (grok_x_components): Call it.
404
094fe153
JM
4051998-11-22 Jason Merrill <jason@yorick.cygnus.com>
406
ff0cf464
JM
407 * decl.c: Lose warn_about_return_type.
408 (grokdeclarator): Always complain about implicit int, except for
409 `main () { ... }'.
410
094fe153
JM
411 * decl.c (tag_name): New fn.
412 (xref_tag): Complain about using typedef-name after class-key.
413
414 * init.c (expand_vec_init): Also keep going if from_array.
415
416 * tree.c (is_overloaded_fn): Also handle the output of
417 build_offset_ref.
418
419 * decl.c (grokdeclarator): Use constructor_name when comparing
420 field name against enclosing class.
421 * class.c (finish_struct_anon): Likewise.
422
536333d4
MM
4231998-11-22 Mark Mitchell <mark@markmitchell.com>
424
425 * decl.c (poplevel): Remove code to handle KEEP == 2.
426 (finish_function): Don't confuse BLOCK-order when
427 processing a destructor.
428
42f989ff
JM
4291998-11-21 Jason Merrill <jason@yorick.cygnus.com>
430
431 * decl.c (require_complete_types_for_parms): Call layout_decl
432 after we've completed the type.
433
75fbcb7d
ML
434