]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
(ASM_COMMENT_START): Add default definition.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
beb53fb8
JM
1Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
2
3 * call.c (build_new_op): Handle null arg2 for ?:.
4
eb448459
MS
5Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
6
7 * except.c (expand_exception_blocks): Ensure that we flow through
8 the end of the exception region for the exception specification.
9 Move exception region for the exception specification in, so that
10 it doesn't protect the parm cleanup. Remove some obsolete code.
11 * decl.c (store_parm_decls): Likewise.
12 (finish_function): Likewise.
13
14Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
15
16 * init.c (build_new): Fix nothrow handling.
17
18Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19
20 * init.c (emit_base_init): Don't warn about the initialization
21 list for an artificial member.
22
23Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
24
25 * expr.c (do_case): Handle !START case for the error msg.
26
27Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
28
29 * decl2.c, lang-options.h: New option -Weffc++.
30 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
31 to -Weffc++.
32
33 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
34 to MULTIPLE_SYMBOL_SPACES.
35
36Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
37
38 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
39
40 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
41
42 * typeck.c (c_expand_return): Don't complain about returning void
43 to void in an artificial function.
44 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
45 don't set DECL_RESULT, set DECL_ARTIFICIAL.
46 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
47
eb66be0e
MS
48Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
49
50 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
51 exception handling.
52 * except.c (init_exception_processing): Likewise.
53 (expand_end_catch_block): Likewise.
54 (expand_exception_blocks): Likewise.
55 (expand_throw): Likewise.
56 * exception.cc (__default_terminate): Likewise.
57
58 * init.c (perform_member_init): Use new method of expr level
59 cleanups, instead of cleanups_this_call and friends.
60 (emit_base_init): Likewise.
61 (expand_aggr_vbase_init_1): Likewise.
62 (expand_vec_init): Likewise.
63 * decl.c (cp_finish_decl): Likewise.
64 (expand_static_init): Likewise.
65 (store_parm_decls): Likewise.
66 (cplus_expand_expr_stmt): Likewise.
67 * decl2.c (finish_file): Likewise.
68
69 * Make-lang.in (exception.o): Ok to compile with -O now.
70
71 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
72 we know it will be done later by the backend.
73
74 * decl2.c (lang_f_options): Remove support for short temps.
75 * lang-options.h: Likewise.
76
77Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
78
79 * tree.c (varargs_function_p): New fn.
80 * method.c (emit_thunk): Replace broken generic code with code to
81 generate a heavyweight thunk function.
82
83Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
84
85 * pt.c (process_template_parm): pedwarn about floating-point parms.
86
87 * decl.c (grokdeclarator): inline no longer implies static.
88
89 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
90
91Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
92
93 * class.c (check_for_override): The signature of an overriding
94 function is not changed.
95
96 * call.c (build_over_call): Move setting of conv into the loop.
97
98Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
99
100 * call.c (build_user_type_conversion_1): Really ignore rvalue
101 conversions when looking for a REFERENCE_TYPE.
102
103 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
104 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
105 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
106 (build_unary_op): Likewise.
107 * call.c (build_over_call): See through a CONVERT_EXPR around the
108 ADDR_EXPR for on a temporary.
109 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
110 the ADDR_EXPR for a local variable.
111
112Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
113
114 * call.c (build_user_type_conversion_1): If we're trying to
115 convert to a REFERENCE_TYPE, only consider lvalue conversions.
116 (build_new_function_call): Print candidates.
117 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
118 (reference_binding): Binding a temporary of a reference-related type
119 is BAD.
120
121Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
122
123 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
124 * tinfo2.cc (type_info::before): Likewise.
125
126Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
127
128 * call.c (implicit_conversion): Oops.
129
130Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
131
132 * call.c (implicit_conversion): Try to find a reference conversion
133 before binding a const reference to a temporary.
134
135Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
136
137 * exception.cc (__default_unexpected): Call terminate by default,
138 so that if the user overrides terminate, the correct function will
139 be called.
140
bd6dd845
MS
141Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
142
143 * parse.y (left_curly): Avoid trying to use any fields of
eb66be0e 144 error_mark_node, as there aren't any.
bd6dd845
MS
145
146Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
147
148 * lex.c (do_identifier): Avoid breaking on overloaded methods
149 as default arguments.
150
151Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
152
eb66be0e 153 * call.c (add_template_candidate): Initialize the variable "dummy".
bd6dd845
MS
154
155Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
156
157 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
158 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
159
160Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
161
162 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
163 (debug_binfo): Delete decl, not needed.
164
165 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
166 promotes_to_aggr_type): Delete fns.
167 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
168 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
169 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
170
171 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
172
173 * friend.c (is_friend_type): Delete fn.
174 * cp-tree.h (is_friend_type): Delete decl.
175
176 * decl.c (original_result_rtx, double_ftype_double,
177 double_ftype_double_double, int_ftype_int, long_ftype_long,
178 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
179 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
180
181 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
182 fwd decls.
183 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
184
185 * decl.c (pushdecl_nonclass_level): #if 0, unused.
186 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
187
188 * lex.c (reinit_lang_specific): #if 0, unused.
189 * cp-tree.h (reinit_lang_specific): #if 0 decl.
190
191 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
192 * cp-tree.h (revert_static_member_fn): Delete decl.
193
194 * class.c (root_lang_context_p): Delete fn.
195 * cp-tree.h (root_lang_context_p): Delete decl.
196
197 * decl.c (set_current_level_tags_transparency): #if 0, unused.
198 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
199
200 * lex.c (set_vardecl_interface_info): Make static.
201 * cp-tree.h (set_vardecl_interface_info): Delete decl.
202
203 * call.c (find_scoped_type): Make static.
204 * cp-tree.h (find_scoped_type): Delete decl.
205
206 * search.c (convert_pointer_to_vbase): Make static.
207 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
208
209 * decl.c (const_ptr_type_node): Likewise.
210 * cp-tree.h (const_ptr_type_node): Delete decl.
211
212 * typeck.c (common_base_type): Make static.
213 * cp-tree.h (common_base_types): Delete erroneous decl.
214
215 * pt.c (classtype_mangled_name): Make static.
216 * cp-tree.h (classtype_mangled_name): Delete decl.
217
218 * lex.c (check_newline): Make static.
219 * cp-tree.h (check_newline): Delete decl.
220
221 * typeck.c (build_x_array_ref): Delete fn, same idea as
222 grok_array_decl.
223 * cp-tree.h (build_x_array_ref): Delete decl.
224
225 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
226 copy_lang_decl.
227 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
228
229 * class.c (build_vtable_entry): Make static.
230 * cp-tree.h (build_vtable_entry): Delete decl.
231
232 * class.c (build_vbase_pointer): Make static.
233 * cp-tree.h (build_vbase_pointer): Delete decl.
234
235 * sig.c (build_sptr_ref): Add forward decl and make static.
236 * cp-tree.h (build_sptr_ref): Delete decl.
237
238 * call.c (build_new_method_call): Add forward decl and make static.
239 * cp-tree.h (build_new_method_call): Delete decl.
240
241 * call.c (build_object_call): Make static.
242 * class.c (check_for_override, complete_type_p, mark_overriders):
243 Likewise.
244 * decl.c (cp_function_chain): Likewise.
245 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
246 Likewise.
247 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
248 Likewise.
249 * tree.c (build_cplus_array_type_1): Likewise.
250 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
251 (comp_target_parms): Likewise.
252
253 * init.c (build_builtin_call): Make static.
254 * cp-tree.h (build_builtin_call): Delete decl.
255
256 * typeck.c (binary_op_error): Delete decl.
257 * cp-tree.h (binary_op_error): Likewise.
258
259Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
260
261 * call.c (build_method_call): Compare against error_mark_node
262 directly, rather than the ERROR_MARK tree code.
263 * cvt.c (cp_convert): Likewise.
264 * decl.c (print_binding_level): Likewise.
265 (duplicate_decls): Likewise.
266 (grokdeclarator): Likewise.
267 (grokdeclarator): Likewise.
268 * init.c (expand_aggr_init_1): Likewise.
269 (decl_constant_value): Likewise.
270 * method.c (build_opfncall): Likewise.
271 (hack_identifier): Likewise.
272 * typeck.c (build_modify_expr): Likewise.
273
274 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
275
276Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
277
278 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
279
280 * pt.c (coerce_template_parms): Add new error message.
281
282 * method.c (build_overload_value): Implement name mangling for
283 floating-point template arguments.
284
285 * method.c (build_overload_int, icat, dicat): Fix mangling of template
286 arguments whose absolute value doesn't fit in a signed word.
287
288Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
289
290 * friend.c: New file; put all of the friend stuff in here.
291 * init.c: Instead of here.
292 * Makefile.in (CXX_OBJS): Add friend.o.
293 (friend.o): Add dependencies.
294 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
295
296Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
297
298 * call.c (build_scoped_method_call): Complain if the scope isn't a
eb66be0e 299 base.
bd6dd845
MS
300
301Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
302
303 * parse.y (left_curly): Don't crash on erroneous type.
304
305 * init.c (build_delete): Fix type of ref.
306
307Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
308
309 * search.c (get_vbase_1): Renamed from get_vbase.
310 (get_vbase): Wrapper, now non-static.
311 (convert_pointer_to_vbase): Now static.
312
313 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
314 * init.c (build_delete): Pass one.
315 (build_partial_cleanup_for): Use build_scoped_method_call.
316 * decl.c (finish_function): Pass a binfo.
317
318Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
319
320 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
321
322 * typeck.c (build_c_cast): Lose other reference to flag.
323
324 * call.c (build_field_call): Don't look for [cd]tor_identifier.
325 * decl2.c (delete_sanity): Remove meaningless use of
eb66be0e 326 LOOKUP_HAS_IN_CHARGE.
bd6dd845 327 * decl.c (finish_function): Use build_scoped_method_call instead
eb66be0e 328 of build_delete for running vbase dtors.
bd6dd845 329 * init.c (build_delete): Call overload resolution code instead of
eb66be0e 330 duplicating it badly.
bd6dd845 331
2ba25f50
MS
332Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
333
334 * call.c (build_over_call): Call mark_used before trying to elide
335 the call.
336
337 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
338
339Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
340
341 * typeck.c (build_modify_expr): Always pedwarn for a cast to
342 non-reference used as an lvalue.
343
344Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
345
346 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
347
348Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
349
350 * parse.y (handler): Fix template typo.
351
352Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
353
354 * error.c (lang_decl_name): New fn.
355 * tree.c (lang_printable_name): Use it.
356
357Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
358
359 * g++spec.c: Include config.h so that we can catch bzero #defines
360 from the config file.
361
e9f32eb5
MS
362Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
363
364 * new1.cc: Include a declaration for malloc, to avoid warning, and
eb66be0e
MS
365 avoid lossing on systems that require one (ones that define malloc
366 in xm.h).
e9f32eb5
MS
367
368Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
369
370 * decl2.c (max_tinst_depth): New variable.
371 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
372 option.
373 * pt.c (max_tinst_depth): Variable moved.
374 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
375 as legal.
376
377Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
378
379 * decl.c (xref_basetypes): Allow a base class that depends on
eb66be0e 380 template parms to be incomplete.
e9f32eb5
MS
381
382 * decl2.c (build_expr_from_tree): Support typeid(type).
383 * rtti.c (get_typeid): Support templates.
384 (expand_si_desc, expand_class_desc): Fix string length.
385 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
386
312e7d50
JM
387Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
388
389 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
390
391 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
392
393Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
394
395 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
eb66be0e
MS
396 smashes together template and non-template decls of the same
397 signature.
312e7d50 398
824b9a4c
MS
399Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
400
824b9a4c
MS
401 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
402
403Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
404
405 * decl.c (duplicate_decls): Next route, pedwarn about different
406 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
407
408Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
409
410 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
411 (struct lang_type): Delete has_default_implementation member.
412 Increase dummy to 21.
413 * decl.c (start_method): Delete usage.
414
415 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
416 store_after_parms, start_decl_1, auto_function): Add decls.
417 (get_arglist_len_in_bytes, declare_implicit_exception,
418 have_exceptions_p, make_type_decl, typedecl_for_tag,
419 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
420 build_component_type_expr, cplus_exception_name,
421 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
422 * call.c (build_this): Make static.
423 (is_complete): Likewise.
424 (implicit_conversion): Likewise.
425 (reference_binding): Likewise.
426 (standard_conversion): Likewise.
427 (strip_top_quals): Likewise.
428 (non_reference): Likewise.
429 (build_conv): Likewise.
430 (user_harshness): Likewise.
431 (rank_for_ideal): Likewise.
432 * decl.c (start_decl_1): Delete forward decl.
433 (push_decl_level): Make static.
434 (resume_binding_level): Make static.
435 (namespace_bindings_p): Make static.
436 (declare_namespace_level): Make static.
437 (lookup_name_real): Make static.
438 (duplicate_decls): Make static. Take register off NEWDECL and
439 OLDDECL parm decls.
440 * decl2.c (get_sentry): Make static.
441 (temp_name_p): Delete fn.
442 * except.c (auto_function): Delete decl.
443 * lex.c (handle_{cp,sysv}_pragma): Make static.
444 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
445 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
446 * pt.c (tsubst_expr_values): Make static.
447 * rtti.c (combine_strings): Delete decl.
448
449Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
450
451 * pt.c (push_template_decl): Handle getting a typedef.
452
453 * call.c (build_new_function_call): Complain about void arg.
454
455Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
456
457 * decl.c (duplicate_decls): Give pedwarn of different exceptions
458 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
459
460Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
461
462 * except.c (expand_throw): Don't expand the cleanup tree here,
eb66be0e
MS
463 since we are not going to write the rtl out. Fixes problem with
464 -g -O on SPARC.
824b9a4c
MS
465
466Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
467
468 * Make-lang.in: Add $(exeext) as necessary.
469
470Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
471
472 * parse.y (handler_seq): Must have at least one catch clause.
473
474Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
475
476 * call.c (add_builtin_candidate): Restore ?: hack.
477
478 * decl.c (grok_op_properties): More warnings.
479
480Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
481
482 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
483 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
484
485 * decl.c (duplicate_decls): Scale back to a warning, and only do
486 'em if -pedantic.
487
488Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
489
490 * decl.c (duplicate_decls): pedwarn mismatched exception
eb66be0e 491 specifications.
824b9a4c
MS
492
493Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
494
495 * call.c (build_new_method_call): Don't display the invisible
eb66be0e 496 argument for controlling virtual bases.
824b9a4c
MS
497
498Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
499
500 * new: Add nothrow new and delete, bad_alloc and throw specifications
501 for delete.
502 * decl.c (init_decl_processing): Add throw specification for delete.
503 * new.cc (nothrow): Define.
504 * lex.c (real_yylex): Removing warning that throw and friends are
505 keywords.
506 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
507 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
508 * Make-lang.in: Add new{1,2}.{cc,o}.
509
510Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
511
512 * lex.c (cons_up_default_function): Fix return type of synth op=.
513
514 * init.c (emit_base_init): Add warnings for uninitialized members
eb66be0e 515 and bases.
824b9a4c
MS
516
517 * decl.c (xref_basetypes): Add warning for non-polymorphic type
eb66be0e 518 with destructor used as base type.
824b9a4c
MS
519
520 * decl.c (grok_op_properties): Add warning for op= returning void.
521 * typeck.c (c_expand_return): Add warning for op= returning anything
522 other than *this.
523
524 * class.c (finish_struct_1): Add warning for class with pointers
eb66be0e 525 but not copy ctor or copy op=.
824b9a4c
MS
526
527 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
528 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
529 (instantiate_template): If -fexternal-templates, add this
eb66be0e 530 instantiation to pending_templates.
824b9a4c
MS
531
532 * decl2.c (copy_assignment_arg_p): Disable old hack to support
eb66be0e 533 Booch components.
824b9a4c
MS
534
535Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
536
537 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
538
de22184b
MS
539Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
540
541 * call.c (standard_conversion): Handle getting references. Tack
eb66be0e 542 on RVALUE_CONV here. Do it for non-class types, too.
de22184b
MS
543 (reference_binding): Pass references to standard_conversion.
544 (implicit_conversion): Likewise.
545 (add_builtin_candidate): Disable one ?: kludge.
546 (convert_like): Handle RVALUE_CONVs for non-class types.
547 (joust): Disable the other ?: kludge.
548
549Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
550
551 * decl.c (init_decl_processing): Add code to build up common
552 function types beforehand, to avoid creation then removal of
553 things already in the hash table.
554
555Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
556
557 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
eb66be0e 558 the arguments.
de22184b
MS
559
560 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
eb66be0e 561 current_template_parms.
de22184b
MS
562
563Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
564
565 * search.c (lookup_field): Don't return a function, check want_type.
566
567Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
568
569 * init.c (build_new): Make sure PLACEMENT has a type.
570
571Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
572
573 * init.c (build_new): Support new (nothrow).
574
575Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
576
577 * pt.c (instantiate_decl): Also do push_to_top_level before setting
578 up DECL_INITIAL.
579
580 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
581 * pt.c (tsubst): Defer instantiation of default args.
582 * call.c (build_over_call): Until here.
583
584Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
585
586 * search.c (lookup_field): Make sure we have an
587 IDENTIFIER_CLASS_VALUE before we try to return it.
588
589Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
590
591 * call.c (build_method_call): Delete unused var PARM.
592 (build_overload_call_real): Likewise.
593 (build_object_call): Delete unused var P.
594 (build_new_op): Likewise.
595 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
596 var definitions, which are never used.
597 (shadow_tag): Delete unused var FN.
598 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
599 * init.c (build_new): Delete unused var ALLOC_TEMP.
600 * method.c (hack_identifier): Delete unused var CONTEXT.
601 (do_build_copy_constructor): Delete unused var NAME.
602 (synthesize_method): Delete unused var BASE.
603 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
604 * rtti.c (build_headof): Delete unused var VPTR.
605 (get_typeid): Delete unused var T.
606 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
607 and ORIG_OP2.
608 (build_ptrmemfunc): Delete unused vars U and NINDEX.
609 * typeck2.c (build_functional_cast): Delete unused var BINFO.
610
611Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
612
613 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
614 things in a type being defined.
615 * decl.c (finish_enum): Reverse the values so that they are in
616 the correct order.
617
618 * pt.c (instantiate_class_template): Don't initialize
eb66be0e 619 BINFO_BASETYPES until the vector is filled out.
de22184b
MS
620 (unify): Don't abort on conflicting bindings, just fail.
621 (instantiate_decl): Do push_tinst_level before any tsubsting.
622
623 * method.c (build_overload_value): Handle getting a
eb66be0e 624 TEMPLATE_CONST_PARM for a pointer.
de22184b
MS
625
626Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
627
628 * init.c (expand_member_init): Don't give 'not a base' error for
eb66be0e 629 templates.
de22184b
MS
630
631 * pt.c (instantiate_decl): Call import_export_decl later.
632
633 * pt.c (instantiate_class_template): Return a value.
634
635 * parse.y (extension): New rule for __extension__.
636 (extdef, unary_expr, decl, component_decl): Use it.
637
638Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
639
640 * class.c (base_binfo): Remove unused base_has_virtual member.
641 (finish_base_struct): Likewise.
642 (finish_struct_1): Likewise.
643
644Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
645
646 * search.c (expand_upcast_fixups): Fix bogus code generation
647 problem where the generated code uses the wrong index into the
648 runtime built vtable on the stack. Old code could clobber random
649 stack values.
650
651Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
652
653 * init.c (perform_member_init): Make sure the partial EH cleanups
eb66be0e 654 live on the function_obstack.
de22184b 655
f7da6097
MS
656Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
657
658 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
659 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
660
661Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
662
663 * decl.c (grokvardecl): Avoid ANSI style initialization.
664
665Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
666
667 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
668
669Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
670
671 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
672
1bf2b2d2
BK
673Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
674
675 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
676 arguments we compare against. Start the count of I at 1, not 0,
677 since argv[0] is still the command.
678
f7da6097
MS
679Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
680
681 * lang-specs.h: Accept .cp as an C++ extension.
682
d2e5ee5c
MS
683Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
684
685 * cp-tree.h (ptr_reasonably_similar): Add decl.
686
687Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
688
689 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
690 pointer. New local SPECBITS with the parm's value.
691 (grokdeclarator): Pass &specbits down.
692
693 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
694 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
695
696 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
697 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
698
699 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
700 not an error_mark_node.
701
702Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
703
704 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
705 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
706
707Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
708
709 * decl.c (grokdeclarator): When giving an anonymous struct a name,
710 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
711 not affected).
712
713 * typeck2.c (build_m_component_ref): If component is a pointer
714 to data member, resolve the OFFSET_REF now.
715
716 * call.c (convert_like): Don't go into infinite recursion.
717
718 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
719
720 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
721 * tree.c (layout_basetypes): And on the vbase ptr.
722
723Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
724
725 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
726 CHAR_TYPE_SIZE so bool is always the same size as another type.
727
728 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
729
730Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
731
732 * decl2.c (grok_x_components): Remove synthesized methods from
eb66be0e
MS
733 TYPE_METHODS of an anonymous union, complain about member
734 functions.
d2e5ee5c
MS
735 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
736 anonymous unions.
737 (finish_function): Just clear the DECL_RTL of our arguments.
738
739Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
740
741 * decl2.c (finish_file): Emit DWARF debugging info for static data
742 members.
743
744 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
745
746Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
747
748 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
eb66be0e 749 IDENTIFIER_NODE.
d2e5ee5c
MS
750
751Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
752
753 * Make-lang.in (g++-cross$(exeext)): Fix typo.
754
755Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
756
757 Make the g++ driver now be a standalone program, rather than one
758 that tries to run the gcc driver after munging up the options.
759 * Make-lang.in (g++.c, g++spec.o): New rules.
760 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
761 added.
762 (g++$(exeext)): New rule, based on xgcc rule.
763 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
764 * g++spec.c: New file.
765 * g++.c: Removed file.
766
767Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
768
769 * cvt.c (build_up_reference): Arrange for any temporary values
770 that have been keep in registers until now to be put into memory.
771
faf5394a 772Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9a3b49ac 773
faf5394a
MS
774 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
775 that make -j3 bootstrap works better.
9a3b49ac 776
faf5394a
MS
777Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
778
779 * decl.c (pushtag): Do pushdecl for anon tags.
780
781Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
782
783 * typeck.c (c_expand_return): Fix logic.
784 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
785
faf5394a
MS
786Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
787
788 * g++.c (main): Make sure arglist has a final NULL entry. Add
eb66be0e
MS
789 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
790 stdin/stdout of the invoked program are redirected to
791 nowheresville.
faf5394a
MS
792
793Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
794
795 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
796
797Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
798
799 * init.c (resolve_offset_ref): Handle obj.vfn better.
800 * typeck.c (build_component_ref): Set TREE_TYPE on result from
801 build_vfn_ref.
802
803Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
804
805 * typeck.c (convert_for_assignment): Also handle anachronistic
806 implicit conversions from (::*)() to cv void*.
807 * cvt.c (cp_convert_to_pointer): Likewise.
808
809Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
810
811 * lex.c (handle_cp_pragma): Fix bogus warning.
812
813Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
814
815 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
eb66be0e 816 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
faf5394a
MS
817
818Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
819
820 * class.c (finish_struct_1): Support DWARF2_DEBUG.
821 * search.c (dfs_debug_mark): Likewise.
822 * decl2.c (finish_vtable_vardecl): Likewise.
823 * decl.c (pushtag, finish_enum): Likewise.
824 * lex.c (check_newline): Use debug_* instead of calling *out
eb66be0e 825 functions directly.
faf5394a
MS
826
827Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
828
829 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
830 on some picky hosts.
831
832Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
833
834 * class.c (finish_struct_1): A class has a non-trivial copy
eb66be0e 835 constructor if it has virtual functions.
faf5394a
MS
836
837 * cvt.c (cp_convert): Always call a constructor.
838
839 * call.c (reference_binding): Still tack on a REF_BIND
eb66be0e 840 for bad conversions.
faf5394a
MS
841 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
842
843 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
844 (c_expand_return): Likewise.
845 * typeck2.c (digest_init): Likewise for { }.
846 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
847 * cvt.c (cp_convert): Handle failure better.
848
849Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
850
851 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
852 of GCC be path-relative.
853
854Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
855
856 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
857 it does need choose-temp.o and pexecute.o.
858
859Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
860
861 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
862 that we still use it.
863 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
864
865Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
866
867 * init.c (expand_default_init): Avoid calling constructors to
868 initialize reference temps.
869
870 * cvt.c (convert_to_reference): Fix.
871
872Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
873
874 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
875 (convert_to_reference): Likewise.
876 * typeck.c (convert_for_initialization): Likewise.
877 * init.c (expand_default_init): Likewise.
878 (expand_aggr_init_1): Likewise.
879 * cp-tree.h (CONV_NONCONVERTING): Lose.
880 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
881 * *.c: Adjust.
882 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
883
884Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
885
886 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
887
888Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
889
890 * init.c (expand_aggr_init_1): Don't crash on non-constructor
891 TARGET_EXPR.
892
893Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
894
895 * g++.c: Include gansidecl.h.
896 (VPROTO, PVPROTO, VA_START): Delete.
897 (choose_temp_base_try, choose_temp_base, perror_exec,
898 run_dos) [__MSDOS__]: Delete fns.
899 (pfatal_with_name): Delete fn.
900 (temp_filename): Declare like in gcc.c.
901 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
902 (error_count, signal_count): Define.
903 (error): Delete both definitions.
904 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
905 (pfatal_pexecute): Add fn from gcc.c.
906 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
907 code to use the pexecute stuff also used by gcc.c.
908 (MIN_FATAL_STATUS): Define.
909 * Make-lang.in (g++): Add dependency on and linking with
910 choose-temp.o and pexecute.o.
911
912 * cp-tree.h: Include gansidecl.h.
913 (STDIO_PROTO): Delete #undef/#define.
914 * cvt.c (NULL): Delete #undef/#define.
915 * expr.c (NULL): Likewise.
916 * init.c (NULL): Likewise.
917 * rtti.c (NULL): Likewise.
918 * xref.c (NULL): Likewise.
919
920 * cp-tree.h (build_user_type_conversion): Add prototype.
921 * call.c (build_user_type_conversion): Delete prototype. Correct
922 decl of FLAGS arg to be an int.
923 * cvt.c (build_user_type_conversion): Likewise.
924
925Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
926
927 * cp-tree.def: Add TRY_BLOCK and HANDLER.
928 * except.c (expand_start_catch_block): Support templates.
929 * parse.y (try_block, handler_seq): Likewise.
930 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9a3b49ac
MS
931
932Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
933
934 * pt.c (current_template_args): New fn.
935 (push_template_decl): Use it.
936 * decl.c (grokdeclarator): Use it.
937
938 * decl2.c (build_expr_from_tree): Dereference ref vars.
939
940 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
941 the decl-specifier-seq.
942
943 * decl.c (grok_op_properties): Don't force the type of a conversion
944 op to be complete. Don't warn about converting to the same type
945 for template instantiations.
946
947 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
948 methods.
949
950Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
951
952 * typeck.c (get_delta_difference): Remove previous bogusness.
953 Don't give errors if force is set.
954
955Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
956
957 * decl2.c (finish_file): Don't emit debug info.
d2e5ee5c 958 * decl.c (pushdecl): Lose obsolete code.
9a3b49ac 959 (grokdeclarator): Still do the long long thing after complaining.
d2e5ee5c
MS
960 * search.c (note_debug_info_needed): Don't do anything if we're in a
961 template.
9a3b49ac 962 * method.c (synthesize_method): For non-local classes,
eb66be0e 963 push_to_top_level first.
9a3b49ac
MS
964
965Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
966
967 * typeck.c (get_delta_difference): Add no_error parameter.
968 (build_ptrmemfunc): Call get_delta_difference with no_error set;
eb66be0e
MS
969 we don't want error messages when converting unrelated
970 pointer-to-member functions.
9a3b49ac
MS
971
972Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
973
974 * error.c (dump_expr): Improve the wording on error messages that
975 involve pointer to member functions.
976
977Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
978
979 * cvt.c (cp_convert_to_pointer): Move code for conversions from
eb66be0e 980 (::*)() to void* or (*)() up a bit, so that we can convert from
9a3b49ac
MS
981 METHOD_TYPEs as well.
982
983Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
984
985 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
986 There are no 'member' types.
987 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
988 (build_x_typeid): Handle errors.
989
990Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
991
992 * typeck.c (convert_for_assignment): Handle anachronistic implicit
993 conversions from (::*)() to void* or (*)().
994 * cvt.c (cp_convert_to_pointer): Likewise.
995 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
996 conversions from here.
997 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
998 * lang-options.h: Likewise.
999 * decl2.c (warn_pmf2ptr): Define.
1000 * cp-tree.h: Declare it.
1001 * typeck2.c (digest_init): Allow pmfs down into
1002 convert_for_initialization.
1003
1004Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1005
1006 * typeck.c (c_expand_return): Fix for returning overloaded fn.
1007
1008Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1009
1010 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
1011 * decl.c (grok_reference_init): Pass DIRECT_BIND.
1012 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
eb66be0e 1013 DIRECT_BIND.
9a3b49ac
MS
1014 * call.c (convert_like): Don't pass INDIRECT_BIND.
1015 * typeck.c (convert_arguments): Likewise.
1016 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
1017
1018Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1019
1020 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
eb66be0e 1021 similar code in build_up_ref.
9a3b49ac
MS
1022 * cvt.c (build_up_reference): Drastically simplify.
1023
691c003d
MS
1024Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
1025
1026 * typeck.c (signed_or_unsigned_type): If the given type already
1027 as the correct signedness, then just return it.
1028
eb66be0e
MS
1029 * typeck.c ({un,}signed_type): If can't do anything, call
1030 signed_or_unsigned_type.
691c003d
MS
1031
1032Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
1033
1034 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
1035 current_class_type is NULL.
1036
1037Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
1038
1039 * class.c (finish_struct_1): Avoid empty structs by adding a field
eb66be0e 1040 so layout_type gets the mode right.
691c003d
MS
1041
1042 * typeck.c (c_expand_return): Drastically simplify.
1043
1044Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1045
1046 * typeck.c (decay_conversion): Handle overloaded methods.
1047
1048Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
1049
1050 * call.c (build_over_call): A TARGET_EXPR has side-effects.
1051
f49422da
MS
1052Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
1053
1054 * cvt.c (convert_to_pointer_force): Add code to support pointer to
eb66be0e 1055 member function to pointer to function conversions.
f49422da 1056 * init.c (resolve_offset_ref): Add code to allow faked up objects,
eb66be0e
MS
1057 ignoring them if they are not used, and giving an error, if they
1058 are needed.
f49422da 1059 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
eb66be0e
MS
1060 code, and so that we can give an error, if we needed an object,
1061 and one was not provided.
f49422da 1062 (build_c_cast): Don't call default_conversion when we want to
eb66be0e 1063 convert to pointer to function from a METHOD_TYPE.
f49422da
MS
1064
1065Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1066
1067 * Make-lang.in (cplib2.ready): Fix logic.
1068
1069 * decl.c (shadow_tag): Only complain about non-artificial function
eb66be0e 1070 members.
f49422da
MS
1071
1072 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
1073
1074Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
1075
1076 * expr.c (cplus_expand_expr): Pre-tweak call_target like
eb66be0e 1077 expand_inline_function would.
f49422da
MS
1078
1079 * pt.c (mark_decl_instantiated): If extern_p, call
eb66be0e 1080 mark_inline_for_output.
f49422da 1081
3d4683cb
MS
1082Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
1083
1084 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
1085 pmd conversions.
1086
1087 * typeck.c (get_delta_difference): Fix wording, as we can be used
1088 for pointer to data members.
1089
1090Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
1091
1092 * pt.c (tsubst): If the function decl isn't a member of this
eb66be0e
MS
1093 template, return a copy of the decl (including copying the
1094 lang-specific part) so we don't hose ourselves later.
3d4683cb
MS
1095
1096Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1097
1098 * class.c (finish_struct): Remove DWARF-specific tag handling.
1099 * decl.c (pushtag): Likewise.
1100 (finish_function): Always clear DECL_ARGUMENTS on function decls with
1101 no saved RTX.
1102 * decl2.c (finish_file): Emit DWARF debugging info for static data
1103 members.
1104
1105Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
1106
1107 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
1108 isn't the same as the new one before we whack it.
1109
1110Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
1111
1112 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
eb66be0e
MS
1113 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
1114 warn_traditional and warn_strict_prototypes; remove ancient
1115 'overload' code; remove references to flag_traditional.
3d4683cb 1116
5156628f
MS
1117Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
1118
1119 * input.c (sub_getch): Handle 8-bit characters in string literals.
1120
1121Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
1122
1123 * tree.c (mapcar): Handle CONSTRUCTORs.
1124 (copy_to_permanent): Handle expression_obstack properly.
1125
1126 * Make-lang.in (cplib2.txt): Also depend on the headers.
1127
1128 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
eb66be0e 1129 INT_TYPE_SIZE.
5156628f
MS
1130 (expand_class_desc): Use USItype for offset field.
1131 * tinfo.h (struct __class_type_info): Likewise.
1132
1133 * method.c (build_overload_int): TYPE_PRECISION should be applied
eb66be0e 1134 to types.
5156628f
MS
1135
1136Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
1137
1138 * call.c (build_new_op): A COND_EXPR involving void must be a
1139 builtin.
1140
1141Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1142
1143 * typeck.c (build_x_component_ref): New fn.
1144 (build_object_ref): Use it.
1145 * parse.y (primary): Use it.
1146 * decl2.c (build_expr_from_tree): Use it.
1147 * cp-tree.h: Declare it.
1148
1149 * decl.c (start_decl): variable-sized arrays cannot be initialized.
1150 * error.c (dump_type_suffix): Handle variable arrays.
1151
1152Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1153
1154 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
1155
1156Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1157
1158 * decl.c (lookup_name_real): Don't try to look up anything in a
eb66be0e 1159 TYPENAME_TYPE.
5156628f
MS
1160
1161 * tinfo2.cc (__throw_type_match_rtti): Oops.
1162
1163Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1164
1165 * Make-lang.in (exception.o): Use -fno-PIC for now.
1166
1167Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1168
1169 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
eb66be0e 1170 calling them.
5156628f
MS
1171 (get_tinfo_fn_dynamic): Extracted from build_typeid.
1172 * tinfo2.cc (__dynamic_cast): Adjust.
1173
1174 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
1175 (build_x_typeid): Likewise.
1176
1177 * parse.y: Call build_x_typeid instead of build_typeid.
1178 * cp-tree.def: Add TYPEID_EXPR.
1179 * pt.c (tsubst_copy): Handle typeid.
1180 * decl2.c (build_expr_from_tree): Likewise.
1181 * rtti.c (build_x_typeid): Throw bad_typeid from here.
1182 (build_typeid): Not here.
1183 * cp-tree.h: Declare build_x_typeid.
1184
1185Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
1186
1187 * call.c (convert_like): Pull out constant values.
1188
1189 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
1190
1191Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1192
1193 * decl.c (init_decl_processing): Create short int types before
1194 creating size_t in case a machine description needs to use
1195 unsigned short for size_t.
1196
1197Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1198
1199 * Make-lang.in (exception.o): Turn off pic.
1200
1201 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
1202 type, multi-level ptr conversions.
1203
1204 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
1205 (throw_bad_cast): Use it.
1206 (throw_bad_typeid): New fn.
1207 (build_typeid): Throw bad_typeid as needed.
1208 Use build_call.
1209 (synthesize_tinfo_fn): Handle functions and arrays before checking
1210 for cv-quals.
1211
1212 * Remove .h from standard C++ headers, add new.h, move into inc
eb66be0e 1213 subdirectory.
5156628f
MS
1214
1215 * exception*: Remove pointer from object, constructors. Add
eb66be0e
MS
1216 default exception::what that uses type_info::name. Add
1217 __throw_bad_typeid.
5156628f
MS
1218
1219 * init.c (build_new): Don't add a cookie to new (void *) T[2].
1220
1221Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
1222
1223 * Make-lang.in: Building C++ code depends on cc1plus.
1224
1225Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1226
1227 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
1228 a HOST_WIDE_INT, not a tree.
1229
1230Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1231
1232 * exception.cc: Don't include <stdlib.h>.
1233
1234 * Make-lang.in (c++.clean): Remove cplib2.*.
1235
1236Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
1237
1238 * parse.y (component_decl_1, component_costructor_declarator case):
1239 Pass attributes/prefix_attributes in tree list.
1240
1241Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
1242
1243 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
1244
1245Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1246
1247 * lex.c (do_identifier): Don't do deferred lookup in a template
eb66be0e 1248 header.
5156628f
MS
1249
1250 * typeck2.c (store_init_value): Oops.
1251
1252 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
1253 New files for C++ lang-support library.
1254 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
1255 (CXX_LIB2FUNCS): Define.
1256 And rules for building the C++ lang-support code.
1257 * config-lang.in (headers): Define.
1258 (lib2funcs): Define.
1259
1260Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1261
1262 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
1263 digest_init.
1264 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
1265 * typeck2.c (store_init_value): Check for initializing pmf with { }
1266 here.
1267 (process_init_constructor): Not here.
1268
1269Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1270
1271 * pt.c (begin_template_parm_list): Increment
eb66be0e 1272 processing_template_decl here.
5156628f
MS
1273 (end_template_parm_list): Not here.
1274 (process_template_parm): No need to add 1 to it now.
1275 * *.c: Use processing_template_decl instead of current_template_parms
1276 to check for being in a template.
1277
1278 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
1279 (tsubst_copy): Handle CONSTRUCTOR.
1280 (instantiate_decl): Set up context properly for variables.
1281 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
1282 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
1283
1284Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1285
1286 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
1287
7fcdf4c2
MS
1288Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1289
1290 * method.c (make_thunk): Call comdat_linkage before setting the
eb66be0e 1291 TREE_CODE.
7fcdf4c2
MS
1292
1293 * decl2.c (comdat_linkage): Use make_decl_one_only.
1294 (import_export_decl): Likewise.
1295 * decl.c (init_decl_processing): Check supports_one_only instead of
1296 SUPPORTS_WEAK.
1297
1298Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1299
1300 * decl2.c (grokfield): Tighten checking for access decls.
1301
1302 * decl.c (make_typename_type): Resolve references to
eb66be0e 1303 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
7fcdf4c2 1304 (lookup_name_real): Types that depend on a template parameter get
eb66be0e 1305 an implicit 'typename' unless they're in the current scope.
7fcdf4c2 1306 (start_decl_1): We don't care about incomplete types that depend
eb66be0e 1307 on a template parm.
7fcdf4c2 1308 (grokdeclarator): Resolve 'typename's in the type specifier that
eb66be0e 1309 refer to members of the current scope.
7fcdf4c2
MS
1310
1311 * call.c (build_over_call): Remove 'inline called before
eb66be0e 1312 definition' diagnostic.
7fcdf4c2
MS
1313 (build_method_call): Likewise.
1314 * decl.c (duplicate_decls): Downgrade 'used before declared
eb66be0e 1315 inline' to a warning, only with -Winline.
7fcdf4c2
MS
1316
1317Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
1318
1319 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
1320
c11b6f21
MS
1321Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1322
1323 * call.c (build_method_call): When calling a signature
1324 default implementation, as in other cases, let instance_ptr simply
1325 be instance.
1326
1327Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
1328
1329 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
1330
1331Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
1332
1333 * except.c (expand_start_catch_block): Add a pushlevel so that -g
eb66be0e 1334 works on hppa and SPARC.
c11b6f21
MS
1335
1336Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1337
1338 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
1339
1340Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1341
1342 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
1343 before testing whether it's a signature.
1344
1345Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1346
1347 * call.c (build_new_method_call): Don't complain about signature
1348 pointers and references not being an aggr type.
1349 (build_this): If a signature pointer or reference was passed in,
1350 just return it.
1351 (build_new_method_call): If instance is a signature pointer, set
1352 basetype to the signature type of instance.
1353 * sig.c (build_signature_method_call): Deleted basetype and
1354 instance parameters, they can be found as the DECL_CONTEXT of
1355 function and as the first argument passed in.
1356 * cp-tree.h: Changed declaration of build_signature_method_call.
1357 * call.c (build_method_call): Deleted first two arguments in call
1358 of build_signature_method_call.
1359 (build_over_call): Added call to build_signature_method_call.
1360
1361Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1362
1363 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
eb66be0e 1364 target_expr.
c11b6f21
MS
1365
1366Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1367
1368 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
1369
9ffa2541
BM
1370Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
1371
1372 * except.c (expand_start_try_stmts): Move to except.c in the backend.
1373 (expand_end_try_stmts): Remove.
1374
1375 * init.c (perform_member_init): Use add_partial_entry () instead
1376 of directly manipulating lists.
1377 (emit_base_init): Ditto.
1378
c11b6f21
MS
1379Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
1380
1381 * except.c (expand_exception_blocks): Always make sure USE and
eb66be0e
MS
1382 CLOBBER insns that came at the end still do, the backend relies
1383 upon this.
c11b6f21
MS
1384
1385Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
1386
1387 * call.c (build_over_call): We can only use a TARGET_EXPR of the
eb66be0e 1388 right type.
c11b6f21
MS
1389
1390Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1391
1392 * cvt.c (convert_to_reference): Revert last change, don't complain
eb66be0e 1393 about temp without target decl.
c11b6f21
MS
1394
1395Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
1396
1397 * decl.c (grokdeclarator): Don't core dump when void() is given.
1398
1399Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1400
1401 * decl.c (copy_args_p): Don't crash.
1402
1403Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
1404
1405 * pt.c (tsubst): And support template args inside the exception
eb66be0e 1406 specification.
c11b6f21
MS
1407
1408 * pt.c (tsubst): Add support for exception specifications in
eb66be0e 1409 template functions.
c11b6f21
MS
1410
1411Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
1412
1413 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
eb66be0e 1414 fields now.
c11b6f21
MS
1415 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
1416 (start_function): Likewise.
1417 (start_method): Likewise.
1418 (grokfield): Likewise.
1419 (make_call_declarator): Add throw spec parameter.
1420 (set_quals_and_spec): Add routine.
1421 * lex.c (set_quals_and_spec): Likewise.
1422 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
1423 * decl.c (shadow_tag): Eliminate the throw spec parameter to
eb66be0e 1424 grokdeclarator.
c11b6f21
MS
1425 (groktypename): Likewise.
1426 (start_decl): Eliminate the throw spec parameter. Eliminate the
eb66be0e
MS
1427 throw spec parameter to grokdeclarator. Eliminate the throw spec
1428 field in DECL_STMT.
c11b6f21
MS
1429 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
1430 (grokfndecl): Remove useless set of raises.
1431 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
eb66be0e
MS
1432 the throw spec parameter to start_decl. Pull the throw spec out
1433 of the call declarator.
c11b6f21
MS
1434 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
1435 (start_function): Eliminate the throw spec parameter. Eliminate
eb66be0e 1436 the throw spec parameter to grokdeclarator.
c11b6f21
MS
1437 (start_method): Likewise.
1438 * decl2.c (grokfield): Likewise.
1439 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
1440 (grokoptypename): Likewise.
1441 (finish_file): Eliminate the throw spec parameter to
eb66be0e 1442 start_function. Add throw spec to make_call_declarator.
c11b6f21 1443 * except.c (init_exception_processing): Add throw spec to
eb66be0e
MS
1444 make_call_declarator. Eliminate the throw spec parameter to
1445 start_decl.
c11b6f21 1446 (expand_start_catch_block): Eliminate the throw spec parameter to
eb66be0e 1447 grokdeclarator.
c11b6f21
MS
1448 (expand_builtin_throw): Add throw spec to make_call_declarator.
1449 Eliminate the throw spec parameter to start_function.
1450 (start_anon_func): Likewise.
1451 * lex.c (make_call_declarator): Add throw spec parameter.
1452 (set_quals_and_spec): New routine.
1453 (cons_up_default_function): Add throw spec to make_call_declarator.
1454 Eliminate the throw spec parameter to grokfield.
1455 * method.c (synthesize_method): Eliminate the throw spec parameter
eb66be0e 1456 to start_function.
c11b6f21 1457 * pt.c (process_template_parm): Eliminate the throw spec parameter
eb66be0e 1458 to grokdeclarator.
c11b6f21
MS
1459 (tsubst): Add throw spec to make_call_declarator.
1460 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
1461 (do_function_instantiation): Eliminate the throw spec parameter to
eb66be0e
MS
1462 grokdeclarator. Eliminate the throw spec parameter to
1463 start_function.
c11b6f21 1464 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
eb66be0e 1465 to start_function.
c11b6f21
MS
1466 * parse.y (datadef): Remove non-winning optimization.
1467 (decl): Likewise.
1468 (fndef): Remove ambiguous error productions uncovered by grammer
eb66be0e 1469 fixing.
c11b6f21
MS
1470 (constructor_declarator): Add exception_specification_opt here.
1471 (component_constructor_declarator): Likewise.
1472 (direct_after_type_declarator): Likewise.
1473 (complex_direct_notype_declarator): Likewise.
1474 (direct_abstract_declarator): Likewise.
1475 (fn.def1): Remove exception_specification_opt.
1476 (fn.def2): Likewise.
1477 (condition): Likewise.
1478 (initdcl0): Likewise.
1479 (initdcl): Likewise.
1480 (notype_initdcl0): Likewise.
1481 (nomods_initdcl0): Likewise.
1482 (component_decl_1): Likewise.
1483 (component_declarator): Likewise.
1484 (after_type_component_declarator0): Likewise.
1485 (after_type_component_declarator): Likewise.
1486 (notype_component_declarator): Likewise.
1487
1488Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1489
1490 * call.c (build_over_call): Also use an INIT_EXPR when
eb66be0e 1491 initializing anything from an rvalue.
c11b6f21
MS
1492
1493 * call.c (build_over_call): Call stabilize_reference when building
eb66be0e 1494 an INIT_EXPR instead of calling the copy ctor.
c11b6f21
MS
1495
1496 * call.c (joust): Extend the previous change to all comparisons.
1497
1498 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
1499 NO_LINKAGE_HEURISTICS.
1500
1501 * decl2.c (finish_file): Emit any statics that weren't already.
1502
1503 * typeck.c (build_static_cast): Implement.
1504 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
1505 * decl.c (grokparms): Use can_convert_arg instead of
eb66be0e 1506 implicit_conversion directly.
c11b6f21
MS
1507 (copy_args_p): New fn.
1508 * cvt.c (convert_to_reference): Don't complain about temp with
eb66be0e 1509 static_cast.
c11b6f21
MS
1510 (build_up_reference): Handle TARGET_EXPRs.
1511 * call.c (build_over_call): Elide unnecessary temps.
1512 (can_convert*): Use new overloading code.
1513
1514Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
1515
1516 * call.c: Move TYPE_PTR*_MACROS ...
1517 * cp-tree.h: To here.
1518 * typeck.c (build_reinterpret_cast): Implement.
1519
1520 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
eb66be0e 1521 ptr_complete_ob.
c11b6f21
MS
1522 (joust): If we're comparing a function to a builtin and the worst
1523 conversion for the builtin is worse than the worst conversion for the
1524 function, take the function.
1525
1526 * typeck.c (build_const_cast): Implement.
1527 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
1528 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
1529
1530Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
1531
1532 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
eb66be0e
MS
1533 too early. Make sure we explode if exprtype turns out to be a
1534 NULL_TREE when it shouldn't be.
c11b6f21
MS
1535
1536Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
1537
1538 * cp-tree.h: New routine make_call_declarator.
1539 * lex.c (make_call_declarator): Define it.
1540 * except.c (init_exception_processing): Use it.
1541 (expand_builtin_throw): Likewise.
1542 (start_anon_func): Likewise.
1543 * decl2.c (finish_file): Likewise.
1544 * lex.c (cons_up_default_function): Likewise.
1545 * parse.y: Likewise.
1546 * pt.c (tsubst): Likewise.
1547
1548Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
1549
1550 * decl2.c (groktypefield): Remove unused code.
1551
1552Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
1553
1554 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
1555 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
1556 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
1557 nonempty_cv_qualifiers.
1558 * hash.h: Rebuild.
1559
1560 * lex.c (make_pointer_declarator): Change type_quals into
eb66be0e 1561 cv_qualifiers.
c11b6f21
MS
1562 (make_reference_declarator): Likewise.
1563
d11ad92e
MS
1564Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1565
1566 * decl.c (start_function): Only check interface_* for templates
eb66be0e 1567 with flag_alt_external_templates.
d11ad92e
MS
1568
1569 * call.c (build_new_op): Check for comparison of different enum types.
1570 (build_over_call): Fix arg # output.
1571
1572 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
1573
1574Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1575
1576 * call.c (build_new_op): Check for erroneous args.
1577
1578 * call.c (build_new_method_call): Add missing args to cp_error.
1579
1580 * tree.c (error_type): Dont print reference-to-array.
1581
1582 * typeck.c (convert_for_assignment): Don't say contravariance for
eb66be0e 1583 removing const.
d11ad92e
MS
1584
1585Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1586
1587 * call.c (build_over_call): Diagnose bad convs for `this'.
1588
1589 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
1590 on _ctor_arg.
1591
1592 * call.c (convert_like): Handle bad convs.
1593 (build_over_call): Handle bad convs better.
1594
1595 * decl2.c: -fansi-overloading is now the default.
1596
1597 * call.c (build_new_method_call): Check for erroneous args.
1598
1599 * pt.c (instantiate_class_template): Propagate
eb66be0e 1600 TYPE_USES_MULTIPLE_INHERITANCE.
d11ad92e
MS
1601
1602Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
1603
1604 * call.c (enforce_access): Add static to routine.
1605
1606Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1607
1608 * call.c (build_user_type_conversion_1): Fix bad handling.
1609 (compare_ics): Likewise.
1610
1611Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1612
1613 * call.c (standard_conversion): Oops.
1614
1615Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
1616
1617 * g++.c: Update test for win32 (&& ! cygwin32).
1618
1619Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1620
1621 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
1622 (ptr_reasonably_similar): New fn.
1623 * call.c (BAD_RANK): New rank.
1624 (ICS_BAD_FLAG): New macro.
1625 (standard_conversion): Handle almost-right pointer conversions.
1626 (reference_binding): Handle bad rvalue bindings.
1627 (add_*_candidate): Stuff.
1628 (build_over_call): Pass bad conversions to convert_for_initialization.
1629 (compare_ics): Handle bad convs.
1630 (joust): Likewise.
1631
1632Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
1633
1634 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
1635 integer_type_node when computing pointer offsets.
1636
1637Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1638
1639 * tree.c (lvalue_type): New fn.
1640 (error_type): New fn.
1641 * call.c (op_error): Use error_type.
1642 (add_conv_candidate): Use lvalue_type.
1643 (add_builtin_candidates): Likewise.
1644 * error.c (args_as_string): Use error_type.
1645
1646Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1647
1648 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
1649 (tsubst): Not here.
1650
1651 * decl.c (init_decl_processing): With -ansi, __null's type is the
1652 signed integral type with the same number of bits as a pointer.
1653 Introduce a new variable null_node for it.
1654 * cp-tree.h: Adjust.
1655 * call.c (null_ptr_cst_p): Adjust.
1656
1657Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
1658
1659 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
eb66be0e 1660 optimize.
d11ad92e
MS
1661
1662Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1663
1664 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
eb66be0e 1665 fns of classes without virtual functions.
d11ad92e
MS
1666
1667 * call.c (add_function_candidate): Handle `this' specially.
1668 (compare_ics): Likewise.
1669
1670Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
1671
1672 * typeck.c (build_conditional_expr): Fix handling of __null.
1673
1674 * decl2.c (comdat_linkage): New fn.
1675 (import_export_vtable): Use it.
1676 (import_export_decl): Use it.
1677 * method.c (make_thunk): Use it.
1678
73aad9b9
JM
1679Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1680
1681 * pt.c (end_template_decl): If we don't actually have parms, return.
1682 * parse.y (template_header): Accept 'template <>'.
1683
1684 * errfn.c: Allow 5 args.
1685
1686Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1687
1688 * tree.c (make_temp_vec): New fn.
1689 * pt.c (push_template_decl): Handle partial specs.
d11ad92e 1690 (instantiate_class_template): Likewise.
73aad9b9
JM
1691 (more_specialized): Use get_bindings.
1692 (more_specialized_class): New fn.
1693 (get_class_bindings): New fn.
1694 (most_specialized_class): New fn.
1695 (do_function_instantiation): List candidates for ambiguous case.
1696 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
1697 (shadow_tag): Call push_template_decl for partial specializations.
d11ad92e 1698 * parse.y: Likewise.
73aad9b9 1699 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
eb66be0e 1700 DECL_TEMPLATE_MEMBERS.
73aad9b9
JM
1701 * call.c (print_z_candidates): Reduce duplication.
1702
1703Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1704
1705 * decl2.c (lang_decode_option): Allow -fansi-overloading.
1706
1707Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1708
1709 * pt.c (get_bindings): New fn.
d11ad92e 1710 (most_specialized): Likewise.
73aad9b9
JM
1711 (do_function_instantiation): Use them.
1712 (add_maybe_template): New fn.
1713 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
1714 * call.c (build_new_op): Handle guiding decls.
d11ad92e
MS
1715 (build_new_function_call): Likewise.
1716 * decl2.c (finish_file): Likewise.
73aad9b9
JM
1717
1718 * decl2.c (mark_used): Do synthesis here.
1719 * call.c (build_method_call): Not here.
1720 (build_over_call): Or here.
1721 * typeck.c (build_function_call_real): Or here.
1722 * tree.c (bot_manip): Call mark_used on functions used in default
eb66be0e 1723 args.
73aad9b9 1724
2eee5e3a
MM
1725Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1726
1727 * decl2.c (import_export_vtable): Delete code that disabled vtable
eb66be0e 1728 heuristic on systems with ASM_OUTPUT_EXTERNAL.
2eee5e3a 1729
c73964b2
MS
1730Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1731
1732 * typeck.c (build_x_function_call): Handle static call context
1733 better.
1734
1735 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
eb66be0e 1736 the function, not its outer block.
c73964b2
MS
1737
1738 * call.c (build_field_call): Pass fields on to build_opfncall
eb66be0e 1739 regardless of TYPE_OVERLOADS_CALL_EXPR.
c73964b2
MS
1740 (build_method_call): Pass on to build_new_method_call sooner.
1741
1742 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
1743 gives us.
1744 * class.c (instantiate_type): Don't put a POINTER_TYPE to
eb66be0e 1745 METHOD_TYPE on an expression. Also make a copy of rhs instead of
c73964b2
MS
1746 modifying it.
1747
1748Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1749
1750 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
1751 (add_builtin_candidate): Don't take enums for ++.
1752 (build_new_method_call): Handle non-aggregates and field calls.
1753 Move new overloading code from...
1754 * cvt.c: Here.
1755
1756 * decl.c (grokparms): Don't check default args in templates.
1757
1758Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1759
1760 * cvt.c (build_new_op): Fix args to build_unary_op.
1761 (add_builtin_candidates): Don't call type_promotes_to on float.
1762
1763 * decl.c (grokparms): Check the type of the default arg.
1764
1765 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
1766 returning NULL_TREE.
1767
1768 * typeck.c (build_x_binary_op): Avoid doing extra work.
d11ad92e
MS
1769 (build_x_unary_op): Likewise.
1770 (build_x_conditional_expr): Likewise.
c73964b2
MS
1771 * cvt.c (build_over_call): Return.
1772 (add_builtin_candidate): Fix MEMBER_REF.
d11ad92e 1773 (build_new_op): Likewise.
c73964b2
MS
1774
1775Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
1776
1777 * method.c (build_overload_name): Put bug fix into code but leave
eb66be0e
MS
1778 disabled for now so we can be bug compatible with older releases
1779 that do repeats incorrectly. In the future, we can enable it.
c73964b2
MS
1780
1781Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1782
1783 * cvt.c (convert_like): Don't call build_cplus_new twice.
1784
1785 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
1786 Control new overloading code with -fansi-overloading.
1787
1788Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1789
1790 * cvt.c (build_over_call): Call build_cplus_new.
d11ad92e
MS
1791 * call.c (build_method_call): Likewise.
1792 * typeck.c (build_function_call_real): Likewise.
c73964b2
MS
1793 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
1794 the COND_EXPR in a TARGET_EXPR so they use the same slot.
1795
1796 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
1797 recursive calls.
1798 * typeck.c (complete_type): Propagate
eb66be0e 1799 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
c73964b2
MS
1800
1801Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1802
1803 * cvt.c (joust): More ?: kludging. Sigh.
1804 (build_over_call): Don't try to synthesize global fns.
1805
1806 * search.c (lookup_conversions): Use binfo marking.
1807
1808Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
1809
1810 * search.c (build_mi_matrix): Use the correct value of cid
1811 when determining the new mi_size.
1812
1813Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1814
1815 * cvt.c (add_builtin_candidates): Do consider type conversion ops
1816 for the first parms of += et al.
1817 (strip_top_quals): New fn.
1818 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
d11ad92e 1819 (implicit_conversion): Likewise.
c73964b2
MS
1820 (add_builtin_candidates): Be careful about arrays.
1821 (build_new_method_call): Handle vtable optimization.
1822
1823Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1824
1825 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
1826 * cvt.c (reference_binding): Use it.
1827 (implicit_conversion): Use it.
1828 (add_builtin_candidate, COND_EXPR): Use it.
1829
1830 * cvt.c (build_new_function_call): Check for error args.
1831
1832 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
1833
1834 * gxx.gperf: Add __null.
1835 * hash.h: Regenerate.
1836 * lex.h: Add RID_NULL.
1837 * lex.c (init_lex): Create null_pointer_node here, stick it in
eb66be0e 1838 RID_NULL.
c73964b2
MS
1839 * decl.c (init_decl_processing): Still set its type here.
1840 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
d11ad92e 1841 (convert_to_pointer_force): Likewise.
c73964b2
MS
1842 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
1843 if (! pedantic).
1844 * call.c (convert_harshness): Use null_ptr_cst_p.
d11ad92e 1845 * typeck.c (convert_for_assignment): Likewise. Don't produce
c73964b2
MS
1846 null_pointer_node.
1847
1848 * error.c (args_as_string): Handle lists of actual args, too.
1849 * cvt.c (null_ptr_cst): Support (void*)0 for now.
1850 (build_user_type_conversion_1): Improve diagnostics.
1851 (build_new_function_call): Likewise.
1852 (build_object_call): Likewise.
1853 (build_new_method_call): Likewise. Move call before def diagnostic...
1854 (build_over_call): Here.
1855
1856 * cvt.c (build_new_method_call): Don't complain about no match if
eb66be0e 1857 LOOKUP_SPECULATIVELY.
c73964b2
MS
1858 (build_over_call): Fix 'this' for virtual fn.
1859 (build_new_method_call): Add diagnostic.
1860
1861Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1862
1863 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
eb66be0e 1864 constructors to be passed in.
c73964b2
MS
1865 (build_over_call): Likewise.
1866 (build_user_type_conversion_1): Pass them in.
1867 (convert_like): Likewise.
1868 (build_object_call): Handle overloaded conversions.
1869 (build_over_call): Pass the right args to build_vfn_ref.
1870 (standard_conversion): Fix pmf convs.
1871 (joust): Handle comparing statics and non-statics.
1872 (build_new_method_call): New fn.
1873 * call.c (build_method_call): Call it if NEW_OVER.
1874
1875Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
1876
1877 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
eb66be0e 1878 %D instead.
c73964b2
MS
1879
1880Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
1881
1882 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
eb66be0e
MS
1883 instead of just maybe_build_cleanup so that we deallocate the
1884 thrown object.
c73964b2
MS
1885
1886Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1887
1888 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
1889 * cp-tree.h (finish_prevtable_vardecl): Add decl.
1890
14548a19
MS
1891Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
1892
c73964b2 1893 * pt.c (instantiate_class_template): Call complete_type. Also, if
eb66be0e
MS
1894 we're at the end of the file and we just instantiated a template
1895 class with a vtable, call finish_prevtable_vardecl.
c73964b2 1896
14548a19 1897 * error.c (dump_decl): Don't explode (or explode more gracefully
eb66be0e 1898 as appropriate) if the object being dumped has a null type.
d11ad92e 1899 (dump_expr): Likewise.
14548a19
MS
1900
1901 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
eb66be0e
MS
1902 by counting the number of nodes that we'll need before allocating
1903 the array.
14548a19
MS
1904 (lookup_fnfields): Fix comment.
1905 (breadth_first_search): Fix comment.
1906
1907Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1908
1909 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
eb66be0e 1910 TYPE_ALIGN.
14548a19
MS
1911 * class.c (finish_struct): Call cplus_decl_attributes here.
1912 (finish_struct_1): Not here.
1913 * cp-tree.h: Adjust.
1914
1915 * pt.c (type_unification): New parameter STRICT.
1916 (unify): If STRICT, don't allow cv addition or base deduction.
1917 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
1918
1919Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1920
1921 * search.c (get_template_base{_recursive}): New fns.
1922 * pt.c (more_specialized): New fn.
1923 (do_function_instantiation): Use it.
1924 (unify): Handle base deduction.
1925 * cvt.c (joust): Use more_specialized.
1926 Don't arbitrarily choose between non-builtin candidates.
1927 (build_over_call): Call require_complete_type.
1928
1929 * decl.c (start_function): Statics are static even in a #pragma
eb66be0e 1930 interface file.
14548a19
MS
1931
1932 * decl2.c (import_export_vtable): Disable vtable heuristic on
eb66be0e 1933 systems with ASM_OUTPUT_EXTERNAL.
14548a19
MS
1934
1935 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
1936 (standard_conversion): No std conv to enum type.
1937
1938 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
1939 for ptm's.
1940
1941 * cvt.c (reference_binding): Bind directly to a base subobject of
eb66be0e 1942 a class rvalue.
14548a19
MS
1943
1944 * cvt.c (build_new_op): Enforce access control.
1945
1946Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
1947
1948 * typeck2.c (process_init_constructor): When scanning the
1949 union for a named field, skip things that aren't FIELD_DECLs.
1950
1951 * method.c (synthesize_method): Don't scan fndecl's rtl if
1952 we're at the end of the file; just assume the function can't
1953 be inlined.
1954
1955Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1956
1957 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
eb66be0e 1958 it failed.
14548a19
MS
1959
1960 * cvt.c (build_user_type_conversion_1): Handle overloaded
eb66be0e 1961 conversion ops.
14548a19
MS
1962
1963 * cvt.c (add_builtin_candidates): Don't consider type conversion
eb66be0e 1964 operators for the first parameter of operator=.
14548a19
MS
1965
1966Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
1967
1968 * typeck.c (complete_type): Only call layout_type if we're not
eb66be0e 1969 expanding a template.
14548a19
MS
1970
1971Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1972
1973 * cvt.c (compare_ics): Oops.
1974
1975 * cvt.c (op_error): Oops.
1976
1977 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
1978 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
1979 (build_conv): Use them.
1980 (implicit_conversion): Use them.
1981 (convert_like): Handle them.
1982 (build_new_op): Handle builtin COND_EXPR again.
1983 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
1984 in lists of types for COND_EXPR.
1985 (add_builtin_candidate): Add enum candidates for COND_EXPR.
1986
1987Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
1988
1989 * typeck.c (build_modify_expr): Always attempt to build a call to
eb66be0e 1990 the assignment operator, even if we're using a default one.
14548a19
MS
1991 (convert_for_initialization): Call complete_type.
1992
1993Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1994
1995 * cvt.c (reference_binding): A REF_BIND gets the reference type.
1996 (implicit_conversion): Likewise.
1997 (convert_like): Likewise.
1998 (compare_ics): Likewise.
1999 (compare_qual): Likewise.
2000 (print_z_candidates): Handle no candidates.
2001 (build_new_op): Don't handle builtin COND_EXPR for now.
2002
2003Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
2004
2005 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
2006
2007Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2008
2009 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
2010
2011 * cvt.c (build_builtin_candidate): Oops.
2012 (build_new_op): Oops.
2013
2014 * method.c (build_opfncall): Pass COND_EXPR on.
2015 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
2016 (add_builtin_candidate{,s}): Likewise.
2017 (add_builtin_candidates): Likewise.
2018 (print_z_candidates, op_error, build_new_op): Likewise.
2019 (type_decays_to): New fn.
2020 * lex.c (init_lex): Just say ?: for COND_EXPR.
2021
2022Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2023
2024 * typeck.c (complete_type): Call layout_type rather than building
eb66be0e 2025 a new array type.
14548a19
MS
2026
2027 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
eb66be0e 2028 only use ptrdiff_t.
14548a19
MS
2029
2030Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2031
2032 * cvt.c: Always compile the new overloading code (but don't use it).
2033 (implicit_conversion): Add a BASE_CONV when converting to
eb66be0e 2034 the same class type.
14548a19
MS
2035 (convert_like): Handle BASE_CONV.
2036
2037Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2038
2039 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
2040 (add_builtin_candidate): Likewise.
2041
2042 NEW_OVER changes:
2043 * typeck.c (build_x_function_call): Try an operator function
eb66be0e 2044 whenever we call an object of class type.
14548a19
MS
2045 * method.c (build_opfncall): Pass CALL_EXPRs through.
2046 * cvt.c (implicit_conversion): Do const-ref case first.
2047 (add_conv_candidate, build_object_call, op_error): New fns.
2048 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
2049 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
2050 builtin candidates.
2051 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
2052 Fall back on preincrement handling. Use op_error.
2053 Handle warn_synth.
2054 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
2055 an error_mark_node.
2056 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
2057 properly.
2058
2059Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
2060
2061 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
2062
2063Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
2064
2065 * typeck.c (build_component_ref_1): Use build_component_ref
2066 instead of open coding it here.
2067
2068Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2069
2070 * g++.c (main): Don't link with -lg++.
2071
2072 NEW_OVER changes:
2073 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
eb66be0e 2074 result of build_type_conversion.
14548a19
MS
2075 (cp_convert): Only call build_method_call for ctors if
2076 build_type_conversion failed.
2077 (ptr_complete_ob): New function.
2078 (TYPE_PTR{,OB,MEM}_P): New macros.
2079 ({add,build}_builtin_candidate{,s}): New functions.
2080 (print_z_candidates): Handle builtins.
2081 (build_user_type_conversion_1): Don't use conversion fns for
2082 converting to a base type.
2083 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
2084 (build_user_type_conversion): Use convert_from_reference.
2085 (build_new_op): New function.
2086 (build_over_call): Fix handling of methods.
2087 (compare_ics): Handle AMBIG_CONV properly.
2088 * typeck2.c: Increment abort count.
2089 * method.c (build_opfncall): Forward most requests to build_new_op.
2090 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
2091
2092Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2093
2094 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
2095 invalid second argument to dump_expr_list.
2096
594740f3
MS
2097Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
2098
2099 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
2100
2101Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
2102
2103 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
2104 ASSEMBLE_EXTERNAL.
2105
2106Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
2107
2108 * typeck2.c (process_init_constructor): New pedwarn for using { }
2109 to initialize a pointer to member function.
2110 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
2111 we can avoid the new error.
2112
2113Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
2114
2115 * typeck.c (build_ptrmemfunc1): New function to hide details of
2116 pointer to member functions better.
2117
2118Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
2119
2120 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
2121 methods into the actual method, as we know the implied object is
2122 not used.
2123
2124Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2125
2126 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
2127 inside a system header.
2128
2129Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
2130
2131 * call.c (build_method_call): Call complete_type on the
2132 instance type.
2133
2134Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
2135
2136 * typeck.c (build_component_ref): Always build up an OFFSET_REF
2137 for obj_ptr->func so that we can know which object to use in a
2138 method call.
2139
2140Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
2141
2142 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
2143 around things. Also improve maintainability.
2144
2145Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
2146
2147 * decl.c (grokdeclarator): Check for overflow when evaluating an
eb66be0e 2148 array dimension.
594740f3
MS
2149
2150Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2151
2152 * cvt.c (cp_convert): Don't check for ambiguity with constructor
eb66be0e 2153 if NEW_OVER.
594740f3
MS
2154
2155 * typeck.c (build_x_function_call): Pass function overload
eb66be0e 2156 questions to new overloading code if NEW_OVER.
594740f3 2157 * init.c (expand_aggr_init_1): Only check for type conversion ops
eb66be0e
MS
2158 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
2159 Don't check for ambiguity with constructor if NEW_OVER.
594740f3 2160 * cvt.c (convert_to_reference): Dereference the result of a type
eb66be0e 2161 conversion operator.
594740f3
MS
2162 (build_conv): Propagate ICS_USER_FLAG.
2163 (implicit_conversion): Call instantiate_type.
2164 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
2165 (add_function_candidate): Fix cv-quals on argtype.
2166 (print_z_candidates): New function.
2167 (build_new_function_call): Call it.
2168 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
2169 consider non-converting constructors.
2170 Call print_z_candidates.
2171 Return an AMBIG_CONV for an ambiguous conversion.
2172 (build_user_type_conversion): Handle AMBIG_CONV.
2173 (convert_like): Fix test for building TARGET_EXPR.
2174 Call instantiate_type.
2175 Handle AMBIG_CONV and LVALUE_CONV.
2176 (build_over_call): Handle 0 args and ellipsis.
2177 * cp-tree.def: Add AMBIG_CONV.
2178
e92cc029
MS
2179Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
2180
2181 * decl.c (lookup_name_real): If we find mem in obj when parsing
eb66be0e 2182 `obj->mem', make sure we return the right value.
e92cc029
MS
2183
2184Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
2185
2186 * search.c (get_base_distance): Call complete_type.
2187
2188Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
2189
2190 * decl.c (store_bindings): Make static.
2191
2192Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2193
2194 * init.c (expand_aggr_init_1): Don't check type conversions if
eb66be0e 2195 NEW_OVER.
e92cc029
MS
2196
2197 * cvt.c (z_candidate): Put back template field.
2198 (add_function_candidate): Set it.
2199 (add_template_candidate): Likewise.
2200 (joust): Use it.
2201 (compare_qual): Handle references and pointers to members.
2202 (compare_ics): Handle reference bindings.
2203
2204 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
2205
2206Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
2207
2208 * call.c (compute_conversion_costs): Call complete_type.
2209
2210 * tree.c (vec_binfo_member): Use comptypes instead of comparing
eb66be0e 2211 pointers, so we can handle template parameters.
e92cc029
MS
2212
2213Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
2214
2215 * cvt.c (cp_convert_to_pointer): We have to call complete_type
2216 here; let's make it explicit instead of a side effect of an
2217 error check.
2218
2219Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2220
2221 * cvt.c (z_candidate): Remove template field.
2222 (reference_binding): Handle binding to temporary.
2223 (implicit_conversion): Likewise.
2224 (add_function_candidate): Handle artificial constructor parms.
2225 Handle functions with too few parms.
2226 (add_template_candidate): New function.
2227 (build_user_type_conversion_1): Handle constructors.
2228 (convert_like): Likewise.
2229 (build_over_call): Likewise.
2230 (build_new_function_call): Support templates.
2231 (compare_ics): Fix reference, inheritance handling.
2232
2233Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
2234
2235 * decl.c: Add signed_size_zero_node.
2236 (init_decl_processing): Build it.
2237 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
eb66be0e 2238 when we're trying to make a negative delta.
e92cc029
MS
2239
2240Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2241
2242 Stop doing this damn index==strchr variable name confusion.
2243 * class.c (add_virtual_function): Change local var INDEX to be
2244 named IDX.
2245 (add_method): Likewise.
2246 * lex.c (print_parse_statistics): Likewise.
2247 * search.c (make_memoized_table_entry): Likewise.
2248 (lookup_fnfields_here): Likewise.
2249 (lookup_field): Likewise.
2250 (lookup_fnfields): Likewise.
2251 (get_baselinks): Likewise.
2252 * sig.c (build_signature_table_constructor): Likewise.
2253 (build_signature_method_call): Likewise.
2254 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
2255 (get_member_function_from_ptrfunc): Likewise.
2256 (build_ptrmemfunc): Change local var INDEX to be IDX.
2257 (c_expand_start_case): Likewise.
2258
2259Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2260
2261 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
eb66be0e 2262 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
e92cc029 2263 (convert_to_reference): Use build_type_conversion to convert to
eb66be0e 2264 the reference type directly.
e92cc029
MS
2265 (standard_conversion): Fix void* case, non-conversions.
2266 (reference_binding): Fix expr == 0 case, non-conversions.
2267 (convert_like): Support REF_BIND.
2268 (compare_qual): Split out from compare_ics.
2269 (compare_ics): Use it, handle icses with only a qual_conv.
2270
2271 * init.c (expand_vec_init): Don't crash if decl is NULL.
2272
2273Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
2274
2275 * mpw-config.in: New file, configury for Mac MPW.
2276 * mpw-make.sed: New file, makefile editing for MPW.
2277
2278Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2279
2280 * pt.c (instantiate_class_template): Call repo_template_used.
2281
2282 * search.c (lookup_conversions): Only lookup conversions in
eb66be0e 2283 complete types.
e92cc029
MS
2284
2285Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2286
2287 * cp-tree.def: Renamed from tree.def, to avoid confusion with
2288 gcc's tree.def.
2289 * cp-tree.h, lex.c: Include cp-tree.def.
2290 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
2291
2292Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
2293
2294 * init.c (build_vec_delete_1): Call complete_type.
2295
2296Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
2297
2298 * except.c (start_anon_func): Make sure anonymous functions are
eb66be0e 2299 never external.
e92cc029
MS
2300
2301Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2302
2303 * decl.c (finish_function): If function_depth > 1, set nested.
2304
2305 * decl2.c (grokbitfield): Revert Bob's change.
2306 * class.c (finish_struct_1): Fix handling of named bitfield widths.
2307
2308Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2309
2310 * pt.c (add_pending_template): Handle types.
2311 (lookup_template_class): With -fexternal-templates, just add the class
2312 to pending_templates instead of instantiating it now.
2313 * decl2.c (finish_file): Handle types in pending_templates.
2314
2315Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
2316
2317 * decl2.c (grokbitfield): Handle constant decls appropriately.
eb66be0e
MS
2318 Give an appropriate error message now instead of spewing core
2319 later.
e92cc029
MS
2320
2321Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2322
2323 * decl2.c: Don't turn on thunks by default for now.
2324
2325Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
2326
2327 * typeck.c (complete_type): Handle error_mark_node.
2328 (common_type, OFFSET_TYPE): Handle template_type_parms.
2329
2330Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2331
2332 * pt.c (instantiate_decl): If at_eof, call import_export_decl
eb66be0e 2333 regardless of DECL_INLINE.
e92cc029
MS
2334
2335 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
2336
2337 * class.c (finish_struct_bits): Copy TYPE_SIZE.
2338
2339 * rtti.c (build_dynamic_cast): Support templates.
2340 * tree.def: Support DYNAMIC_CAST_EXPR.
2341 * pt.c (tsubst_copy): Likewise.
2342 * decl2.c (build_expr_from_tree): Likewise.
2343
2344Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2345
2346 * typeck.c (build_static_cast): Support templates.
2347 (build_const_cast): Likewise.
2348 * tree.def: Support CONST/STATIC_CAST_EXPR.
2349 * pt.c (tsubst_copy): Likewise.
2350 * decl2.c (build_expr_from_tree): Likewise.
2351
2352Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2353
2354 * decl2.c (finish_vtable_vardecl): Don't trust
eb66be0e 2355 TREE_SYMBOL_REFERENCED for vtables of local classes.
e92cc029
MS
2356
2357Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2358
2359 * pt.c (tsubst_copy): Handle operator T.
2360
2361Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2362
2363 * init.c (build_delete): Move creation of PARMS inside test of
2364 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
2365
2366Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
2367
2368 * typeck.c (build_conditional_expr): Don't assume that
2369 the arguments to ?: are always pointers or records.
2370
2371Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2372
2373 * decl2.c (import_export_decl): Still emit static/weak/comdat
eb66be0e 2374 copies of inline template functions with -fno-implicit-templates.
e92cc029
MS
2375
2376Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
2377
2378 * init.c (build_delete): Determine the complete basetype
2379 path to the destructor we're calling.
2380
2381Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
2382
2383 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
eb66be0e
MS
2384 initialize the enum, because we really and truly don't know where
2385 it came from.
e92cc029 2386 (start_enum): Don't copy integer_zero_node because
eb66be0e 2387 build_enumerator will do it.
e92cc029
MS
2388
2389Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2390
2391 * decl.c (finish_function): Do access control on base destructors.
2392
2393 * pt.c (tsubst, case FUNCTION_DECL): Set up
eb66be0e
MS
2394 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
2395 hose us.
e92cc029
MS
2396
2397Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
2398
2399 * cvt.c (build_up_reference): If we have already extended the
eb66be0e 2400 lifetime of the temporary, don't try it again.
e92cc029
MS
2401 * typeck.c (c_expand_return): Don't try and convert the return
2402 value twice when we want a reference, once is enough.
2403
a0128b67
MS
2404Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
2405
2406 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
eb66be0e 2407 LOOKUP_ONLYCONVERTING at all for now.
a0128b67
MS
2408
2409 * search.c (add_conversions): Put the conversion function in
eb66be0e 2410 TREE_VALUE, the basetype in TREE_PURPOSE.
a0128b67
MS
2411 * cvt.c (build_type_conversion): Adjust.
2412 * cvt.c (build_expr_type_conversion): Adjust.
2413 * call.c (user_harshness): Adjust.
2414
2415Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2416
2417 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
eb66be0e 2418 backend's benefit.
a0128b67 2419
14548a19
MS
2420Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
2421
2422 * except.c (expand_start_catch_block): Add a dummy region, if we
2423 get an error, so that we can avoid core dumping later.
2424
a0128b67
MS
2425Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
2426
2427 * cp-tree.h (OFFSET_REF): Remove.
2428 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
2429 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
d11ad92e
MS
2430 * init.c (expand_aggr_init_1): Likewise.
2431 (build_new): Likewise.
2432 * typeck.c (expand_target_expr): Likewise.
a0128b67
MS
2433
2434Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2435
2436 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
eb66be0e 2437 TARGET_EXPR.
a0128b67 2438
e349ee73
MS
2439Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
2440
2441 * cvt.c (build_up_reference): Redo how and when temporaries are
2442 created.
2443 * decl.c (grok_reference_init): Don't try and be smart about
2444 running cleanups.
2445
2446Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
2447
2448 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
2449 (TARGET_EXPR...), now that it has 4 arguments.
d11ad92e 2450 * tree.c (build_cplus_new): Likewise.
e349ee73
MS
2451
2452Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2453
2454 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
2455
2456 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
2457 * decl.c (struct saved_scope): Remove named_labels,
2458 {base,member}_init_list.
2459 (maybe_push_to_top_level): Don't set them. Call
2460 push_cp_function_context if appropriate.
2461 (pop_from_top_level): Likewise.
2462
2463 * method.c (do_build_assign_ref): Remove obsolete check of
2464 TYPE_HAS_ASSIGN_REF (basetype).
2465
2466 * decl.c (grokfndecl): Diagnose user definition of
eb66be0e 2467 implicitly-declared methods.
e349ee73
MS
2468
2469Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
2470
2471 * method.c (do_build_copy_constructor): Add code to give
eb66be0e
MS
2472 meaningful error messages instead of crashing.
2473 (do_build_assign_ref): Don't synthesize assignment operators for
2474 classes containing reference or const members.
e349ee73
MS
2475
2476 * class.c (struct base_info): Remove cant_synth_copy_ctor
2477 and cant_synth_asn_ref.
2478 (finish_base_struct): Remove the code that tries to conditionalize
eb66be0e
MS
2479 synthesis of copy constructors & assignment operators based on
2480 access permissions. Instead, let it fail when it tries to
2481 synthesize the copy constructor. This will give meaningful error
2482 messages instead of silently generating code to perform a bitcopy.
e349ee73
MS
2483
2484Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
2485
2486 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
eb66be0e 2487 determining types for constant values.
e349ee73
MS
2488
2489 * decl.c (struct named_label_list): Use instead of stuffing
2490 random items into a TREE_LIST node.
2491 (named_label_uses): Use the new struct.
d11ad92e
MS
2492 (poplevel): Likewise.
2493 (lookup_label): Likewise.
e349ee73 2494 (define_label): Add an error message to tell the user the line
eb66be0e
MS
2495 where the goto is located in addition to the destination of the
2496 goto.
e349ee73
MS
2497 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
2498 named_label_uses.
d11ad92e 2499 (finish_function): Likewise.
e349ee73
MS
2500
2501 (start_decl): Complain about defining a static data member
2502 in a different type from which it was declared.
2503
2504Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2505
2506 * cvt.c (build_expr_type_conversion): Adjust.
2507
2508Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2509
2510 * call.c (build_method_call): Always convert 'this' to the
eb66be0e 2511 appropriate type.
e349ee73
MS
2512
2513 * search.c (add_conversions): Put the conversion function in
eb66be0e 2514 TREE_VALUE, the type in TREE_PURPOSE.
e349ee73
MS
2515 * cvt.c (build_type_conversion): Adjust.
2516 * call.c (user_harshness): Adjust.
2517
2518 * method.c (emit_thunk): Call temporary_allocation and
eb66be0e 2519 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
e349ee73
MS
2520
2521 * tree.c (build_cplus_array_type): Handle tweaking of
eb66be0e 2522 TYPE_MAIN_VARIANT here.
e349ee73
MS
2523 * typeck.c (common_type): Not here.
2524
2525 * typeck.c (complete_type): Only try to complete an array type if
eb66be0e 2526 it has a domain.
e349ee73
MS
2527
2528Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
2529
2530 * decl.c (grokvardecl): Call complete_type.
2531 (grokdeclarator): Call complete_type for PARM_DECLs.
2532
2533Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
2534
2535 * pt.c (instantiate_class_template): Re-set
eb66be0e 2536 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
e349ee73
MS
2537
2538Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
2539
2540 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
2541 smart enough to do it right.
d11ad92e 2542 * tree.c (cp_expand_decl_cleanup): Likewise.
e349ee73
MS
2543 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
2544 cp_expand_decl_cleanup.
d11ad92e
MS
2545 (store_parm_decls): Likewise.
2546 (hack_incomplete_structures): Likewise.
2547 * except.c (push_eh_cleanup): Likewise.
e349ee73
MS
2548
2549Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
2550
2551 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
2552 frontend to the backend where it belongs.
d11ad92e
MS
2553 * tree.c (unsave_expr): Likewise.
2554 (unsave_expr_now): Likewise.
2555 * tree.def (UNSAVE_EXPR): Likewise.
2556 * cp-tree.h (unsave_expr): Likewise.
2557 (unsave_expr_now): Likewise.
e349ee73
MS
2558
2559Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
2560
2561 * init.c (emit_base_init): Make sure the partial EH cleanups live
2562 on the function_obstack.
2563
ce122a86
MS
2564Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
2565
2566 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
2567 when checking for pointer types.
2568
2569Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2570
2571 * pt.c (instantiate_class_template): Remove obsolete check for
eb66be0e 2572 access declarations.
ce122a86
MS
2573
2574Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
2575
2576 * call.c (build_overload_call): Simplify calls to
2577 build_overload_call by removing last parameter.
d11ad92e
MS
2578 (build_method_call): Likewise.
2579 * cp-tree.h: Likewise.
2580 * method.c (build_opfncall): Likewise.
2581 * typeck.c (build_x_function_call): Likewise.
ce122a86
MS
2582
2583Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
2584
2585 * call.c (default_parm_conversions): Factor out common code.
2586 (build_method_call): Use it.
2587 (build_overload_call_real): Use it.
2588
4ac14744
MS
2589Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
2590
2591 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
2592 but pedwarn as the code is bogus.
d11ad92e 2593 * typeck.c (decay_conversion): Likewise.
4ac14744
MS
2594 (build_function_call_real): Use build_addr_func instead of
2595 default_conversion. Don't allow pointer-to-method functions down
2596 here.
2597 (build_unary_op): Use real pointer-to-member functions instead of
2598 fake ones.
2599 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
2600 (convert_for_assignment): Removed some obsolete code.
2601 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
2602 build_x_function_call instead of current_class_ptr. Only call
2603 digest_init once on an initializer, we do this just checking
2604 TREE_TYPE.
2605 (build_expr_from_tree): Pass current_class_ref to
2606 build_x_function_call instead of current_class_ptr.
d11ad92e
MS
2607 * init.c (build_member_call): Likewise.
2608 * pase.y: Likewise.
4ac14744
MS
2609 * error.c (dump_expr): Handle OFFSET_REFs better.
2610 * pt.c (unify): Handle pointer-to-member functions better.
2611 * decl.c (finish_function): Clear out current_class_ref just like
2612 we do for current_class_ptr.
2613
2614 * typeck.c (get_delta_difference): Handle virtual bases better.
2615
2616Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
2617
2618 * sig.c (build_signature_table_constructor): Use the delta for
2619 the original basetype for this virtual function with thunks.
2620 (build_signature_method_call): We still need to adjust 'this'
2621 with thunks.
2622
2623Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
2624
2625 * call.c (build_addr_func): New routine. Used to get the `real'
2626 address of a function or a method. Needed to avoid getting a
2627 pointer-to-member function.
2628 (build_call): New routine to build CALL_EXPRs.
2629 (build_method_call): Use it.
d11ad92e
MS
2630 * cvt.c (convert_to_aggr): Likewise.
2631 * typeck.c (build_function_call_real): Likewise.
4ac14744
MS
2632 * sig.c (build_signature_table_constructor): Use build_addr_func.
2633 * cp-tree.h (build_call, build_addr_func): Declare them.
2634
2635Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
2636
2637 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
2638 * parse.y: Remove uses of LOOKUP_AGGR.
2639
2640Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
2641
2642 * *.[chy]: Rename current_class_decl to current_class_ptr, and
2643 C_C_D to current_class_ref.
2644
2645Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2646
2647 * call.c (convert_harshness): Tighten up pointer conversions.
2648
2649Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
2650
2651 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
2652 (finish_file): Likewise.
2653
2654Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2655
2656 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
2657
2658 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
eb66be0e 2659 code.
4ac14744
MS
2660
2661Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2662
2663 * decl2.c: Turn on thunks by default where supported.
2664
4dabb379
MS
2665Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
2666
2667 * cp-tree.h (build_overload_call_maybe): Removed.
2668 * call.c (build_overload_call_real): Invert meaning of last arg to
2669 be require_complete.
d11ad92e 2670 (build_overload_call): Likewise.
4dabb379
MS
2671 * typeck.c (build_x_function_call): Use build_overload_call_real
2672 instead of build_overload_call_maybe.
2673
a50f0918
MS
2674Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2675
2676 * decl2.c (finish_file): Don't try to emit functions that haven't
eb66be0e 2677 been compiled.
a50f0918
MS
2678
2679Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2680
2681 * decl2.c (finish_vtable_vardecl): Oops.
2682
2683 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
eb66be0e 2684 Also store the bindings from previous_class_values.
a50f0918
MS
2685 (pop_from_top_level): Restore them.
2686
2687Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2688
2689 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
eb66be0e 2690 symbol has been referenced.
a50f0918
MS
2691 (finish_file): Re-join synthesis/vtable loop with inline emission
2692 loop, disable inlining when an inline is output.
2693
2694Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
2695
2696 * except.c (init_exception_processing): Setup saved_in_catch.
2697 (push_eh_cleanup): Reset __eh_in_catch.
2698 (expand_start_catch_block): Set __eh_in_catch.
2699
2700Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
2701
2702 * except.c (push_eh_cleanup): Add tracking for whether or not we
2703 have an active exception object.
2704 (expand_builtin_throw): Use it to make sure a rethrow without an
2705 exception object is caught.
2706
2707Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
2708
2709 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
eb66be0e 2710 cache.
a50f0918 2711
809c8c30
JM
2712Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2713
2714 * decl2.c (finish_file): Also use sentries for vars with
eb66be0e
MS
2715 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
2716 created).
809c8c30
JM
2717
2718 * lex.c (handle_cp_pragma): Disable #pragma
eb66be0e 2719 interface/implementation if SUPPORTS_ONE_ONLY > 1.
809c8c30
JM
2720
2721Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2722
2723 * method.c (emit_thunk): Wrap default case in
eb66be0e 2724 temporary/permanent_allocation.
809c8c30
JM
2725
2726 * method.c (make_thunk): Use DECL_ONE_ONLY.
2727 (emit_thunk): Call assemble_end_function.
2728
46b02c6d
MS
2729Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2730
2731 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
d11ad92e 2732 (import_export_decl): Likewise.
46b02c6d
MS
2733 (finish_prevtable_vardecl): Disable vtable hack if
2734 SUPPORTS_ONE_ONLY > 1.
2735
2736Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
2737
2738 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
2739 PREDECREMENT_EXPRs take two arguments, not one.
2740
2741Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
2742
2743 * class.c (build_vtable_entry): Don't build thunks for abstract
eb66be0e 2744 virtuals.
46b02c6d
MS
2745
2746 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
eb66be0e 2747 frontend.
46b02c6d
MS
2748
2749Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2750
2751 * class.c (set_rtti_entry): Use size_zero_node.
d11ad92e 2752 (build_vtable): Likewise.
46b02c6d
MS
2753
2754Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
2755
2756 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
d11ad92e 2757 (prepare_fresh_vtable): Likewise.
46b02c6d
MS
2758
2759Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
2760
2761 * method.c (emit_thunk): Call mark_used on the target function.
2762
2763 * call.c (build_method_call): Don't warn about pending templates.
2764
c7690c68
JM
2765Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2766
2767 * decl2.c (finish_file): Fix list walking logic.
2768
46b02c6d
MS
2769 * typeck2.c (check_for_new_type): Only warn if -pedantic.
2770
2771Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
2772
2773 * class.c (finish_struct_1): Remove old code for
2774 dont_allow_type_definitions.
d11ad92e 2775 * cp-tree.h: Likewise.
46b02c6d
MS
2776 * spew.c: Make sure cp-tree.h is included before parse.h, so the
2777 definition of flagged_type_tree is found before it is used.
d11ad92e 2778 * lex.c: Likewise.
46b02c6d 2779 * parse.y: Added the ftype member to the type union, and changed a
eb66be0e 2780 number of rules to use it instead of ttype. Added calls to
46b02c6d
MS
2781 check_for_new_type() as appropriate.
2782 * typeck2.c (check_for_new_type): New function for checking
2783 if a newly defined type appears in the specified tree.
2784 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
2785 for check_for_new_type().
2786
67d743fe
MS
2787Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2788
c7690c68
JM
2789 * decl2.c (finish_file): Only use a sentry if the decl is public.
2790
67d743fe
MS
2791 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
2792 don't pass LOOKUP_ONLYCONVERTING.
2793
2794Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
2795
2796 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
2797 properly keeps track of const and volatile type modifiers.
2798
2799Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2800
2801 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
2802 * pt.c (comp_template_args): Use it.
2803
2804 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
2805 assemble_external for artificial function decls.
2806
2807 * decl.c (cp_finish_decl): Oops.
2808
2809Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2810
2811 * decl2.c (import_export_decl): Put static data member templates
eb66be0e
MS
2812 into common storage, or make them weak, depending on whether they
2813 are dynamically or statically initialized.
67d743fe
MS
2814 (get_sentry): New function.
2815 (finish_file): Do import_export_decl for static data members before
2816 building the init/fini functions. Don't init/fini a variable that's
2817 EXTERNAL. Use a sentry for variables in common. Fix mismatching
2818 push/pop_temp_slots.
2819 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
eb66be0e 2820 expand_static_init thang.
67d743fe
MS
2821 * method.c (get_id_2): New function.
2822
2823Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
2824
2825 * parse.y (empty_parms): Make sure we use C++-style prototypes
eb66be0e 2826 when we're declaring member functions.
67d743fe
MS
2827
2828Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2829
2830 * Makefile.in (CONFLICTS): 16 s/r conflicts.
2831 * parse.y (self_template_type): New nonterminal.
2832
a80e4195
MS
2833Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2834
2835 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
eb66be0e 2836 name.
a80e4195
MS
2837 * parse.y (base_class.1): Allow 'typename foo::bar'.
2838
2839 * lex.c (check_newline): Remove #pragma code that plays with the
eb66be0e
MS
2840 input stream, since we now deal with tokens. Clear nextchar when
2841 we're done.
a80e4195
MS
2842 (handle_cp_pragma): Use real_yylex.
2843 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
2844 in one place.
2845
2846 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
2847
2848 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
2849
2850Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2851
2852 * parse.y: New token SELFNAME for potential constructor.
2853 * spew.c (yylex): Handle it.
2854 * lex.c (identifier_type): Produce it.
2855
2856 * parse.y (complete_type_name): In :: case, don't push class binding.
d11ad92e 2857 (complex_type_name): Likewise.
a80e4195
MS
2858
2859Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
2860
2861 * typeck.c (build_reinterpret_cast): Handle pointer to member
eb66be0e 2862 functions.
a80e4195
MS
2863
2864Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
2865
2866 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
eb66be0e 2867 pragmas.
f72bbc37 2868 (check_newline): Put the vtable/unit/implementation/interface pragma
eb66be0e 2869 code into handle_cp_pragma, replacing it with a call.
f72bbc37 2870 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
eb66be0e 2871 args. Get the next token after handling the pragma token.
a80e4195
MS
2872
2873Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2874
2875 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
d11ad92e 2876 (convert_to_pointer_force): Likewise.
a80e4195
MS
2877
2878 * init.c (build_new): Fix array new without -fcheck-new.
2879
2880Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2881
2882 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
2883 tree.c: Lose TYPE_NESTED_NAME.
2884
2885 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
2886 as identifiers.
2887
2888 * tree.def: Add VEC_INIT_EXPR.
2889 * expr.c (cplus_expand_expr): Handle it.
2890 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
eb66be0e 2891 the extra file-scope symbol nastiness.
a80e4195
MS
2892
2893Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2894
2895 * method.c (make_thunk): Thunks are static.
2896 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
2897
2898 * decl2.c (mark_vtable_entries): Emit thunks as needed.
2899 (finish_file): Don't emit them here.
2900
2901Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2902
2903 * rtti.c (build_dynamic_cast): Handle null pointers.
2904 (ifnonnull): New function.
f72bbc37 2905
6b5fbb55
MS
2906Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
2907
a80e4195 2908 * call.c (build_method_call): Remember the original basetype we
eb66be0e
MS
2909 were called with. Give an error message instead of trying
2910 (incorrectly) to call a non-static member function through a
2911 non-inherited class.
a80e4195 2912
6b5fbb55
MS
2913 * search.c (expand_upcast_fixups): Mark the new fixup as
2914 DECL_ARTIFICIAL.
2915
2916Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2917
2918 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
2919
2920 * class.c (set_rtti_entry): Fix for thunks.
2921
2922 * decl2.c (import_export_decl): Still emit typeinfo fns for
2923 cv-variants of builtin types.
2924
2925 * rtti.c (expand_class_desc): Set up base_info_type_node here.
2926 (init_rtti_processing): Instead of here.
2927
2928Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2929
2930 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
2931 (build_typeid): Only complain about taking dynamic typeid without
2932 -frtti.
2933
2934 * decl2.c: flag_rtti defaults to 1.
2935
2936 * rtti.c (get_tinfo_var): The general class case is now smaller.
2937 (init_rtti_processing): Pack the latter three fields of base_info
2938 into 32 bits.
2939
2940Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
2941
2942 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
2943
2944Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
2945
2946 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
2947 (push_memoized_context): Split out code to undefer pop_type_level to
2948 (clear_memoized_cache): here.
2949 (pop_memoized_context): We can only handle one layer of deferral of
2950 pop_type_level so clear the cache, if there was a previous level.
2951
2952Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2953
2954 * rtti.c (init_rtti_processing): Build up base_info_type_node.
2955 (expand_class_desc): Use one pointer to an array of base_info
2956 structs, passed using a CONSTRUCTOR.
2957
2958Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
2959
2960 * class.c (build_vbase_path): Remove block extern for
2961 flag_assume_nonnull_objects here.
2962 (build_vfn_ref): Split out functionality into build_vtbl_ref.
2963 (build_vtbl_ref): New routine.
2964 (build_vtable): Set up rtti info here.
2965 (add_virtual_function): Note in CLASSTYPE_RTTI the best
2966 place where we can get the rtti pointers from to avoid having to
2967 search around for a place.
d11ad92e
MS
2968 (finish_base_struct): Likewise.
2969 (finish_struct_1): Likewise. Never create totally new vtables
2970 with totally new vtable pointers for rtti. Disable code to layout
2971 vtable pointers better until we want to break binary
2972 compatibility.
6b5fbb55
MS
2973 * rtti.c (build_headof_sub): New routine to convert down to a
2974 sub-object that has an rtti pointer in the vtable.
2975 (build_headof): Use it. Also, use build_vtbl_ref now to be more
2976 maintainable.
2977 (build_dynamic_cast): Make sure we have saved it, if we need to.
2978 * search.c (dfs_init_vbase_pointers): Disable code that deals with
2979 a more efficient vtable layout, enable later.
2980 * call.c (flag_assume_nonnull_objects): Moved declaration to
2981 * cp-tree.h: here. Declare build_vtbl_ref.
2982 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
2983 function calls that want a tree.
2984
2985Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2986
2987 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
eb66be0e 2988 other X subobjects in the most derived type. Ack.
6b5fbb55
MS
2989
2990 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
eb66be0e 2991 get_typeid will do it for us.
6b5fbb55
MS
2992 (get_typeid_1): Break out call-building for expand_*_desc to use.
2993 (get_typeid): Call it.
d11ad92e 2994 (expand_*_desc): Likewise.
6b5fbb55 2995 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
eb66be0e 2996 and void *.
6b5fbb55
MS
2997 (init_decl_processing): Lose builtin_type_tdescs lossage.
2998 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
2999
3000Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
3001
3002 * pt.c (tsubst): When calling set_nested_typename, use
eb66be0e
MS
3003 TYPE_NESTED_NAME (current_class_type) instead of
3004 current_class_name.
6b5fbb55 3005
d11ad92e
MS
3006 * decl.c (pushdecl): Likewise.
3007 (pushdecl_class_level): Likewise.
6b5fbb55
MS
3008 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
3009 set_nested_typename.
3010
3011Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
3012
3013 * rtti.c (synthesize_tinfo_fn): Handle arrays.
3014
3015 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
3016
3017Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
3018
3019 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
3020 (init_rtti_processing): Lose bad_cast_type.
3021 (build_dynamic_cast): Use throw_bad_cast.
3022
3023 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
3024
3025 * decl2.c (finish_file): Don't synthesize artificial functions
eb66be0e 3026 that are external and not inline.
6b5fbb55
MS
3027
3028 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
3029
3030 * decl2.c (finish_file): Handle having new inlines added to
eb66be0e 3031 saved_inlines by synthesis.
6b5fbb55
MS
3032
3033 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
3034
3035Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3036
3037 RTTI rewrite to initialize nodes as needed, not require that
3038 users #include <typeinfo>, complete functionality and reduce wasted
3039 space.
3040 * rtti.c (init_rtti_processing): New fn.
3041 (build_typeid): The vtable entry is now a function.
3042 (get_tinfo_var): New fn.
d11ad92e 3043 (get_tinfo_fn): Likewise.
6b5fbb55
MS
3044 (get_typeid): Use it.
3045 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
3046 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
3047 points __rtti_*.
3048 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
3049 (synthesize_tinfo_fn): New fn.
3050 * method.c (build_t_desc_overload): Lose.
3051 (build_overload_with_type): More generic.
3052 * decl.c (init_decl_processing): Call init_rtti_processing.
3053 * class.c (set_rtti_entry): Use get_tinfo_fn.
3054 * decl2.c (mark_vtable_entries): Mark the rtti function.
3055 (finish_prevtable_vardecl): Don't build_t_desc.
3056 (import_export_decl): Handle tinfo functions.
d11ad92e 3057 (finish_file): Likewise.
6b5fbb55
MS
3058 * typeck.c (inline_conversion): New fn.
3059 (build_function_call_real): Use it.
3060 * cp-tree.h: Add decls.
3061
3062 * method.c (hack_identifier): Also convert component_refs from
eb66be0e 3063 references.
6b5fbb55
MS
3064
3065 * lex.c (cons_up_default_function): Use the type, not the name, in
eb66be0e 3066 declspecs.
6b5fbb55
MS
3067
3068 * decl2.c (import_export_vtable): Fix weak vtables.
3069
3070Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
3071
3072 * search.c (get_base_distance_recursive): Fix access checks for
eb66be0e 3073 protected bases.
6b5fbb55
MS
3074
3075Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3076
3077 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
3078 cp-tree.h.
3079 (convert_harshness): Add prototypes wrapped by PROTO.
3080 * decl2.c (grok_function_init): Likewise.
3081 (do_toplevel_using_decl): Change to void return type.
3082 * class.c (build_vtable_entry): Remove decl of make_thunk.
3083 (merge_overrides): Fix order of arg definitions.
3084 (finish_vtbls): Likewise.
3085 (fixup_vtable_deltas): Likewise.
3086 (modify_all_direct_vtables): Likewise.
3087 (modify_all_indirect_vtables): Likewise.
3088 * search.c (get_base_distance_recursive): Likewise.
3089 (get_abstract_virtuals_1): Likewise.
3090 (fixup_virtual_upcast_offsets): Likewise.
3091 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
3092 * init.c (perform_member_init): Fix order of arg definitions.
3093 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
3094 * cp-tree.h (make_thunk): Add decl.
3095 (overload_template_name, push_template_decl): Add decls.
3096 (do_toplevel_using_decl): Change to void return type.
3097 (vec_binfo_member): Add decl.
3098
cdf5b885
MS
3099Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3100
3101 * typeck.c (mark_addressable, convert_for_assignment,
3102 convert_for_initialization, pointer_int_sum, pointer_diff,
3103 unary_complex_lvalue): Add prototypes wrapped by PROTO.
3104 (convert_sequence): #if 0 fn decl, since definition also is.
3105
3106Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
3107
3108 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
3109 cast to pointer types for type searching.
3110
3111Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3112
3113 * typeck.c (get_delta_difference): Use cp_error, not error, in the
3114 case where BINFO == 0.
3115
3116Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
3117
3118 * call.c (build_method_call): Fix wording of error messages so
3119 constructors come out right.
3120
3121Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
3122
3123 * decl.c (push_overloaded_decl): Don't warn about hidden
3124 constructors when both the type and the function are declared
3125 in a system header file.
3126
c91a56d2
MS
3127Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
3128
3129 * class.c (finish_struct_1): Propagate the TYPE_PACKED
3130 flag for the type to the type's fields.
3131
3132Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3133
3134 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
3135
3136Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
3137
3138 * class.c (base_info, finish_base_struct): Replace
3139 needs_virtual_dtor with base_has_virtual.
3140
3141 (finish_struct_1): Remove the old code that tried to make default
eb66be0e
MS
3142 destructors virtual. Use base_has_virtual when checking if we need
3143 to add a vtable entry for the rtti code.
c91a56d2
MS
3144
3145Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
3146
3147 * pt.c (push_template_decl): Complain about template decl with
eb66be0e 3148 inappropriate declaration.
c91a56d2
MS
3149
3150Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
3151
3152 * typeck.c (build_x_unary_op): Remove bogus check for taking
3153 the address of a member function.
3154
3155Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3156
3157 * parse.y (constructor_declarator): Only push the class if
3158 we are not already in the class.
3159
3160Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
3161
3162 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
3163 Add additional argument to INIT_CUMULATIVE_ARGS.
3164
c91a56d2
MS
3165Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
3166
3167 * decl.c (shadow_tag): Fix error about anon union with methods.
3168
3169 * parse.y (self_reference): Only generate a self-reference if this
eb66be0e 3170 is a non-template class.
c91a56d2
MS
3171 (opt.component_decl_list): Only use it if it was generated.
3172
3173 * parse.y (component_decl_1): Use constructor_declarator.
d11ad92e
MS
3174 (fn.def2): Likewise.
3175 (notype_component_declarator0): Likewise.
c91a56d2
MS
3176
3177Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
3178
3179 * typeck.c (build_x_unary_op): Add checks for taking the address
3180 of a TARGET_EXPR or of a member function, and give appropriate
3181 warnings.
3182
3183Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3184
3185 * pt.c (process_template_parm): Allow template type parms to be
eb66be0e 3186 used as types for template const parms.
c91a56d2
MS
3187
3188Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
3189
3190 * init.c (expand_vec_init): Ensure the eh cleanups are on the
3191 function_obstack.
3192
3193Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3194
3195 * decl.c (lookup_name_real): Be even more picky about the
eb66be0e 3196 ambiguous lookup warning.
c91a56d2
MS
3197 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
3198 * parse.y (constructor_declarator): Rather than here.
3199
3200 * parse.y (constructor_declarator): New nonterminal.
3201 (fn.def1): Use it.
d11ad92e 3202 (explicit_instantiation): Likewise.
c91a56d2
MS
3203
3204Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3205
3206 Add implicit declaration of class name at class scope.
3207 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
3208 * parse.y (self_reference): New nonterminal.
3209 (opt.component_decl_list): Use it.
3210 (fn.def1): Add nested_name_specifier type_name cases.
3211 * class.c (build_self_reference): New function.
3212 (finish_struct): Handle access_default later, move self-reference
3213 decl to the end.
3214 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
3215 * cp-tree.h: Adjust.
3216
3217 * pt.c (do_function_instantiation): Separate handling of member
eb66be0e 3218 functions and non-member functions properly.
c91a56d2
MS
3219
3220Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3221
3222 * pt.c (process_template_parm): Improve error for 'volatile class K'.
3223
3224 * class.c (finish_struct_1): Check the right slot for destructors.
3225
3226 * decl.c (start_enum): Complain about enum templates.
3227
3228Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
3229
3230 * init.c (resolve_offset_ref): Offset pointers to member data by one.
d11ad92e 3231 * typeck.c (unary_complex_lvalue): Likewise.
c91a56d2
MS
3232
3233Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
3234
3235 * typeck.c (c_expand_return): Check for a returned local
3236 array name, similar to the check for an ADDR_EXPR.
3237
3238Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3239
3240 * decl.c (cp_finish_decl): Don't build cleanups for static
eb66be0e 3241 variables here.
c91a56d2
MS
3242
3243Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
3244
3245 * typeck.c (build_modify_expr): Fix error messages to be more
3246 accurate.
3247 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
3248 assignment operators.
d11ad92e 3249 * error.c (assop_as_string): Likewise. Add support for `%Q' for
c91a56d2
MS
3250 assignment operators.
3251
909e536a
MS
3252Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
3253
c91a56d2 3254 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
eb66be0e
MS
3255 give an error if initialized. Pedwarn about nested type with the
3256 same name as its enclosing class.
c91a56d2 3257
909e536a
MS
3258 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
3259
3260 * typeck.c (require_complete_type): Be sure to instantiate the
eb66be0e 3261 MAIN_VARIANT of the type.
909e536a
MS
3262
3263 * decl2.c (finish_file): Instantiate pending templates before
eb66be0e 3264 processing static constructors and destructors.
909e536a
MS
3265
3266 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
eb66be0e 3267 unless at_eof.
909e536a
MS
3268
3269Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
3270
3271 * decl2.c (delete_sanity): If error_mark_node is passed
3272 in as an expression, quit while we're ahead.
3273
3274 * decl.c (grokdeclarator): Give an error message if `friend'
3275 is combined with any storage class specifiers.
3276
fc378698
MS
3277Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
3278
3279 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
eb66be0e 3280 definition of nonexistent nested type.
fc378698
MS
3281
3282 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
eb66be0e 3283 not to say 'typedef'.
fc378698
MS
3284
3285Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3286
3287 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
3288 * search.c (dfs_walk, dfs_init_vbase_pointers,
3289 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
3290 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
3291
3292Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3293
3294 * except.c (build_throw): Support minimal parse.
3295 * pt.c (tsubst_copy): Support THROW_EXPR.
d11ad92e 3296 * decl2.c (build_expr_from_tree): Likewise.
fc378698
MS
3297
3298 * pt.c (mangle_class_name_for_template): Always allocate
eb66be0e 3299 scratch_firstobj.
fc378698
MS
3300
3301Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
3302
3303 * cvt.c (cp_convert_to_pointer): Give an appropriate error
3304 when trying to cast from an incomplete type.
3305
3306Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3307
3308 * pt.c (instantiate_class_template): Don't bother setting up
eb66be0e
MS
3309 CLASSTYPE_TAGS explicitly, as the nested types will add
3310 themselves.
fc378698
MS
3311
3312Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
3313
3314 * decl.c (shadow_tag): Remove old error check for usage of
3315 an enum without a previous declaration.
3316 (xref_tag): Add error message about usage of enums without a
3317 previous declaration.
3318
3319Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3320
3321 * lex.c (do_identifier): Only do name consistency check if we're
eb66be0e 3322 parsing.
fc378698
MS
3323
3324 * pt.c (push_template_decl): Don't crash if we get a member defn
3325 that doesn't match.
3326
3327 * decl.c (xref_tag_from_type): New function to do an xref without
eb66be0e 3328 always having to figure out code_type_node.
fc378698
MS
3329 * cp-tree.h: Declare it.
3330 * pt.c (instantiate_class_template): Use it for friend classes.
eb66be0e 3331 (lookup_template_class): Use it.
fc378698
MS
3332
3333 * typeck2.c (build_functional_cast): Pull out a single parm before
eb66be0e 3334 passing it to build_c_cast.
fc378698
MS
3335
3336Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
3337
3338 * expr.c (do_case): Give an error message if a pointer is
3339 given as a case value.
3340
3341Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
3342
3343 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
eb66be0e 3344 an overload list.
fc378698
MS
3345
3346 * lex.c (cons_up_default_function): Really, now, interface hackery
eb66be0e 3347 does not apply to synthesized methods.
fc378698
MS
3348
3349Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
3350
3351 * call.c (build_method_call): Ctors and dtors now have special names
3352 with respect to lookups.
d11ad92e
MS
3353 * class.c (add_method): Likewise.
3354 (grow_method): Likewise.
3355 (finish_struct_methods): Likewise.
3356 (warn_hidden): Likewise.
3357 (finish_struct_1): Likewise.
3358 * cvt.c (convert_to_reference): Likewise.
3359 (convert_to_aggr): Likewise.
3360 (cp_convert): Likewise.
3361 * decl2.c (check_classfn): Likewise.
3362 * init.c (expand_member_init): Likewise.
3363 (expand_default_init): Likewise.
3364 (expand_aggr_init_1): Likewise.
3365 (build_offset_ref): Likewise.
3366 (build_new): Likewise.
3367 (build_delete): Likewise.
3368 * lex.c (do_inline_function_hair): Likewise.
3369 * search.c (lookup_field_1): Likewise.
3370 (lookup_fnfields_here): Likewise.
3371 (lookup_field): Likewise.
3372 (lookup_fnfields): Likewise.
3373 (get_virtual_destructor): Likewise.
3374 (dfs_debug_mark): Likewise.
3375 (dfs_pushdecls): Likewise.
3376 (dfs_compress_decls): Likewise.
3377 * tree.c (layout_basetypes): Likewise.
3378 * typeck.c (build_component_ref): Likewise.
3379 (build_x_function_call): Likewise.
3380 (build_modify_expr): Likewise.
3381 (convert_for_initialization): Likewise.
3382 (build_functional_cast): Likewise.
3383 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
fc378698
MS
3384 (CTOR_NAME): New.
3385 (DTOR_NAME): New.
3386 * decl.c (ctor_identifier): New.
3387 (dtor_identifier): New.
3388 (init_decl_processing): Set them.
3389
3390Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
3391
3392 * typeck.c (build_component_ref): Don't get confused by fields whose
3393 context has no type name, like pointer to member functions.
3394
3395Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3396
3397 * decl.c (grokdeclarator): Handle typedef without declarator.
3398
3399 * pt.c (tsubst): Handle SCOPE_REF in declarator.
3400
3401 * parse.y (bad_parm): Catch another case of missing `typename'.
3402
3403 * lex.c (yyprint): Handle TYPE_DECLs.
3404
3405 * decl.c (start_function): Don't try to be clever.
3406
3407 * lex.c: Lose compiler_error_with_decl.
3408 * typeck2.c: Lose error_with_aggr_type.
3409 (incomplete_type_error): Use cp_* instead of old functions.
d11ad92e
MS
3410 (readonly_error): Likewise.
3411 * typeck.c (convert_arguments): Likewise.
3412 * search.c (lookup_nested_field): Likewise.
3413 * method.c (make_thunk): Likewise.
3414 * decl.c (grokparms): Likewise.
fc378698
MS
3415 * cp-tree.h: Update.
3416
3417 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
eb66be0e 3418 and value.
fc378698
MS
3419
3420Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
3421
3422 * method.c (build_opfncall): When deleting a pointer to an
3423 array, build a new pointer to the tree past any ARRAY_TYPE
3424 nodes.
3425
3426Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3427
3428 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
3429
3430Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
3431
3432 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
eb66be0e 3433 and ! DECL_INLINE.
fc378698
MS
3434
3435 * decl.c (finish_function): Don't set nested based on
eb66be0e 3436 hack_decl_function_context.
fc378698 3437 * parse.y (function_try_block): Check for nested function.
d11ad92e 3438 (pending_inlines): Likewise.
fc378698
MS
3439
3440 * decl2.c (build_expr_from_tree): If a unary op already has a
eb66be0e 3441 type, just return it.
fc378698
MS
3442
3443 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
3444
3445 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
3446 (finish_file): Check the return value of walk_vtables.
3447 (finish_prevtable_vardecl): Return int.
d11ad92e
MS
3448 (finish_vtable_vardecl): Likewise.
3449 (prune_vtable_vardecl): Likewise.
3450 * lex.c (set_vardecl_interface_info): Likewise.
fc378698
MS
3451 * cp-tree.h: Adjust return types.
3452
3453 * class.c (delete_duplicate_fields_1): Don't complain about
eb66be0e 3454 duplicate nested types if they're the same type.
fc378698
MS
3455 (finish_struct): Remove check for duplicate.
3456 * decl2.c (grokfield): Don't check for typedef of anonymous type.
3457
3458Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3459
3460 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
3461
3462 * decl.c (grokdeclarator): Lose special handling of class-level
eb66be0e
MS
3463 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
3464 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
fc378698
MS
3465
3466 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
3467
3468 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
3469
3470 * search.c (compute_access): Fix handling of anonymous union
eb66be0e 3471 members.
fc378698 3472 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
eb66be0e 3473 from anonymous unions to their members.
fc378698
MS
3474
3475 * typeck.c (build_x_function_call): For static member functions,
eb66be0e 3476 hand off to build_member_call.
fc378698
MS
3477
3478Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
3479
3480 * typeck.c (build_component_ref): Handle OFFSET_REFs.
3481
3482 * init.c (expand_vec_init): Fix init == 0 case.
3483
3484Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3485
3486 * init.c (build_new): Pedwarn about init and array new.
3487 (expand_vec_init): Handle lists, use convert_for_initialization
3488
3489 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
eb66be0e 3490 when converting to an aggregate type.
fc378698
MS
3491 * cvt.c (cp_convert): Pass it through.
3492
3493 * typeck.c (build_conditional_expr): Handle user-defined
eb66be0e 3494 conversions to slightly different types.
fc378698
MS
3495
3496 * decl.c (grokdeclarator): Force an array type in a parm to be
eb66be0e 3497 permanent.
fc378698
MS
3498
3499 * decl2.c (do_using_directive): Sorry.
d11ad92e 3500 (do_namespace_alias): Likewise.
fc378698
MS
3501 * lex.c (real_yylex): Warn about using the `namespace' keyword.
3502
3503Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3504
3505 * parse.y (datadef): Move call to note_list_got_semicolon up.
3506
934c6b13
MS
3507Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
3508
3509 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
3510
3511Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
3512
3513 * decl.c (cp_finish_decl): The exception regions have to be
3514 nested, not overlapping. We start the exception region for a
3515 decl, after it has been fully built, and all temporaries for it
3516 have been cleaned up.
3517
3518Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
3519
3520 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
3521
e76a2646
MS
3522Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
3523
3524 * tree.def: Add RETURN_INIT.
3525 * pt.c (instantiate_decl): Handle RETURN_INIT.
3526 * decl.c (store_return_init): Handle minimal_parse_mode.
3527
3528 * tree.c (cp_build_type_variant): Just return an error_mark_node.
3529 * decl.c (make_typename_type): Don't try to get the file and line
eb66be0e 3530 of an identifier.
e76a2646
MS
3531 * typeck.c (comptypes): Handle TYPENAME_TYPE.
3532
3533Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
3534
3535 * decl.c (poplevel): Make sure we clear out and restore old local
3536 non-VAR_DECL values by default when they go out of scope.
3537
3538Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
3539
3540 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
eb66be0e 3541 referring to addresses of variables and functions.
e76a2646
MS
3542
3543 * error.c (dump_expr): Support SIZEOF_EXPR.
3544
3545 * init.c (do_friend): Use the return value of check_classfn.
3546
3547 * typeck.c (convert_arguments): Call complete_type.
3548
3549 * method.c (hack_identifier): After giving an error, set value to
eb66be0e 3550 error_mark_node.
e76a2646
MS
3551
3552Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3553
3554 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
eb66be0e 3555 lossage for local classes.
e76a2646
MS
3556 * cp-tree.h: Declare it.
3557 * decl.c (lookup_name_real): Evil, painful hack for local classes.
3558 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
3559 Use hack_decl_function_context.
3560 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
3561 (start_function): Use hack_decl_function_context.
d11ad92e
MS
3562 (finish_function): Likewise.
3563 * method.c (synthesize_method): Likewise.
3564 * lex.c (process_next_inline): Likewise.
3565 (do_pending_inlines): Likewise.
e76a2646 3566 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
eb66be0e 3567 done with it.
e76a2646
MS
3568
3569Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
3570
3571 * sig.c (build_signature_pointer_or_reference_type): Align
3572 signature pointers/references on 8-byte boundaries so they can be
3573 grabbed 2 words at a time on a Sparc.
3574
3575Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
3576
3577 * method.c (hack_identifier): Requiring a static chain is now a
eb66be0e 3578 hard error.
e76a2646 3579 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
eb66be0e 3580 functions.
e76a2646
MS
3581
3582Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3583
3584 * init.c (build_offset_ref): Call complete_type.
3585
3586 * decl.c (pop_from_top_level): Always pop previous_class_type.
3587
3588 * parse.y: Handle multiple decls in a for-init-statement.
d11ad92e 3589 * pt.c (tsubst_expr): Likewise.
e76a2646
MS
3590
3591 * pt.c (tsubst): Use tsubst_expr for the second operand of an
eb66be0e 3592 ARRAY_REF.
e76a2646
MS
3593
3594 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
3595 (poplevel_class): Set it here.
3596 (pop_from_top_level): Pop it here if we're returning to class scope.
3597 * class.c (pushclass): Don't set it here.
3598
3599 * decl.c (maybe_push_to_top_level): Save current_template_parms,
eb66be0e 3600 and clear it if !pseudo.
e76a2646
MS
3601 (pop_from_top_level): Restore it.
3602
3603 * decl2.c (finish_file): Push the dummy each time we walk the list
eb66be0e 3604 of vtables.
e76a2646
MS
3605
3606 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
eb66be0e 3607 something for CAST_EXPR.
e76a2646
MS
3608
3609Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3610
3611 * cvt.c (cp_convert): Warn about implicit conversion of the
3612 address of a function to bool, as it is always true.
3613
3614Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3615
3616 * typeck.c (c_expand_return): Fix warning for local externs returned.
3617
3618Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
3619
3620 * tree.c (mapcar): Propagate const and volatile properly.
3621
3622 * typeck.c (complete_type): Be sure to instantiate the
eb66be0e 3623 MAIN_VARIANT of the type.
e76a2646
MS
3624
3625 * method.c (synthesize_method): Class interface hackery does not
3626 apply to synthesized methods.
3627
3628Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
3629
3630 * pt.c (comp_template_args): Use comptypes rather than just
eb66be0e 3631 checking for TEMPLATE_TYPE_PARM equivalence.
e76a2646
MS
3632
3633 * typeck.c (build_x_function_call): Call complete_type before
eb66be0e 3634 checking TYPE_OVERLOADS_CALL_EXPR.
e76a2646 3635
7ea63af7
MH
3636Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
3637
3638 * g++.c (main): Check also for new define ALT_LIBM.
3639
ec255269
MS
3640Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3641
3642 * pt.c (instantiate_class_template): If we don't have a pattern
eb66be0e 3643 yet, that's OK.
ec255269
MS
3644 (coerce_template_parms): If we see a local class, bail.
3645
3646 * decl.c (grok_reference_init): Make sure there's a type before
eb66be0e 3647 checking its code.
ec255269
MS
3648
3649 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
d11ad92e 3650 (push_template_decl): Likewise.
ec255269
MS
3651
3652 * parse.y (named_class_head): Set
eb66be0e 3653 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
ec255269
MS
3654
3655 * decl.c (xref_tag): Diagnose redeclaration of template
eb66be0e 3656 type-parameter name.
ec255269
MS
3657
3658 * error.c (dump_type): Handle anonymous template type parms.
3659
3660 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
eb66be0e 3661 TYPE_STUB_DECL.
d11ad92e 3662 (coerce_template_parms): Likewise.
ec255269
MS
3663
3664Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
3665
3666 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
3667 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
3668
3669Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
3670
3671 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
eb66be0e 3672 before trying to get its STUB_DECL.
d11ad92e 3673 (coerce_template_parms): Likewise.
ec255269
MS
3674
3675 * parse.y (template_type_parm): If they didn't use 'class',
eb66be0e 3676 pretend they did after giving an error.
ec255269
MS
3677
3678 * pt.c (coerce_template_parms): Diagnose use of local class.
3679
3680 * decl.c (grok_reference_init): Use instantiate_type.
3681
3682 * error.c (dump_expr): Handle TEMPLATE_DECLs.
3683
3684 * parse.y (named_class_head): Diagnose mismatching types and tags.
3685
3686 * decl.c (pushdecl): Type decls and class templates clash with
eb66be0e 3687 artificial type decls, not hide them.
ec255269
MS
3688
3689 * decl.c (redeclaration_error_message): Diagnose redefinition of
eb66be0e 3690 templates properly.
ec255269
MS
3691 (duplicate_decls): Diagnose disallowed overloads for template
3692 functions, too.
3693
3694 * decl.c (start_decl): Call complete_type before checking for a
eb66be0e 3695 destructor.
ec255269
MS
3696
3697 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
3698
3699 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
3700
5566b478
MS
3701Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3702
ec255269 3703 * decl.c (grok_op_properties): Don't check for operator++(int) in
eb66be0e 3704 a template.
ec255269
MS
3705
3706 * tree.c (perm_manip): Return a copy of variable and function
eb66be0e 3707 decls with external linkage.
ec255269
MS
3708
3709 * tree.def: Change some of the min tree codes to type "1".
3710 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
3711 * method.c (build_overload_int): Emit something arbitrary for
eb66be0e 3712 anything but an INTEGER_CST if we're in a template.
ec255269
MS
3713
3714 * decl.c (cp_finish_decl): Call complete_type before deciding
eb66be0e 3715 whether or not to lay out the decl.
ec255269 3716
5566b478
MS
3717 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
3718
3719Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3720
3721 * typeck2.c (build_x_arrow): Call complete_type.
3722
3723 * pt.c (add_pending_template): Broken out.
eb66be0e
MS
3724 (lookup_template_class): If -fexternal-templates, call it for all
3725 the methods of implemented types.
5566b478
MS
3726 (instantiate_class_template): Instead of instantiating them here.
3727 (instantiate_decl): Handle -fexternal-templates earlier.
3728
3729Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3730
3731 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
3732 memoized lookup stuff inside GATHER_STATISTICS.
3733
3734Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3735
3736 * decl.c (start_decl): Complain about array of incomplete type
3737 here.
3738 (grokdeclarator): Not here.
3739
3740 * parse.y (template_parm): Expand full_parm inline so we can set
eb66be0e 3741 the rule's precedence.
5566b478
MS
3742
3743 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
3744 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
3745 * decl2.c (grokbitfield): Don't check for integer constant here.
3746 * class.c (finish_struct_1): Check here.
3747
3748 * decl.c (define_label): Make the min decl go on permanent_obstack.
3749
3750 * pt.c (unify): Don't handle CONST_DECLs.
3751 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
d11ad92e 3752 (tsubst_copy): Likewise.
5566b478
MS
3753
3754 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
eb66be0e 3755 CONST_DECL for a template parm.
5566b478
MS
3756
3757Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
3758
3759 * decl.c (grokdeclarator): Complain about array of incomplete type
3760 here.
3761 (start_decl_1): Not here.
3762
3763 * pt.c (tsubst): Handle pointer-to-function declarators.
3764
3765 * method.c (hack_identifier): If pedantic, diagnose local class
eb66be0e 3766 methods that require a static chain.
5566b478
MS
3767
3768 * decl.c (grok_op_properties): No longer static.
3769 * cp-tree.h: Declare it.
3770 * pt.c (tsubst): Call it for operators.
3771 Use tsubst_copy for TREE_VECs.
3772
3773 * parse.y (template_arg): The expr has precedence like '>'.
3774
3775Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3776
3777 * pt.c (coerce_template_parms): Don't coerce an expression using
eb66be0e 3778 template parms.
5566b478
MS
3779 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
3780 (tsubst): Don't use build_index_2_type if the max_value uses template
3781 parms.
3782 * method.c (build_overload_int): Emit something arbitrary for an
eb66be0e 3783 expression using template parms.
5566b478
MS
3784
3785 * parse.y (template_close_bracket): New non-terminal to catch use
eb66be0e 3786 of '>>' instead of '> >' in template class names.
5566b478
MS
3787 (template_type): Use it.
3788 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
3789
3790 * tree.def: Add CAST_EXPR.
3791 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
eb66be0e 3792 CONVERT_EXPR for minimal_parse_mode.
d11ad92e
MS
3793 * typeck.c (build_c_cast): Likewise.
3794 * pt.c (tsubst_copy): Likewise.
3795 * decl2.c (build_expr_from_tree): Likewise.
3796 * error.c (dump_expr): Likewise.
5566b478
MS
3797
3798Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3799
3800 * except.c (SetTerminate, SetUnexpected): Put back global vars.
3801 (init_exception_processing): Put back decl/init of
3802 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
3803 fns from libstdc++.
3804
3805 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
3806 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
3807 Delete unused fns.
3808 * cp-tree.h (declare_uninstantiated_type_level,
3809 uninstantiated_type_level_p): Delete prototypes.
3810
3811Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3812
3813 * pt.c (tsubst_expr): Add default return.
3814
3815Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3816
3817 * error.c (fndecl_as_string): Delete unused arg CNAME.
3818 * sig.c (build_signature_table_constructor,
3819 build_signature_method_call): Fix calls.
3820
3821 * class.c (the_null_vtable_entry): Delete var definition.
3822 (init_class_processing): Delete tree the_null_vtable_entry init.
3823 * decl.c (no_print_{functions, builtins}): Declare as static.
3824 (__tp_desc_type_node): #if 0 var definition.
3825 (init_type_desc): #if 0 init of __tp_desc_type_node.
3826 (vb_off_identifier): Move var decl into init_decl_processing.
3827 (current_function_assigns_this): Declare as static.
3828 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
3829 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
3830 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
3831 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
3832 * init.c (BI_header_type, BI_header_size): Declare as static.
3833 * pt.c (template_classes): Delete unused var.
3834 (add_pending_template): Delete decl for non-existent fn.
3835 (lookup_template_class): Delete vars CODE and TAG_CODE.
3836 (instantiate_template): Delete unused var TARGS.
3837 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
3838 Delete decls.
3839 (__tp_desc_type_node): #if 0 var decl.
3840 (fndecl_as_string): Fix prototype.
3841
3842Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3843
3844 * tree.def: Add GOTO_STMT.
3845 * pt.c (tsubst_expr): Support goto and labels.
3846 * decl.c (define_label): Support minimal parsing.
d11ad92e 3847 * parse.y (simple_stmt): Likewise.
5566b478
MS
3848
3849Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3850
3851 * xref.c (GNU_xref_member): Only define/set var I if
3852 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
3853 used.
3854 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
3855 (GNU_xref_end): Fix call.
3856 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
3857 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
3858
3859 * tree.c (build_exception_variant): Delete unused vars I, A, T,
3860 T2, and CNAME.
3861 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
3862 (mapcar): Delete unused var CODE.
3863 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
3864 (break_out_cleanups): Fix call.
3865 (bot_manip): Likewise.
3866 * call.c (build_method_call): Likewise.
3867 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
3868 Likewise.
3869 * typeck.c (unary_complex_lvalue, build_modify_expr,
3870 convert_for_initialization): Likewise.
3871 * typeck2.c (build_functional_cast): Likewise.
3872 * cp-tree.h (build_cplus_new): Fix prototype.
3873
3874 * repo.c (open_repo_file): Delete unused var Q.
3875 (repo_compile_flags, repo_template_declared,
3876 repo_template_defined, repo_class_defined, repo_inline_used,
3877 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
3878 (repo_get_id, repo_vtable_used): Declare as static.
3879 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
3880 prototypes.
3881
3882Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3883
3884 * parse.y (pending_inlines): Add function_try_block case.
3885
3886 * pt.c (unify): Fix for template const parms.
3887
3888Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3889
3890 * lex.c (extract_interface_info): Delete forward decl.
3891 (default_copy_constructor_body, default_assign_ref_body): Delete
3892 decls for non-existent functions.
3893 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
3894 (init_lex): Delete setting them.
3895 (cons_up_default_function): Delete unused vars FUNC_BUF,
3896 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
3897 #if 0'd synth code.
3898 (toplevel, expression_obstack): Delete unused extern decls.
3899 (tree_node_kind): Delete unused enum.
3900 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
3901 GATHER_STATISTICS.
3902 (tree_node_kind_names): Delete unused extern decl.
3903 (synth_obstack): Delete unused var.
3904 (init_lex): Don't set it.
3905 (init_parse): Add decl before use.
3906 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
3907 (current_unit_{name, language}): Delete unused vars.
3908 (check_newline): Don't bother setting them, just accept the #pragma.
3909 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
3910 (current_unit_{name, language}): Delete decls.
3911
3912 * search.c: Wrap all of the memoized functions, macros, and
3913 variables inside #ifdef GATHER_STATISTICS.
3914 (lookup_field, lookup_fnfields): Likewise.
3915 (init_search_processing): Likewise.
3916 (reinit_search_statistics): Wrap whole function.
3917 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
3918
3919 * decl.c (finish_function): Only call pop_memoized_context if
3920 GATHER_STATISTICS is defined.
3921 (start_function): Likewise for push_memoized_context.
3922 * class.c (pushclass, popclass): Likewise.
3923
3924 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
3925 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
3926
3927 * cvt.c (cp_convert): Delete unused local var FORM.
3928 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
3929 prototypes.
3930
3931Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3932
3933 * pt.c (do_poplevel): Oops; really return what we get from
eb66be0e 3934 poplevel this time.
5566b478
MS
3935
3936Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3937
3938 * cp-tree.h (is_aggr_type): Add prototype.
3939
3940 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
3941 * method.c ({push,pop}_cp_function_context): Delete decls.
3942 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
3943 (SetUnexpected, SetTerminate): Delete unused vars.
3944 (init_exception_processing): Don't set SetUnexpected or
3945 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
3946 (output_exception_table_entry): Delete unused array LABEL.
3947 (expand_internal_throw): Delete unused var PARAMS.
3948 (expand_start_catch_block): Delete unused var CLEANUP.
3949 (emit_exception_table): Delete unused var EH_NODE_DECL.
3950 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
3951 GOTO_UNWIND_AND_THROW. Don't set them.
3952 (end_eh_unwinder): Add top decl.
3953 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
3954 (exception_section, push_rtl_perm, do_function_call,
3955 lang_interim_eh, push_eh_cleanup, eh_outer_context,
3956 expand_end_eh_spec, end_eh_unwinder): Declare as static.
3957 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
3958 throw_used): Likewise.
3959 * cp-tree.h (expand_end_eh_spec): Delete prototype.
3960
3961 * search.c (dfs_mark, dfs_mark_vtable_path,
3962 dfs_unmark_vtable_path, dfs_mark_new_vtable,
3963 dfs_unmark_new_vtable, dfs_clear_search_slot,
3964 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
3965 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
3966 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
3967 functions.
3968 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
3969 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
3970 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
3971 Only define #ifdef GATHER_STATISTICS.
3972 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
3973 is defined.
3974 (vbase_decl): Delete var definition.
3975 (init_search): Delete old decl.
3976 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
3977 never actually used.
3978 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
3979 (get_base_distance_recursive): Delete unused fourth arg
3980 BASETYPE_PATH. Fix call .
3981 (get_base_distance): Fix call.
3982 (push_class_decls): Delete unused var ID.
3983 (make_memoized_table_entry): Declare as static.
3984 (breadth_first_search): Declare as static.
3985 (tree_has_any_destructor_p): Declare as static.
3986 (pop_class_decls): Delete unused arg pop_class_decls.
3987 * class.c (popclass): Fix call to pop_class_decls.
3988 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
3989 tree_has_any_destructor_p): Delete prototypes.
3990
3991 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
3992 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
3993 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
3994 (build_user_desc): Delete unused var T.
3995 (build_class_desc): Delete unused vars T and OFF.
3996 (build_t_desc): Delete unused var NAME_STRING.
3997 (build_headof): Make static.
3998 (get_bad_cast_node): Likewise.
3999 (get_def_to_follow): Likewise.
4000 * cp-tree.h (init_type_desc): Add prototype.
4001 (build_headof): Remove prototype.
4002
4003Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
4004
4005 * pt.c (tsubst): Only look for matching decls at file scope for
eb66be0e 4006 non-member functions.
5566b478
MS
4007
4008 * call.c (build_scoped_method_call): Handle scoped destructor
eb66be0e 4009 calls in templates.
5566b478
MS
4010
4011 * decl.c (*_top_level): Also save previous_class_values.
4012
4013 * pt.c (tsubst_expr): Support do {} while loops.
d11ad92e
MS
4014 * parse.y (simple_stmt): Likewise.
4015 * tree.def: Likewise.
5566b478
MS
4016
4017 * method.c (build_overload_identifier): For a class nested in a
eb66be0e
MS
4018 template class, don't mangle in the template parms from our
4019 context.
5566b478
MS
4020
4021 * lex.c, cp-tree.h: Remove support for template instantiations in
eb66be0e 4022 the pending_inlines code.
5566b478
MS
4023 * pt.c: Remove dead functions and unused arguments.
4024 (uses_template_parms): TYPENAME_TYPEs always use template parms.
4025 * parse.y: Stop passing anything to end_template_decl.
4026 * tree.c (print_lang_statistics): Only print tinst info #ifdef
eb66be0e 4027 GATHER_STATISTICS.
5566b478
MS
4028
4029Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4030
4031 * init.c (expand_recursive_init{,_1}): Delete decls.
4032 (sort_member_init): Delete unused var INIT.
4033 (emit_base_init): Delete unused var X.
4034 (build_offset_ref): Delete unused var CNAME.
4035 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
4036 (emit_base_init): Delete unused local var BASE. Delete extern
4037 decl of IN_CHARGE_IDENTIFIER.
4038 (build_delete): Delete unused local var VIRTUAL_SIZE.
4039
4040 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
4041 (build_delete): Fix call.
4042 * decl2.c (delete_sanity): Likewise.
4043 * cp-tree.h (build_vec_delete): Update prototype.
4044
4045 * typeck.c (common_base_type): Delete unused var TMP.
4046 (build_binary_op): Delete local var ARGS_SAVE.
4047 (build_array_ref): Delete unused var ITYPE.
4048 (c_expand_return): Delete unused var USE_TEMP.
4049
4050 * typeck.c (compexcepttypes): Delete unused arg STRICT.
4051 (comptypes): Fix calls.
4052 * decl.c (duplicate_decls): Likewise.
4053 * cp-tree.h (compexcepttypes): Delete extra arg.
4054
4055 * decl2.c (check_classfn): Delete unused second arg CNAME.
4056 * decl.c (start_decl, grokfndecl): Fix calls.
4057 * init.c (do_friend): Likewise.
4058 * cp-tree.h (check_classfn): Update prototype.
4059
4060 * cp-tree.h (signature_error, import_export_vtable,
4061 append_signature_fields, id_in_current_class, mark_used,
4062 copy_assignment_arg_p): Add decls.
4063 * decl2.c (mark_used): Delete decl.
4064
4065 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
4066
4067 * class.c (get_vtable_entry): Diable unused function.
4068 (doing_hard_virtuals): Delete unused static global var.
4069 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
4070 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
4071 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
4072 (modify_one_vtable): Delete unused var OLD_RTTI.
4073 (finish_struct_anon): Delete unused vars OFFSET and X.
4074 (finish_struct_bits): Delete unused var METHOD_VEC.
4075 (get_basefndecls): Delete unused var PURPOSE. Delete unused
4076 for-scope local variable METHODS.
4077
4078 * call.c (user_harshness): Delete unused/unneeded arg PARM.
4079 (ideal_candidate): Delete unused args BASETYPE and PARMS.
4080 (build_method_call): Delete unused args passed into ideal_candidate.
4081 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
4082 * cp-tree.h (synthesize_method): Add decl.
4083
4084 * decl.c (note_level_for_for): Give void return type.
4085 (pushdecl_nonclass_level): Likewise.
4086 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
4087 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
4088 (suspend_binding_level): Delete unused var LEVEL.
4089 (duplicate_decls): Delete unused var CTYPE.
4090 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
4091 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
4092 PTR_ENDLINK.
4093 (grokdeclarator): Delete unused var C.
4094 (grokdeclarator): Delete unused var SIZE_VARIES.
4095 (grokparms): Delete unused var SAW_VOID.
4096 (start_function): Delete unused var OLDDECL.
4097 (cplus_expand_expr_stmt): Delete unused var
4098 REMOVE_IMPLICIT_IMMEDIATELY.
4099
4100 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
4101
4102 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
4103
4104Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
4105
4106 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
d11ad92e 4107 (build_min_nt): Likewise.
5566b478
MS
4108 * pt.c (do_pushlevel): Emit line note.
4109 (do_poplevel): Return what we get from poplevel.
4110 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
4111 * parse.y: Use do_pushlevel and do_poplevel.
4112 * cp-tree.h: Declare do_poplevel.
4113
4114 * cp-tree.h: Declare at_eof.
4115 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
4116 * decl2.c (import_export_decl): Renamed from import_export_inline.
4117 (finish_file): Call it to do interface handling for statics.
4118 * pt.c (tsubst_copy): Call mark_used on variables and functions
eb66be0e 4119 used here.
5566b478
MS
4120
4121 * decl2.c (finish_file): Don't emit statics we can't generate.
4122 * pt.c (instantiate_decl): Don't set interface on instantiations
eb66be0e 4123 we can't generate.
5566b478
MS
4124
4125 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
4126 * tree.c (print_lang_statistics): Print max template depth.
4127 * pt.c (push_tinst_level): Dump entire instantiation context.
4128 (instantiate_class_template): Use it and pop_tinst_level.
d11ad92e 4129 (instantiate_decl): Likewise.
5566b478
MS
4130
4131 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
eb66be0e 4132 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
5566b478
MS
4133
4134Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
4135
4136 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
eb66be0e
MS
4137 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
4138 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
4139 the new template implementation.
5566b478
MS
4140
4141Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4142
4143 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
4144
cffa8729
MS
4145Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
4146
4147 * decl.c (cp_finish_decl): Delay emitting the debug information for
4148 a typedef that has been installed as the canonical typedef, if the
4149 type has not yet been defined.
4150
4151Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4152
4153 * decl2.c (grokfield): Still call pop_nested_class for access decls.
4154
4155Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4156
4157 * decl.c (lookup_label): Call label_rtx.
4158
4159 * decl.c (make_binding_level): New function.
4160 (pushlevel, pushlevel_class): Call it instead of explicit
4161 duplicate calls to xmalloc.
4162
4163 * decl.c (init_decl_processing): Delete useless build_pointer_type
4164 call.
4165
4166 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
4167 (sizet_ftype_string): Delete variable.
4168 (init_decl_processing): Add built-in functions fabsf, fabsl,
4169 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
4170 variable strlen_ftype, used for strlen.
4171
4172Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
4173
4174 * decl.c (push_to_top_level): Start from current_binding_level
eb66be0e
MS
4175 again for now; the stl hacks depend on g++ being broken in this
4176 way, and it'll be fixed in the template rewrite.
cffa8729
MS
4177
4178 * tree.def: Add USING_DECL.
4179 * decl2.c (do_class_using_decl): Implement.
4180 (grokfield): Pass access decls off to do_class_using_decl instead of
4181 grokdeclarator.
4182 * error.c (dump_decl): Handle USING_DECLs.
4183 * decl.c (grokdeclarator): Remove code for handling access decls.
4184 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
eb66be0e 4185 as access decls for now.
cffa8729
MS
4186 (finish_struct): Don't check USING_DECLs for other uses of the name.
4187
4188 * search.c (get_matching_virtual): Use cp_error_at.
4189
4190Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4191
4192 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
4193 match c-typeck.c.
4194 (self_promoting_args_p): Move the check that TYPE is non-nil
4195 before trying to look at its main variant.
4196 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
4197
4198 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
4199 Delete macros.
4200 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
4201 (do_friend): Delete call to xref_friend.
4202 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
4203
4204 * typeck.c (convert_sequence): #if 0 unused function.
4205
4206 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
4207 be in decl_in_memory_p.
4208 (decl_in_memory_p): Delete decl.
4209 * expr.c (decl_in_memory_p): Delete fn.
4210 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
4211
4212 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
4213
4214Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
4215
4216 * class.c (finish_struct_1): Check for a pure-specifier on a
eb66be0e 4217 non-virtual function here.
cffa8729
MS
4218
4219 * decl2.c (grok_function_init): Don't check whether the function
eb66be0e 4220 is virtual here.
cffa8729
MS
4221 (grokfield): Don't call check_for_override here.
4222
4223 * decl.c (push_to_top_level): Start from inner_binding_level,
eb66be0e 4224 check class_shadowed in class levels.
cffa8729
MS
4225
4226Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
4227
4228 * decl.c (resume_level): Ignore things that don't have names, instead
4229 of core dumping.
4230
4231Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4232
4233 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
4234
4235Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
4236
4237 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
eb66be0e 4238 synthesized dtor.
cffa8729
MS
4239
4240 * parse.y (complete_type_name): Bind global_scope earlier.
d11ad92e 4241 (complex_type_name): Likewise.
cffa8729
MS
4242 (qualified_type_name): Remove.
4243
2ee887f2
MS
4244Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
4245
4246 * decl.c (grokfndecl): Move code that looks for virtuals in base
eb66be0e 4247 classes...
cffa8729 4248 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
4249 (finish_struct_1): Call it.
4250
4251 * cp-tree.h: Declare warn_sign_compare.
4252
4253 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
eb66be0e
MS
4254 rather than extra_warnings to decide whether to warn about
4255 comparison of signed and unsigned.
2ee887f2
MS
4256
4257 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
eb66be0e 4258 implies -Wsign-compare. -Wall doesn't imply -W.
2ee887f2
MS
4259
4260Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
4261
4262 * typeck.c (build_component_ref): Fix to handle anon unions in base
4263 classes as well.
4264
4265Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4266
4267 * class.c (resolves_to_fixed_type_p): Delete code dealing with
4268 a WITH_CLEANUP_EXPR, since we don't generate them any more.
4269 * cvt.c (build_up_reference): Likewise.
4270 * decl.c (grok_reference_init): Likewise.
4271 (cp_finish_decl): Likewise.
4272 * error.c (dump_expr): Likewise.
4273 * tree.c (real_lvalue_p): Likewise.
4274 (lvalue_p): Likewise.
4275 (build_cplus_new): Likewise.
4276 (unsave_expr_now): Likewise.
4277 * typeck.c (unary_complex_lvalue, build_modify_expr,
4278 c_expand_return): Likewise.
4279
4280Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4281
4282 Make the C++ front-end pay attention to attributes for structures.
4283 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
4284 finish_struct_1.
eb66be0e 4285 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
2ee887f2
MS
4286 Take out old round_up_size use and setting the DECL_ALIGN possibly
4287 using it. Take out setting of TYPE_ALIGN to round_up_size, which
4288 can override what the attribute set.
4289 * cp-tree.h (finish_struct): Update prototype.
4290 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
4291 attributes to finish_struct.
4292 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
4293 value down into finish_struct.
4294 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
4295
4296Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
4297
4298 * decl.c (poplevel): Re-word dead for local handling.
4299 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
4300 (cp_finish_decl): If is_for_scope, check for duplicates so
4301 we can disable is_for_scope. Otherwise, preserve_temp_slots.
4302
4303 * lex.c (do_identifier): Use global binding in preference of
4304 dead for local variable.
4305
4306Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
4307
4308 * init.c (initializing_context): Handle anon union changes, the
4309 context where fields of anon unions can be initialized now has to be
4310 found by walking up the TYPE_CONTEXT chain.
4311
4312Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
4313
4314 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
4315 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
4316 (obscure_complex_init): If bss is supported, always set
4317 DECL_INITIAL to error_mark_node.
4318
4319Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4320
4321 * init.c (is_friend): Make sure there's a context before we see if
4322 it's an aggr type.
4323
4324Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
4325
4326 * init.c (is_friend): Classes are not friendly with nested classes.
4327
4328Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
4329
4330 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
4331 and record its result.
4332
9e9ff709
MS
4333Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
4334
4335 * class.c (finish_struct_anon): Switch around code to not move anon
4336 union elements around, nor mess up their contexts, nor offsets,
4337 instead we now build up the right number of COMPONENT_REFs for all
4338 the anon unions that may be present at build_component_ref time.
4339 * typeck.c (lookup_anon_field): New routine to handle field lookup
4340 on fields without names. We find them, based upon their unique type
4341 instead.
4342 * typeck.c (build_component_ref): Allow FIELD_DECL components.
4343 Handle finding components in anonymous unions, and ensure that a
4344 COMPONENT_REF is built for each level as necessary.
4345
4346Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
4347
4348 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
4349 code that ensures that copy ctors are used if appropriate.
4350
4351Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4352
4353 * init.c (build_vec_delete): Only give an error if base isn't an
4354 error_mark_node.
4355
4356Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
4357
4358 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
4359 (yylex): If we see `new', keep slurping.
4360
4361Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
4362
4363 * class.c (finish_struct_1): Move code for handling anon unions...
4364 (finish_struct_anon): to here. Fixup so that we do the offset
4365 calculations right, and so that the fields are physically moved to
4366 the containers's chain.
4367
4368Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4369
4370 * decl.c (grokdeclarator): Avoid trying to get an operand off an
4371 identifier node.
4372
4373Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
4374
4375 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
4376 POINTER_SIZE to agree with expr.c.
4377
4378Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
4379
4380 * search.c (lookup_field): Don't report ambiguities if protect is 0,
4381 instead return NULL_TREE.
4382
4383Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
4384
4385 * class.c (finish_struct_1): Call warn_hidden if we want warnings
4386 about overloaded virtual functions.
4387 (warn_hidden): New routine to warn of virtual functions that are
4388 hidden by other virtual functions, that are not overridden.
4389 (get_basefndecls): New routine, used by warn_hidden.
4390 (mark_overriders): New routine, used by warn_hidden.
4391 * search.c (get_matching_virtual): Remove old warning that just
4392 isn't very useful.
4393
4394Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4395
4396 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
4397
4398 * typeck.c (null_ptr_cst_p): Delete unused fn.
4399 (build_function_call_maybe): Delete unused fn.
4400
4401 * expr.c (extract_init): #if 0 the code after unconditional return 0
4402 for now.
4403
4404 Delete old cadillac code.
4405 * edsel.c: Remove file.
4406 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
4407 * Makefile.in (CXX_OBJS): Delete edsel.o.
4408 (edsel.o): Delete rule.
4409 * cp-tree.h (flag_cadillac): Delete var decl.
4410 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
4411 * decl2.c (flag_cadillac): Delete var definition.
4412 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
4413 (grokfield): Delete code depending on flag_cadillac.
4414 (finish_anon_union): Likewise.
4415 * class.c (finish_struct_1): Likewise.
4416 (pushclass): Likewise.
4417 (popclass): Likewise.
4418 (push_lang_context): Likewise.
4419 (pop_lang_context): Likewise.
4420 * decl.c (init_decl_processing): Likewise.
4421 (start_decl): Likewise.
4422 (cp_finish_decl): Likewise.
4423 (xref_tag): Likewise.
4424 (finish_enum): Likewise.
4425 (start_function): Likewise.
4426 (finish_function): Likewise.
4427 (finish_stmt): Likewise.
4428 * lex.c (lang_init): Likewise.
4429 (check_newline): Likewise.
4430
4431 * lex.c (do_pending_inlines): Delete synthesized method kludge.
4432
4433 Delete defunct, ancient garbage collection implementation.
4434 * rtti.c: New file with the RTTI stuff from gc.c.
4435 * gc.c: Removed file (moved the remaining stuff into rtti.c).
4436 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
4437 (rtti.o): New rule, replacing gc.o.
4438 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
4439 * cp-tree.h: Delete gc-related fn decls.
4440 (DECL_GC_OFFSET): Delete macro.
4441 (flag_gc): Delete extern decl.
4442 * decl.c (current_function_obstack_index): Delete var decl.
4443 (current_function_obstack_usage): Delete var decl.
4444 (start_function): Delete clearing of current_function_obstack_index
4445 and current_function_obstack_usage.
4446 (init_decl_processing): Delete code relying on -fgc.
4447 Delete call to init_gc_processing.
4448 (cp_finish_decl): Delete calls to build_static_gc_entry and
4449 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
4450 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
4451 and to expand_expr of a __gc_main call.
4452 (maybe_gc_cleanup): Delete var decl.
4453 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
4454 * decl2.c (flag_gc): Delete var decl.
4455 (lang_f_options): Delete offering of -fgc.
4456 (lang_decode_option): Delete -fgc and -fno-gc handling.
4457 (get_temp_regvar): Delete gc code.
4458 * init.c (build_new): Delete gc code.
4459 * lex.c (init_lex): Delete checking of flag_gc.
4460
4461 * typeck.c (convert_arguments): Delete gc code.
4462 (build_component_addr): Delete -fgc warning.
4463 (build_modify_expr): Delete gc code.
4464
4465 * decl2.c (build_push_scope): Delete fn.
4466 * cp-tree.h (build_push_scope): Delete decl.
4467
4468 * search.c (clear_search_slots): Delete fn.
4469 * cp-tree.h (clear_search_slots): Delete decl.
4470
4471 * search.c (tree_needs_constructor_p): Delete fn.
4472 * cp-tree.h (tree_needs_constructor_p): Delete decl.
4473
4474 * tree.c (id_cmp): Delete fn.
4475
4476 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
4477 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
4478
4479 * tree.c (decl_value_member): Delete fn.
4480 * cp-tree.h (decl_value_member): Delete decl.
4481
4482 * tree.c (list_hash_lookup_or_cons): Delete fn.
4483 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
4484
4485 * method.c (cplus_exception_name): Delete fn.
4486 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
4487
4488 * spew.c (shift_tokens): Delete fn.
4489
4490Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4491
4492 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
4493 to cp_finish_decl.
d11ad92e 4494 * parse.y: Likewise.
9e9ff709
MS
4495
4496Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4497
4498 * tree.c (build_cplus_staticfn_type): Delete function definition;
4499 never used.
4500 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
4501
4502 * tree.c (virtual_member): Delete function definition; never used.
4503 * cp-tree.h (virtual_member): Delete decl.
4504
45537677
MS
4505Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
4506
4507 * typeck.c (build_component_ref): Handle getting vbase pointers
4508 out of complex multiple inheritance better.
4509
4510Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
4511
4512 * typeck.c (build_object_ref): Make sure we use the real type, not
4513 any reference type.
4514
4515Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
4516
4517 * tree.c (build_exception_variant): Don't create new types if we
4518 don't have to, also build new types on the right obstack.
4519
4520Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
4521
4522 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
4523 (push_to_top_level): Call it for b->type_shadowed on class binding
4524 levels.
45537677
MS
4525
4526Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
4527
4528 * search.c (expand_upcast_fixups): Fix so that offsets stored in
4529 vbase_offsets are always right. Fixes a problem where virtual base
4530 upcasting and downcasting could be wrong during conversions on this
4531 during virtual function dispatch at ctor/dtor time when dynamic
4532 vtable fixups for deltas are needed. This only sounds easier than
4533 it is. :-)
4534 (fixup_virtual_upcast_offsets): Change to reflect new calling
4535 convention for expand_upcast_fixups.
4536
4537Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4538
4539 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
4540 check that it's usable as the bitfield width.
4541
4542Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4543
4544 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
4545 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
4546 only ever used for functions in it.
4547
4548Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4549
4550 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
d11ad92e 4551 (nested_type): Likewise.
45537677
MS
4552 (nested_name_specifier): Use lastiddecl.
4553
4554 * decl.c (grokdeclarator): Adjust accordingly.
d11ad92e
MS
4555 * init.c (expand_member_init): Likewise.
4556 * parse.y (base_class): Likewise.
4557 * typeck2.c (build_functional_cast): Likewise.
45537677
MS
4558
4559 * typeck2.c (build_functional_cast): Fill in name after we've
4560 checked for non-aggr type.
4561
be99da77
MS
4562Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
4563
4564 * decl2.c (warn_pointer_arith): Default to on.
4565
4566Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4567
4568 * lex.c (is_rid): New function.
4569 * decl.c (grokdeclarator): Diagnose reserved words used as
4570 declarator-ids.
4571
4572Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
4573
4574 * tree.c (get_decl_list): Don't lose cv-quals.
4575
4576 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
4577 typespecs used as declarator-ids.
4578
4579Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
4580
4581 * decl.c (poplevel): When poping a level, don't give a warning for
4582 any subblocks that already exist.
4583
4584Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4585
4586 * typeck.c (build_object_ref): Finish what I started.
4587
4588 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
4589
4590 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
4591
4592 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 4593 scope.
be99da77
MS
4594
4595Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
4596
4597 * decl.c (xref_tag): Handle passing a type in directly.
4598
4599 * parse.y (qualified_type_name): Pull out the type.
d11ad92e 4600 (nested_type): Likewise.
be99da77
MS
4601 Take types directly instead of as identifiers.
4602 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709 4603 as identifiers.
d11ad92e
MS
4604 * decl.c (xref_basetypes): Likewise.
4605 * init.c (expand_member_init): Likewise.
4606 (build_member_call): Likewise.
4607 (build_offset_ref): Likewise.
4608 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
4609 * method.c (do_build_assign_ref): Likewise.
be99da77
MS
4610 * decl.c (grokdeclarator): Handle a type appearing as the
4611 declarator-id for constructors.
4612 * method.c (do_build_copy_constructor): current_base_init_list now
4613 uses the types directly, not their names.
d11ad92e
MS
4614 * init.c (sort_base_init): Likewise.
4615 (expand_member_init): Likewise.
be99da77 4616 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77 4617
d11ad92e 4618Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
be99da77
MS
4619
4620 * tree.c (layout_basetypes): Call build_lang_field_decl instead
4621 of build_lang_decl if first arg is a FIELD_DECL.
be99da77
MS
4622
4623Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4624
4625 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
4626 non-empty.
4627 * except.c (expand_start_catch_block): Set TREE_USED to avoid
4628 warnings about the catch handler.
4629
4630Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
4631
4632 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 4633 expand_target_expr.
be99da77
MS
4634
4635Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4636
4637 Fix access control to use trees rather than integers.
4638 * class.c (access_{default, public, protected, private,
4639 default_virtual, public_virtual, private_virtual}_node): Add
4640 definitions.
4641 (init_class_processing): Do creation of those nodes.
4642 * cp-tree.h (access_type): Delete enum decl.
4643 (access_{default, public, protected, private, default_virtual,
4644 public_virtual, private_virtual}_node): Add decls.
4645 (compute_access): Change return type.
4646 * search.c (compute_access): Have tree return type, instead of enum.
4647 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
4648 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
4649 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
4650 * parse.y (VISSPEC): Make ttype rather than itype.
4651 (base_class_access_list): Likewise.
4652 * *.[cy]: Change all refs of `access_public' to `access_public_node',
4653 etc.
4654 * call.c (build_method_call): Make ACCESS be a tree.
4655 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
4656 * cvt.c (convert_to_aggr): Likewise.
4657 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
4658 Likewise.
4659 * method.c (hack_identifier): Likewise.
4660 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
4661
4662Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
4663
4664 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
4665 frontend, and make it more consistent with respect to
4666 warn_pointer_arith.
4667
4668Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
4669
4670 * decl.c (pushdecl): Check for duplicate parameter names.
4671
4672Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
4673
4674 * decl.c (expand_static_init): Call assemble_external for atexit.
4675
4676Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
4677
4678 * except.c (do_unwind): Remove some generated dead code.
4679 (eh_outer_context): New routine, factor out some common code from
4680 expand_builtin_throw and end_eh_unwinder. Add code to do return
4681 address masking for the PA.
4682 (expand_builtin_throw): Use eh_outer_context instead of open coding
4683 it here.
d11ad92e 4684 (end_eh_unwinder): Likewise.
be99da77
MS
4685
4686Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
4687
4688 * except.c (expand_throw): Call assemble_external for __empty, if we
4689 use it.
4690
21451173
MS
4691Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
4692
4693 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
4694 NORMAL_RETURN_ADDR_OFFSET.
d11ad92e 4695 (end_eh_unwinder): Likewise.
21451173
MS
4696
4697Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
4698
4699 * gc.c (build_dynamic_cast): Make sure we don't cast away const
4700 when dealing with references, and make sure we handle dynamic
4701 casting to a cv qualified reference.
4702
4703Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
4704
4705 * except.c (struct eh_context): New structure top hold eh context
4706 information.
4707 (push_eh_context): New routine.
d11ad92e 4708 (pop_eh_context): Likewise.
21451173 4709 * decl.c (push_cp_function_context): Use them.
d11ad92e 4710 (pop_cp_function_context): Likewise.
21451173
MS
4711
4712Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
4713
4714 * decl2.c (finish_file): Also prune uninteresting functions in the
4715 inline emission loop.
4716
d11ad92e 4717Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21451173
MS
4718
4719 * sig.c (build_signature_table_constructor): Mark functions
4720 in the signature as referenced.
4721
4722Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
4723
4724 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
4725 the inline emission stuff.
4726
72b7eeff
MS
4727Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
4728
4729 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 4730 weak symbols.
72b7eeff
MS
4731 * lang-options.h: Add -f{no-,}weak.
4732 * decl.c (init_decl_processing): If the target does not support weak
4733 symbols, don't use them.
4734 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
4735
4736Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4737
4738 * init.c (expand_member_init): warning for base init after members.
4739
72b7eeff
MS
4740Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4741
4742 * cvt.c (build_expr_type_conversion): Don't convert to a reference
4743 type.
4744
4745Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
4746
4747 * method.c (report_type_mismatch): Improve wording for volatile
4748 mismatches.
4749
4750Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
4751
4752 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 4753 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
4754 copy constructors well. The compiler would do bitwise copying,
4755 instead of ctor calling in some cases.
4756
4757Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
4758
4759 * g++.c (my_strerror): Return "cannot access" if errno is 0.
4760 (pfatal_with_name, perror_exec): Don't assume that
4761 the returned value from my_strerror contains no '%'s.
4762 (concat): Remove.
4763 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
4764
4765Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
4766
4767 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
4768 TYPE_METHODS/TREE_CHAIN mean what they used to.
4769 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
4770 instead of TYPE_METHODS.
4771 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
d11ad92e 4772 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
72b7eeff
MS
4773 * cp-tree.h (CLASSTYPE_METHODS): Lose.
4774 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
4775 TYPE_METHODS.
4776 (struct lang_decl): Lose next_method field.
4777 (DECL_NEXT_METHOD): Lose.
4778 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
4779 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
4780 anymore.
4781 (finish_struct_methods): Don't mess with the TREE_CHAINs in
4782 fn_fields.
4783
4784 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
4785 vector.
4786
4787 * call.c (build_method_call): Synthesize here even when not inlining.
d11ad92e 4788 * typeck.c (build_function_call_real): Likewise.
72b7eeff
MS
4789
4790Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
4791
4792 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
4793 == DBX_DEBUG, call dbxout_start_new_source_file and
4794 dbxout_resume_previous_source_file when appropriate.
4795
4796Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
4797
4798 * except.c (start_anon_func): Push to the top level.
4799 (end_anon_func): Pop from the top level.
4800
4801Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
4802
4803 * cp-tree.h (build_cleanup): New routine to build cleanups.
4804 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
4805 call at ctor time and use atexit to run it later.
4806 * decl2.c (build_cleanup): New routine, taken from finish_file.
4807 (finish_file): Use build_cleanup instead, and don't put function
4808 local statics in global dtor list.
4809
4810Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
4811
4812 * except.c (expand_throw): Ensure that we have cleanups, if we try
4813 and expand cleanups.
4814
4815Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
4816
4817 * except.c (expand_throw): Add logic to manage dynamic cleanups for
4818 the EH object.
4819 (expand_end_catch_block): Use the magic of expand_goto, instead of
4820 emit_jump so that we get the cleanup for any catch clause parameter
4821 and the cleanup for the exception object. Update to reflect label
4822 changes.
4823 (push_eh_cleanup): New routine to register a cleanup for an
4824 exception object.
9e9ff709 4825 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
4826 nothing.
4827 (init_exception_processing): Setup empty_fndecl. Setup
4828 saved_cleanup.
4829 (expand_start_catch_block): Update to reflect label changes. Call
4830 push_eh_object to register the cleanup for the EH object.
4831 (start_anon_func): New routine to start building lambda expressions
4832 from trees.
4833 (end_anon_func): New routine to end them.
4834 (struct labelNode): Change so that we can use tree labels, or rtx
4835 labels.
4836 (saved_cleanup): Object to check for dynamic cleanups for the
4837 exception handling object.
4838 (push_label_entry): Change so that we can use tree labels, or rtx
4839 labels.
d11ad92e
MS
4840 (pop_label_entry): Likewise.
4841 (top_label_entry): Likewise.
72b7eeff
MS
4842 (expand_start_all_catch): Use tree label instead of rtx label, so
4843 that we can get the magic of expand_goto.
4844 (expand_end_all_catch): Update to reflect label changes.
4845
4846 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
4847 use UNSAVE_EXPRs.
4848 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
4849 building_cleanup logic, as we now use UNSAVE_EXPRs.
4850 * cp-tree.h (unsave_expr): Declare it.
4851 * decl.c (building_cleanup): Remove.
4852 (maybe_build_cleanup): Remove building_cleanup logic, and use
4853 UNSAVE_EXPR instead.
4854
4855Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
4856
4857 * gc.c (build_t_desc): Update error message to say <typeinfo>.
4858
4859Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4860
4861 * decl.c (pushdecl): Only warn about shadowing a local variable if
4862 warn_shadow is true.
4863
4864Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4865
4866 * typeck.c (build_binary_op_nodefault): Added warning about
4867 comparisons between different enum types with -Wall, unless
4868 -fenum-int-equiv set.
4869
4870Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
4871
4872 * class.c (finish_struct_1): Skip down to the inner type in
4873 multidimensional arrays. Ensures ctors will be made for types that
4874 need constructing.
4875
4876Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
4877
4878 * decl.c (last_dtor_insn): New to track the last compiler generated
4879 insn in a dtor.
4880 (store_parm_decls): Set it.
4881 (finish_function): Use it to see if the dtor is empty. Avoid doing
4882 vtable setup all the time, if we can.
4883 (struct cp_function): Add last_dtor_insn.
4884 (push_cp_function_context): Save it.
4885 (pop_cp_function_context): Restore it.
4886
4887Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
4888
4889 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 4890 warnings.
72b7eeff
MS
4891
4892Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
4893
4894 * typeck.c (expand_target_expr): Make sure targets get put into the
4895 current temp_slot_level, so that the free_temp_slots call will reuse
4896 them.
4897
4898Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
4899
4900 * class.c (finish_struct_1): Delay delta fixups for virtual bases
4901 until after we have done the hard virtuals, to avoid a bogus `every
4902 virtual function must have a unique final overrider' for virtual
4903 functions that are only overridden by hard virtuals.
4904
4905Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4906
4907 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 4908 template for a member function.
72b7eeff
MS
4909
4910Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
4911
4912 * g++.c (main): Add handling of -nodefaultlibs.
4913
4914Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
4915
4916 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
4917 distinguish between direct bindings of reference variables, and
4918 indirect bindings of reference variables.
4919 * cvt.c (build_up_reference): Use it.
4920 * typeck.c (convert_arguments): Use it to indicate this is an
4921 indirect binding.
4922 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
4923 as they are unused.
d11ad92e
MS
4924 (expand_static_init): Likewise.
4925 (cplus_expand_expr_stmt): Likewise.
4926 * decl2.c (finish_file): Likewise.
4927 * init.c (perform_member_init): Likewise.
4928 (emit_base_init): Likewise.
4929 (expand_aggr_vbase_init_1): Likewise.
72b7eeff 4930
72b7eeff
MS
4931Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4932
4933 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
4934 get a DECL_LANG_SPECIFIC node.
4935 * cp-tree.h (lang_decl_flags): Add new member `level'.
4936 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
4937 decl_flags level member.
4938
4939Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4940
4941 * call.c (build_method_call): Make sure instance has a
4942 TYPE_LANG_SPECIFIC node before we dive into it.
4943
d11ad92e 4944Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
72b7eeff
MS
4945
4946 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
4947
4948Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
4949
4950 * decl.c (duplicate_decls): When smashing decls, smash staticness in
4951 the usual way.
4952
4953Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
4954
4955 * decl.c (poplevel): Handle the merging of subblocks of cleanups
4956 when finishing blocks that have already been created (usually due to
4957 the fixup goto code). Fixes bad debugging information.
4958
4959Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
4960
4961 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
4962 that's not a list of overloaded functions.
4963
4964Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4965
4966 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
4967 before trying to use DECL_ABSTRACT_VIRTUAL_P.
4968
4969Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
4970
4971 * decl2.c (mark_used): New function for hooking into setting of
4972 TREE_USED on decls.
4973 * call.c (build_method_call): Use it.
d11ad92e
MS
4974 * class.c (instantiate_type): Likewise.
4975 * init.c (build_offset_ref): Likewise. Don't call assemble_external
72b7eeff 4976 for all like-named functions.
d11ad92e 4977 * method.c (hack_identifier): Likewise.
72b7eeff
MS
4978 (emit_thunk): Don't call assemble_external.
4979 (make_thunk): Create thunk as a FUNCTION_DECL so that it
4980 gets the right mode and ENCODE_SECTION_INFO works.
4981
4982 * parse.y: Use mark_used. Pass operator names to do_identifier.
4983 * lex.c (do_identifier): Handle operator names.
4984
4985 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
4986
72b7eeff
MS
4987Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4988
4989 * errfn.c: Include stdio.h.
4990 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
4991
4992Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
4993
4994 * typeck2.c (digest_init): Always convert initializers to the
4995 right type.
4996
4997Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
4998
4999 * init.c (member_init_ok_or_else): Don't allow member initializers
5000 for indirect members, as it is invalid.
5001
5002Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5003
5004 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
5005
5006Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
5007
5008 * parse.y (for.init.statement): Catch compound statements inside for
5009 initializations, if we're being pedantic.
5010
5011Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
5012
5013 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
5014 looking for.
5015
5016Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
5017
5018 * error.c (dump_expr): Don't core dump when a boolean expression is
5019 used as a default argument.
5020
5021Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
5022
5023 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 5024 RETURN_IN_MEMORY.
72b7eeff
MS
5025
5026Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
5027
5028 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
5029 BLKmode type that would otherwise be returned in registers.
5030
5031Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5032
5033 * g++.c (WITHLIBC): New macro.
5034 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
5035 saw_libc and pass it at the end if it was set.
5036
5037Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5038
5039 * parse.y (fn.def1): Call split_specs_attrs in
5040 declmods notype_declarator case.
5041
21451173 5042Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
5043
5044 * Version 2.7.2 released.
5045
5046Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
5047
5048 * g++.c (pfatal_with_name): Add missing third argument to concat.
5049
e7843f33
MS
5050Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
5051
5052 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
5053 type.
5054
21451173 5055Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
5056
5057 * Version 2.7.1 released.
5058
5059Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
5060
5061 * call.c (convert_harshness): Handle references to arrays.
5062
5063Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
5064
5065 * typeck.c (comp_target_types): Check multi-level pointer
5066 conversions in both directions.
5067
5068Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
5069
5070 * parse.y (explicit_instantiation): Fix 'extern template' with no
5071 return type.
5072
5073Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
5074
5075 * parse.y (explicit_instantiation): Support automatic instantiation
5076 of constructors.
5077 (named_class_head_*): Support out-of-class definition of nested
5078 types.
5079
f30432d7
MS
5080Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
5081
5082 * search.c (envelope_add_decl): New routine. Fix so that
5083 methods are hidden in the same way that other members are.
5084 (dfs_pushdecls): Cleanup and move functionality out of line,
5085 into envelope_add_decl.
5086
5087Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
5088
5089 * typeck.c (mark_addressable): Only call assemble_external if we
5090 have started the output file.
5091
5092Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
5093
5094 * decl.c (start_function): Fix earlier cv-quals change.
5095
5096Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
5097
5098 * parse.y (complex_direct_notype_declarator): Only push the class if
5099 we are not already in the class.
5100
5101Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
5102
5103 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
5104 Update olddecl's attributes too.
5105 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
5106 * typeck.c (common_type): Call merge_machine_type_attributes.
5107
5108Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
5109
5110 * typeck.c (mark_addressable): Add missing call to
5111 assemble_external.
5112
f30432d7
MS
5113Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
5114
5115 * decl.c (store_parm_decls): Make sure the unwinder start comes
5116 before the exception specification start.
5117 * except.c (expand_exception_blocks): Make sure the unwinder end
5118 comes after the terminate protected catch clause region and after
5119 the end of the exception specification region.
5120
5121Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
5122
5123 * lex.c (real_yylex): Fix identifier case for linemode.
5124 (handle_sysv_pragma): Don't abort when we see a pragma we don't
5125 recognize.
5126
5127Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
5128
5129 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
5130 * except.c (init_exception_processing): __throw doesn't take any
5131 arguments.
d11ad92e 5132 (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode
f30432d7
MS
5133 for all pointers. Use expand_builtin_return_addr to unwind the
5134 first level off the stack.
5135 (do_unwind): Always use Pmode, instead of SImode for all pointers.
5136 (expand_exception_blocks): Add a call to end_eh_unwinder.
5137 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
5138 independent stack unwinders for function/method calls.
5139
5140Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
5141
5142 * tree.c (unsave_expr_now): Make sure we process the argument list
5143 of any called functions. Fixes incorrect code generation for
5144 cleanups.
5145
5146Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
5147
5148 * typeck.c (get_member_function_from_ptrfunc): Save function if it
5149 needs it. Cures core dump on things like (this->*(f()))().
5150
5151Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5152
5153 * decl.c (start_function): Conform to gcc cv-quals convention (no
5154 expression has a cv-qualified type) in RESULT_DECLs.
d11ad92e 5155 * method.c (make_thunk): Likewise.
f30432d7
MS
5156
5157Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
5158
5159 * decl.c (pushtag): Add in the namespace name for the tag.
5160
5161Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
5162
5163 * parse.y (maybe_base_class_list, base_class_list, base_class,
5164 base_class_access_list): Make sure we see the typenames for base
5165 classes.
5166 * lex.c (see_typename): Instead of failing to see a typename when
5167 there is no next token, perfer a typename, and get the next token.
5168
5169Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
5170
5171 * decl.c (init_decl_processing): Add __builtin_expect.
5172
5173Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
5174
5175 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
5176 or from pointer to member functions, they must all be handled before
5177 this point.
5178
5179Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5180
5181 * init.c (resolve_offset_ref): Fix wording of non-static member
5182 being referenced as a static.
5183
5184Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5185
5186 * typeck.c (build_indirect_ref): Only bash pointer if we actually
5187 call build_expr_type_conversion.
5188
5189Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
5190
5191 * cvt.c (build_expr_type_conversion): Handle conversion from
5192 reference.
5193 * typeck.c (build_indirect_ref): Avoid infinite recursion.
5194
5195Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
5196
5197 * decl.c (expand_start_early_try_stmts): New routine to start a try
5198 block at the start of the function, for function-try-blocks.
5199 * cp-tree.h (expand_start_early_try_stmts): Declare it.
5200 * parse.y (function_try_block): Use it, instead of doing it here, as
5201 we don't want to include rtl.h here, as that conflicts with RETURN
5202 in the parser.
5203
5204Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
5205
5206 * lex.c (reinit_parse_for_block): Support saving inline
5207 function-try-blocks, uses peekyylex.
5208 * parse.y (eat_saved_input): New rule, permit the parser to see that
5209 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
5210 handlers of a function-try-block.
5211 (fndef): Use it.
5212 (component_decl): Make sure TRY and RETURN can come after fn.def2.
5213 * spew.c (peekyylex): New routine to peek at what will come next.
5214
cf54380f
JM
5215Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5216
f30432d7 5217 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 5218 parms.
f30432d7 5219
cf54380f
JM
5220 * decl.c (duplicate_decls): Turn off whining about virtual functions
5221 redeclared inline for now.
5222
f30432d7
MS
5223Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
5224
5225 * decl.c (store_in_parms): New routine to put things before we
5226 put base inits.
5227 * cp-tree.h (store_in_parms): Declare it.
5228 * decl.c (store_parm_decls): Use it to makr sure the starting of the
5229 eh spec comes before base inits.
5230 (finish_function): Use sequences instead of the obsolete
5231 reorder_insns.
5232 * parse.y (fndef): Enhance readability and maintainability. Update
5233 to include function_try_block syntax.
5234 (function_try_block): Add.
5235
5236Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5237
5238 * call.c (convert_harshness): Use comptypes, not ==, to check if
5239 TYPE and PARMTYPE are equivalent on a function type.
5240
d11ad92e 5241Tue Sep 12 17:31:33 1995 Douglas Rupp <drupp@cs.washington.edu>
2453e8d1
DR
5242
5243 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
5244
f30432d7
MS
5245Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
5246
5247 * except.c (expand_throw): Never allocate storage for thrown pointer
5248 to objects.
5249
5250Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
5251
5252 * except.c (expand_start_catch_block): Pointers to objects come
5253 back from catch matching already dereferenced, don't dereference
5254 again.
5255
5256Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
5257
5258 * except.c (expand_throw): Only decay the throw expression, don't do
5259 any default conversions. This is so that one can throw and catch
5260 characters, and not have them match integers.
5261
5262Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
5263
5264 * error.c (dump_aggr_type): Deal with anonymous unions that don't
5265 have a TYPE_NAME.
5266
38267a70
BK
5267Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5268
5269 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
5270
f30432d7
MS
5271Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
5272
5273 * except.c (expand_end_eh_spec): Handle empty EH specifications.
5274
5275Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
5276
5277 * cp-tree.h (expand_start_eh_spec): Declare new routine.
d11ad92e 5278 (expand_end_eh_spec): Likewise.
f30432d7
MS
5279 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
5280 exception specifications.
5281 * except.c (expand_leftover_cleanups): Remove unused parameter.
d11ad92e
MS
5282 (expand_end_catch_block): Likewise.
5283 (expand_exception_blocks): Likewise.
f30432d7
MS
5284 (expand_start_eh_spec): New routine to mark the start of an
5285 exception specification region.
5286 (expand_end_eh_spec): New routine to mark the end of an exception
5287 specification region.
5288 (expand_exception_blocks): Call expand_end_eh_spec to process
5289 exception specifications.
5290
b37d04bc
PB
5291Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
5292
5293 * lex.c (do_identifier): Use global binding in preference of
5294 dead for local variable.
5295
f30432d7
MS
5296Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
5297
5298 * cp-tree.h (build_exception_variant): Remove used first argument.
d11ad92e
MS
5299 * decl.c (duplicate_decls): Likewise.
5300 (grokfndecl): Likewise.
5301 (revert_static_member_fn): Likewise.
5302 * decl2.c (grok_method_quals): Likewise.
5303 * tree.c (build_exception_variant): Likewise.
5304 * typeck.c (common_type): Likewise.
f30432d7
MS
5305 * decl2.c (grokclassfn): After changing the type, call
5306 build_exception_variant, if necessary.
5307
5308Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
5309
5310 * except.c (expand_throw): Run cleanups for the throw expression.
5311
d11ad92e 5312Wed Aug 30 15:24:38 1995 Stephen L. Favor <sfavor@tigger.intecom.com>
f30432d7
MS
5313
5314 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
5315 the store_parm_decls call which does initialization in the emit_*
5316 code concerning label numbering.
5317
5318Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
5319
5320 * except.c (expand_internal_throw): Let the frontend be responsible
5321 for managing all frontend EH parameters, the backend routine only
5322 needs to deal with backend values. type and value are no longer
5323 passed to __throw.
d11ad92e
MS
5324 (init_exception_processing): Likewise.
5325 (expand_start_all_catch): Likewise.
5326 (expand_end_all_catch): Likewise.
5327 (expand_leftover_cleanups): Likewise.
5328 (expand_end_catch_block): Likewise.
5329 (expand_builtin_throw): Likewise.
5330 (expand_throw): Likewise.
f30432d7
MS
5331
5332Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5333
5334 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
5335 for a decl.
5336 * decl.c (cp_finish_decl): Use it.
5337
5338Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
5339
5340 * except.c (expand_internal_throw): Oops, almost forgot type and
5341 value are now trees.
5342
5343Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5344
5345 Fix the attribute handling to make sure they get noted before we
5346 create the function's RTL, in case they can affect that.
5347 * decl.c (grokfndecl): New arg ATTRLIST. Run
5348 cplus_decl_attributes before creating the decl's rtl.
5349 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
5350 (shadow_tag, groktypename, start_decl, start_method): Pass a
5351 NULL_TREE to grokdeclarator's new last arg.
5352 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
5353 (grokbitfield, grokoptypename): Pass a NULL_TREE to
5354 grokdeclarator's new last arg.
5355 * except.c (expand_start_catch_block): Likewise.
5356 * pt.c (process_template_parm, end_template_decl,
5357 do_function_instantiation): Likewise.
5358 * cp-tree.h (grokfield): Add arg.
5359 (grokdeclarator): Move the prototype from here...
5360 * decl.h: ...to here.
5361 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
5362 ATTRLIST argument.
5363 * parse.y: Create a list for the grokfield arg where appropriate,
5364 and pass it down instead of calling cplus_decl_attributes.
5365
5366Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
5367
5368 * except.c: Always allow turning on exception handling. Allow cross
5369 compilations to use EH.
5370
5371Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
5372
5373 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
5374 trees, instead of rtxs, and don't depend on using special machine
5375 dependent registers.
d11ad92e
MS
5376 (expand_internal_throw): Likewise.
5377 (init_exception_processing): Likewise.
5378 (expand_start_all_catch): Likewise.
5379 (expand_end_all_catch): Likewise.
5380 (expand_start_catch_block): Likewise.
5381 (expand_leftover_cleanups): Likewise.
5382 (expand_end_catch_block): Likewise.
5383 (expand_builtin_throw): Likewise.
5384 (expand_throw): Likewise.
f30432d7
MS
5385
5386Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5387
5388 * cvt.c (build_expr_type_conversion): Handle conversions to
5389 reference types.
5390
5391Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
5392
5393 * except.c (do_unwind): Work around backend bug with -fpic.
5394
fb409a19
PB
5395Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
5396
5397 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
5398 for-scoping, but supports (and warns about) old programs.
5399 Make the new mode (with value 1) the default.
5400 (lang_f_options): The on-value for flag_new_for_scope is now 2.
5401 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
5402 (DECL_SHADOWED_FOR_VAR): Likewise.
5403 * decl.c (struct binding_level): New fields dead_vars_from_for
5404 and is_for_scope.
5405 (note_level_for_for): New function.
5406 (poplevel): Special processing if is_for_scope.
5407 (pushdecl): Warn if for-scope variable shadows local.
5408 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
5409 and warn if conflicts.
5410 * parse.y (FOR): Call note_level_for_for.
5411
f30432d7
MS
5412Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
5413
5414 * decl2.c (import_export_inline): Class interface hackery does not
5415 apply to synthesized methods.
5416
5417Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
5418
5419 * search.c (virtual_context): Find the right context more often.
5420 Solves a `recoverable compiler error, fixups for virtual function'
5421 problem.
5422
5423Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
5424
5425 * except.c (expand_start_all_catch): Ensure that we always transfer
5426 control to the right EH handler, by rethrowing the end label on the
5427 region, instead of hoping we are nested and falling through.
d11ad92e 5428 (expand_leftover_cleanups): Likewise.
f30432d7
MS
5429 (end_protect): Since we now rethrow the end label, put a
5430 nop after it, so that outer regions are recognized.
5431 * init.c (build_vec_delete_1): New routine to handle most of vector
5432 deleting, all code moved here from build_vec_delete.
5433 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
5434 work.
5435 (expand_vec_init): If the array needs partial destructing, setup an
5436 EH region to handle it.
5437 (build_vec_delete): Move lots of code to build_vec_delete_1, use
5438 build_vec_delete_1 to do the grunt work.
5439
5440Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5441
5442 Handle decl attributes properly for function definitions without
5443 previous attribute-loaded declarations.
5444 * decl.c (start_function): New arg ATTRS. Add a call to
5445 cplus_decl_attributes with it before we create the RTL.
5446 * cp-tree.h (start_function): Update prototype.
5447 * parse.y (fn.def1): Pass ATTRS into start_function instead of
5448 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
5449 for other use.
5450 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
5451 start_function.
5452 * method.c (synthesize_method): Likewise.
5453 * except.c (expand_builtin_throw): Likewise for start on __throw.
5454
5455Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
5456
5457 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
5458 This changes -fvtable-thunks vtable layout, so a recompile will be
5459 necessary, if you use -fvtable-thunks.
5460 (get_vtable_entry): Use n, instead of i to be consistent with the
5461 rest of the compiler.
d11ad92e 5462 (get_vtable_entry_n): Likewise.
f30432d7
MS
5463 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
5464 are being used.
d11ad92e 5465 (finish_struct_1): Likewise.
f30432d7
MS
5466 (skip_rtti_stuff): New routine to collapse similar code from many
5467 different parts of the compiler. I think I got them all.
5468 (modify_one_vtable): Use it.
d11ad92e
MS
5469 (fixup_vtable_deltas1): Likewise.
5470 (override_one_vtable): Likewise.
5471 * decl2.c (mark_vtable_entries): Likewise.
5472 * tree.c (debug_binfo): Likewise.
5473 * search.c (expand_upcast_fixups): Likewise.
5474 (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to
f30432d7 5475 consistent with the rest of the compiler.
d11ad92e 5476 (get_abstract_virtuals): Likewise.
f30432d7
MS
5477 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
5478 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
d11ad92e 5479 (build_typeid): Likewise.
f30432d7
MS
5480 (build_classof): Remove old style way of doing rtti. Remove support
5481 for `classof' and `headof'.
d11ad92e
MS
5482 * gxx.gperf: Likewise.
5483 * hash.h: Likewise.
5484 * parse.y: Likewise.
f30432d7
MS
5485
5486Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
5487
5488 * decl.c (start_function): Clear ctor_label and dtor_label.
5489
5490 * class.c (finish_struct_1): Fix handling of access decls.
5491
5492Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5493
5494 * class.c (finish_struct): Only do minimal processing here, so it
5495 can be used for class template definitions, as well.
5496 (finish_struct_1): New function with the rest of the code.
5497
5498Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
5499
5500 * class.c (prepare_fresh_vtable): On second though, always build the
5501 offset (see Aug 10 change), unless -fvtable-thunks is given. It
5502 does this by calling the new routine set_rtti_entry.
d11ad92e 5503 (finish_struct): Likewise.
f30432d7
MS
5504 (set_rtti_entry): New routine to update the rtti information at the
5505 start of the vtable.
5506
5507Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5508
5509 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
5510 if it's declared in the C++ language spec.
5511 (dump_function_decl): Likewise.
5512 (dump_function_name): Likewise.
5513 (ident_fndecl): Make sure we got something back from lookup_name.
5514 * decl.c (start_function): Likewise.
5515
5516Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5517
5518 * call.c (build_method_call): Don't call build_new when calling a
5519 constructor without an instance.
5520
5521Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
5522
5523 * class.c (prepare_fresh_vtable): Always build the offset to the
5524 complete object, as it doesn't cost much. This allows dynamic_cast
5525 to void * to work when -frtti isn't given.
d11ad92e 5526 (finish_struct): Likewise.
f30432d7
MS
5527
5528Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
5529
5530 * except.c (build_eh_type): Split out some functionality to new
5531 routine named build_eh_type_type.
5532 (build_eh_type_type): New routine.
5533 (expand_start_catch_block): Use build_eh_type_type, as we never want
5534 the dynamic type of the catch parameter, just the static type.
5535 Fixes core dumps when -frtti is used and one catchs pointers to
5536 classes.
5537
5538Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
5539
5540 * except.c (expand_builtin_throw): Since we now use normal calling
5541 conventions for __throw, we have to remove the first layer off the
5542 stack, so that the next context we search for handlers is the outer
5543 context instead of the context that had the call to __throw, if we
5544 don't immediately find the desired context.
5545
5546Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5547
5548 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
5549 * cp-tree.h: Update.
5550
5551 * parse.y (template_type_parm): Add support for `typename'.
5552
5553Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
5554
5555 * except.c (expand_internal_throw): New internal routine to throw a
5556 value.
5557 (expand_end_all_catch, expand_leftover_cleanups): All throwers
5558 changed to use `expand_internal_throw' instead of jumping to throw
5559 label.
d11ad92e 5560 (expand_end_catch_block, expand_throw): Likewise.
f30432d7
MS
5561 (throw_label): Removed.
5562 (expand_builtin_throw): Changed so that EH parameters are passed by
5563 normal function call conventions. Completes Aug 4th work.
5564
5565Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
5566
5567 * cp-tree.h (expand_builtin_throw): Declare it.
5568 * decl2.c (finish_file): Call expand_builtin_throw.
5569 * except.c (make_first_label): Remove.
5570 (init_exception_processing): Don't use a LABEL_REF for throw_label,
5571 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
5572 other functions that don't really appear in those functions. This
5573 solves a problem where cc1plus consumed exponential amounts of
5574 memory when -Wall was used.
5575 (expand_end_all_catch, expand_leftover_cleanups,
5576 expand_end_catch_block, expand_throw): Change all uses of
5577 throw_label to match new style.
5578 (do_unwind): Rename parameter to inner_throw_label, as it is now
5579 different from throw_label. Also, assume that our caller will wrap
5580 the passed label with a LABEL_REF, if needed.
5581 (expand_builtin_throw): Make external, change so that the generated
5582 throw is now a real function.
5583 (expand_exception_blocks): Never generate throw code inside another
5584 function.
5585
5586Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
5587
5588 * decl.c (grokdeclarator): Move checking of mutable const objects
5589 and mutable static objects down, as we might decide during parsing
5590 to unset staticp or constp (for example, when const is part of the
5591 object being pointed to).
5592
5593Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
5594
5595 * except.c (output_exception_table_entry): Enhance portability to
5596 weird machines.
d11ad92e 5597 (emit_exception_table): Likewise.
f30432d7
MS
5598
5599Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
5600
5601 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
5602 non-virtual member functions.
5603
5604Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
5605
5606 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
5607 and const T all match.
5608
5609Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
5610
5611 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
5612 T&, T and const T all match.
5613
5614Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
5615
5616 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
5617 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
5618 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
5619 InsnSave. Also, numerous speed improvements, and correctness
5620 improvements. Double faulting in all situations should now be
5621 handled correctly.
5622 (expand_start_all_catch): Instead of having many terminate protected
5623 regions, just have one.
5624 (expand_start_catch_block): No longer have to protect
5625 false_label_rtx, as it isn't used for EH region marking.
5626 (expand_end_catch_block): Expand out EH cleanups here by using
5627 expand_leftover_cleanups.
5628 (expand_end_all_catch): Use sequences instead of playing with insn
5629 links directly.
d11ad92e 5630 (expand_exception_blocks): Likewise. Also protect all catch clauses
f30432d7
MS
5631 with one terminate region.
5632
5633Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5634
5635 * method.c (report_type_mismatch): Don't talk about an object
5636 parameter for non-methods.
5637
5638Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5639
5640 * class.c (finish_struct): Catch private and protected members of
5641 anonymous unions here.
5642 * decl2.c (finish_anon_union): And here.
5643 * parse.y: Instead of here.
5644
5645 * errfn.c (ARGSLIST): Support passing four args.
5646 * error.c (cv_as_string): New function.
5647 (cp_printers): Add it.
5648 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
5649
5650 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
5651
5652 * init.c (expand_aggr_init): Handle volatile objects, too.
5653
5654Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5655
5656 * decl.c (struct binding_level): Keep list of incomplete decls.
5657 (print_binding_level): Use list_length to count them.
5658 (pushdecl): Build up the list.
5659 (hack_incomplete_structures): Walk it and prune completed decls.
5660
5661Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5662
5663 * typeck.c (comp_target_types): Don't check const and volatile for
5664 function types.
d11ad92e 5665 (comp_ptr_ttypes_real): Likewise.
f30432d7
MS
5666
5667Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5668
5669 * typeck.c (comp_target_types): Fix.
5670
5671Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
5672
5673 * cp-tree.h (unsave_expr_now, build_unsave_expr,
5674 cp_expand_decl_cleanup): Declare new routines.
5675 * decl.c (cp_finish_decl, store_parm_decls,
5676 hack_incomplete_structures): Change all cals from
5677 expand_decl_cleanup to cp_expand_decl_cleanup.
d11ad92e 5678 * gc.c (protect_value_from_gc): Likewise.
f30432d7
MS
5679 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
5680 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
5681 (unsave_expr_now): Backend routine used by tree expander.
5682 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
5683 work around a limitation in the backend. The backend uses the
5684 cleanups multiple times, on disjoint control flows, so we cannot
5685 pass unsaved SAVE_EXPRs to the backend.
5686 * tree.def (UNSAVE_EXPR): New tree code.
5687 * typeck.c (c_expand_return): Move goto/return code up inside
5688 conditional, as we don't always want to do this, we only want to do
5689 this when we don't otherwise finish with this control flow.
5690
5691Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5692
5693 * parse.y (typespec): Only complain about typeof if we're not
5694 getting it from a system header.
5695
5696Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
5697
5698 Clean up prefix attribute handling.
5699 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
5700 (declmods): Likewise.
5701 (all rules that reference typed_declspecs and declmods): Call
5702 split_specs_attrs or strip_attrs to separate declspecs and attrs.
5703 (lang_extdef): Delete resetting of prefix_attributes.
5704 (template_def, notype_declarator rule): Use NULL_TREE for
5705 prefix_attributes.
5706 (condition): Use NULL_TREE for prefix_attributes.
5707 (setattrs): Deleted.
5708 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
5709 (component_decl): Delete resetting of prefix_attributes.
5710 (component_decl_1, notype_components rule): Use NULL_TREE for
5711 prefix_attributes.
5712 (simple_stmt): Delete resetting of prefix_attributes.
5713
5714Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5715
5716 * call.c (convert_harshness): Deal with reference conversions before
5717 others. Actually do array->pointer decay. Call comp_target_types
5718 with pointer types rather than their targets.
5719
5720 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
5721
5722Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5723
5724 * pt.c (to_be_restored): Move decl to global scope.
5725
5726Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5727
5728 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
5729
5730Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5731
5732 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
5733 to pedwarn.
5734
5735 * pt.c (instantiate_template): Also avoid instantiation if the
5736 function has already been declared to be a specialization.
5737
5738 * decl2.c (check_classfn): Ignore cname argument, and return the
5739 matching function.
5740
5741 * decl.c (start_decl): Handle declarations of member functions
5742 outside of the class (i.e. specialization declarations).
5743
5744Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5745
5746 * class.c (finish_struct): Don't mess with the type of bitfields.
5747
5748 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
5749
5750Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
5751
5752 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
5753 is not a parameter list (TREE_LIST).
5754 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
5755 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
5756 but don't set it otherwise.
5757
5758Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
5759
5760 * init.c (expand_default_init): Don't allow two-level conversions
5761 during construction.
5762
5763Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
5764
5765 * gc.c (build_headof): The type of dyncasting to a pointer to cv
5766 void, should be pointer to cv void.
5767
5768Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
5769
5770 * gc.c (build_dynamic_cast): Allow casting in const.
5771
5772Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
5773
5774 * typeck.c (build_const_cast): If we are passed error_mark_node,
5775 return it.
5776
5777Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5778
5779 * class.c (push_nested_class): Make sure TYPE is non-nil.
5780
5781 * cvt.c (type_promotes_to): Watch for error_mark_node on the
5782 incoming TYPE.
5783
5784Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
5785
5786 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
5787 (SIGTABLE_VB_OFF_NAME): New macro.
5788 (vt_off_identifier): Renamed from offset_identifier.
5789 (vb_off_identifier): Added extern declaration.
5790
5791 * decl.c (vt_off_identifier): Renamed from offset identifier.
5792 (vb_off_identifier): New variable to hold the identifier for the
5793 sigtable field vb_off.
5794 (init_decl_processing): Initialize vb_off_identifier.
5795 Renamed vt_off_identifier from offset_identifier.
5796 * sig.c (build_signature_method_call): Renamed offset_identifier and
5797 local variable offset to vt_off_identifer and vt_off, respecitively.
5798 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
5799
5800 * decl.c (init_decl_processing): Add vb_off field to
5801 sigtable_entry_type. Reorder fields so that pfn gets properly
5802 aligned at a 64 bit boundary on the Alpha.
5803 * sig.c (build_signature_table_constructor): Build the constructor
5804 according to the new layout. Set the vb_off field to -1 for now.
5805
5806 * decl.c (init_decl_processing): Align sigtable_entry_type on word
5807 boundaries instead of double word boundaries to save space.
5808
f30432d7
MS
5809Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
5810
5811 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
5812
5813Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5814
5815 * parse.y (opt.component_decl_list): Only forbid private/protected
5816 in anonymous unions. We need to make this know when the type is
5817 defined for an object, to not give the error.
5818
5819Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5820
5821 * parse.y (opt.component_decl_list): Don't allow access control
5822 as private or protected for union members.
5823
5824Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
5825
5826 * lex.c (check_newline): For 'p' case, move goto skipline line to
5827 before end brace for 'pragma'.
5828
5829Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
5830
5831 * g++.1: Tiny updates.
5832
5833Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
5834
5835 * decl.c (cp_finish_decl): Only destruct local static variables if
5836 they are constructed, and only construct the first time control
5837 passes completely through its declaration (if not initialized with a
5838 constant-expression).
d11ad92e 5839 (expand_static_init): Likewise.
f30432d7
MS
5840
5841Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5842
5843 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
5844 is a TEMPLATE_TYPE_PARM, give a match.
5845
f30432d7
MS
5846Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
5847
5848 * method.c (build_overload_value): Handle encoding of null pointer
5849 constants (or any pointer with a constant numeric value) for
5850 templates.
5851
42783eab
BK
5852Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5853
5854 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
5855 const vs non-const for void conversions.
5856
f30432d7
MS
5857Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
5858
5859 * except.c (expand_start_all_catch): Fix problem with finding an
5860 outer nested try block when there is no code to separate it from an
5861 inner try block.
5862
5863Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
5864
5865 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
5866 memory please when virtual bases are used.
5867
5868Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
5869
5870 * class.c (build_vbase_path): Avoid testing things that cannot be
5871 null to see if they are null.
5872 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
5873 * decl.c (finish_function): Pass a type into the new
5874 convert_pointer_to_vbase instead of a binfo.
5875 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
5876 and convert_pointer_to_real.
5877 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
5878 of the more cryptic call to get_vbase.
5879
e18923b4 5880Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
5881
5882 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
5883
f30432d7
MS
5884Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5885
5886 * pt.c (instantiate_template): Don't strip 'this' twice.
5887
5888 * pt.c (coerce_template_parms): Allow null pointer constants.
5889
5890 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
5891 set.
5892
f30432d7
MS
5893Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5894
5895 * decl.c (revert_static_member_fn): Also remove 'this' from
5896 DECL_ARGUMENTS.
5897 * decl2.c (check_classfn): Don't revert this function until we get a
5898 match.
5899
5900Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5901
5902 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
5903
5904Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
5905
5906 * decl2.c (finish_file): Handle global vector news.
5907 * init.c (build_new): Encode vector news so that later we will know
5908 how many elements there are.
5909
e18923b4 5910Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
5911
5912 * expr.c (cplus_expand_expr): Don't mess with temp slots.
5913
f30432d7
MS
5914 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
5915 returns null.
5916
5917 * decl2.c (check_classfn): Use revert_static_member_fn.
5918 * decl.c (revert_static_member_fn): Diagnose static member functions
5919 declared const or volatile.
5920
5921 * decl2.c (grokfield): Check for missing default args here, too.
5922 (check_default_args): Function to do the checking.
5923 * decl.c (pushdecl): Use it.
5924
5925 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
5926 if there is no `this'.
5927
5928Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5929
5930 * call.c (build_method_call): Downgrade 'called before definition'
5931 to a warning, as it ought to go away after Monterey.
5932
5933Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5934
5935 * pt.c (coerce_template_parms): Don't do extra checking on pointer
5936 to member arguments.
5937
5938 * class.c (finish_struct): const and reference members don't prevent
5939 a class from being an aggregate.
5940
5941 * class.c (finish_struct): Signatures are always aggregates.
5942
f7d9d4a8
JM
5943Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5944
f30432d7
MS
5945 * decl2.c (check_classfn): Improve error message.
5946
5947 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 5948
f7522313
JM
5949Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5950
f30432d7 5951 * typeck.c (comptypes): Don't ignore method quals.
f7522313 5952
f30432d7
MS
5953 * class.c (finish_struct): Non-abstract virtuals are always USED.
5954
5955 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
5956 IS_AGGR_TYPE, either.
5957 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
d11ad92e 5958 * cp-tree.h: Likewise.
f30432d7
MS
5959
5960 * cp-tree.h (lang_type): Add aggregate.
5961 (CLASSTYPE_AGGREGATE): New macro.
d11ad92e 5962 (TYPE_NON_AGGREGATE_CLASS): Likewise.
f30432d7
MS
5963 * class.c (finish_struct): Determine whether a class is an
5964 aggregate.
5965 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
5966 TYPE_NEEDS_CONSTRUCTING.
5967 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
5968 subobjects, too.
5969
5970 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
5971
5972 * decl.c (start_function): For pre-parsed functions, layout all of
5973 the parm decls again.
5974 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
5975 DECL_EXTERNAL.
5976
f30432d7
MS
5977 * pt.c (coerce_template_parms): Improve checking for invalid
5978 template parms.
5979
5980Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5981
5982 * decl.c (grokdeclarator): Forbid declaration of a static member
5983 with the same name as its enclosing class.
5984
d8f1d487
RK
5985Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5986
5987 * decl.c (finish_function): Clear current_class_decl.
5988
5989 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
5990 instead of truthvalue_conversion.
5991
5992 * class.c (finish_struct): A data member with the same name as the
5993 class doesn't suppress constructors.
5994
d11ad92e 5995Fri Jun 16 18:11:39 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
5996
5997 * decl.c (start_function): If current_class_decl is a signature
5998 pointer, don't dereference it but set C_C_D to current_class_decl.
5999
6000Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6001
6002 * decl.c (duplicate_decls): Complain about virtual functions
6003 redeclared to be inline.
6004
6005Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
6006
6007 * decl.c (get_unique_name): New routine to name unnamed namespaces.
6008 (push_namespace): Use get_unique_name for naming unnamed namespaces.
6009
d3c89e1f
JM
6010Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6011
d8f1d487 6012 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 6013 appropriate.
d8f1d487
RK
6014
6015Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
6016
6017 * search.c (get_vbase): New routine to switch hierarchies from the
6018 CLASSTYPE_VBASECLASSES to the normal one.
6019 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
6020 want to convert to a vbase pointer.
6021
6022Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6023
6024 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 6025 template_classes.
d8f1d487
RK
6026 (do_pending_expansions): Call instantiate_member_templates on all of
6027 the classes in template_classes.
6028
6029Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
6030
6031 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
6032 TYPE_MAIN_VARIANT if it is not filled in.
6033 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
6034 error instead of core dumping.
6035
6036Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6037
6038 * call.c (can_convert): Also check for distance > 0.
d11ad92e
MS
6039 (can_convert_arg): Likewise.
6040 (user_harshness): Likewise.
d8f1d487
RK
6041
6042Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6043
6044 * g++.c (MATH_LIBRARY): Provide default.
6045 (main): Always link with the math library if we link with libstdc++.
6046
6047 * decl.c (start_function): Complain about redefinition of a function
6048 even when the pending_inline version is compiled after the other
6049 version.
6050
6051Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6052
6053 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
6054 aggregate type.
6055
d11ad92e 6056Wed Jun 7 15:31:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
6057
6058 * init.c (build_vec_delete): Resolve an offset ref before we try to
6059 use it.
6060
6061Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6062
6063 * typeck.c (build_modify_expr): If the class lacks a constructor or
6064 assignment operator, return error_mark_node.
6065 (common_type): Use build_cplus_array_type.
6066
6067Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
6068
6069 * class.c (dont_allow_type_definitions): New variable set when types
6070 cannot be defined.
6071 (finish_struct): Use it.
6072 * cp-tree.h (dont_allow_type_definitions): Define it.
6073 * parse.y (primary, handler_seq): Set it.
6074
6075Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
6076
6077 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
6078 results from lookup_fnfields. Always give warning/error on bad
6079 code.
6080
d11ad92e 6081Mon Jun 5 11:39:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
6082
6083 * init.c (member_init_ok_or_else): Don't allow initialization of
6084 an ancestor's member from within a constructor.
6085
d11ad92e 6086Mon Jun 5 11:20:34 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
6087
6088 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
6089 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
6090 abstract virtual functions are handled correctly.
6091
6092 * sig.c (build_signature_table_constructor): Store the correct
6093 delta in signature table entries. It does not yet work for
6094 classes with virtual base classes as implementations of signatures.
6095 (build_signature_method_call): Add the delta to the object_ptr
6096 before generating the function call.
6097
6098 * call.c (build_method_call): Make instance_ptr the signature
6099 pointer itself instead of dereferencing the optr.
6100 * sig.c (build_signature_method_call): Dereference the optr for the
6101 direct and virtual calls.
6102
6103 * sig.c (build_signature_table_constructor): Make the tag for
6104 default implementations -1 instead of 2.
6105 (build_signature_method_call): Change the generated conditional
6106 expression correspondingly.
6107
6108 * sig.c (build_signature_pointer_constructor): Deleted the sorry
6109 message that said we can't handle multiple inheritance for
6110 implementations of signatures
6111 (build_signature_method_call): Use the offset from the sigtable
6112 entry instead of the vptr field from the signature pointer for
6113 building a virtual function call.
6114
6115 * class.c (build_vfn_ref): Deleted signature specific code, we don't
6116 call this function anymore from build_signature_method_call.
6117
6118 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
6119 field in the object now instead of in the signature pointer/ref.
6120 (build_vptr_ref): Deleted extern declaration.
6121 * sig.c (build_vptr_ref): Deleted.
6122 (build_signature_pointer_or_reference_type): Deleted construction of
6123 the vptr field.
6124 (build_signature_pointer_constructor): Deleted initialization of/
6125 assignment to the vptr field.
6126
6127 * sig.c (build_signature_table_constructor): Convert the signature
6128 table entry fields to their correct types.
6129
6130 * sig.c (build_signature_table_constructor): Don't call digest_init
6131 for the fields of a sigtable entry, it's wasted time.
6132
6133 * sig.c (build_signature_table_constructor): Correctly set the
6134 offset and index fields of a sigtable entry. Build the constructor
6135 the way digest_init does, digest_init can't handle initializing an
6136 anonymous union inside a struct.
6137 (build_signature_method_call): Use the index field instead of the
6138 delta field to get the vtable index.
6139
6140 * decl.c (init_decl_processing): Fix number of fields for building
6141 sigtable_entry_type.
6142
6143 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
6144 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
6145 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
6146 * decl.c (tag_identifier, offset_identifier): New variables to
6147 hold the identifiers for the sigtable fields tag and offset.
6148 (init_decl_processing): Initialize these variables.
6149 (init_decl_processing): Use these variables to build the
6150 sigtable_entry_type structure. Rename the code and offset fields
6151 to tag and delta, respectively; add offset and index fields. Changed
6152 types of fields from short_integer_type_node to delta_type_node.
6153 * sig.c (build_signature_table_constructor): Rename code and offset
6154 to tag and delta, respectively.
d11ad92e 6155 (build_signature_method_call): Likewise. Use above variables.
d8f1d487 6156
d8f1d487
RK
6157Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6158
6159 * decl.c (lookup_name_real): Don't try to look anything up in an
6160 erroneous object.
6161
6162Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
6163
6164 * method.c (build_overload_int): New routine. Break out
6165 functionality from build_overload_value so we can reuse it.
6166 (build_overload_value): Handle pointer to member functions as value
6167 parameters for templates.
6168 (build_overload_identifier): Since template parameters are shared
6169 among all instantiations, we have to substitute in the real types
6170 in TREE_TYPE (parm).
d11ad92e
MS
6171 pt.c (coerce_template_parms): Likewise.
6172 (push_template_decls): Likewise.
d8f1d487
RK
6173 (grok_template_type): Deleted as template parameters are shared
6174 among all instantiations.
6175
6176Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
6177
6178 * decl.c (grokdeclarator): Always give errors on constant overflow
6179 for array indices.
6180
6181Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6182
6183 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
6184 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
6185 reference type.
6186 (build_indirect_ref): Fix check for *&.
6187
72b7eeff
MS
6188Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
6189
6190 * Version 2.7.0 released.
6191
d11ad92e 6192Fri Jun 16 15:07:29 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
72b7eeff
MS
6193
6194 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
6195
6196Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6197
6198 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
6199
6200Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
6201
6202 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
6203 * decl.c (finish_decl): New routine to handle call backs from the
6204 mid end (declare_hidden_char_array).
6205
6206Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6207
6208 * decl.c (start_function): Handle setting C_C_D here.
6209 (set_C_C_D): Removed.
6210 (struct saved_scope): Remove class_decl.
6211 (push_to_top_level): Don't save current_class_decl.
6212 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
6213 (struct cp_function): Add C_C_D.
6214 (push_cp_function_context): Save C_C_D.
6215 (pop_cp_function_context): Restore C_C_D.
6216
6217Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6218
6219 * decl.c (set_C_C_D): New function. suspend_momentary before
6220 building C_C_D.
6221 (pop_from_top_level): Call it.
d11ad92e
MS
6222 (start_function): Likewise.
6223 (pop_cp_function_context): Likewise.
72b7eeff
MS
6224
6225 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
6226 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
6227
6228 * decl.c (push_cp_function_context): Save current_class_decl.
6229 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
6230 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
d11ad92e 6231 (start_function): Likewise.
72b7eeff
MS
6232
6233 * class.c (popclass): Don't mess with current_class_decl,
6234 current_vtable_decl, or C_C_D.
6235
6236Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
6237
6238 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
6239
d11ad92e 6240Wed May 24 15:55:18 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
b796119f
RK
6241
6242 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
6243 * decl2.c (finish_anon_union): Likewise.
6244 * method.c (largest_union_member): Likewise.
6245
d11ad92e 6246Wed May 24 14:41:11 1995 H.J. Lu <hjl@nynexst.com>
103894f1
L
6247
6248 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
6249
d11ad92e 6250Mon May 22 17:38:48 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fbb47000
RK
6251
6252 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
6253 Use $@ instead of output name so works even if have .exe.
6254 (cxxmain.o): Use cp if ln -s fails.
6255 (c++.install-man): Use $(exeext) in executable names.
6256 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
6257 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
6258
878cd289
MS
6259Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
6260
6261 * call.c (build_method_call): parms can be null, duh.
6262
6263Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
6264
6265 * call.c (build_method_call): If convert_arguments failed, just bail.
6266
6267Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6268
6269 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
6270
6271 * tree.c (copy_to_permanent): Oops.
6272
d11ad92e 6273Fri May 19 10:01:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
878cd289
MS
6274
6275 * cp-tree.h (break_out_target_exprs): Add decl.
6276
6277Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6278
6279 * decl.c (start_function): Move *all* interface handling stuff after
6280 the pushdecl.
6281
6282 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
6283 (perm_manip): Return t if permanent, otherwise 0.
6284 (copy_to_permanent): Use them.
6285 (bot_manip): Helper for break_out_target_exprs.
6286 (break_out_target_exprs): New function. Uses mapcar.
6287
6288 * typeck.c (convert_arguments): Use it.
6289
6290 * method.c (hack_identifier): Use convert_from_reference to
6291 dereference a reference.
6292
6293Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
6294
6295 * call.c (convert_harshness): Move reference bashing before pointer
6296 to member bashing.
6297
6298Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
6299
6300 * cvt.c (convert_to_reference): Only complain, if complaints are
6301 wanted.
d11ad92e
MS
6302 * typeck.c (build_function_call_real): Likewise. If
6303 LOOKUP_SPECULATIVELY is set and something won't work, return
6304 NULL_TREE.
6305 * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call.
878cd289 6306 (convert): Pass LOOKUP_NORMAL to cp_convert.
d11ad92e 6307 * typeck.c (convert_for_assignment): Likewise.
878cd289 6308 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 6309 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
6310 (convert_for_initialization): Use cp_convert instead of convert so
6311 that we can pass flags down.
6312 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
6313
c19a8067
JM
6314Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6315
878cd289
MS
6316 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
6317 decl type.
6318
c19a8067
JM
6319 * class.c (finish_struct): Don't complain about a class with no
6320 user-defined constructors but with a member that has no default
6321 constructor, as this is OK for aggregates.
6322
6323 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
6324 constructor call, mark slot addressable.
6325
d11ad92e 6326Tue May 16 18:37:51 1995 Douglas Rupp <drupp@cs.washington.edu>
eacd15bc
DR
6327
6328 * g++.c: Changed WINNT to _WIN32.
6329
a9aedbc2
MS
6330Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
6331
6332 * lex.c (handle_sysv_pragma): Don't use token_buffer.
6333
6334Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
6335
6336 * call.c (resolve_scope_to_name): Add initial semantic support for
6337 namespaces.
d11ad92e
MS
6338 * class.c (finish_struct): Likewise.
6339 * cp-tree.h (NAMESPACE_LEVEL): Likewise.
6340 * cvt.c (build_up_reference, convert_to_reference): Likewise.
6341 * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise.
6342 (resume_binding_level, toplevel_bindings_p): Likewise
6343 (namespace_bindings_p, declare_namespace_level): Likewise.
6344 (resume_level, push_namespace, pop_namespace): Likewise.
6345 (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise.
6346 (implicitly_declare, lookup_namespace_name): Likewise.
6347 (lookup_name_real, start_decl, make_temporary_for_reference): Likewise.
6348 (obscure_complex_init, finish_decl, expand_static_init): Likewise.
6349 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise.
6350 (store_parm_decls, hack_incomplete_structures): Likewise.
6351 * decl2.c (get_temp_name, finish_anon_union): Likewise.
6352 (current_namespace, push_namespace, pop_namespace): Likewise.
6353 (do_namespace_alias, do_toplevel_using_decl): Likewise.
6354 (do_class_using_decl): Likewise.
6355 * error.c (dump_decl): Likewise.
6356 * init.c (build_member_call, build_offset_ref): Likewise.
6357 * lex.c (identifier_type): Likewise.
6358 * parse.y (lang_extdef, using_decl, extdef): Likewise.
6359 (component_decl_1, nested_name_specifier_1): Likewise.
6360 * spew.c (yylex): Likewise.
6361 * tree.def (NAMESPACE_DECL): Likewise.
a9aedbc2
MS
6362
6363Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6364
6365 * decl.c (push_overloaded_decl): Return the new decl even if it
6366 can't be pushed.
6367
6368Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
6369
6370 * typeck.c (decay_conversion): Split out from default_conversion.
6371 (default_conversion): Call it.
d11ad92e 6372 (build_binary_op): Likewise.
a9aedbc2
MS
6373 (build_binary_op_nodefault): Use decay_conversion for truth ops.
6374
6375Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6376
6377 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
6378 (duplicate_decls): Always use the old decl's linkage info. Don't
6379 play with linkage of consts.
6380 (pushdecl): Don't play with linkage of consts.
6381 (redeclaration_error_message): Don't complain about an old public
6382 decl and a new non-public decl here.
6383 (grokvardecl): Handle linkage of consts here.
6384 (grokdeclarator): An 'extern inline' is public. Pass constp to
6385 grokvardecl.
6386 (start_function): Wait until after the pushdecl to do some linkage
6387 stuff.
6388
6389 * decl2.c (import_export_vtable): Make duplicates weak rather than
6390 static if supported.
d11ad92e
MS
6391 (import_export_inline): Likewise.
6392 * pt.c (do_pending_expansions): Likewise.
a9aedbc2
MS
6393
6394 * class.c (build_vbase_path): flag_assume_nonnull_objects only
6395 affects reference conversion.
6396
6397 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 6398 rtl_expr_chain.
a9aedbc2
MS
6399 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
6400
7154457b
PE
6401Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
6402
6403 * method.c (numeric_output_need_bar): Renamed from misspelling.
6404
45ca9d09
RK
6405 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
6406
7ab7b006
RK
6407Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6408
6409 * lang-options.h, lang-specs.h: New files.
6410
fd378c9d
JM
6411Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6412
6413 * typeck.c (default_conversion): Don't check for BLKmode before
6414 pulling out the decl_constant_value.
6415
6416 * decl.c (start_function): Clear named_labels and shadowed_labels.
6417
6418 * typeck.c (build_function_call_real): Also synthesize methods here.
6419
6420Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6421
6422 * decl2.c (finish_file): Synthesize exported methods before the
6423 reconsider loop.
6424
6425 * parse.y: Move declaration of flag_new_for_scope to file scope.
6426
863adfc0
MS
6427Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
6428
6429 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
6430 * parse.y (FOR): Conditionalize the pushing and poping of scope for
6431 the for-init-statement upon the new flag_new_for_scope.
6432 * parse.y (try_block): Simplify and use compstmt.
6433
6434Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6435
6436 * decl.c (define_function): Mark function decl artificial.
6437
6438Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6439
6440 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
6441
6442 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
d11ad92e 6443 * tree.c (build_cplus_method_type): Likewise.
863adfc0
MS
6444
6445 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
6446
6447 * typeck.c (build_function_call_real): If convert_arguments failed,
6448 just bail.
6449 (convert_arguments): If one of the arguments is error_mark_node,
6450 just bail.
6451
6452Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6453
6454 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
6455 decls that don't include it.
6456
6457Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6458
6459 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
6460 DECL_NOT_REALLY_EXTERN set aren't extern decls.
6461
6462 * typeck.c (build_indirect_ref): Don't call default_conversion for a
6463 parameter of reference_type.
6464 * cvt.c (convert_from_reference): Just use build_indirect_ref.
6465
6466 * pt.c (do_type_instantiation): Only instantiate member functions
6467 that actually come from templates.
6468
6469Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
6470
6471 * parse.y: Generalized cleanup of poplevels, and compound statements
6472 and compound statements in try blocks. Rewritten `for' rule so that
6473 the scope of variables declared in the for clause is shortened to
6474 span just to the end of the statement, instead of the whole
6475 containing block.
6476
6477Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6478
6479 * call.c (convert_harshness): Handle pointers to members better.
6480
6481Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6482
6483 * decl2.c (delete_sanity): Do access control here.
6484 * init.c (build_delete): Instead of here.
6485
6486 * Make-lang.in: Build c++filt.
6487
6488Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6489
6490 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
6491 update our IDENTIFIER_TYPE_VALUE.
6492
a5894242
MS
6493Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6494
6495 * lex.c (cons_up_default_function): Fix linkage of #pragma
6496 implemented functions.
6497
6498Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6499
6500 * method.c (build_overload_name): Simplify and fix repeated type
6501 folding.
6502
6503 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 6504 members.
a5894242
MS
6505
6506Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
6507
6508 * typeck2.c (process_init_constructor): Make sure initializers are
6509 fully digested.
6510
6511Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
6512
6513 * lex.c (cons_up_default_function): Always defer synthesis.
6514
6515Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6516
6517 * decl2.c (mark_inline_for_output): Don't play with pending_inline
6518 stuff.
6519
6520Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6521
6522 * call.c (user_harshness): New function; like build_type_conversion,
6523 but doesn't actually build anything.
6524 (compute_conversion_costs): Use it instead of build_type_conversion.
6525
6526Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
6527
6528 * typeck.c (build_function_call_real): Improve error message for
6529 calling a non-function.
6530
6531 * method.c (hack_identifier): Lose check for calling a data member.
6532
6533Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
6534
6535 * typeck2.c (build_functional_cast): Remove very old cruft.
6536 Seems like good code is generated without it.
6537
6538Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6539
6540 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
d11ad92e 6541 (do_build_copy_constructor): Likewise.
a5894242
MS
6542
6543 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
6544
6545 * decl.c (push_switch): New function.
d11ad92e 6546 (pop_switch): Likewise.
a5894242
MS
6547 (define_case_label): Check for jumping over initialization.
6548
6549 * call.c (build_method_call): Check for an inline function being
6550 called before its definition has been seen.
d11ad92e 6551 * typeck.c (build_function_call_real): Likewise.
a5894242
MS
6552
6553 * decl.c (duplicate_decls): Check for a function being redeclared
6554 inline after its address has been taken.
6555
6556 * typeck.c (build_conditional_expr): Handle related class lvalues.
6557
6558Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6559
6560 * pt.c (do_pending_expansions): Don't expand unused templates.
6561
6562 * parse.y (component_decl): Accept a lone semicolon.
6563
6564Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
6565
6566 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
6567 object parameter anymore.
6568
6569 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
6570
6571Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6572
6573 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
d11ad92e 6574 (lang_extdef): Likewise.
a5894242
MS
6575
6576 * parse.y (maybe_parmlist): New rule for use in declarators where
6577 this could either be a list of expressions or parameters. Calls
6578 suspend_momentary before deciding which.
6579 (direct_after_type_declarator): Use it.
6580 (complex_direct_notype_declarator): Use it.
6581
6582 * pt.c (tsubst): Propagate attributes const and noreturn.
6583
6584 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
6585 before doing the default thing.
6586
2db70b29
DE
6587Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
6588
6589 * typeck.c (common_type): Call lookup_attribute instead of
6590 value_member.
6591
d11ad92e 6592Tue Apr 25 18:07:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
91887f0b
RK
6593
6594 * Make-lang.in: Change "realclean" to "maintainer-clean".
6595
e8abc66f
MS
6596Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
6597
6598 * decl2.c (finish_file): Fix broken linked list handling.
6599
6600Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6601
6602 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
6603 as often.
d11ad92e 6604 (finish_struct): Likewise.
e8abc66f
MS
6605
6606 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
6607
6608 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
6609 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
6610
6611Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
6612
6613 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
6614 it is of the same type as the return value.
6615
6616Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6617
6618 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
6619 out its assembly.
6620
6621 * typeck.c (convert_for_initialization): Don't call a trivial copy
6622 constructor.
6623
6624 * typeck2.c (store_init_value): Only abort if the type has a
6625 non-trivial copy constructor.
6626
6627 * typeck.c (c_expand_return): If we're returning in a register and
6628 the return value is a TARGET_EXPR, expand it. Only do
6629 expand_aggr_init if we're returning in memory.
6630 (expand_target_expr): Function to expand a TARGET_EXPR.
6631 (build_modify_expr): Use it.
6632
6633 * tree.c (build_cplus_new): Layout the slot.
6634
6635 * expr.c (cplus_expand_expr): Use expand_call to expand the call
6636 under a NEW_EXPR, so the target is not discarded.
6637
6638Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
6639
6640 * gc.c (build_dynamic_cast): Tighten error checking.
6641
6642Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6643
6644 * expr.c (cplus_expand_expr): Only abort if the returned target is
6645 different from what we expected if the type has a non-trivial copy
6646 constructor.
6647
6648 * decl2.c (cplus_decl_attributes): Attributes applied to a template
6649 really apply to the template's result.
6650
6651 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
6652 to decide whether to consider a CALL_EXPR an lvalue.
6653
6654 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
6655 type has a non-trivial copy constructor.
6656
6657 * decl.c (start_function): If interface_known, unset
6658 DECL_NOT_REALLY_EXTERN on the function.
6659
6660Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6661
6662 * pt.c (do_function_instantiation): Handle explicit instantiation of
6663 member functions.
6664 (do_type_instantiation): Handle 'inline template class foo<int>',
6665 meaning just spit out the vtable.
6666
6667 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
6668 the consed functions.
6669
6670 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
6671
d11ad92e 6672Wed Apr 19 16:28:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
e8abc66f
MS
6673
6674 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
6675 typeck.c: Include output.h.
6676
d11ad92e 6677Wed Apr 19 14:57:21 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
e8abc66f
MS
6678
6679 * call.c (build_method_call): Allow a signature member functions to
6680 be called from a default implementation.
6681
6682Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6683
6684 * repo.c (finish_repo): Remember what directory we are in.
6685
6686 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
6687
6688 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
6689 out the second copy of the symbol name. Don't remember COLLECT_GCC.
6690
43f2999d
MS
6691Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
6692
6693 * search.c (virtual_context): New function to get the virtual
6694 context of a function.
6695 (expand_upcast_fixups): New function to generate runtime vtables.
d11ad92e 6696 (fixup_virtual_upcast_offsets): Likewise.
43f2999d
MS
6697 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
6698 ensure that the this offsets for upcasts from virtual bases into
6699 other virtual bases or non-virtual bases are correct at construction
6700 time and destruction time.
6701 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
6702 vtables in all virtual bases, instead of just one vtable in each
6703 virtual base.
d11ad92e 6704 (fixup_vtable_deltas1): Likewise.
43f2999d 6705
d11ad92e 6706Tue Apr 18 03:57:35 1995 Michael Meissner <meissner@cygnus.com>
44a8d0b3
MS
6707
6708 * Makefile.in (lex.o): Add dependency on c-pragma.h.
6709
6710 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
6711 appropriate, instead of 0.
6712
6713Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6714
6715 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
6716 comparing local and global decls.
6717
6718Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6719
6720 * typeck.c (convert_arguments): Only prohibit passing to ... of
6721 types with non-trivial copy constructors.
6722
6723 * repo.c (repo_template_used): Don't try to mess with no id.
6724
6725Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
6726
6727 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
6728
d11ad92e 6729Thu Apr 13 15:37:42 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
44a8d0b3
MS
6730
6731 * cp-tree.h (current_tinst_level): Delete declaration, since it's
6732 static inside pt.c.
6733
6734 * typeck.c (build_modify_expr): Catch incompatible array assignment.
6735
6736 * parse.y (attribute_list, attrib): Rewrite actions to feed the
6737 right stuff to decl_attributes.
6738
6739Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6740
6741 * search.c (dfs_debug_mark): Check for magic virtual like
6742 import_export_vtable.
6743
6744 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
6745 four args.
6746
6747Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
6748
6749 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
6750 decision.
6751
6752Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6753
6754 * decl.c (finish_decl): If we're writing out a static data member of
6755 a class, we want the debug info for that class.
6756
6757 * gc.c (build_t_desc): Check linkage of a class properly.
6758
6759 * class.c (finish_struct): Set the 'headof' offset for the main
6760 vtable properly.
6761 (prepare_fresh_vtable): Fix typeinfo pointer here.
6762 (modify_one_vtable): Instead of here.
6763
6764Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6765
6766 * repo.c (repo_get_id): New function to return the interesting
6767 identifier for a repo entity.
6768 (repo_template_used): Use it.
6769 (repo_template_instantiated): Mark the id as chosen.
6770 (init_repo): Record whether or not the id was chosen.
6771 (finish_repo): Note if an id was newly chosen.
6772
6773 * pt.c (do_function_instantiation): Call repo_template_instantiated.
d11ad92e 6774 (do_type_instantiation): Likewise. Don't diagnose multiple
44a8d0b3
MS
6775 instantiation.
6776
6777 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
6778 whether or not to synthesize a method.
6779
6780 Undo these changes:
6781 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6782 * class.c (modify_all_direct_vtables): ditto.
6783 * init.c (expand_direct_vtbls_init): expand more vtables if
6784 flag_rtti is on.
6785
79ff2c6c
MS
6786Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
6787
6788 * gc.c (build_headof): Use ptrdiff_type_node instead of
6789 integer_type_node on pointer arithmetic.
6790
6791Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6792
6793 * typeck.c (build_modify_expr): Undo previous change.
6794
6795Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6796
6797 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
6798
6799 * repo.c (get_base_filename): Put the .rpo file in the directory
6800 with the object file, not the source.
6801
6802 * typeck.c (build_conditional_expr): Handle pmf's better.
6803
6804 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
6805 the name of the symbol.
6806
6807Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6808
6809 * repo.c (open_repo_file): Make repo filename DOS-compliant.
6810 (*): Also write a new repo file if some previously-used
6811 templates are no longer used. Only remember the identifier.
6812
6813 * lex.c (cons_up_default_function): If this function belongs to a
6814 template class, call repo_template_used for it.
6815
6816 * repo.c (repo_template_used): Using a class means using its vtable,
6817 if any.
d11ad92e 6818 (finish_repo): Likewise.
79ff2c6c
MS
6819
6820 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
6821 if the type has a complex copy constructor.
6822
6823 * decl2.c (lang_decode_option): -frepo implies
6824 -fno-implicit-templates.
6825
6826 * decl.c (start_function): Clear current_{base,member}_init_list.
6827
6828 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
6829
6830Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6831
6832 * decl.c (struct cp_function): Add {base,member}_init_list.
6833 (push_cp_function_context): Save current_{base,member}_init_list.
6834 (pop_cp_function_context): Restore them.
6835
b19b4a78
MS
6836Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6837
6838 * repo.c (get_base_filename): Take filename parm, fix logic bug.
6839
6840 * typeck.c (build_compound_expr): Do not warn about a compound expr
6841 in which the first expression has no side effects.
6842 (build_x_compound_expr): Warn here instead.
6843 (build_conditional_expr): Don't warn about a conditional expression
6844 between an enum and the type it promotes to.
6845
6846 * init.c (build_new): Handle initialization of arrays of builtins
6847 properly.
6848
d11ad92e 6849Mon Apr 3 15:08:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b19b4a78
MS
6850
6851 * repo.c: Include config.h to get definitions of bcopy and rindex
6852 on systems that don't have them (e.g., SVR4).
6853
6854Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
6855
6856 * decl2.c (finish_table): Pass NULL_TREE instead of init to
6857 finish_decl so that it won't try and do error checking on the
6858 initializer.
6859
6860Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6861
6862 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
6863 determine whether this compile used -c -o.
6864 (open_repo_file): Use get_base_filename. Remove the extension.
6865 (finish_repo): Spit out the values of main_input_filename,
6866 COLLECT_GCC and COLLECT_GCC_OPTIONS.
6867
6868 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
6869
faae18ab
MS
6870Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6871
6872 * search.c (compute_access): Don't try to do access control on
6873 nested types.
6874
6875Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6876
6877 * repo.c: New file to handle things repo.
6878
6879 * pt.c (instantiate_template): Call repo_template_used if the
6880 definition is accessible.
6881 (mark_function_instantiated): Split out from
6882 do_function_instantiation.
6883 (mark_class_instantiated): Split out from do_type_instantiation.
6884
6885 * parse.y (template_instantiate_once): Call repo_template_used.
6886
6887 * lex.c (lang_init): Call init_repo.
6888
6889 * decl2.c: Handle flag_use_repository.
6890 (finish_file): Call finish_repo.
6891
6892 * decl.c (start_method): Call repo_template_used if this is a
6893 template method.
6894
6895 * Makefile.in (CXX_OBJS): Add repo.o.
6896 (repo.o): Add dependencies.
6897
6898 * Make-lang.in (CXX_SRCS): Add repo.c.
6899
6900 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
6901 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
6902
6903 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
6904 types used.
6905
6906 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
6907
6908Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6909
6910 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
6911 and result_type. When checking for comparison between signed
6912 and unsigned, use result_type rather than the (possibly shortened)
6913 type of op0. Also, don't warn about equality comparison of a
6914 signed operand to an unsigned constant that fits in the signed
6915 type.
6916
6917 * method.c (do_build_copy_constructor): Reverse
6918 current_base_init_list after we've built it up.
6919
6920Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
6921
6922 * except.c (build_throw): Never warn about the value of throw not
6923 being used.
6924
6925Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
6926
6927 * except.c (expand_start_catch_block): Check for bad catch parameter
6928 declarations.
6929
6930Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6931
6932 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
6933 DECL_EXTERNAL is not already set.
6934
6935Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
6936
6937 * method.c (emit_thunk): Let poplevel know that the last level is
6938 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
6939
6940Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6941
6942 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
6943 here.
6944
6945 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
6946 METHOD_TYPE.
6947 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
6948 all deferred inlines.
6949
6950Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6951
6952 * cp-tree.h (DECL_THIS_INLINE): New macro.
6953 (DECL_NOT_REALLY_EXTERN): New macro.
6954 (DECL_THIS_STATIC): New macro.
6955
6956 * decl.c: Lose all references to current_extern_inline. Break
6957 inline semantics into DECL_INLINE for actual inlining and
6958 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
6959 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
6960 emit an inline here. Associated changes.
d11ad92e
MS
6961 * lex.c: Likewise.
6962 * pt.c: Likewise.
6963 * typeck.c: Likewise.
faae18ab
MS
6964
6965 * call.c (build_method_call): Don't bother trying to handle inlines
6966 specially.
d11ad92e 6967 * cvt.c (convert_to_aggr): Likewise.
faae18ab
MS
6968
6969 * pt.c (do_function_instantiation): Handle instantiation of
6970 public inlines, too.
6971
6972Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
6973
6974 * except.c (init_exception_processing): Change the interface for
6975 __throw_type_match and add decl for new rtti matching routine
6976 __throw_type_match_rtti.
6977 (build_eh_type): New routine to build a run time descriptor for the
6978 expression given.
6979 (expand_start_catch_block): Update to use new calling convention for
6980 the matcher.
6981 (expand_throw): Update to use build_eh_type.
6982
08fb8ad0
WL
6983Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
6984
6985 * g++.c: Removed __NetBSD__ from conditional.
6986 Declare strerror if HAVE_STRERROR is defined; otherwise
6987 declare sys_errlist and sys_nerr.
6988 (my_strerror): New function.
6989
71851aaa
MS
6990Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6991
6992 * search.c (get_binfo): Don't try to be so clever.
6993
6994 * tree.c (copy_to_permanent): Also suspend_momentary().
6995
6996 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
6997 if the types are the same.
6998
6999 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 7000 we should.
71851aaa
MS
7001
7002 * init.c (build_member_call): Hand constructor calls off to
7003 build_functional_cast.
7004
7005 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
7006 the name of the type.
7007
d11ad92e 7008Tue Mar 28 13:13:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
7009
7010 * decl.c (grokdeclarator): Check for the decl returned by
7011 grokfndecl to be null before using build_decl_attribute_variant.
7012
d11ad92e 7013Mon Mar 27 18:04:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
7014
7015 * init.c (build_new): Use build_pointer_type instead of
7016 TYPE_POINTER_TO.
7017
7215f9a0
MS
7018Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7019
71851aaa
MS
7020 * typeck.c (build_conditional_expr): Handle pmfs.
7021 (convert_for_assignment): Fix pmf support.
7022
7023 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
7024 (cp_convert_to_pointer): Handle pmfs.
7025 (cp_convert): Pass pmfs to cp_convert_to_pointer.
7026
7027 * typeck.c (common_type): Handle inheritance for pmfs.
7028
7029 * typeck2.c (build_m_component_ref): Do access control.
7030
7031 * typeck.c (comp_target_types): Check for conversion to void *
7032 before checking trickier conversions.
7033
7215f9a0
MS
7034 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
7035
7036 * pt.c (push_tinst_level): Complain if template instantiation depth
7037 is greater than max_tinst_depth.
7038
7039 * typeck.c (common_type): Assume that we can call common_type to
7040 unify the target type of a pointer.
7041
7042Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7043
7044 * decl2.c (finish_file): Don't synthesize methods at
7045 finish_vtable_prevardecl time. Do synthesize methods that are not
7046 used, but are public and not external.
7047
7048 * cvt.c (build_type_conversion): Only give an error if for_sure.
7049
7050 * typeck.c (comp_target_types): Only support pointer conversions if
7051 nptrs > 0.
7052
d11ad92e 7053Wed Mar 22 19:30:15 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7215f9a0
MS
7054
7055 * init.c (build_new): Catch use of an initializer list where it
7056 shouldn't be.
7057
7058Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7059
7060 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
7061 non-constant.
7062
7063 * decl2.c: temp_name_counter is now public.
7064
7065 * decl.c (struct cp_function): Add temp_name_counter field.
7066 (push_cp_function_context): Save it.
7067 (pop_cp_function_context): Restore it.
7068
7069 * typeck.c (common_type): Handle unifying function types, and unify
7070 unmatched things to void* with a compiler_error, rather than
7071 silently like before.
7072
28cbf42c
MS
7073Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
7074
7075 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
7076 Brendan's last change and fix latent problem that causes TD entries
7077 to not come out when the things that need them has yet to be
7078 expanded.
7079
7080Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7081
7082 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
7083 and type1, since we might have changed op0 or op1.
7084
7085Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
7086
7087 * typeck.c (common_type): Don't mess up templates.
7088
7089Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7090
7091 * typeck.c (common_type): Handle ptms properly. Also handle
7092 T* -> void*.
7093 (build_binary_op_nodefault): New variable build_type controls what
7094 type is given to the expression when it is created. Set this to
7095 boolean_type_node for comparison ops instead of using result_type.
7096 (comp_target_types): Allow T * -> void *.
7097
7098 * cvt.c (cp_convert_to_pointer): Do access control when converting
7099 ptms, too.
7100
d11ad92e 7101Tue Mar 21 17:25:06 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7102
7103 * parse.y (extern_lang_string): Catch use of linkage specs that
7104 aren't all naming the same language.
7105
7106 * class.c (finish_struct): Delete accidental duplicate code.
7107
7108Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7109
7110 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
7111 comparing functions and incomplete types.
7112
7113 * decl.c (finish_function): Only unset current_function_decl if
7114 !nested.
7115 (duplicate_decls): Last change went too far; we only want to stop
7116 checking for value/reference ambiguity.
7117
7118Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
7119
7120 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
7121 out fresh, as the new type may be larger.
7122
7123Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7124
7125 * expr.c (extract_init): Try to expand the RTL for the
7126 initialization and figure out what it will look like so we can avoid
7127 run-time initialization. Disabled for now.
7128 (extract_scalar_init): Helper for scalar initialization.
7129 (extract_aggr_init): Helper for aggregate initialization.
7130
7131 * decl.c (duplicate_decls): Don't complain about ambiguous
7132 declarations.
7133 (obscure_complex_init): Now returns a tree. Call extract_init if
7134 we're optimizing and this is a toplevel decl.
7135 (finish_decl): Update accordingly.
7136
7137 * lex.c (check_newline): If we're just changing files (not pushing
7138 or popping), update input_file_stack->name.
7139
7140Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
7141
7142 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
7143 in the transitive unification code.
7144
d11ad92e 7145Mon Mar 20 16:07:50 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7146
7147 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
7148 non-functions.
7149 (grokdeclarator): Don't allow friends to be defined in local classes.
7150
7151Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7152
7153 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
7154 rather than DECL_SAVED_INSNS to decide whether or not this method
7155 was declared inline.
7156
7157 * method.c (synthesize_method): Turn off DECL_INLINE if
7158 function_cannot_inline_p thinks we're too large.
7159
7160 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
7161
7162Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7163
7164 * class.c (instantiate_type): Handle pmfs.
7165
7166 * typeck.c (convert_for_assignment): Check types when assigning one
7167 pmf to another.
7168
7169 * decl.c (define_label): Fix logic for printing out the name of the
7170 label in an error message.
7171
7172 * error.c (dump_expr): Support ARRAY_REF.
7173
d11ad92e 7174Fri Mar 17 17:43:02 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7175
7176 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
7177 (finish_prevtable_vardecl): Instead of here.
7178
7179Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7180
7181 * decl.c (expand_static_init): Also use expand_aggr_init if the
7182 initializer is a TREE_LIST.
7183 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
7184
7185 * pt.c (unify): Fix unification of return type.
7186
7187 * expr.c (fixup_result_decl): Use store_expr, rather than
7188 emit_move_insn, to move the return value into the place where
7189 callers will expect it.
7190
7191Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7192
7193 * init.c (build_offset_ref): Call assmble_external on functions.
d11ad92e 7194 * typeck.c (build_component_ref): Likewise.
28cbf42c 7195
d11ad92e 7196Thu Mar 16 20:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7197
7198 * decl.c (struct saved_scope): Add members base_init_list and
7199 member_init_list.
7200 (push_to_top_level): Save current_base_init_list and
7201 current_member_init_list to them.
7202 (pop_from_top_level): Put it back.
7203
7204Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7205
7206 * pt.c (instantiate_template): Call assemble_external.
7207
d11ad92e 7208Thu Mar 16 18:07:54 1995 Brendan Kehoe <brendan@phydeaux.cygnus.com>
28cbf42c
MS
7209
7210 * class.c: Include rtl.h, to get NULL_RTX.
7211 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
7212 on hosts with different sizes for each part of the union.
7213 * tree.c: Also include rtl.h.
7214 (layout_basetypes): Same change for DECL_SAVED_INSNS.
7215
7216Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7217
7218 * pt.c (unify): Fix array domain unification for 64-bit targets.
7219
7220 * decl2.c (finish_file): Push bizarre type decl before walking the
7221 vtables the first time.
7222 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
7223 with TREE_CHAIN (prev).
7224
7225 * init.c (emit_base_init): Use convert_pointer_to_real instead of
7226 convert_pointer_to when converting to a direct base.
7227
7228Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
7229
7230 * pt.c (type_unification): Handle transitive unification better.
7231
7232Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7233
7234 * decl2.c (walk_vtables): Always set prev to vars.
7235 (mark_vtable_entries): Call assemble_external on the vtable entries.
7236
7237 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 7238 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
7239
7240 Finally re-enable dynamic synthesis. This time it works.
7241 * method.c (synthesize_method): Pass decl_function_context (fndecl)
7242 to {push,pop}_cp_function_context.
7243 * decl.c (push_cp_function_context): Now takes a tree argument.
d11ad92e 7244 (pop_cp_function_context): Likewise.
28cbf42c 7245 * call.c (build_method_call): Enable synthesis.
d11ad92e 7246 * lex.c (cons_up_default_function): Likewise.
28cbf42c
MS
7247
7248Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
7249
7250 * parse.y (setattrs): Chain onto prefix_attributes rather than
7251 setting it.
7252
d11ad92e 7253Wed Mar 15 13:00:00 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7254
7255 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
7256 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
7257
d11ad92e 7258Mon Mar 13 21:00:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7259
7260 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
7261 and convert the size and integer_one_node to the index type.
7262
7263Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7264
7265 * typeck.c (get_member_function_from_ptrfunc): Save the instance
7266 argument, and tack it onto the front of the COND_EXPR to make the
7267 semantics come out right. Grab the instance argument from
7268 '*instance_ptrptr', rather than having it passed in separately.
7269
7270 * various: Change various consed-up comparison operations to have
7271 boolean type. Remove the instance argument in calls to
7272 get_member_function_from_ptrfunc.
7273
7274 * error.c (dump_expr): Dump true and false as "true" and "false".
7275
7276 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
7277 global init function.
7278
7279 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
7280 inline function is public.
7281
7282Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7283
7284 * init.c (is_friend): Be more careful about checking
7285 DECL_CLASS_CONTEXT on non-member functions.
7286
7287 * decl2.c (finish_vtable_vardecl): Don't bother calling
7288 assemble_external here.
7289 (prune_vtable_vardecl): New function that just splices out the
7290 vtable decl from the top-level decls.
7291 (import_export_inline): Unset DECL_EXTERNAL at first.
7292 (finish_file): Don't bother calling assemble_external here. Do
7293 splice out all of the vtables.
7294
7295Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7296
7297 * decl.c (finish_function): If we're not emitting the function yet,
7298 call assemble_external for it.
7299
7300 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
7301 here.
7302 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
7303 Also don't splice out the current vtable if it is unused.
7304 (finish_file): Move the second walk_vtables and the synthesis check
7305 inside the 'reconsider' loop. Move thunk emission after the
7306 'reconsider' loop.
7307
d11ad92e 7308Thu Mar 9 16:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7309
7310 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
7311 was passing bogus values for readonly and volatile from the original
7312 template decl, not the resultant type of the tsubst call.
7313
7314 * class.c (duplicate_tag_error): Use cp_error_at to point out the
7315 previous definition of the tag.
7316
7317Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7318
7319 * decl.c (start_function): Clear base_init_insns and protect_list.
7320 (struct cp_function): Add base_init_insns field.
7321 (push_cp_function_context): Also save base_init_insns.
7322 (pop_cp_function_context): Also restore base_init_insns.
7323
7324Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7325
7326 * init.c (member_init_ok_or_else): Check for initializing a static
7327 member here.
7328 (emit_base_init): Instead of here.
7329
7330Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7331
7332 * call.c (build_method_call): Disable synthesis as needed.
d11ad92e 7333 * lex.c (cons_up_default_function): Likewise.
b7484fbe 7334
d11ad92e 7335Tue Mar 7 10:14:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
f6abb50a
BK
7336
7337 * parse.y: New rules to allow attributes in a prefix position.
7338 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
7339 (setattr): New rule.
7340 (reserved_declspecs, declmods): Catch attributes here.
7341 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
7342 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
7343 descendent typedef.
7344 (grokdeclarator): Added code to support machine attributes.
7345 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
7346
b7484fbe
MS
7347Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7348
7349 * call.c (build_method_call): Don't synthesize methods outside of a
7350 function.
7351
7352 Make base initialization more re-entrant so that synthesis on the
7353 fly will work (and, eventually, template instantation on the fly).
7354 * init.c (sort_member_init): Don't bother with members that can't be
7355 initialized. Reorganize a bit. Don't initialize base members here.
7356 (sort_base_init): New function, like sort_member_init, but for base
7357 classes. Steals some code from emit_base_init.
7358 (emit_base_init): Simplify. Call sort_{member,base}_init before
7359 doing any initialization, so we don't have to save
7360 current_{member,base}_init_list in push_cp_function_context.
7361 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
7362 (expand_aggr_vbase_init): Simplify.
7363 * decl.c (struct cp_function): Add protect_list field.
7364 (push_cp_function_context): Also save protect_list.
7365 (pop_cp_function_context): Also restore protect_list.
7366 * call.c (build_method_call): Enable synthesis at point of call.
d11ad92e 7367 * lex.c (cons_up_default_function): Likewise.
b7484fbe
MS
7368
7369 * parse.y: Turn -ansi checks back into -pedantic checks.
7370
7371 * init.c (build_new): Fix -fcheck-new for array new.
7372
7373Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
7374
7375 * typeck.c (build_compound_expr): warn if left-hand operand of
7376 comma expression has no side-effects.
7377
7378Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7379
7380 * parse.y (primary): Change 'object qualified_id *' rules to 'object
7381 overqualified_id *'.
7382
d11ad92e 7383Fri Mar 3 12:48:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7384
7385 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
7386 Make the error look the same as the one we issue in c_sizeof.
7387
7388 * typeck.c (build_binary_op_nodefault): Give an error for trying
7389 to compare a pointer-to-member to `void *'.
7390
7391Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7392
7393 * typeck.c (build_unary_op): Handle bool increment with smoke and
7394 mirrors here, rather than in expand_increment where it belongs,
7395 because Kenner doesn't agree with me.
7396
d11ad92e 7397Fri Mar 3 00:08:10 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7398
7399 * decl.c (grokparms): Catch a PARM_DECL being used for a default
7400 argument as well.
7401
d11ad92e 7402Thu Mar 2 20:05:54 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7403
7404 * init.c (build_new): Don't allow new on a function type.
7405
7406 * parse.y (primary): Avoid a crash when seeing if the arg is of
7407 the same type as that given for the typespec in an explicit dtor call.
7408
7409Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7410
7411 * decl.c (finish_function): Change test for calling
7412 mark_inline_for_output.
7413
7414Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7415
7416 * typeck.c (build_modify_expr): Complain if
7417 build_default_binary_type_conversion fails.
7418
7419 * init.c (expand_default_init): Handle arguments of unknown type
7420 properly.
7421
7422 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
7423 if 'complain'.
7424 * various: Pass 'complain'.
7425
7426 * typeck.c (comptypes): Be more picky about comparing UPTs.
7427
d11ad92e 7428Wed Mar 1 11:03:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7429
7430 * decl.c (grokdeclarator): If declarator is null, say that the
7431 type used has an incomplete type.
7432
7433Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7434
7435 * pt.c (instantiate_template): Copy the template arguments to the
7436 permanent_obstack. Also use simple_cst_equal to compare them when
7437 looking for a previous instantiation.
7438
7439 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
7440 they are array domain types).
7441
7442Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7443
7444 * cp-tree.h: Define WANT_* constants for passing to
7445 build_expr_type_conversion.
7446 * cvt.c (build_expr_type_conversion): New function to build
7447 conversion to one of a group of suitable types.
7448 (build_default_binary_type_conversion): Use it.
d11ad92e
MS
7449 * decl2.c (grok_array_decl): Likewise.
7450 * typeck.c (build_unary_op): Likewise.
b7484fbe 7451 (build_array_ref): Tidy up a bit.
d11ad92e 7452 (build_binary_op): Likewise.
b7484fbe 7453
d11ad92e 7454Tue Feb 28 19:57:31 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7455
7456 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
7457
7458Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7459
7460 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
7461 reserved_declspecs' rule.
7462
7463 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
d11ad92e 7464 (direct_notype_declarator): Likewise.
b7484fbe
MS
7465 (complex_direct_notype_declarator): Add notype_qualified_id rule.
7466
7467 * lex.c (real_yylex): Handle :> digraph properly.
7468
d11ad92e 7469Tue Feb 28 12:26:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7470
7471 * decl.c (grokdeclarator): Check if it's a friend, not if it's
7472 non-virtual, that's being initialized. Move the check up to
7473 before FRIENDP would get cleared. Catch an unnamed var/field
7474 being declared void. Say just `field' instead of `structure field'
7475 in the error message. Only go for the operator name if DECLARATOR
7476 is non-null.
7477
7478Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7479
7480 * decl.c (start_function): Complain about abstract return type.
7481 (grokdeclarator): Complain about declaring constructors and
7482 destructors to be const or volatile. Complain about declaring
7483 destructors to be static.
7484
7485 * pt.c (uses_template_parms): Handle pmfs.
7486
7487 * decl.c (grokdeclarator): Don't call variable_size for array bounds
7488 that only depend on template constant parameters.
7489
d11ad92e 7490Mon Feb 27 15:38:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7491
7492 * error.c (dump_decl): Only look to see if it's a vtable if we
7493 actually have a name to check out.
7494
7495Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7496
7497 * cvt.c (convert_to_aggr): Lose misleading shortcut.
7498
7499Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
7500
7501 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
7502 not just for dwarf.
7503
d11ad92e 7504Sun Feb 26 00:10:18 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7505
7506 * decl.c (grokdeclarator): Don't allow a static member to be
7507 declared `register'.
7508
7509 * init.c (make_friend_class): Move up to a pedwarn for the warning
7510 about a class declaring friends with itself.
7511
7512 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
7513 or `inline friend class foo'. Only try to make a friend out of
7514 TYPE if we didn't already reset it to integer_type_node.
7515
d11ad92e 7516Sat Feb 25 22:32:03 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7517
7518 * decl.c (grokdeclarator): Don't allow initialization of a
7519 non-virtual function.
7520
7521 * decl.c (start_function): Do a pedwarn if we're changing `main'
7522 to have an int return type.
7523
7524Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7525
7526 * typeck.c (build_modify_expr): Handle simple assignment from
7527 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
7528
d11ad92e 7529Fri Feb 24 18:27:14 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7530
7531 * decl.c (grokdeclarator): Also don't allow virtual outside of a
7532 class decl for a scope method definition performed at global binding.
7533
7534 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
7535 of a bitfield.
7536
7537 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
7538
7539 * typeck.c (build_binary_op): Return an error_mark_node if either
7540 one of the args turned into an error_mark_node when we tried to
7541 use default_conversion.
7542
7543 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
7544
7545 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
7546 used on `__wchar_t'.
7547
7548Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
7549
7550 * except.c (end_protect_partials): Do it the right way.
7551
7552Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7553
7554 * typeck.c (build_binary_op_nodefault): Upgrade warning about
7555 comparing distinct pointer types to pedwarn.
7556
7557 * typeck2.c (digest_init): Cope with extra braces.
7558
7559 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
7560 of INT_CST_LT (..., interger_zero_node).
7561
d11ad92e 7562Wed Feb 22 14:45:52 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7563
7564 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
7565 function for systems that don't have EH.
7566
7567Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7568
7569 * call.c (can_convert_arg): Like can_convert, but takes an arg as
7570 well.
7571
7572 * pt.c (type_unification): Allow implicit conversions for parameters
7573 that do not depend on template parameters.
7574
d11ad92e 7575Tue Feb 21 18:43:48 1995 Douglas Rupp <drupp@cs.washington.edu>
1b65f56d
DR
7576
7577 * Make-lang.in, config-lang.in: ($exeext): New macro.
7578 * Make-lang.in: Try a "cp" if "ln" fails.
7579 * cp-tree.h (decl_attributes): Added argument.
7580 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
7581 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
7582 Modified spawnvp to have to correct number of arguments for OS/2, NT.
7583
b7484fbe
MS
7584Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
7585
7586 * decl.c (finish_function): Add calls to end_protect_partials to end
7587 the exception region that protects constructors so that partially
7588 constructed objects can be partially destructed when the constructor
7589 throws an exception.
7590 * init.c (perform_member_init, sort_member_init, emit_base_init):
7591 Added support for partially constructed objects.
7592 * init.c (build_partial_cleanup_for): New routine to do partial
7593 cleanups of a base class.
7594 * decl2.c (finish_file): Move the emitting of the exception table
7595 down, after we emit all code that might have exception regions in
7596 them.
7597 * except.c (end_protect_partials, might_have_exceptions_p): New
7598 routines.
7599 (emit_exception_table): Always output table if called.
7600 * cp-tree.h (protect_list, end_protect_partials,
7601 might_have_exceptions_p, emit_exception_table): Added.
7602
d11ad92e 7603Tue Feb 21 16:05:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7604
7605 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
7606 address of a local variable.
7607 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
7608 were given a non-null PTR_TO_INSTPTR.
7609
7610Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7611
7612 * decl.c (duplicate_decls): Always lay out the merged decl.
7613
7614 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
d11ad92e 7615 (finish_prevtable_vardecl): Likewise.
59be85d7 7616
b7484fbe
MS
7617 * method.c (synthesize_method): Set interface_{unknown,only}
7618 according to the settings for our class, not the file where it comes
7619 from.
59be85d7 7620
b7484fbe 7621Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 7622
b7484fbe 7623 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 7624
e3417fcd
MS
7625Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7626
7627 * decl2.c (reparse_decl_as_expr): Support being called without a
7628 type argument.
7629
7630 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
7631 conflicts. Sigh.
7632
7633Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
7634
7635 * parse.y (template_def, fndef, fn.def1, return_init, condition,
7636 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
7637 component_decl_1, after_type_component_declarator0,
7638 notype_component_declarator0, after_type_component_declarator,
7639 notype_component_declarator, after_type_component_declarator,
7640 full_parm, maybe_raises, exception_specification_opt): Fix up,
7641 include exception_specification_opt maybeasm maybe_attribute and
7642 maybe_init if missing. Rename maybe_raises to
7643 exception_specification_opt to match draft wording. Use maybe_init
7644 to simplify rules.
7645
7646Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7647
7648 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
7649 built for news of scalar types.
7650
7651Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7652
7653 * typeck.c (build_binary_op_nodefault): Update code for warning
7654 about signed/unsigned comparisons from C frontend. Realize that the
7655 code in the C frontend is, if anything, even more bogus. Fix it.
7656 (build_binary_op): Undo default_conversion if it wasn't useful.
7657
7658 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
7659 PRE*CREMENT_EXPR.
7660
7661 * decl2.c (import_export_vtable): Don't try the vtable hack
7662 if the class doesn't have any real non-inline virtual functions.
7663 (finish_vtable_vardecl): Don't bother trying to find a non-inline
7664 virtual function in a non-polymorphic class.
d11ad92e 7665 (finish_prevtable_vardecl): Likewise.
e3417fcd
MS
7666
7667 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
7668
7669 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
7670
7671 * init.c (expand_virtual_init): Always call assemble_external.
7672
7673 * class.c (build_vfn_ref): Always call assemble_external.
7674 (build_vtable): Always call import_export_vtable.
d11ad92e 7675 (prepare_fresh_vtable): Likewise.
e3417fcd
MS
7676 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
7677
8ccc31eb
MS
7678Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7679
7680 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
7681 whether an enumerated type fits in a bitfield.
7682
7683Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7684
7685 * class.c (grow_method): Update method_vec after growing the class
f30432d7 7686 obstack.
8ccc31eb
MS
7687
7688Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
7689
7690 * parse.y (handler_seq): Push a level for the catch parameters.
7691
7692Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7693
7694 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
7695 bases, in case they've been clobbered.
7696
7697Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
7698
7699 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
7700 so that one day it will always be valid.
d11ad92e 7701 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
8ccc31eb
MS
7702
7703 * cp-tree.h (copy_binfo): Removed, unused.
d11ad92e 7704 * tree.c (copy_binfo): Likewise.
8ccc31eb
MS
7705
7706Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7707
7708 * init.c (build_new): Save the allocation before calling
7709 expand_vec_init on it.
7710
7711 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
7712 match the TYPE_PRECISION of the underlying type for constant folding
7713 to work.
7714
7715Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
7716
7717 * except.c (push_eh_entry, expand_start_all_catch,
7718 expand_leftover_cleanups, expand_end_catch_block): Keep track of
7719 the context in which the exception region occurs.
7720 (build_exception_table): If the region was not output, don't output
7721 the entry in the eh table for it.
7722
7723Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7724
7725 * init.c (expand_default_init): Only use a previous constructor call
7726 if it's a call to our constructor. Does the word "Duh" mean
7727 anything to you?
7728
7729 * decl.c (grokparms): Fine, just don't call
7730 convert_for_initialization at all. OK? Happy now?
7731
7732Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7733
7734 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
7735 method vector has a second element before returning it.
7736
7737 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
7738 convert_for_initialization.
7739
7740Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7741
7742 * typeck.c (build_modify_expr): Compare function name to
7743 constructor_name (current_class_type) instead of current_class_name.
7744
7745 * decl.c (grokparms): Don't do anything with the return value of
7746 convert_for_initialization.
7747
7748 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
7749
7750 * decl.c (duplicate_decls): Tweak error message.
7751
7752 * typeck.c (build_const_cast): Implement checking.
7753 (build_reinterpret_cast): Implement some checking.
7754
7755 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
7756 converting to the same aggregate type.
7757 (CONV_STATIC_CAST): Include it.
d11ad92e 7758 (CONV_C_CAST): Likewise.
8ccc31eb
MS
7759 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
7760 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
7761
7762Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7763
7764 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 7765 where necessary.
8ccc31eb
MS
7766
7767 * decl.c (auto_function): Now a function.
7768 * except.c (init_exception_processing): terminate, unexpected,
7769 set_terminate, and set_unexpected have C++ linkage.
7770
7771 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
7772 truthvalue_conversion for converting to bool, as it handles
7773 user-defined conversions properly.
d11ad92e 7774 (condition_conversion): Likewise.
8ccc31eb
MS
7775
7776 * except.c (expand_throw): Don't call convert_to_reference.
7777 Pass the correct parameters to build_new.
7778
7779 * method.c (do_build_assign_ref): Don't use access control when
7780 converting to a base reference here.
7781 (do_build_copy_constructor): Or here.
7782
7783 * init.c (build_new): Unset TREE_READONLY on the dereferenced
7784 pointer before assigning to it.
7785
7786 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
7787
7788 * decl2.c (delete_sanity): You can now delete pointer to const.
7789
7790Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
7791
7792 * decl.c (finish_function): Don't rely on actual parameters being
7793 evaluated left-to-right.
d11ad92e 7794 * except.c (expand_end_catch_block): Likewise.
8ccc31eb
MS
7795
7796Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7797
7798 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
7799 considered lvalues.
7800 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 7801 lvalue_p.
8ccc31eb
MS
7802
7803 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
7804 types.
7805 (convert_to_reference): Fix erroneous text substitution.
7806
7807 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
7808 Add new argument to all callers.
7809
7810 * typeck.c (convert_arguments): Check for error_mark_node before
7811 trying to do anything with the actual parameter.
7812
7813 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
7814 fold it.
7815 (bool_truthvalue_conversion): Remove. Fix all callers to call
7816 truthvalue_conversion instead.
7817 (various): Fold CLEANUP_POINT_EXPRs.
7818
7819 * parse.y (conditions): Call condition_conversion rather than
7820 building up a CLEANUP_POINT_EXPR.
7821
7822 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
7823 under -falt-external-templates.
7824
7825Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7826
7827 * init.c (build_new): Complain about new of const type without
7828 initializer. Other cleanup.
7829
7830 * call.c (compute_conversion_costs): Don't call
7831 build_type_conversion with a reference type; convert to the target
7832 type and check its lvaluetude.
d11ad92e 7833 * cvt.c (convert_to_reference): Likewise.
8ccc31eb
MS
7834
7835 * cvt.c (build_type_conversion_1): There will never be any need to
7836 dereference references here now.
7837
7838Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
7839
7840 * except.c (expand_builtin_throw): Make sure we only `use' the
7841 value of return_val_rtx.
7842
7843Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7844
7845 * parse.y (structsp): Don't complain about declaring a type being
7846 defined to be a friend.
7847
7848 * decl2.c (warn_if_unknown_interface): Note the template in question
7849 and the point of instantiation, for -falt-external-templates.
7850 * lex.c (reinit_parse_for_method): Pass the decl to
7851 warn_if_unknown_interface.
d11ad92e
MS
7852 * pt.c (instantiate_template): Likewise.
7853 (end_template_decl): Likewise.
8ccc31eb
MS
7854
7855 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
7856 nested name again, to make local classes work a bit better.
7857
7858 * typeck.c (build_function_call_real): Dereference reference after
7859 checking for incomplete type.
7860
7861 * init.c (build_new): Accept new of const and volatile types.
7862
7863Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
7864
7865 * decl.c (grokdeclarator): Fix error message.
7866
7867Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7868
7869 * typeck.c (convert_for_initialization): Do bash arrays when
7870 converting to a reference to non-array.
7871
7872Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7873
7874 * cvt.c (cp_convert): Don't call convert_to_reference, or
7875 automatically dereference references. Do pass reference conversions
7876 to cp_convert_to_pointer.
7877 (cp_convert_to_pointer): Support references.
7878
7879 * call.c (build_method_call): Don't build up a reference to the
7880 parameter here; let build_overload_call handle that.
7881
7882 * typeck.c (build_c_cast): Call convert_to_reference directly if
7883 converting to a reference type.
d11ad92e
MS
7884 * method.c (do_build_copy_constructor): Likewise.
7885 * method.c (do_build_copy_constructor): Likewise.
7886 (do_build_assign_ref): Likewise.
8ccc31eb
MS
7887
7888 * call.c (build_method_call): Dereference a returned reference.
d11ad92e 7889 * typeck.c (build_function_call_real): Likewise.
8ccc31eb
MS
7890
7891 * decl.c (xref_basetypes): Check for unions with basetypes here.
7892 (xref_tag): Instead of here.
7893
7894 * pt.c (process_template_parm): Template type parm decls are
7895 artificial.
7896
7897Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7898
7899 * parse.y (typed_declspecs): Add missing semicolon.
7900 (do_xref_defn): Resurrect.
7901 (named_class_head_sans_basetype): Move template specialization
7902 definition cases to named_class_head_sans_basetype_defn.
7903
7904 * decl2.c (grokfield): Call pushdecl_class_level after setting the
7905 TYPE_NAME, not before.
7906
7907Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7908
7909 * call.c (convert_harshness): Don't call sorry here. Don't allow
7910 conversions between function pointer types if pedantic.
7911
7912 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
7913
7914 * lex.c (cons_up_default_function): Use the full name for the return
7915 type of op=.
7916
7917 * decl.c (set_nested_typename): Don't worry about anonymous types,
7918 as they already have a unique name.
7919 (pushdecl): Remove redundant set_nested_typename
7920 (xref_tag): Split out base handling into xref_basetypes.
7921
7922 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
7923 not considered incomplete even though their definition is unknown.
7924
7925 * decl.c (xref_defn_tag): Lose.
7926 (xref_tag): xref_next_defn = ! globalize.
7927 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
7928 ones that should have it set will have it set by pushtag.
d11ad92e 7929 (pushdecl_class_level): Likewise.
8ccc31eb
MS
7930 (pushtag): Tidy up a bit.
7931 (set_nested_typename): Push a decl for the nested typename from
7932 here, rather than from xref_defn_tag.
7933
7934 * parse.y (do_xref): Lose.
7935 (named_class_head): If we see 'class foo:' we know it's a
7936 definition, so don't worry about base lists for non-definitions.
7937
7938 * pt.c (push_template_decls): Template parm decls are artificial.
7939
7940 * decl.c (duplicate_decls): Restore check for qualifier
7941 disagreement for non-functions.
7942 (decls_match): Remove check for qualifier disagreement.
7943
7944Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7945
7946 * decl.c (grok_reference_init): Convert initializer from
f30432d7 7947 reference.
d11ad92e 7948 * typeck.c (convert_for_initialization): Likewise.
8ccc31eb
MS
7949
7950 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
7951
7952 * cvt.c (cp_convert): Don't convert to the same class type by just
7953 tacking on a NOP_EXPR.
7954 (convert_to_reference): Use comp_target_types instead of comptypes
7955 so that we don't allow conversions two levels down.
7956
7957Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7958
7959 * class.c (build_vbase_path): Bash types to make the backend happy.
7960 * cvt.c (build_up_reference): Bash the types bashed by
7961 build_vbase_path to be reference types instead of pointer types.
d11ad92e 7962 (convert_to_reference): Likewise.
8ccc31eb
MS
7963
7964 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
7965 reference type.
7966
7967 * parse.y (structsp): Put back error for 'struct B: public A;'.
7968
7969Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
7970
7971 * except.c: Add support for mips systems that don't define __mips
7972 but do define mips, like Ultrix.
7973
7974Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
7975
7976 * except.c: Add support for exception handling on the Alpha.
7977
1038f4f9
MS
7978Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
7979
7980 * decl2.c (finish_file): Fix bug in Jan 31st change.
7981
d11ad92e 7982Tue Jan 31 16:59:15 1995 Gerald Baumgartner <gb@lorenzo.cs.purdue.edu>
1038f4f9
MS
7983
7984 * sig.c (build_signature_pointer_or_reference_type): Don't set
7985 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
7986 doesn't expect to find a copy constructor.
7987 * call.c (build_method_call): Treat signature pointers/reference
7988 as if IS_AGGR_TYPE were set.
7989
d18c083e
MS
7990Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
7991
7992 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
7993 (build_t_desc): Inform the user here if they try and build
7994 with -frtti and don't include <typeinfo.h>.
7995
7996 * decl2.c (finish_prevtable_vardecl): Support rescanning.
7997 (finish_file): Move finish_prevtable_vardecl up to before the global
7998 initializers are done as tdecls are initialized in the global
7999 initializer. Also Pick up any new tdecls or vtables needed by
8000 synthesized methods.
8001
8002 * class.c (finish_struct): Simplify. We have to do rtti scanning at
8003 end, so we might as well do all of it there.
8004
8005Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8006
8007 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
8008 targets, too.
8009
8010Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
8011
8012 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
8013 finish_vtable_vardecl. It has the first half functionality from
8014 that routine.
8015 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
8016 in finish_prevtable_vardecl.
8017 * decl2.c (finish_file): Call finish_prevtable_vardecl.
8018 * gc.c (build_generic_desc): Allow it to be called when not at the
8019 global binding layer, but behave as if we were.
8020 (build_t_desc): Rearrange a bit so that it really works and is
8021 easier to follow.
8022 * class.c (finish_struct): Don't decide on tdecls here, as we have
8023 to wait until the end of the file in general to decide whether or
8024 not they come out.
8025
8026Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8027
8028 * init.c (build_delete): Check access to operator delete before
8029 calling the destructor.
8030 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
8031 return error_mark_node.
8032 * call.c (build_method_call): Use the one-argument op delete even if
8033 it's an error.
8034
8035 * init.c (build_new): Fix -fthis-is-variable support.
d11ad92e 8036 * call.c (build_method_call): Likewise.
d18c083e
MS
8037
8038 * call.c (convert_harshness): Make conversion from a pointer to bool
8039 worse than conversion to another pointer.
8040
8041Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8042
8043 * init.c (build_new): Check new return value if -fcheck-new.
8044
8045 * lex.c (check_newline): Clear end_of_file when we're done, too.
8046
8047Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
8048
8049 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
8050 vtables whereever they go.
8051
8052 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
8053 right.
8054
8055Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
8056
8057 * decl2.c (finish_vtable_vardecl): Now set the
8058 interface/implementation of vtables on the first virtual function,
8059 if one exists, otherwise we use the old method. This is a major win
8060 in terms of cutting down the size of objects and executables in
8061 terms of text space and data space. Now most of the savings that
8062 #pragma interface/implementation gives is automatic in a fair number
8063 of cases.
8064
8065Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8066
8067 * decl.c (grokdeclarator): Discard the template parameters in a
8068 template constructor declaration so that the function is always
8069 named constructor_name (ctype).
8070
8071 * lex.c (check_newline): Use ungetc to put back the character before
8072 calling HANDLE_PRAGMA.
8073
8074Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
8075
8076 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
8077 make sure we still match them.
8078
8079Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8080
8081 * parse.y: Add END_OF_LINE token.
8082
8083 * lex.c (check_newline): Set linemode when we see a # directive, and
8084 unset it when we're done. Turn all 'return's into 'goto skipline'.
8085 Fix all uses of '\n', since we won't see it anymore. Put back the
8086 character we read before checking for a sysv or target pragma.
8087 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
8088 (handle_sysv_pragma): Don't look at the input stream; quit when we
8089 see an END_OF_LINE token.
8090
8091 * input.c (getch): Return EOF if we're in line mode and at the end
8092 of a line.
8093 (put_back): Don't put back an EOF.
8094
8095Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
8096
8097 * except.c (expand_throw): Do the newing of the exception object
8098 before we load the type descriptor or the address so that we don't
8099 wipe any of the values out.
8100
8101Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
8102
8103 * except.c (init_exception_processing): Don't use r12 on the rs6000.
8104
8105Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8106
8107 * decl.c (grokparms): Don't try to build up a reference at this point.
8108
8109 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
8110 will suffice to convert from integer_zero_node.
8111
d11ad92e 8112Wed Jan 25 15:02:09 1995 David S. Miller <davem@nadzieja.rutgers.edu>
b7484fbe
MS
8113
8114 * class.c (instantiate_type): Change error message text.
8115 * typeck2.c (store_init_value): Likewise.
8116
e1cd6e56
MS
8117Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
8118
8119 * pt.c (tsubst): When we copy a node, don't forget to copy
8120 TREE_CHAIN, we use it later.
8121
8122Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8123
8124 * typeck.c (convert_for_assignment): Initialize variable before use.
8125
8126Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8127
8128 * g++.c (main): Link with both libstdc++ and libg++ if called as
8129 something ending with "g++", otherwise only libstdc++. Move -lm to
8130 the end of the line.
8131
8132Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8133
8134 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 8135 compute_conversion_costs.
e1cd6e56
MS
8136
8137Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8138
8139 * search.c (get_matching_virtual): Give line number for previous
f30432d7 8140 declaration.
e1cd6e56
MS
8141
8142 * call.c (convert_harshness): Handle conversions to references
8143 better.
8144
8145 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
8146
8147Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
8148
8149 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
8150 as the TREE_CHAIN for methods will take us to the next differently
8151 named function, DECL_CHAIN won't.
8152
8153Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8154
8155 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
8156
8157 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
8158 warn_parentheses defaults to 0.
8159
8160 * decl.c (grokparms): Put back call to require_instantiated_type.
8161
8162Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
8163
8164 * except.c (exception_section): Use the data section on the rs6000.
8165 Change calling convention for named_section.
8166
8167Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
8168
f30432d7
MS
8169 * cp-tree.h : Make if (x=0) warn with wall
8170 * parse.y : Make if (x=0) warn with wall
e1cd6e56 8171
255512c1
JM
8172Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8173
e1cd6e56
MS
8174 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
8175 BITS_PER_UNIT otherwise.
8176
8177 * search.c (get_matching_virtual): Don't check the binfo if the
8178 types are the same.
8179
8180 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 8181 bool.
255512c1
JM
8182
8183Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8184
e1cd6e56
MS
8185 * various: Use boolean_type_node, boolean_true_node,
8186 boolean_false_node.
8187
8188 * search.c (get_matching_virtual): Allow covariant returns that
8189 don't require pointer adjustment.
8190
8191 * typeck.c (build_conditional_expr): Don't call default_conversion
8192 on ifexp.
8193
8194 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
8195
8196 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
8197
d11ad92e 8198Sun Jan 15 22:17:32 1995 David Binderman <dcb@lovat.fmrco.COM>
e1cd6e56
MS
8199
8200 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
8201
8202Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8203
e1cd6e56
MS
8204 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
8205 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
8206 for bool.
8207
8208Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8209
8210 * decl2.c (finish_file): We need to mess up if there are any
8211 variables in the list, not just if there is one with a constructor.
8212
8213Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8214
8215 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
8216 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
8217 (finish_function): Trust rest_of_compilation.
8218
8219 * decl2.c (finish_file): Also call functions designated as static
8220 constructors/destructors.
8221
8222 * decl.c (grokdeclarator): Allow access decls of operator functions.
8223 (grokparms): Only do convert_for_initialization if the initializer
8224 has a type.
8225 (duplicate_decls): Put back push_obstacks_nochange call.
8226
8227 * lex.c (real_yylex): Downgrade complaint about the escape sequence
8228 being too large from pedwarn to warning.
8229
8230 * decl.c (grokdeclarator): Don't complain about long long in system
8231 headers.
8232
8233 * lex.c (real_yylex): Handle digraphs.
8234
8235Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8236
8237 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
8238 affects C linkage declarations now.
8239
8240 * typeck.c (comp_target_types): Grok simple contravariant conversions.
8241 (common_type): t1 and t2 are interchangeable.
8242
8243 * various: Test return value of comp_target_types differently in
8244 different places; it now returns -1 for a contravariant conversion
8245 (which is fine in symmetric cases).
8246
8247 (common_type): Prefer long double to double even when
8248 they have the same precision.
8249
8250 * decl.c (grokparms): Call convert_for_initialization to check
8251 default arguments.
8252
8253 * init.c (build_new): void_type_node has a size (of 0).
8254
8255 * decl.c (decls_match): Also check for agreement of TREE_READONLY
8256 and TREE_THIS_VOLATILE.
8257 (push_class_level_binding): Properly handle shadowing of
8258 nested tags by fields.
8259
d11ad92e 8260 * search.c (dfs_pushdecls): Likewise.
e1cd6e56
MS
8261
8262 * decl2.c (finish_file): Don't second-guess self-initialization.
8263
8264 * cvt.c (convert_to_reference): Work with expr directly, rather than
8265 a copy.
8266
8267 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
8268
8269 * init.c (add_friend): Downgrade duplicate friend message from
8270 pedwarn to warning.
8271
8272 * decl.c (duplicate_decls): Push obstacks before calling common_type.
8273
8274Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
8275
8276 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
8277 exception table labels.
d11ad92e
MS
8278 (expand_start_all_catch): Likewise.
8279 (expand_leftover_cleanups): Likewise.
8280 (expand_end_catch_block): Likewise.
e1cd6e56
MS
8281 * except.c (make_first_label): new function.
8282 (expand_start_all_catch): add a call to make_first_label() before
8283 using a label as a jump destination.
d11ad92e
MS
8284 (expand_end_all_catch): Likewise.
8285 (expand_leftover_cleanups): Likewise.
8286 (expand_end_catch_block): Likewise.
8287 (expand_builtin_throw): Likewise.
8288 (expand_throw): Likewise.
e1cd6e56
MS
8289 * except.c: Add ARM processor support for exception handling.
8290
8291Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8292
8293 (complete_array_type): Copy code from C frontend.
8294
8295 * lex.c (real_yylex): Don't multiply the length of a wide string
8296 literal by WCHAR_BYTES.
8297
8298 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
8299 (duplicate_decls): Instead of here.
8300 (define_label): Complain about a label named wchar_t.
8301 (grokdeclarator): Complain about declarations of
8302 operator-function-ids as non-functions.
8303
8304 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
8305 COMPOUND_EXPRs.
8306 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
8307
8308 * lex.c (real_yylex): Don't skip whitespace when reading the next
8309 character after ->.
8310
8311Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
8312
8313 * except.c: Allow cc1plus to be built with native compiler on rs6000.
8314 (expand_start_all_catch): Add assemble_external calls for various
8315 routines we call.
d11ad92e
MS
8316 (expand_leftover_cleanups): Likewise.
8317 (expand_start_catch_block): Likewise.
8318 (do_unwind): Likewise.
8319 (expand_builtin_throw): Likewise.
e1cd6e56
MS
8320
8321Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8322
8323 * decl.c (pushtag): Only look for a previous decl in the current
8324 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
8325
8326 * gxx.gperf: Add __signature__ and __sigof__ keywords.
8327
8328 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
8329 does set flag_no_gnu_keywords and flag_operator_names.
8330
8331 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
8332 Unset extension keywords if -fno-gnu-keywords.
8333 Allow operator names ('bitand') if -foperator-names.
8334 Never unset 'asm'; -fno-asm only affects 'typeof'.
8335
8336 * decl.c (lookup_name_real): The got_object special lookup only
8337 applies to types.
8338
8339Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8340
8341 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
8342
8343 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 8344 'object' nonterminal.
e1cd6e56
MS
8345 (object): Set got_object.
8346
8347 * lex.h: Declare got_object.
8348
8349 * decl.c (lookup_name_real): Also lookup names in the context of an
8350 object specified.
8351
8352Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
8353
8354 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
8355 for things that have to be added to pointers, not size_type. Cures
8356 problems with pointer to members on Alphas.
d11ad92e
MS
8357 (build_binary_op_nodefault): Likewise.
8358 (get_delta_difference_: Likewise.
8359 (build_ptrmemfunc): Likewise.
e1cd6e56
MS
8360
8361Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8362
8363 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
8364 it.
8365
8366 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
8367 when dealing with overloaded member functions; just act like
8368 build_offset_ref.
8369 (commonparms): Remove misleading comment.
8370
8371 * decl.c (duplicate_decls): Complain about repeated default
8372 arguments here.
8373 (redeclaration_error_message): Instead of here.
8374 (pushdecl): Complain about missing default arguments here.
8375 (grokparms): Instead of here.
8376 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
8377 (grok_reference_init): Do not complain about missing initializer if
8378 declared 'extern'.
8379
8380 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
8381 function alternative and want_type is not set.
8382
8383Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8384
8385 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
8386 the decl when the type has no TYPE_NAME.
8387 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
8388 (lookup_name_real): Call lookup_field with want_type =
8389 prefer_type.
8390
8391 * search.c (lookup_field): Handle want_type properly in the presence
8392 of fields with the same name.
8393
8394 * decl.c (set_nested_typename): Set nested name for file-scope types
8395 to include leading ::.
8396 (pushdecl): Set the nested typename if the decl doesn't have one,
8397 rather than if the type's canonical decl doesn't have one.
8398
e1cd6e56
MS
8399Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8400
8401 * typeck.c (convert_for_assignment): Complain about contravariance
8402 violation here.
8403 (comp_target_types): Instead of here.
8404 (build_unary_op): resolve_offset_ref before checking for a valid
8405 type.
8406
8407 * spew.c (yylex): Decrement looking_for_typename after we see a
8408 _DEFN.
8409
8410 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 8411 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
8412
8413 * typeck.c (convert_for_assignment): Converting pointers to bool
8414 does not need a cast.
8415
8416Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8417
8418 * class.c (instantiate_type): Initialize nsubsts parm.
8419
d11ad92e 8420 * pt.c (do_function_instantiation): Likewise.
e1cd6e56
MS
8421
8422Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8423
8424 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
8425 DECL_SAVED_INSNS to determine whether or not we've seen a definition
8426 of this function.
d11ad92e 8427 (instantiate_template): Likewise.
e1cd6e56
MS
8428
8429 * call.c (convert_harshness): Allow const reference binding when
8430 called from the overloading code, but not when called from
8431 can_convert (since it isn't a conversion).
8432 (convert_harshness): Put back some disabled code.
8433
8434Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8435
8436 * call.c (convert_harshness): There is no implicit conversion from
8437 void* to other pointer types (unless the parameter is (void*)0).
8438 (convert_harshness): Non-lvalues do not convert to reference types.
8439
8440 * class.c (finish_struct_methods): Still set
f30432d7 8441 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
8442
8443 * call.c (can_convert): Don't use aggregate initialization.
8444
8445 * cp-tree.h: Declare lookup_conversions.
8446
8447Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
8448
8449 * parse.y (simple_stmt): Fix duplicate case value error messages to
8450 be more readable.
8451
8452Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8453
8454 * cvt.c (build_type_conversion): Total rewrite to use
8455 convert_harshness instead of reproducing conversion logic here. Now
8456 much shorter.
8457
8458 * call.c (convert_harshness): Support conversions to bool.
8459 (can_convert): Checks whether a conversion is less harsh
8460 than USER_CODE, for build_type_conversion.
8461
8462 * search.c (add_conversions): Function for passing to dfs_walk which
8463 adds all the type conversion operators in the current type to a list.
8464 (lookup_conversions): Calls dfs_walk with add_conversions and return
8465 the list.
8466 (dfs_walk): Don't require a qfn.
8467
8468 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
8469 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
8470
8471 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
8472 (grow_method): A separate function for building onto the growing
8473 method vector.
8474 (finish_struct_methods): Use it. Put all type conversion operators
8475 right after the constructors. Perhaps we should sort the methods
f30432d7 8476 alphabetically?
e1cd6e56
MS
8477
8478Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8479
8480 * call.c (build_method_call): Lose another misleading shortcut.
8481
8482Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
8483
8484 * gc.c (build_bltn_desc): Handle bool as a built-in type.
8485
8486Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
8487
8488 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
8489 on the complete type because of small virtual bases.
255512c1 8490
8145f082
MS
8491Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
8492
8493 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
8494 front end.
8495 (pushdecl): Also count decls pushed that are of a type being defined
8496 as incomplete things.
8497 * class.c (finish_struct): Move hack_incomplete_structures up to
8498 just after we set it as not being defined, so that the decls we
8499 build for RTTI don't count as incomplete.
8500
8501Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
8502
8503 * pt.c (tsubst): Fix problem with defining constructors in templated
8504 classes with virtual bases.
8505
8506Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
8507
8508 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
8509 expressions.
d11ad92e 8510 * gc.c (build_typeid): Likewise.
8145f082
MS
8511
8512Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
8513
8514 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
8515 don't assert on complex AGGR inits.
8516
8517Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
8518
8519 * method.c (build_overload_value): Handle pointer to members as
8520 template arguments.
8521
8522Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
8523
8524 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
8525 to do take the address of a data member for a pointer to data
8526 member.
8527
8528Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
8529
8530 * decl.c (grokdeclarator): Use the typedef name for linkage if the
8531 type doesn't otherwise have a name.
8532
d11ad92e 8533 * decl2.c (grokfield): Likewise.
8145f082
MS
8534
8535 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
8536 DECL_NAME of enums, structs and classes, we have to avoid trying to
8537 put it in the TYPE_FIELDS again.
8538
8539Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
8540
8541 * decl2.c (check_classfn): Ignore this parameter on static functions
8542 when checking to see if we match.
8543
8544Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
8545
8546 * typeck.c (unary_complex_lvalue): Handle address of non-left most
8547 pointers to members by calling get_delta_difference.
8548
5edb8b93
MS
8549Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
8550
8551 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
8552 static functions to early.
8553
8554Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
8555
8556 * method.c (make_thunk): Handle encoding of positive thunk offsets.
8557
8558Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
8559
8560 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
8561
6060a796
MS
8562Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
8563
8564 * decl2.c (check_classfn): Use decls_match to check if this has
8565 already been declared, as the DECL_ASSEMBLER_NAME may have been
8566 changed via asm("new_name").
8567 * decl.c (decls_match): Make public.
8568
8569Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
8570
8571 * *.[chy] (expand_aggr_init) Add fourth argument to handle
8572 distinction between = init and (init) style of initializations.
8573 * *.[chy] (finish_decl): Add fifth argument to to handle
8574 distinction between = init and (init) style of initializations.
8575
8576Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
8577
8578 Fix some random `explicit' bugs.
8579
8580 * cvt.c (convert_to_reference): Add third parameter to
8581 convert_force.
d11ad92e
MS
8582 (convert_force): Likewise.
8583 * call.c (build_method_call): Likewise.
8584 * decl2.c (setup_vtbl_ptr): Likewise.
8585 * init.c (expand_virtual_init): Likewise.
8586 (build_member_call): Likewise.
8587 (build_delete): Likewise.
8588 (build_vbase_delete): Likewise.
8589 * typeck.c (build_component_addr): Likewise.
8590 (build_c_cast): Likewise.
8591 (build_modify_expr): Likewise.
8592 * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can
6060a796
MS
8593 distinguish the context in which the conversion appears. Add thrid
8594 argument to build_c_cast.
8595 * cvt.c (cp_convert): Pass whether or not we want to consider
8596 non-converting constructors down to build_method_call.
8597 * decl2.c (reparse_absdcl_as_casts): Add third argument to
8598 build_c_cast.
d11ad92e
MS
8599 * gc.c (build_m_desc): Likewise.
8600 * init.c (build_new): Likewise.
8601 * parse.y (expr_no_commas): Likewise.
8602 (primary): Likewise.
8603 * typeck.c (build_x_function_call): Likewise.
8604 (build_static_cast): Likewise.
8605 (build_reinterpret_cast): Likewise.
8606 (build_const_cast): Likewise.
8607 (build_c_cast): Likewise.
8608 (build_ptrmemfunc): Likewise.
8609 * typeck2.c (build_functional_cast): Likewise.
6060a796
MS
8610 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
8611 expand_aggr_init_1 as inits are converted to the destination type.
8612
8613Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8614
8615 * Make-lang.in (cc1plus): Depends on c-pragma.o.
8616
8617 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
8618
8619 * lex.c (check_newline): If the #pragma is not recognized by g++,
8620 try machine-specific ones too.
8621 (handle_sysv_pragma): Copied from c-lex.c.
8622
8623Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
8624
8625 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
8626 reference better.
8627
8628Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8629
8630 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
8631 IS_AGGR_TYPE, since now they will not both be set on the same type.
8632
8633 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
8634 instantiations controlled by -fexternal-templates.
8635
8636 * decl.c (duplicate_decls): Don't complain about different values of
8637 __attribute__ ((const)) and ((noreturn)).
8638
81cdf787
DE
8639Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
8640
8641 * Makefile.in (BISONFLAGS): Delete --yacc.
8642 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
8643 (PARSE_C): Undo last patch.
8644
be99da77 8645Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 8646
3526f730 8647 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
8648 y.tab.c.
8649
6060a796
MS
8650Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8651
8652 * decl.c (finish_decl): Don't call obscure_complex_init for decls
8653 of indeterminate size.
8654
8655Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8656
8657 * decl.c (obscure_complex_init): Function to tweak the decl to
8658 prevent expand_decl from tring to initialize it.
8659 (finish_decl): Use it rather than writing the same code in three
8660 different places.
8661
8662 * parse.y (bad_parm): Stop trying to support parms without types.
8663
8664Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
8665
8666 * decl2.c (grokfield): Make asm specs on static member functions
8667 work.
8668
8669Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
8670
8671 * except.c (expand_throw): Make a copy of the thrown object.
8672
8673Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8674
8675 * parse.y: : has lower precedence than =.
8676
8677Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
8678
8679 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
8680 manglings.
8681 (grokvardecl): Add namespace into variable name.
8682
8683Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
8684
8685 * decl2.c (current_namespace_id): New routine to transform a simple
8686 name into a name in a namespace.
8687 * decl.c (grokdeclarator): Use it.
8688 * decl2.c (get_namespace_id): Find the name of the current
8689 namespace.
8690 (push_namespace, pop_namespace): Complete out missing
8691 functionality.
8692
8693Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8694
8695 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
8696 not be defined. Fix warning message for enums and restore warning
8697 for non-enums.
8698
8699 * decl2.c (push_namespace): Dummy function.
d11ad92e
MS
8700 (pop_namespace): Likewise.
8701 (do_namespace_alias): Likewise.
8702 (do_using_decl): Likewise.
8703 (do_using_directive): Likewise.
6060a796
MS
8704
8705 * parse.y: New token NSNAME for namespace names.
8706 (extdef): Add namespace, using definitions.
8707 (using_decl): New rule for using declarations.
8708 (any_id): New rule for identifiers with any degree of scoping.
8709 (identifier): Add NSNAME.
d11ad92e 8710 (notype_identifier): Likewise.
6060a796
MS
8711 (component_decl): Add using_decl.
8712 (nested_name_specifier): Add NSNAME SCOPE.
8713
8714 * typeck.c (convert_for_assignment): Handle conversions between
8715 enums and bool.
8716
8717 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
8718 FUNCTION_DECLs.
8719
8720Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
8721
8722 * class.c (finish_struct): Give an error if one tries to declare a
8723 bit-field's size greater than a long long, as the backend will dump.
8724 It is not an error to declare an enum bit-field greater than its
8725 precision. Warn if an enum bit-field is too small to hold all
8726 its values.
8727
8728Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
8729
8730 * typeck.c (convert_for_assignment): Use cp_convert instead of
8731 convert so that we don't get static casts.
8732
8733Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
8734
8735 * cvt.c (cp_convert): Don't complain about int->enum conversion if
8736 we are doing static casts.
8737
8738Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
8739
8740 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
8741 when dumping expressions in error messages.
8742
8743Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
8744
8745 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 8746 the return type is the right type, and make references work.
6060a796
MS
8747
8748Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8749
8750 * decl.c (poplevel): Don't be confused by function-scope
8751 declarations of non-nested functions.
8752 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
8753 (pushdecl): Use duplicate_decls to copy info from old decl into new
8754 function-scope one rather than doing it here.
8755
8756 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
8757 of this decl, in case this is a function-scope declaration.
8758
8759 * decl.c (finish_enum): Make sure that the type has the right
8760 precision when we call fixup_*_type.
8761
8762Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8763
8764 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
8765 want to build up references to rvalues if possible.
8766 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
8767
8768Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
8769
8770 * parse.y (maybe_raises): Handle throw ().
8771 * parse.y (ansi_raise_identifier): grok type-ids in exception
8772 specifications.
8773 * tree.c (build_exception_variant): Use list compare to check if
8774 two exception specifications match.
8775 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
8776 messages.
8777 * call.c (build_method_call): Remove TREE_RAISES.
d11ad92e
MS
8778 * cvt.c (convert_to_aggr): Likewise.
8779 * typeck.c (build_function_call_real, convert_arguments): Likewise.
8780 * init.c (expand_aggr_init_1): Likewise.
6060a796
MS
8781
8782Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
8783
8784 * except.c: Add support for m68k and mips exception handling
8785 support.
8786
8787Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
8788
8789 * except.c (expand_end_all_catch): Throw into outer context, if we
8790 fall off end of catch handlers.
8791
db5ae43f
MS
8792Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
8793
8794 * Makefile.in: Make is easier to decide where parse.[ch] will be
8795 built.
8796
af824546
DE
8797Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
8798
8799 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
8800 (GXX_INSTALL_NAME) Likewise.
8801 (CXX_CROSS_NAME) Use program_transform_cross_name.
8802 (GXX_CROSS_NAME) Likewise.
8803 (c++.install-man): Use program_transform_name on g++.1.
8804 (c++.uninstall): Likewise.
8805
db5ae43f
MS
8806Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
8807
8808 * parse.y (THROW): Fix precedence of throw expressions.
8809
8810Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
8811
8812 * typeck.c (build_unary_op): Allow promotions from bool to int on
8813 unary ~.
8814
8815Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8816
8817 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
8818 classes when appropriate.
8819 (build_overload_nested_name): When dealing with a function context,
8820 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
8821 avoid conflicts between local classes of the same name.
8822
8823Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
8824
8825 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
8826 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
8827 `explicit'.
8828 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
8829 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
8830 build_method_calls so that non-converting constructors are not used.
8831 * call.c (build_method_call): If we shouldn't use a non-converting
8832 constructor, then don't.
8833
8834Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8835
8836 * call.c (build_method_call): Don't try to synthesize methods yet.
8837
8838Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 8839
db5ae43f
MS
8840 * pt.c (push_template_decls): Create CONST_DECLs for template
8841 constant parameters, not VAR_DECLs.
8842
d11ad92e 8843Sat Nov 19 15:28:31 1994 Jim Wilson <wilson@chestnut.cygnus.com>
db5ae43f
MS
8844
8845 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
8846 shift count is less than size in bits of arg0.
8847
8848Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
8849
8850 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
8851 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
8852 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
8853 to add support for explicit, namespace, typename, and using, support
8854 for the rest is already in.
8855
db5ae43f
MS
8856Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
8857
8858 * gc.c (get_bad_cast_node): New routine to support compile time
8859 throws of bad_cast.
8860 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
8861 time.
8862
8863Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
8864
8865 * except.c: Add hppa support.
8866
8867Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
8868
8869 * except.c: Add rs6000 support.
8870
8871Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
8872
8873 * except.c (do_unwind): Add i[34]86 support.
8874
d11ad92e 8875Thu Nov 3 00:10:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8876
8877 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
8878 instantiations.
8879
d11ad92e 8880Wed Nov 2 15:08:24 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f 8881
14548a19 8882 * decl.c (finish_function): Emit types used in method parameters
db5ae43f
MS
8883 into symbol table.
8884
d11ad92e 8885Wed Nov 2 15:05:47 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8886
8887 * pt.c (process_template_parm): Allow pointer to member function
8888 template parameter types.
8889 (uses_template_parms): Handle pointer to member function
8890 CONSTRUCTORs.
8891
8892 * g++.c (main): Cast first argument of bzero to (char *).
8893 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
8894
d11ad92e 8895Mon Oct 31 14:50:48 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8896
8897 * gc.c (build_dynamic_cast): rewrite to make it work.
8898 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
8899 * class.c (modify_all_direct_vtables): ditto.
8900 * init.c (expand_direct_vtbls_init): expand more vtables if
8901 flag_rtti is on.
8902 * decl.c (init_type_desc): add default return.
8903
d11ad92e 8904Tue Oct 25 17:13:09 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8905
8906 * tree.c (debug_binfo): get rid of the initial size entry of
8907 vtable.
8908 * cp-tree.h: change flag_dossier to flag rtti, define type
8909 descriptor type nodes.
8910 * decl.c (init_type_desc): new function to initialize type
8911 descriptor type nodes.
8912 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
8913 * lex.c (init_lex): ditto.
8914 * decl.c : change variable flag_dossier to flag_rtti.
8915 * decl.c (duplicate_decls): get rid initial size entry of vtable.
8916 * decl.c (hack_incomplete_structures): take out assert 164.
8917 * search.c (get_abstract_virtuals_1): ditto.
8918 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
8919 CLASSTYPE_RTTI.
8920 * parse.y: ditto.
8921 * class.c (prepare_fresh_vtable): for virtual bases, get right
8922 offset.
8923 * class.c (add_virtual_function): change flag_dossier to
8924 flag_rtti.
8925 * class.c (modify_one_vtable): modify the right rtti entry.
8926 * class.c (override_one_vtable): get rid of size entry.
8927 * class.c (finish_struct): change flag_dossier to flag_rtti, and
8928 build extra vtables, build type descriptors for polymorphic
8929 classes.
8930 * gc.c (build_headof): make headof() works correctly with new
8931 rtti.
8932 * gc.c (build_typeid): make this function work with new rtti.
8933 * gc.c (get_typeid): make this function work with new rtti.
8934 * gc.c (build_bltn_desc): new function for new rtti.
8935 * gc.c (build_user_desc): ditto.
8936 * gc.c (build_class_desc): ditto.
8937 * gc.c (build_ptr_desc): ditto.
8938 * gc.c (build_attr_desc): ditto.
8939 * gc.c (build_func_desc): ditto.
8940 * gc.c (build_ptmf_desc): ditto.
8941 * gc.c (build_ptmd_desc): ditto.
8942 * gc.c (build_t_desc): ditto.
8943 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
8944
d11ad92e 8945Tue Oct 25 13:37:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8946
8947 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
8948 after checking for integral conversions.
ea943e1d 8949
72b7eeff
MS
8950Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
8951
8952 * Version 2.6.3 released.
8953
8954Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8955
8956 * typeck2.c (build_m_component_ref): Check the basetype of the
8957 member pointer against the main variant of the object type.
8958
8959Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8960
8961 * cvt.c (convert_to_reference): Make sure that the original expr
8962 gets its type back when converting a reference.
8963
8964 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
8965 (build_decl_overload): Instead of here.
8966
8967Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8968
8969 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
8970 function.
8971
8972 * typeck.c (convert_for_initialization): Handle initialization from
8973 a TARGET_EXPR.
8974
d11ad92e 8975Sun Nov 6 01:34:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
72b7eeff
MS
8976
8977 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
8978 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
8979 TYPE_READONLY and TYPE_VOLATILE from the argument.
8980 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
8981 present in parm from arg.
8982 (type_unification): Strip REFERENCE_TYPE from the argument type.
8983 (unify): Don't strip REFERENCE_TYPE from the argument type.
8984
d11ad92e 8985Sat Nov 5 22:42:15 1994 Greg McGary <gkm@magilla.cichlid.com>
72b7eeff
MS
8986
8987 * pt.c (do_type_instantiation): Check to see if there's a
8988 IDENTIFIER_TEMPLATE on a class before calling
8989 instantiate_member_templates().
8990
8991Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
8992
8993 * Version 2.6.2 released.
8994
8995Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
8996
8997 * Makefile.in (spew.o, lex.o, pt.o):
8998 Depend on $(srcdir)/parse.h, not parse.h.
8999
9000Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
9001
9002 * Version 2.6.1 released.
9003
d11ad92e 9004Sun Oct 23 13:19:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9005
db5ae43f
MS
9006 * decl2.c: Declare flag_access_control.
9007 (struct lang_f_options): Add access-control.
9008 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
9009 for the call to expand_aggr_init to copy the object out of the
9010 pcc_struct_return slot.
9011 * search.c (compute_access): if (!flag_access_control) return
9012 access_public.
eae89e04 9013
d11ad92e 9014Fri Oct 21 00:32:54 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9015
db5ae43f
MS
9016 * lex.c (cons_up_default_function): Don't try to defer method
9017 synthesis now.
9018
9019 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
9020 instead of abort, since the OSF/1 dynamic linker doesn't like to see
9021 relocation entries for abort.
eae89e04 9022
db5ae43f
MS
9023 * tree.c (array_type_nelts_total): Use sizetype, not
9024 integer_type_node.
d11ad92e 9025 (array_type_nelts_top): Likewise.
db5ae43f
MS
9026
9027Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
9028
9029 * decl.c (grokdeclarator): Added handling for catch parameters
9030 (CATCHPARM).
9031 * except.c (expand_start_catch_block): Use the new CATCHPARM context
9032 instead of NORMAL.
9033 * except.c (expand_throw): Don't let convert_to_reference complain
9034 about what we are doing.
9035
d11ad92e 9036Thu Oct 20 12:55:24 1994 Jim Wilson <wilson@cygnus.com>
db5ae43f
MS
9037
9038 * method.c (emit_thunk): Call instantiate_virtual_regs.
9039
9040Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
9041
9042 * except.c (expand_exception_blocks): Make sure throw code doesn't
9043 get put in function that won't be output.
eae89e04 9044
d11ad92e 9045Mon Oct 17 18:03:15 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9046
db5ae43f
MS
9047 * decl.c (init_decl_processing): Make alloca a builtin.
9048
d11ad92e 9049Thu Oct 27 21:10:25 1994 Craig Burley <craig@burley>
db5ae43f
MS
9050
9051 * g++.c (main): Only decrement "added" and set "library" to
9052 NULL when "library" != NULL (just like 940829 fix).
eae89e04 9053
c199879d
MS
9054Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
9055
9056 * except.c (expand_start_catch_block): Make sure the false label
9057 gets onto the permanent obstack, as it is used for the exception
9058 table.
9059
13306d4f
MS
9060Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
9061
9062 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
9063 be set just below, use current_fndecl instead.
9064
d11ad92e 9065Fri Oct 14 15:12:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9066
9067 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
9068 with LOOKUP_SPECULATIVELY.
9069 (expand_default_init): Abort if build_method_call returns NULL_TREE.
9070
9071 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
9072 the rhs is a TARGET_EXPR.
9073
9074 * parse.y (left_curly): Anonymous types are not affected by #pragma
9075 interface/implementation.
9076
9077 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
9078 default constructor if it isn't needed.
9079
9080 * lex.c (cons_up_default_function): Do synthesize methods for
9081 anonymous types if necessary.
9082
d11ad92e 9083Thu Oct 13 17:44:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9084
db5ae43f 9085 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d 9086
d11ad92e 9087Wed Oct 12 13:27:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9088
db5ae43f
MS
9089 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
9090
d11ad92e 9091 * init.c (expand_default_init): Likewise. Also remove some of the
db5ae43f
MS
9092 crufty code that assumes methods will not be synthesized properly.
9093
9094 * lex.c (cons_up_default_function): If the containing type has no
9095 name, these functions should never need to be called, so just
9096 declare them.
2f4f907d 9097
db5ae43f
MS
9098 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
9099 bitmask for lexing character constants.
9100
9101 * call.c (build_method_call): Disable code that tries to do tricky
9102 stuff with a default parameter that is a constructor call, but
9103 actually does other tricky stuff that breaks things.
2f4f907d
JM
9104
9105Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
9106
db5ae43f
MS
9107 * decl.c (finish_enum): Disable code which forces enums to be signed,
9108 since this conflicts with their use as bitfields. type_promotes_to
9109 handles promotion of enums of underlying unsigned types to signed
9110 integer types.
2f4f907d 9111
d11ad92e 9112Wed Oct 12 13:24:03 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9113
db5ae43f
MS
9114 * cvt.c (type_promotes_to): Also promote enums to long if
9115 appropriate.
2f4f907d 9116
db5ae43f
MS
9117 * typeck.c (default_conversion): Don't expect type_promotes_to to
9118 return a main variant.
2f4f907d 9119
d11ad92e 9120Wed Oct 12 12:19:45 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9121
db5ae43f
MS
9122 * call.c (build_scoped_method_call): Don't lose side effects in the
9123 object expression when calling a non-existent destructor.
2f4f907d 9124
d11ad92e 9125Fri Sep 2 19:05:21 1994 Rohan Lenard <rjl@iassf.easams.com.au>
2f4f907d 9126
db5ae43f
MS
9127 * call.c (build_scoped_method_call): Remove erroneous error message
9128 when destructor call is written as a scoped call.
2f4f907d 9129
d11ad92e 9130Tue Oct 11 23:48:31 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9131
9132 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 9133
13306d4f
MS
9134Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
9135
9136 * class.c (get_derived_offset): Added a type parameter to limit how
9137 far up the CLASSTYPE_VFIELD_PARENT chain we search.
9138 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
9139 offset to put into the vtable for the this parameter, make sure we
9140 don't offset from a parent of the DECL_CONTEXT of the function.
9141
d11ad92e 9142Tue Oct 11 16:10:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9143
9144 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
9145 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
d11ad92e 9146 (do_type_instantiation): Likewise.
db5ae43f
MS
9147
9148 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
9149 DECL_EXTERNAL and TREE_STATIC as appropriate.
9150
9151 * decl2.c (finish_file): Also synthesize methods that don't have
9152 DECL_EXTERNAL set. Set interface_unknown before doing so.
9153
9154 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
9155 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
9156
d11ad92e 9157Mon Oct 10 00:56:53 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9158
db5ae43f
MS
9159 * lex.c (cons_up_default_function): Mark methods in a template class
9160 as template instances. Store the values of interface_unknown and
9161 interface_only for do_pending_inlines.
9162 (do_pending_inlines): Use them.
9163
9164 * decl2.c (finish_file): If we haven't seen a definition of a
9165 function declared static, make the decl non-PUBLIC so compile_file
9166 can give an error.
cba8ba35 9167
d11ad92e 9168Sun Oct 9 02:42:29 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9169
db5ae43f 9170 * method.c (do_build_copy_constructor): Handle anonymous unions.
d11ad92e 9171 (do_build_assign_ref): Likewise.
db5ae43f
MS
9172 (largest_union_member): Move from lex.c.
9173
d11ad92e 9174Sat Oct 8 14:59:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9175
9176 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
9177 * pt.c (instantiate_member_templates): Lose redundant
9178 -fexternal-templates handling.
9179 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
9180 TREE_STATIC or DECL_INTERFACE_KNOWN.
9181 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
9182 of DECL_EXTERNAL for explicit instantiations.
9183 (do_function_instantiation): Do the new thing.
d11ad92e 9184 (do_type_instantiation): Likewise.
db5ae43f
MS
9185 (instantiate_template): Deal with member templates defined in a .cc
9186 file with -fexternal-templates.
9187 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
9188 decide whether to stick builtin_throw here.
9189 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
9190 rather than TREE_PUBLIC. Generally fix rules.
9191 (finish_file): Use DECL_INITIAL to determine whether or not a method
9192 has been synthesized, rather than TREE_ASM_WRITTEN.
9193 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
9194 TREE_PUBLIC.
d11ad92e
MS
9195 (pushdecl): Likewise.
9196 (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and
db5ae43f
MS
9197 DECL_INTERFACE_KNOWN.
9198 (redeclaration_error_message): Fix checking for conflicting linkage.
9199 (define_function): Set DECL_INTERFACE_KNOWN.
9200 (grokfndecl): Function decls are PUBLIC until we are sure about
9201 their linkage. Set DECL_DECLARED_STATIC as needed.
9202 (start_function): Deal with linkage. Move pushdecl after linkage
9203 magic.
9204 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
9205 * cp-tree.h (lang_decl_flags): Add interface_known and
9206 declared_static.
9207 (DECL_INTERFACE_KNOWN): New macro.
9208 (DECL_DECLARED_STATIC): New macro.
9209 (DECL_PUBLIC): New macro.
9210
9211 Clean up bogus use of TREE_PUBLIC.
9212 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
9213 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
9214 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35 9215
d11ad92e 9216Wed Oct 5 13:44:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9217
db5ae43f
MS
9218 * call.c (build_overload_call_real): Don't immediately do
9219 array->pointer conversion.
cba8ba35 9220
db5ae43f
MS
9221 * pt.c (type_unification): If not passing to a reference, strip
9222 cv-quals. Also handle array->pointer conversion.
cba8ba35 9223
d11ad92e 9224Tue Oct 4 17:45:37 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9225
db5ae43f
MS
9226 * decl.c (grokdeclarator): Don't warn about applying const to a
9227 const typedef or template type parameter.
9228
9229 * decl2.c (finish_file): Also synthesize methods after walking the
9230 vtables. Ugly ugly ugly.
cba8ba35 9231
d11ad92e 9232Mon Oct 3 15:02:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9233
db5ae43f
MS
9234 * various: Remove lingering remnants of old exception handling code.
9235
9236 * decl2.c (finish_file): Synthesize methods before walking the
9237 vtables, so that the vtables get emitted as needed.
9238
9239 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
9240 dealing with exceptions.
9241
9242Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
9243
9244 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
9245
d11ad92e 9246Mon Oct 3 02:59:28 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9247
9248 * decl2.c (finish_file): Fix inline handling.
cba8ba35 9249
d11ad92e 9250Sun Oct 2 00:21:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9251
db5ae43f
MS
9252 * decl.c (grokdeclarator): Handle redundant scope even better.
9253 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 9254
db5ae43f
MS
9255 * method.c (synthesize_method): Pass toplev parameter to
9256 {push,pop}_cp_function_context depending on decl_function_context
9257 (fndecl).
cba8ba35 9258
db5ae43f
MS
9259 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
9260 built-in version.
cba8ba35 9261
db5ae43f
MS
9262 * method.c (synthesize_method): Don't be confused by __in_chrg
9263 parameter.
b3738072 9264
db5ae43f 9265 * class.c (popclass): Set C_C_D like start_function does.
b3738072 9266
db5ae43f 9267 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 9268
db5ae43f 9269 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
d11ad92e 9270 (direct_notype_declarator): Likewise.
db5ae43f 9271 (complex_direct_notype_declarator): Remove it here.
81613e43 9272
d11ad92e 9273Sat Oct 1 21:42:18 1994 Jason Merrill <jason@deneb.cygnus.com>
44c5421f 9274
db5ae43f
MS
9275 * init.c (resolve_offset_ref): Fix types used in resolving .*
9276 expressions.
9277
d11ad92e 9278Sat Oct 1 15:18:49 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9279
9280 Beginnings of work to synthesize methods only when needed.
9281 * call.c (build_method_call): Synthesize methods as necessary
9282 (currently never necessary).
9283 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
9284 on the wrong obstack.
9285 * decl.c (push_cp_function_context): Mostly copied from
9286 push_c_function_context.
9287 (pop_cp_function_context): Similarly.
9288 (finish_function): Reverse order of poplevel and pop_nested_class so
9289 that current_class_decl is restored properly.
d11ad92e 9290 (start_function): Likewise.
db5ae43f
MS
9291 (finish_function): Add parameter 'nested'. Don't call
9292 permanent_allocation if (nested).
9293 * various: Pass extra parameter to finish_function.
9294 * decl2.c (finish_file): Reorganize end-of-file inline handling,
9295 synthesizing methods as necessary.
9296 * lex.c (cons_up_default_function): Call mark_inline_for_output.
9297 Only synthesize methods immediately if #pragma implementation
9298 (currently disabled).
9299 (do_pending_inlines): Call synthesize_method.
9300 * method.c (synthesize_method): New function; all method synthesis
9301 goes through here. Calls do_build_assign_ref and
9302 do_build_copy_constructor.
9303 (build_default_constructor): Remove.
d11ad92e 9304 (build_dtor): Likewise.
db5ae43f
MS
9305 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
9306 done by synthesize_method.
9307 (build_copy_constructor): Similarly.
44c5421f 9308
eac293a1
MS
9309Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
9310
9311 * typeck.c (c_expand_return): Use magic so the backend can fixup the
9312 assignment into the return register, so cleanups won't clobber it.
9313
d11ad92e 9314Thu Sep 29 13:08:50 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9315
9316 * method.c (hack_identifier): Don't call assemble_external for
9317 template decls.
9318
9319 * decl.c (finish_decl): Also end temporary allocation if the decl in
9320 question has a type of error_mark_node.
9321
6060a796 9322Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
9323
9324 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
9325 that if the ?: was a reference type, that the subparts will be also.
9326
d11ad92e 9327Wed Sep 28 16:14:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
eac293a1
MS
9328
9329 * except.c (register_exception_table): Use Pmode, not PTRmode.
9330
d11ad92e 9331Fri Sep 23 13:54:27 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9332
9333 * lex.c (do_pending_inlines): Do method synthesis after the
9334 pending_inlines have been reversed.
9335
d11ad92e 9336Thu Sep 22 12:53:03 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9337
9338 * decl2.c (finish_file): Fix Brendan's fix: Only call
9339 register_exception_table if there is a non-empty exception table.
9340
d11ad92e 9341Thu Sep 22 12:03:46 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9342
9343 * decl2.c (finish_file): Only do register_exception_table if
9344 -fhandle-exceptions is being used.
9345
d11ad92e 9346Wed Sep 21 19:01:51 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9347
9348 * except.c (output_exception_table_entry): Simplify
9349 by using assemble_integer.
9350 (build_exception_table): Change to return a count.
9351 Cleanup to use standard macros, instead of hard-wired
9352 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
9353 (register_exception_table): New function. Generate call to builtin.
9354 * decl2.c (finish_file): Call register_exception_table.
9355 * cp-tree.h (build_exception_table): Fix prototype.
9356
d11ad92e 9357Wed Sep 21 13:20:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9358
9359 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
9360
9361 * decl2.c (delete_sanity): Give an error at trying to delete a
9362 function.
9363
d11ad92e 9364Wed Sep 21 11:47:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9365
9366 * lex.c (cons_up_default_function): Mark synthesized destructors
9367 inline.
9368
9369 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
9370 something other than __wchar_t, complaining if -pedantic and not in
9371 a system header.
9372
d11ad92e 9373Tue Sep 20 09:43:28 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9374
9375 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
9376 here.
9377
9378 * typeck.c (build_modify_expr): Require complete type after checking
9379 for error_mark_node.
9380
9381 * call.c (build_method_call): Print parmtypes when complaining of
9382 ambiguous call.
9383
9384 * typeck.c (build_modify_expr): Handle assignment to array from
9385 non-array.
9386
9387 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
9388
9389 * call.c (build_method_call): Don't bother with the exact match.
9390
d11ad92e 9391Mon Sep 19 00:51:39 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9392
9393 * init.c (expand_aggr_init): If we munge the type of the variable,
9394 also munge the type of the initializer.
9395
9396 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
9397 (init_decl_processing): Push artificial declaration of wchar_t so
9398 people don't have to declare it before they can use it.
9399
9400 * error.c (cp_line_of): return lineno in lieu of 0.
9401
9402 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
9403 int and bool.
9404 (build_component_ref): Fold the COMPONENT_REF in case it can be
9405 reduced.
9406
9407 * typeck2.c (store_init_value): Don't pedwarn about non-constant
9408 bracketed initializers for automatic variables.
9409
d11ad92e 9410Sun Sep 18 10:12:12 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9411
9412 * error.c (dump_decl): Don't say `typedef enum foo foo'.
9413
9414 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
9415 because they're affected by #pragma i/i. We'll deal with that when
9416 they get instantiated.
9417
9418 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
9419
9420 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
9421 ADDR_EXPRs if appropriate.
9422
9423 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
9424
9425 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
9426 initializer properly.
d11ad92e 9427 * typeck2.c (digest_init): Likewise.
f376e137
MS
9428
9429 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
9430 it uses build_cplus_array_type.
9431 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
9432
9433 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 9434 enums.
f376e137 9435
d11ad92e 9436Tue Sep 13 10:56:58 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9437
9438 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 9439 properly.
f376e137 9440
d11ad92e 9441Tue Sep 13 09:51:59 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9442
9443 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
9444 fact, static.
9445
d11ad92e 9446Mon Sep 12 14:40:30 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9447
9448 * decl.c (finish_decl): Lay out the rtl for DECL before doing
9449 grok_reference_init, in case it's static.
9450
d11ad92e 9451Mon Sep 12 12:45:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9452
9453 * class.c (finish_struct): Don't synthesize constructors if the
9454 class has a field with the same name as the class. Don't die on
9455 classes with no constructors or destructors. Don't die if the head
9456 and tail of the class are in different files.
9457
9458 * decl.c (grokdeclarator): Don't treat a function pointer field
9459 with the same name as the class as a constructor.
9460
d11ad92e 9461Fri Sep 9 13:17:00 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9462
9463 * typeck.c (build_c_cast): Pull constant values out of their
9464 variables here.
9465
9466 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
9467 FUNCTION_DECLs and TEMPLATE_DECLs.
9468
d11ad92e 9469Thu Sep 8 10:07:48 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9470
9471 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
9472 have it.
9473
9474 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
9475 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
9476 TREE_PUBLIC unless -fexternal-templates.
9477
d11ad92e 9478Wed Sep 7 13:17:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9479
9480 * pt.c (do_type_instantiation): Call instantiate_member_templates.
9481 Deal with specializations.
9482 (tsubst): Don't stick the mangled name in DECL_NAME for function
9483 instantiations. Don't push them, either.
9484
9485 * decl2.c (grokfield): Move code for generating the
9486 DECL_ASSEMBLER_NAME for static members from here.
9487 * method.c (build_static_name): To here.
9488 * decl.c (grokvardecl): Call build_static_name.
9489 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
9490
d11ad92e 9491Mon Sep 5 12:49:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9492
9493 * call.c (build_method_call): if -Wsynth, warn when selecting
9494 synthesized op= over user-supplied one cfront would select.
9495 * decl2.c (lang_decode_option): Handle -Wsynth.
9496
d11ad92e 9497Fri Sep 2 15:11:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9498
9499 * decl.c (finish_enum): Overhaul to fix several bugs.
9500 (start_enum): Disable useless code.
9501
d11ad92e 9502Thu Sep 1 16:04:54 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9503
9504 * typeck.c (c_expand_return): Warn about returning a reference to a
9505 temporary.
9506 (convert_arguments): Increment argument counter when using default
9507 arguments, too.
9508
d11ad92e 9509Wed Aug 31 14:29:22 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9510
9511 * decl.c (finish_decl): If the type of decl is error_mark_node,
9512 don't bother trying to do anything.
9513
9514 * typeck.c (convert_for_initialization): If the rhs contains a
9515 constructor call, pretend the lhs type needs to be constructed.
9516
9517 * init.c (expand_default_init): If we stick the object inside the
9518 initializer, mark the initializer used.
9519
d11ad92e 9520Tue Aug 30 13:50:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9521
9522 * method.c (build_assign_ref): return *this;
9523 (build_assign_ref): Fix base assignment order.
9524 (build_copy_constructor): Fix member init order.
9525
d11ad92e 9526Mon Aug 29 13:54:39 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9527
9528 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
9529 its argument.
9530
d11ad92e 9531Sat Aug 27 09:36:03 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9532
9533 * method.c (build_copy_constructor): Also copy virtual bases.
9534
d11ad92e 9535Fri Aug 26 17:05:15 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9536
9537 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
9538 any synthesis. Also first set deja_vu on all pending_inlines.
9539
9540 * method.c (build_assign_ref): Use build_member_call to invoke base
9541 operator=, rather than build_modify_expr. And use
9542 build_reference_type instead of TYPE_REFERENCE_TO.
9543 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
9544 basetype.
9545
9546 * decl2.c (grokfield): Don't complain about undefined local class
9547 methods.
9548
9549 * class.c (finish_struct): Don't try to synthesize methods here.
9550 * lex.c (do_pending_inlines): Instead, synthesize them here.
9551 (init_lex): Initialize synth_obstack.
9552 (cons_up_default_function): Stick synthesis request on
9553 pending_inlines.
9554
d11ad92e 9555Fri Aug 26 12:24:14 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9556
9557 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
9558 accept an RTL_EXPR in what we're about to use for the instance,
9559 since anything which would end up with pcc_struct_return set
9560 inside cplus_expand_expr.
9561
9562 * cp-tree.h (cons_up_default_function): Note change of prototype.
9563
d11ad92e 9564Thu Aug 25 23:05:30 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
9565
9566 * class.c (finish_struct): Undid change from Aug 21 testing
9567 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
d11ad92e 9568 * parse.y (left_curly): Likewise, undid change from Aug 21.
f376e137
MS
9569 * decl.c (xref_tag): Undid change from Aug 21, set
9570 CLASSTYPE_INTERFACE correctly, and added comments.
9571
d11ad92e 9572Thu Aug 25 00:36:31 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9573
9574 Rework approach to synthesized methods; don't go through the parser
9575 anymore.
9576 * class.c (finish_struct): Use new synthesis approach.
9577 * lex.c (cons_up_default_function): Now just creates declaration,
9578 not code.
9579 (largest_union_member): #if 0 out.
d11ad92e
MS
9580 (default_assign_ref_body): Likewise.
9581 (default_copy_constructor_body): Likewise.
f376e137
MS
9582 * method.c (build_default_constructor): New function to synthesize X().
9583 (build_copy_constructor): Synthesize X(X&).
9584 (build_assign_ref): Synthesize X::operator=(X&).
9585 (build_dtor): Synthesize ~X().
9586
9587 * error.c (cp_line_of): If we're dealing with an artificial
9588 TYPE_DECL, look at the type instead.
9589
d11ad92e 9590Wed Aug 24 11:11:50 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9591
9592 * init.c (sort_member_init): Check warn_reorder.
9593 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
9594
9595 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
9596 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
9597 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
9598
6060a796 9599Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
9600
9601 * error.c (dump_decl): Improve wording, so that error messages
9602 dont't read template<, class foo>...
9603
d11ad92e 9604Mon Aug 22 15:30:51 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9605
9606 * parse.y (label_colon): Also match a TYPENAME as a label name,
9607 since they may have declared a class by that name but have also
9608 tried to have a local label under the same name.
9609
9610 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
9611 for the message so they know at what point it was instantiated.
9612
d11ad92e 9613Sun Aug 21 23:07:35 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
9614
9615 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
9616 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
9617 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 9618 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
9619 * parse.y (left_curly): New final resting place for setting
9620 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
9621
9622 * class.c (finish_struct): Don't test for function/field name
9623 conflicts in signatures, since all the fields are compiler-constructed.
9624
d11ad92e 9625Fri Aug 19 14:04:47 1994 Kung Hsu <kung@mexican.cygnus.com>
f376e137
MS
9626
9627 * method.c (build_overload_nested_name): in qualified name
9628 mangling, the template with value instantiation will have numeric
9629 at end and may mixed with the name length of next nested level.
9630 Add a '_' in between.
9631 * method.c (build_overload_name): ditto.
9632 * method.c (build_overload_identifier): ditto.
9633
6060a796 9634Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
9635
9636 * error.c (dump_decl): Handle NULL args.
9637
db5ae43f
MS
9638Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
9639
9640 * g++.c: Rework last change so it's done like collect.c (and
9641 gcc.c).
9642
9643Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
9644
9645 * g++.c: Include <sys/errno.h> in case `errno' is a macro
9646 as permitted by ANSI C.
9647
6060a796 9648Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
9649
9650 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
9651 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
9652 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 9653 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
9654 * parse.y (left_curly): New final resting place for setting
9655 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
9656
d11ad92e 9657Thu Aug 11 11:32:42 1994 H.J. Lu <hjl@nynexst.com>
00595019
MS
9658
9659 * g++.c (main): Only decrement "added" and set "library" to
9660 NULL when "library" != NULL.
9661
d11ad92e 9662Sat Aug 13 00:14:52 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9663
9664 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
9665 just because its class has a known interface.
9666 (decls_match): Deal with new format of template parms.
9667
9668 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
9669 DECL_EXTERNAL here.
9670
d11ad92e 9671Fri Aug 12 01:55:15 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9672
9673 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
d11ad92e 9674 (xref_defn_tag): Likewise.
00595019
MS
9675 (pushdecl): Only allow artificial typedefs to be shadowed.
9676
9677 * init.c (emit_base_init): Pass the right binfos to
9678 expand_aggr_init_1.
9679
9680 * class.c (delete_duplicate_fields_1): Make it work right.
9681 (finish_struct): Catch function/field name conflict.
9682
9683 * decl2.c (check_classfn): Pass the function to cp_error, not just
9684 the name.
9685
9686 * init.c (sort_member_init): Warn when order of member initializers
9687 does not match order of member declarations.
9688 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
9689
9690 * error.c (dump_expr): Handle lists of functions.
9691
9692 * decl.c (start_function): #pragma interface only affects functions
9693 that would otherwise be static.
9694 (finish_decl): Don't warn about an unused variable if it has both
9695 constructor and destructor, since the 'resource allocation is
9696 initialization' idiom is relatively common.
9697
9698 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
d11ad92e 9699 (comp_target_parms): Likewise.
00595019
MS
9700 (compparms): Never consider default parms.
9701 (common_base_type): Don't choose a virtual baseclass if there is a
9702 more derived class in common.
9703 (build_conditional_expr): If pedantic, pedwarn about conversion to
9704 common base in conditional expr.
9705
9706 * class.c (instantiate_type): Handle template instantiation better.
9707
9708 * typeck.c (convert_arguments): Don't try to get tricky and convert
9709 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
9710 user-defined conversions.
9711
9712 * lex.c (check_for_missing_semicolon): Also give error at end of
9713 file.
9714
9715 * call.c (build_method_call): Don't promote arrays to pointers here.
9716
9717 * typeck.c (convert_arguments): Don't require the actual parameter
9718 to be of a complete type if the formal parameter is a reference.
9719
d11ad92e 9720Thu Aug 11 15:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9721
9722 * decl.c (grokdeclarator): Soften 'static' on member function error
9723 to pedwarn.
9724
9725 * init.c (build_new): Don't automatically save rval.
9726 (build_offset_ref): Do field lookup with proper basetype_path.
9727
d11ad92e 9728Thu Aug 11 12:46:54 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
00595019
MS
9729
9730 * errfn.c (cp_silent): Declare to mark when we should avoid
9731 emitting warnings and errors.
9732 (cp_error): Check it.
9733 (cp_warning): Likewise.
9734 (cp_pedwarn): Likewise.
9735 (cp_compiler_error): Likewise.
9736 (cp_error_at): Likewise.
9737 (cp_warning_at): Likewise.
9738 (cp_pedwarn_at): Likewise.
9739 * call.c (compute_conversion_costs): Set CP_SILENT when we start
9740 out, and make sure we turn it off before we leave.
9741
d11ad92e 9742Thu Aug 11 00:02:54 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9743
9744 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
9745 argument is obviously an array.
9746
d11ad92e 9747Wed Aug 10 15:32:04 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9748
9749 * typeck.c (c_expand_start_case): Do cleanups here.
9750
9751 * parse.y (xcond): Do bool conversion here, too.
9752 (simple_stmt, SWITCH case): Don't do cleanups here.
9753
9754 * decl.c (duplicate_decls): Don't treat builtins that have been
9755 explicitly declared specially.
9756
d11ad92e 9757Tue Aug 9 01:16:09 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9758
9759 * tree.c (make_deep_copy): Support copying pointer, reference,
9760 function, array, offset and method types.
9761
9762 * decl.c (init_decl_processing): Mark exit and abort as
9763 BUILT_IN_NONANSI so that duplicate_decls is kinder about
9764 redeclaration.
9765 (duplicate_decls): Don't give two errors for redeclaring a C
9766 function with the same parms but a different return type.
9767
9768 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
9769 (condition): Instead of here.
9770 (simple_stmt, SWITCH case): Also do cleanup here.
9771
9772 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
9773
9774 * call.c (build_method_call): Don't throw away the side effects of
9775 the object in a call to a non-existent constructor.
d11ad92e 9776 * parse.y (primary): Likewise.
00595019
MS
9777
9778 * method.c (build_decl_overload): Oop.
9779
9780 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
9781 warn about uselessness of specifying -fansi-overloading.
9782
9783 * method.c (build_decl_overload): Treat any non-member new with one
9784 parameter as __builtin_new.
9785
9786 * decl.c (init_decl_processing): Setup built-in meanings of exit,
9787 _exit and abort.
9788
d11ad92e 9789Mon Aug 8 15:03:30 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9790
9791 * error.c (dump_readonly_or_volatile): Put a space between const and
9792 volatile if both apply.
9793
9794 * init.c (perform_member_init): Clean up after this initialization.
9795 (emit_base_init): Clean up after each base init, not after all have
9796 been done.
9797 (expand_aggr_vbase_init_1): Clean up after this init.
9798
d11ad92e 9799Sun Aug 7 14:55:05 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9800
9801 * call.c (build_method_call): Deal with destroying references.
9802
9803 * parse.y (condition): Do bool_truthvalue_conversion here.
9804 (paren_expr_or_null): And here.
9805 (simple_if): Not here.
9806 (simple_stmt): Or here.
9807
d11ad92e 9808Sat Aug 6 22:29:45 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9809
9810 * parse.y (paren_expr_or_null): Wrap the expression in a
9811 CLEANUP_POINT_EXPR.
d11ad92e 9812 (condition): Likewise.
00595019 9813
d11ad92e 9814Sat Aug 6 19:46:37 1994 Rohan Lenard <rjl@easams.com.au>
00595019
MS
9815
9816 * call.c (build_scoped_method_call): Fix error message when
9817 destructor call refers to a nonexistent type.
9818
d11ad92e 9819Sat Apr 16 22:43:30 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9820
9821 * lex.h (rid): Deleted RID_RAISES, it's never used.
9822 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
9823 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
9824 they don't need to be touched in `grokdeclarator.'
9825 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
9826
9827 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
9828 RID_MAX as loop limit for finding declaration specifiers.
9829
d11ad92e 9830Sat Apr 3 21:59:07 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9831
9832 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
9833 access `yytname,' which is static in parse.c.
9834
d11ad92e 9835Fri Apr 2 23:36:57 1993 Gerald Baumgarnter <gb@cs.purdue.edu>
00595019
MS
9836
9837 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
9838 was `GNU_xref_def' instead of `GNU_xref_ref.'
9839
d11ad92e 9840Fri Aug 5 14:20:16 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9841
9842 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
9843 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
d11ad92e 9844 (do_type_instantiation): Likewise.
00595019
MS
9845
9846 * decl2.c (import_export_inline): Decides at EOF what an inline's
9847 linkage should be.
9848 (finish_file): Call it.
9849
9850 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
9851 and DECL_EXTERNAL from do_*_instantiation. Only set
9852 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
9853 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
9854 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
9855
6060a796 9856Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
9857
9858 * class.c (get_class_offset_1, get_class_offset): New routine to
9859 find the offset of the class where a virtual function is defined,
9860 from the complete type.
9861 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
9862 get_class_offset instead of virtual_offset as get_class_offset will
9863 always provide the right answer.
9864 * tree.c (virtual_offset): Remove. It only ever worked some of the
9865 time.
9866
d11ad92e 9867Tue Aug 2 12:44:21 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9868
9869 * call.c (build_method_call): Put back unary_complex_lvalue call
9870 that I thought was redundant.
9871
9872 * typeck.c (c_expand_return): Fix a case I missed before.
9873
d11ad92e 9874Sun Jul 31 17:54:02 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9875
9876 * pt.c (unify): Strip cv-quals from template type arguments (when
9877 'const T*' is matched to 'const char*', that does not mean that T is
9878 'const char').
9879
d11ad92e 9880Fri Jul 29 01:03:06 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9881
9882 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
9883 typedefs. Third time's the charm?
9884
9885 * parse.y (template_parm): Support default template parms.
d11ad92e
MS
9886 * pt.c (process_template_parm): Likewise.
9887 (end_template_parm_list): Likewise.
9888 (coerce_template_parms): Likewise.
9889 (mangle_class_name_for_template): Likewise.
9890 (push_template_decls): Likewise.
9891 (unify): Likewise.
9892 * method.c (build_overload_identifier): Likewise.
9893 * error.c (dump_decl): Likewise.
a292b002 9894
d11ad92e 9895Wed Jul 27 17:47:00 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9896
9897 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
9898
d11ad92e 9899Tue Jul 26 13:22:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9900
9901 * search.c (note_debug_info_needed): Also emit debugging information
9902 for the types of fields.
9903
d11ad92e 9904Mon Jul 25 00:34:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9905
9906 * pt.c (lookup_template_class): Pass 'template' to
9907 coerce_template_parms instead of 'in_decl', since it's a more
9908 meaningful context.
9909
9910 * typeck.c (c_expand_return): Make sure any cleanups for the return
9911 expression get run.
9912 (build_c_cast): Use CONVERT_EXPR for conversion to void.
9913
9914 * pt.c (do_type_instantiation): Also instantiate nested types.
9915
9916 * typeck.c (convert_for_assignment): Don't die when comparing
9917 pointers with different levels of indirection.
9918
9919 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
9920 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
9921 out.
9922
9923 * decl2.c (finish_anon_union): Don't die if the union has no
9924 members.
9925
9926 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
9927 so that 'typedef int foo, bar;' will work.
9928
9929 * decl2.c (finish_file): Don't call expand_aggr_init for
9930 non-aggregates.
9931
d11ad92e 9932Mon Jul 25 00:03:10 1994 Teemu Torma <tot@trema.fi>
a292b002
MS
9933
9934 * decl.c (finish_function): We can't inline constructors and
9935 destructors under some conditions with -fpic, but don't unset
9936 DECL_INLINE.
9937
d11ad92e 9938Mon Jul 25 00:03:10 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9939
9940 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
9941
d11ad92e 9942Sun Jul 24 14:19:31 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9943
9944 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
9945 non-fields.
9946 (finish_struct_methods): Use copy_assignment_arg_p.
9947
9948 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
9949 of giving an error.
9950
9951 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
9952 don't know how to compare the operands.
9953
9954 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
9955 as a declarator-id in their program. Like the Linux headers do.
9956 Arrgh.
9957
9958 * tree.c (lvalue_p): Treat calls to functions returning objects by
9959 value as lvalues again.
9960
9961 * typeck.c (build_component_addr): Use convert_force to convert the
9962 pointer in case the component type is also a private base class.
9963
9964 * search.c (get_matching_virtual): Fix bogus warning of overloaded
9965 virtual.
9966
9967 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
9968 TYPE_DECL to fix bogus shadowing warnings.
9969
d11ad92e 9970Fri Jul 22 01:15:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9971
9972 * init.c (expand_aggr_init_1): const and volatile mismatches do not
9973 prevent a TARGET_EXPR from initializing an object directly.
9974
d11ad92e 9975Tue Jul 19 17:55:37 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9976
9977 * cvt.c (build_up_reference): Allow building up references to
9978 `this', don't warn about making references to artificial variables
9979 (like `this').
9980
9981 * tree.c (lvalue_p): `this' is not an lvalue.
9982
9983 * call.c (build_method_call): Accept using a typedef name (or
9984 template type parameter) for explicit destructor calls.
9985
72b7eeff
MS
9986Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
9987
9988 * Version 2.6.0 released.
9989
d11ad92e 9990Wed Jul 13 03:57:54 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 9991
a292b002
MS
9992 * method.c (hack_identifier): Put back old code so lists of
9993 non-functions will be handled properly.
a5ef9010 9994
a292b002
MS
9995 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
9996 defined in the language-independent tree.h.
cf17cae3 9997
a292b002
MS
9998 * tree.c (count_functions): Avoid bogus warning when compiling this
9999 function.
cf17cae3 10000
d11ad92e 10001Mon Jul 11 18:37:20 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 10002
a292b002
MS
10003 * decl.c (grok_reference_init): Always save the initializer of a
10004 reference.
cf17cae3 10005
6060a796 10006Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
10007
10008 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
10009 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 10010 (disabled for now)
5b605f68 10011
d11ad92e 10012Fri Jul 8 12:59:38 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10013
10014 * method.c (hack_identifier): Fix for new overloading.
10015
10016 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 10017 zero.
5b605f68 10018
d11ad92e 10019Fri Jul 8 13:20:28 1994 Gerald Baumgartner <gb@cs.purdue.edu>
5b605f68
MS
10020
10021 * decl2.c (finish_file): Only call walk_sigtables, if
10022 flag_handle_signatures is turned on, don't waste time otherwise.
10023
d11ad92e 10024Fri Jul 8 02:27:41 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10025
10026 * decl.c (push_overloaded_decl): Don't create overloads of one when
10027 shadowing a class type.
a292b002 10028 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
10029
10030 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
10031 (grokdeclarator): Fix setting of TREE_STATIC.
10032 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
10033
d11ad92e 10034Thu Jul 7 22:20:46 1994 Gerald Baumgartner <gb@andros.cygnus.com>
311862c8
GB
10035
10036 * cp-tree.h (walk_sigtables): Created extern declaration.
10037 * decl2.c (walk_sigtables): Created function, patterned after
10038 walk_vtables, even though we only need it to write out sigtables.
10039 (finish_sigtable_vardecl): Created function.
10040 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
10041 (finish_file): Call walk_sigtables.
10042
10043 * sig.c (build_signature_table_constructor): Mark class member
10044 function pointed to from signature table entry as addressable.
10045
d11ad92e 10046Thu Jul 7 13:39:37 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10047
10048 * decl.c (start_decl): Check new decl of static member variable
10049 against the declaration in the class here.
10050 (grokvardecl): Instead of here.
10051
10052 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
10053 -fvtable-thunks.
d11ad92e 10054 (build_vtable): Likewise.
5b605f68
MS
10055
10056 * decl2.c (import_export_vtable): Move logic for deciding the
10057 interface of a template class from here.
10058 (import_export_template): To here.
10059 (finish_vtable_vardecl): Call import_export_template before
10060 import_export_vtable.
10061
6060a796 10062Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
10063
10064 * except.c (init_exception_processing): Setup interim_eh_hook to
10065 call lang_interim_eh.
10066 * except.c (do_unwind): Propagate throw object value across
10067 stack unwinding.
10068 * except.c (saved_throw_value): Used to hold the value of the object
10069 being thrown. It is always a reference to the real value.
10070 * except.c (expand_start_catch_block): Add handling for the
10071 value of the exception object.
10072 * except.c (expand_start_catch_block): Add handler for the handler,
10073 so that throws inside the handler go to the outer block.
d11ad92e 10074 * except.c (expand_end_catch_block): Likewise.
a3b49ccd
MS
10075 * parse.y (handler_args): Use parm instead, as the other doesn't yet
10076 handle references correctly.
10077
d11ad92e 10078Wed Jul 6 17:55:32 1994 Per Bothner <bothner@kalessin.cygnus.com>
a3b49ccd
MS
10079
10080 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
10081 vtable entry properly to abort.
10082
d11ad92e 10083Tue Jul 5 14:07:54 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10084
10085 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
10086 errors to warnings.
10087
10088 * call.c (build_overload_call_real): Handle fnname being a list of
10089 functions.
10090 * typeck.c (build_x_function_call): Pass list of functions to
10091 build_overload_call, not just the name.
10092 * tree.c (count_functions): Complain when called for invalid
10093 argument.
10094
10095 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
10096 and DECL_EXTERNAL on static members and initialized const members.
10097 * decl2.c (grokfield): Reflect this change.
10098
d11ad92e 10099Fri Jul 1 09:35:51 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10100
10101 * parse.y (init): ANSI C++ does not forbid { }.
10102
d11ad92e 10103Thu Jun 30 00:35:22 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10104
10105 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
10106 warn_nonvdtor defaults to off.
10107
10108 * class.c (instantiate_type): Use comptypes rather than relying on
10109 types to satisfy ==.
10110
10111 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
10112 might be static.
10113
10114 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
10115
10116 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
10117
10118 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
10119 build_cplus_new.
10120
d11ad92e 10121Wed Jun 29 22:31:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10122
10123 * decl2.c (finish_file): Maybe consider static inlines multiple
10124 times, in case they reference each other.
10125
d11ad92e 10126Tue Jun 28 11:58:38 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10127
10128 * class.c (finish_struct): Don't `cons_up_default_function's
10129 for signatures.
10130 (finish_struct): Handle an empty method_vec correctly.
10131
10132 * decl.c (grokdeclarator): Don't warn about a signature being
10133 empty in a signature pointer declaration if we only saw a
10134 forward declaration of the signature. Changed `warning's into
10135 `cp_warning's.
10136
10137 * sig.c (build_sigtable): Don't die if a null signature table
10138 constructor is returned.
10139 (build_signature_pointer_constructor): If the signature table
10140 constructor is null, the _sptr field is set to a null pointer
10141 and cast to the appropriate type. Make copies of all null
10142 pointers so that the type null_pointer_node doesn't get changed.
10143 (build_signature_table_constructor): Added comments.
10144
10145 * sig.c (build_signature_pointer_constructor): Complain if we
10146 try to assign to/initialize a signature pointer/reference of
10147 an undefined signature.
10148
d11ad92e 10149Mon Jun 27 14:05:16 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10150
10151 * typeck2.c (store_init_value): Don't be pedantic about
10152 non-constant initializers of signature tables/pointers/references.
10153
d11ad92e 10154Fri Jun 24 16:49:41 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10155
10156 * decl.c (grokdeclarator): If we are grokking an opaque typedef
10157 in a signature, don't complain about it begin static.
10158
6060a796 10159Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
10160
10161 Fixes a problem of the this pointer being wrong in virtual calls to
10162 methods that are not overridden in more derived classes.
10163
10164 * class.c (fixup_vtable_delta): New routine. It will fixup the
10165 delta entries in vtables, wheever they need updating.
10166 * class.c (finish_struct): Call the new routine for all virtual
10167 bases, as they can have different offsets, than those used in base
10168 classes that we derive our vtable from.
10169
d11ad92e 10170Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10171
10172 * typeck.c (build_binary_op): Use the types before default
10173 conversions in the error message.
10174
10175 * *.c: Use c_build_type_variant instead of build_type_variant where
10176 the type might be an array.
10177
10178 * call.c (build_method_call): Call build_type_variant and
10179 build_reference_type in the right order.
d11ad92e 10180 * decl.c (record_builtin_type): Likewise.
21474714 10181
d11ad92e 10182Wed Jun 29 16:58:53 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10183
10184 * call.c (build_method_call): Call build_type_variant and
10185 build_reference_type in the right order.
d11ad92e 10186 * decl.c (record_builtin_type): Likewise.
21474714 10187
d11ad92e 10188Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10189
10190 * typeck.c (build_binary_op): Use the types before default
10191 conversions in the error message.
10192
10193 * *.c: Use c_build_type_variant instead of build_type_variant where
10194 the type might be an array.
10195
d11ad92e 10196Sat Jun 25 11:50:54 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10197
10198 * cvt.c (convert_to_reference): Try UDC's before doing the
10199 reinterpret_cast thang, though.
10200
d11ad92e 10201Fri Jun 24 01:24:01 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10202
10203 * typeck.c (c_expand_return): Don't USE the return value location
10204 after we've expanded the jump.
10205
10206 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
10207 trying to write out an inline.
10208
10209 * cvt.c (build_up_reference): Also do address adjustment when the
10210 target type uses MI.
10211 (convert_to_reference): Try UDCs only after built-in conversions.
10212 (build_type_conversion_1): Don't play games with the argument to the
10213 method.
10214 (build_type_conversion): #if 0 out code for binding to reference.
10215
d11ad92e 10216Thu Jun 23 00:22:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465 10217
21474714
MS
10218 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
10219 whether to emit inlines.
10220
a3203465
MS
10221 * decl.c (grokdeclarator): Set explicit_int for decls that just
10222 specify, say, 'long'.
10223
10224 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 10225 anyaway).
a3203465 10226
d11ad92e 10227Wed Jun 22 13:40:49 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10228
10229 * cvt.c (build_up_reference): Don't call readonly_error.
10230 (convert_to_reference): Propagate const and volatile from expr to
10231 its type.
10232
10233 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
10234
10235 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
10236 creating a temporary.
10237 (convert_to_reference): Lose excessive and incorrect trickiness.
10238 (cp_convert): Call build_cplus_new with with_cleanup_p set.
10239
d11ad92e 10240 * typeck2.c (build_functional_cast): Likewise.
a3203465 10241
d11ad92e 10242Tue Jun 21 17:38:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10243
10244 * decl.c (grokdeclarator): signed, unsigned, long and short all
10245 imply 'int'.
10246
10247 * decl.c (grokdeclarator): Allow "this is a type" syntax.
10248 (grok_reference_init): Simplify and fix.
10249
d11ad92e 10250Sun Jun 19 17:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10251
10252 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
10253 type.
10254
d11ad92e 10255Sat Jun 18 04:16:50 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10256
10257 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
10258 tinkering to after call to pushdecl.
10259
d11ad92e 10260Fri Jun 17 14:48:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10261
10262 * call.c (build_method_call): Handle destructors for non-aggregate
10263 types properly.
10264
d11ad92e 10265Thu Jun 16 16:48:05 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10266
10267 * call.c (build_method_call): Make sure that the name given for the
10268 destructor matches the constructor_name of the instance.
10269
10270 * pt.c (do_function_instantiation): A non-extern instantiation
10271 overrides a later extern one.
d11ad92e 10272 (do_type_instantiation): Likewise.
a3203465 10273
d11ad92e 10274Wed Jun 15 19:34:54 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10275
10276 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
10277 unqualified array type.
10278
10279 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
10280 CONSTRUCTOR with no elements.
10281
10282 * decl.c (various): Lose empty_init_node.
10283 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
10284 thing depending on the value of DECL_COMMON instead of
10285 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
10286 don't have constructors, don't treat a real empty CONSTRUCTOR
10287 specially.
10288
10289 * typeck2.c (process_init_constructor): Don't treat empty_init_node
10290 specially.
10291
6060a796 10292Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
10293
10294 * class.c (override_one_vtable): Don't forget to merge in an old
10295 overrider when we wanted to reuse a vtable, but couldn't.
10296
d11ad92e 10297Wed Jun 15 15:03:16 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10298
10299 * decl.c (start_decl): Put statics in common again.
10300
10301 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
10302 setting the type to error_mark_node.
10303
10304 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
10305 bitfield assignments.
10306
d11ad92e 10307Tue Jun 14 12:23:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10308
10309 * decl.c (grok_op_properties): Const objects can be passed by value.
10310
d11ad92e 10311Mon Jun 13 03:10:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10312
10313 * decl2.c (import_export_vtable): Force implicit instantiations to
10314 be interface_only when -fno-implicit-templates.
10315
10316 * decl.c (duplicate_decls): Redeclaring a class template name is an
10317 error.
10318
10319 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
10320 * xref.c (GNU_xref_decl): Support templates.
10321
d11ad92e 10322Sat Jun 11 17:09:05 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10323
10324 * decl.c (grok_op_properties): Split out checking for whether this
10325 function should suppress the default assignment operator.
d11ad92e 10326 * decl2.c (grok_function_init): Likewise.
f0e01782
MS
10327 (copy_assignment_arg_p): New function do do just that.
10328 Now considers virtual assignment operators that take a base as an
10329 argument to count as copy assignment operators.
10330
10331 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
10332 TREE_ASM_WRITTEN, as they are redundant.
10333
10334 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
10335 decl that has no LANG_SPECIFIC part.
10336 (do_type_instantiation): Force the debugging information for this
10337 type to be emitted.
10338
10339 * decl.c (start_decl): Clear up uses of various types of templates
10340 (say sorry for static data members, rather than "invalid template").
10341 (expand_static_init): Fix initialization of static data members of
10342 template classes.
10343
d11ad92e 10344Fri Jun 10 00:41:19 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10345
10346 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
10347
10348 * g++.c (main): Use -xc++-cpp-output for .i files.
10349
10350 * pt.c (tsubst): Give meaningful error about declaring template for
10351 a copy constructor which was not declared in the class template.
10352 (do_type_instantiation): Explicit instantiation before the class
10353 template is an error.
10354 (instantiate_template): Don't die if tsubst returns error_mark_node.
10355
d11ad92e 10356Thu Jun 9 19:04:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10357
10358 Don't synthesize the copy assignment operator if the one in a base
10359 class is pure virtual.
10360 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
10361 whether the type has a pure virtual copy assignment operator.
10362 * class.c (finish_base_struct): Don't generate the copy assignment
10363 operator if a base class has a pure virtual one.
10364 * decl.c (grok_op_properties): Add disabled code to set
10365 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
10366 actually set.
10367 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
10368
10369 * decl2.c (import_export_vtable): Always treat template
10370 instantiations as if write_virtuals >= 2, and treat implicit
10371 instantiations as external if -fno-implicit-templates.
10372 (finish_file): Output all pending inlines if
10373 flag_keep_inline_functions.
10374
6060a796 10375Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
10376
10377 * tree.c (layout_vbasetypes): Align virtual base classes inside
10378 complete objects, so that we don't core dump on machines such as
10379 SPARCs when we access members that require larger than normal
10380 alignments, such as a double. Also, we bump up the total alignment
10381 on the complete type, as necessary.
10382
d11ad92e 10383Wed Jun 8 16:18:14 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10384
10385 * gxxint.texi (Free Store): New section with code for examining
10386 cookie.
10387 (Limitations of g++): Remove operator delete entry, since it is no
10388 longer accurate. Fix access control entry.
10389
10390 * typeck.c (build_unary_op): Pedwarn about taking the address of or
10391 incrementing a cast to non-reference type.
10392 (build_modify_expr): Use convert instead of convert_force again.
10393
10394 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
10395 class type, not == RECORD_TYPE.
10396
10397 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
10398
10399 * typeck2.c (report_case_error): #if 0 out.
10400 * lex.c (real_yylex): Lose RANGE.
d11ad92e 10401 * parse.y: Likewise.
f0e01782 10402
d11ad92e 10403Tue Jun 7 18:17:35 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10404
10405 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
10406
d11ad92e 10407Mon Jun 6 19:39:57 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10408
10409 * typeck.c (build_c_cast): Don't shortcut conversions to the same
10410 type. Don't replace consts with their values here, since that's now
10411 done in cp_convert.
10412
10413 * cvt.c (cp_convert): When converting to bool, take
10414 integer_zero_node to false_node and all other INTEGER_CSTs to
10415 true_node.
10416 (build_type_conversion): Don't complain about multiple conversions
10417 to float if we're not really converting.
10418
d11ad92e 10419Fri Jun 3 02:10:56 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927 10420
f0e01782
MS
10421 Implement 'extern template class A<int>;' syntax for suppressing
10422 specific implicit instantiations.
10423 * cp-tree.h: Update prototypes for do_*_instantiation.
10424 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
10425 instantiations.
10426 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
10427 instantiations.
d11ad92e 10428 (do_type_instantiation): Likewise.
f0e01782
MS
10429 * parse.y (explicit_instantiation): Support 'extern template class
10430 A<int>;' syntax.
10431 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
10432 and DECL_EXTERNAL on explicit instantiations.
10433
a0a33927
MS
10434 * cvt.c (cp_convert): Replace constants with their values before
10435 converting.
f0e01782 10436 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927 10437
d11ad92e 10438Thu Jun 2 03:53:30 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10439
10440 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
10441
d11ad92e 10442Wed Jun 1 18:57:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10443
10444 * typeck2.c (digest_init): Handle initializing a pmf with an
10445 overloaded method.
10446 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
10447
10448 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
d11ad92e
MS
10449 (xref_defn_tag): Likewise.
10450 * pt.c (process_template_parm): Likewise.
10451 (lookup_template_class): Likewise.
10452 (push_template_decls): Likewise.
10453 (instantiate_class_template): Likewise.
10454 (create_nested_upt): Likewise.
a0a33927
MS
10455 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
10456 TYPE_DECLs.
10457
10458 * typeck.c (convert_arguments): Make sure type is not NULL before
10459 checking its TREE_CODE.
10460
6060a796 10461Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10462
10463 * class.c (get_derived_offset): New routine.
10464 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
10465 BINFO_VIRTUALS when we choose a new base class to inherit from.
10466 * class.c (modify_one_vtable): Use get_derived_offset to get the
10467 offset to the most base class subobject that we derived this binfo
10468 from.
10469 * class.c (finish_struct): Move code to calculate the
10470 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
10471 new calls to get_derived_offset in modify_one_vtable.
10472
d11ad92e 10473Wed Jun 1 16:50:59 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10474
10475 * init.c (build_member_call): Use build_pointer_type instead of
10476 TYPE_POINTER_TO.
10477
d11ad92e 10478Wed Jun 1 11:11:15 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
10479
10480 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
10481 try to use it in an error.
10482
6060a796 10483Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10484
10485 * typeck.c (convert_arguments, convert_for_initialization): Don't
10486 strip NOP_EXPRs, when we are converting to a reference.
10487
d11ad92e 10488Wed Jun 1 01:11:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10489
10490 * typeck.c (build_modify_expr): Don't dereference references when
10491 initializing them.
10492
10493 * decl2.c (grokfield): Don't check for grokdeclarator returning
10494 error_mark_node any more.
10495
10496 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10497 (start_method): Return void_type_node instead of error_mark_node.
10498
10499 * typeck.c (build_modify_expr): Resolve offset refs earlier.
10500
d11ad92e 10501Tue May 31 16:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10502
10503 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
10504
10505 * typeck.c (build_modify_expr): Dereference references before trying
10506 to assign to them.
10507
10508 * call.c (build_method_call): Don't confuse type conversion
10509 operators with constructors.
10510 * typeck2.c (build_functional_cast): Just call build_c_cast if there
10511 was only one parameter.
10512 * method.c (build_typename_overload): Don't set
10513 IDENTIFIER_GLOBAL_VALUE on these identifiers.
10514 * decl.c (grok_op_properties): Warn about defining a type conversion
10515 operator that converts to a base class (or reference to it).
10516 * cvt.c (cp_convert): Don't try to use a type conversion operator
10517 when converting to a base class.
10518 (build_type_conversion_1): Don't call constructor_name_full on an
10519 identifier.
10520 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
10521
10522 * decl.c (start_decl): Don't complain that error_mark_node is an
10523 incomplete type.
10524 (finish_decl): Check for type == error_mark_node.
10525
d11ad92e 10526Mon May 30 23:38:55 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10527
10528 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
10529 instantiations and inline members.
10530
10531 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
10532
10533 * lex.h: Declare looking_for_template.
10534
10535 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
10536 between type and template interpretations of an identifier.
10537
d11ad92e 10538Sat May 28 04:07:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10539
10540 * pt.c (instantiate_template): Zero out p if we found a
10541 specialization.
10542
10543 * decl.c (grokdeclarator): Elucidate warning.
10544 (grokdeclarator): If pedantic AND -ansi, complain about long long.
10545
10546 Make explicit instantiation work reasonably. It is now appropriate
10547 to deprecate the use of -fexternal-templates.
10548 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
10549 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
10550 (end_template_instantiation): Reflect changes in USE_TEMPLATE
10551 semantics.
10552 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
10553 (do_function_instantiation): Don't set EXPLICIT_INST if
10554 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
10555 appropriately otherwise.
10556 (do_type_instantiation): Set interface info for class. Set
10557 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
10558 flag_external_templates is set.
10559 * parse.y: Reflect changes in USE_TEMPLATE semantics.
10560 * decl2.c: New flag flag_implicit_templates determines whether or
10561 not implicit instantiations get emitted. This flag currently
10562 defaults to true, and must be true for -fexternal-templates to work.
10563 (finish_file): Consider flag_implement_inlines when
10564 setting DECL_EXTERNAL. Consider flag_implicit_templates when
10565 deciding whether or not to emit a static copy.
10566 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
10567 properly for template instantiations.
10568 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
10569 template class.
10570 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
10571 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
10572 (various others): Accessor macros for the above.
10573
d11ad92e 10574Fri May 27 13:57:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10575
10576 * typeck.c (build_binary_op_nodefault): Division by constant zero is
10577 an error.
10578
6060a796 10579Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10580
10581 * class.c (override_one_vtable): Don't modify things we don't own.
10582
d11ad92e 10583Fri May 27 01:42:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10584
10585 * decl.c (finish_decl): Don't postpone processing the initializer of
10586 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
10587 PUBLIC const at toplevel.
10588 (grokdeclarator): pedwarn about initializing non-const or
10589 non-integral statics in the class body.
10590
10591 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
10592 TYPE_DECL.
10593
10594 * call.c (convert_harshness): Dereference reference on rhs before
10595 proceeding, properly grok passing const things to non-const
10596 references.
10597
10598 * typeck.c (build_unary_op): Soften error about taking the address
10599 of main() to a pedwarn.
10600
10601 * lex.c (default_copy_constructor_body): Unambiguously specify base
10602 classes (i.e. A((const class ::A&)_ctor_arg) ).
d11ad92e 10603 (default_assign_ref_body): Likewise.
a0a33927 10604
d11ad92e 10605Thu May 26 13:13:55 1994 Gerald Baumgartner <gb@mexican.cygnus.com>
a0a33927
MS
10606
10607 * decl2.c (grokfield): Don't complain about local signature
10608 method declaration without definition.
10609
10610 * call.c (convert_harshness): If `type' is a signature pointer
10611 and `parmtype' is a pointer to a signature, just return 0. We
10612 don't really convert in this case; it's a result of making the
10613 `this' parameter of a signature method a signature pointer.
10614
10615 * call.c (build_method_call): Distinguish calling the default copy
10616 constructor of a signature pointer/reference from a signature
10617 member function call.
10618
d11ad92e 10619Thu May 26 12:56:25 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10620
10621 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
10622 declarations.
10623
10624 * decl.c (duplicate_decls): A previous function declaration as
10625 static overrides a subsequent non-static definition.
10626 (grokdeclarator): Don't set TREE_PUBLIC on inline method
10627 declarations.
10628
d11ad92e 10629Wed May 25 14:36:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10630
10631 * decl.c (grokdeclarator): Handle initialization of static const
10632 members.
d11ad92e 10633 (finish_decl): Likewise.
a0a33927
MS
10634
10635 * decl2.c (grokfield): Allow initialization of static const members
10636 even when pedantic.
10637
10638 * decl2.c (grokfield): Deal with grokdeclarator returning
10639 error_mark_node.
10640
10641 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
10642 (grokfndecl): Check the return value of grok_ctor_properties.
d11ad92e 10643 (start_method): Likewise.
a0a33927
MS
10644
10645 * parse.y (absdcl): Expand type_quals inline.
10646
d11ad92e 10647Tue May 24 19:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10648
10649 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
10650 RECORD_TYPE.
10651
d11ad92e 10652Tue May 24 18:09:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
a0a33927
MS
10653
10654 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
10655 always use "__vt_%s".
10656 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
10657 when looking for a "sentinal" method (to decide on emitting vtables).
10658 * decl2.c (finish_file): Scan all decls for thunks that need
10659 to be emitted.
10660 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
10661 * method.c (make_thunk): Use a more meaningful label. If there
10662 exists a matching top-level THUNK_DECL re-use it; otherwise
10663 create a new THUNK_DECL (and declare it).
10664 * method.c (emit_thunk): Make thunk external/public depending
10665 on the underlying method.
10666
d11ad92e 10667Tue May 24 00:22:04 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10668
10669 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
10670 lookup_name.
10671
10672 * call.c (build_overload_call_real): Don't immediately pick a
10673 function which matches perfectly.
10674
10675 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
10676 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
10677 reference (like 'int &const j').
10678
10679 * typeck.c (convert_arguments): Don't mess with i for methods.
10680 * call.c (build_method_call): Pass the function decl to
10681 convert_arguments.
10682
10683 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
10684 checking for which multi-level pointer conversions are allowed.
10685 (comp_target_types): Call it.
10686 (convert_for_assignment): Check const parity on the ultimate target
10687 type, too. And make those warnings pedwarns.
10688
d11ad92e 10689Mon May 23 14:11:24 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10690
10691 * error.c (dump_char): Use TARGET_* for character constants.
10692
d11ad92e 10693Mon May 23 13:03:03 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
10694
10695 * tree.c (debug_no_list_hash): Make static.
10696
10697 * decl.c (decls_match): Say the types don't match if newdecl ends up
10698 with a null type, after we've checked if olddecl does.
10699 (pushdecl): Check if the decls themselves match before looking for
10700 an extern redeclared as static, to avoid inappropriate and incorrect
10701 warnings.
10702
d11ad92e 10703Fri May 20 14:04:34 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10704
10705 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
10706 a pedwarn.
10707
10708 * typeck.c (build_c_cast): Casting to function or method type is an
10709 error.
10710
10711 * class.c (finish_struct): Make warning for anonymous class with no
10712 instances a pedwarn.
10713
10714 * Makefile.in (stamp-parse): Expect a s/r conflict.
10715
10716 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
10717 cast as an lvalue.
10718
d11ad92e 10719Thu May 19 12:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10720
10721 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
10722 than unsigned on platforms where sizeof(char)==sizeof(int).
10723
d11ad92e 10724Wed May 18 14:27:06 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10725
10726 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
10727 another variant.
10728 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
10729 and treat them as lvalues.
10730
10731 * decl.c (shadow_tag): Do complain about forward declarations of
10732 enums and empty declarations.
10733 * parse.y: Don't complain about forward declarations of enums and
10734 empty declarations.
10735
10736 * typeck.c (convert_for_assignment): Complain about changing
10737 the signedness of a pointer's target type.
10738
10739 * parse.y (stmt): Move duplicated code for checking case values from
10740 here.
10741 * decl2.c (check_cp_case_value): To here. And add a call to
10742 constant_expression_warning.
10743
10744 * typeck.c (convert_for_assignment): Don't complain about assigning
10745 a negative value to bool.
10746
10747 * decl.c (init_decl_processing): Make bool unsigned.
10748
10749 * class.c (finish_struct): Allow bool bitfields.
10750
d11ad92e 10751Wed May 18 12:35:27 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
2986ae00
MS
10752
10753 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
10754
d11ad92e 10755Wed May 18 03:28:35 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10756
10757 * cvt.c (build_type_conversion): Lose special handling of
10758 truthvalues.
10759
10760 * search.c (dfs_pushdecls): Improve shadowing warning.
10761
d11ad92e 10762Tue May 17 13:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10763
10764 * init.c (build_delete): Throw away const and volatile on `this'.
10765
10766 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
10767 rather than the enumerators.
10768 (pushtag): s/cdecl/c_decl/g
10769
d11ad92e 10770Mon May 16 23:04:01 1994 Stephen R. van den Berg <berg@pool.informatik.rwth-aachen.de>
2986ae00 10771
63718c49
GB
10772 * cp/typeck.c (common_type): Attribute merging.
10773 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 10774
63718c49 10775 * cp/parse.y: Revamp attribute parsing.
2986ae00 10776
d11ad92e 10777Mon May 16 01:40:34 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10778
10779 * decl.c (shadow_tag): Also check for inappropriate use of auto and
10780 register.
10781
10782 * method.c (build_overload_name): Clarify that the illegal case is a
10783 pointer or reference to array of unknown bound.
10784
10785 * error.c (dump_type_prefix): Print references to arrays properly.
10786
10787 * typeck.c (various): Be more helpful in pointer
10788 comparison diagnostics.
10789
10790 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
10791 fun?
10792
10793 * parse.y: Also catch an error after valid stmts.
10794
10795 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
10796 const.
10797
10798 * typeck.c (convert_for_initialization): If call to
10799 convert_to_reference generated a diagnostic, print out the parm
10800 number and function decl if any.
10801
10802 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
10803 specifying a line, not atarg.
10804
10805 * tree.c (build_cplus_method_type): Always make `this' const.
10806
10807 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
10808 a constructor or destructor, make `this' non-const.
10809
10810 * typeck.c (build_modify_expr): Don't warn specially about
10811 assignment to `this' here anymore, since it will be caught by the
10812 usual machinery.
10813
10814 * various: Disallow specific GNU extensions (variable-size arrays,
10815 etc.) when flag_ansi is set, not necessarily when pedantic is set,
10816 so that people can compile with -pedantic-errors for tighter const
10817 checking and such without losing desirable extensions.
10818
10819 * typeck2.c (build_functional_cast): Call build_method_call with
10820 LOOKUP_PROTECT.
10821 (process_init_constructor): Only process FIELD_DECLs.
10822
10823 * decl.c (finish_decl): Also force static consts with no explicit
10824 initializer that need constructing into the data segment.
10825
10826 * init.c (build_delete): Undo last patch, as it interferes with
10827 automatic cleanups.
10828
d11ad92e 10829Sat May 14 01:59:31 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10830
10831 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
10832 code.
10833
10834 * init.c (build_delete): pedwarn about using plain delete to delete
10835 an array.
10836
d11ad92e 10837Fri May 13 16:45:07 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10838
10839 * typeck.c (comp_target_types): Be more helpful in contravariance
10840 warnings, and make them pedwarns.
10841
10842 * decl.c (grokdeclarator): Use decl_context to decide whether or not
10843 this is an access declaration.
10844
10845 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
10846 has a conversion to enum or bool, too.
10847
6060a796 10848Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10849
10850 * method.c (emit_thunk): Make declaration for
10851 current_call_is_indirect local (needed for hppa).
10852
d11ad92e 10853Fri May 13 16:16:37 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10854
10855 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
d11ad92e 10856 (tsubst): Likewise.
2986ae00 10857
6060a796 10858Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10859
10860 * pt.c (tsubst): If there is already a function for this expansion,
10861 use it.
d11ad92e 10862 * pt.c (instantiate_template): Likewise.
2986ae00 10863
d11ad92e 10864Fri May 13 10:30:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
2986ae00
MS
10865
10866 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
10867 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
10868 generating debug info for unemitted symbols on some systems.
10869
10870 * cp-tree.h (build_static_cast, build_reinterpret_cast,
10871 build_const_cast): Add declarations.
10872
6060a796 10873Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10874
10875 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
10876 fix. We now try get_binfo, and if that doesn't find what we want,
10877 we go back to the old method, which still sometimes fails.
10878
d11ad92e 10879Fri May 13 01:43:18 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10880
10881 * parse.y (initdcl): Call cplus_decl_attributes on the right
10882 variable.
10883 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
10884 void_type_node.
10885
10886 * typeck.c (build_binary_op_nodefault): Change result_type for
10887 comparison ops to bool.
10888 (build_binary_op): Convert args of && and || to bool.
10889 * cvt.c (build_default_binary_type_conversion): Convert args of &&
10890 and || to bool.
10891 (build_default_unary_type_conversion): Convert arg of ! to bool.
10892 (type_promotes_to): bool promotes to int.
10893
6060a796 10894Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10895
10896 Implement the new builtin `bool' type.
10897 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
10898 bool.
10899 (build_unary_op): Convert arg of ! to bool.
10900 * parse.y: Know true and false. Use bool_truthvalue_conversion.
10901 * method.c (build_overload_value): Know bool.
d11ad92e 10902 (build_overload_name): Likewise.
2986ae00
MS
10903 * lex.c (init_lex): Set up RID_BOOL.
10904 * gxx.gperf: Add bool, true, false.
10905 * error.c (*): Know bool.
10906 * decl.c (init_decl_processing): Set up bool, true, false.
10907 * cvt.c (cp_convert): Handle conversion to bool.
d11ad92e 10908 (build_type_conversion): Likewise.
2986ae00
MS
10909 * *.c: Accept bool where integers and enums are accepted (use
10910 INTEGRAL_CODE_P macro).
10911
d11ad92e 10912Thu May 12 19:13:54 1994 Richard Earnshaw <rwe11@cl.cam.ac.uk>
8de7634e
RE
10913
10914 * g++.c: Use #ifdef for __MSDOS__, not #if.
10915
6060a796 10916Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10917
10918 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
10919 gives old behavior , and destroys temporaries earlier. Default
10920 behavior now conforms to the ANSI working paper.
10921
d11ad92e 10922Thu May 12 14:45:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10923
10924 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
10925 Use convert_force to convert the result of a recursive call when we
10926 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
10927 in COMPOUND_EXPRs any more.
10928 (various): Lose pedantic_lvalue_warning.
10929 (unary_complex_lvalue): Understand MODIFY_EXPR.
10930
10931 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
10932 we don't know what we're initializing.
10933
d11ad92e 10934Wed May 11 01:59:36 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10935
10936 * cvt.c (convert_to_reference): Modify to use convtype parameter.
10937 Only create temporaries when initializing a reference, not when
10938 casting.
10939 (cp_convert): New main function.
10940 (convert): Call cp_convert.
10941 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
10942 * cp-tree.h (CONV_*): New constants used by conversion code for
10943 selecting conversions to perform.
10944
10945 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
10946
10947 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
10948 call build_c_cast.
10949 * parse.y: Add {static,reinterpret,const}_cast.
d11ad92e 10950 * gxx.gperf: Likewise.
a4443a08
MS
10951
10952 * typeck.c (common_type): Allow methods with basetypes of different
10953 UPTs.
10954 (comptypes): Deal with UPTs.
10955 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
10956
10957 * pt.c (end_template_decl): Check for multiple definitions of member
10958 templates.
10959
10960 * call.c (build_method_call): Complain about calling an abstract
10961 virtual from a constructor.
10962
10963 * typeck.c (pointer_int_sum): Check for the integer operand being 0
10964 after checking the validity of the pointer operand.
10965
10966 * typeck2.c (digest_init): Pedwarn about string initializer being
10967 too long.
10968
d11ad92e 10969Tue May 10 12:10:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10970
10971 * decl.c (push_overloaded_decl): Only throw away a builtin if the
10972 decl in question is the artificial one.
10973
10974 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
10975 expand_{start,end}_case cannot happen in the middle of a block.
10976
10977 * cvt.c (build_type_conversion_1): Use convert again.
10978
d11ad92e 10979Tue May 10 11:52:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a4443a08
MS
10980
10981 * typeck2.c (digest_init): Make sure we check for signed and
10982 unsigned chars as well when warning about string initializers.
10983
10984 * init.c (emit_base_init): Check if there's a DECL_NAME on the
10985 member before trying to do an initialization for it.
10986
6060a796 10987Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10988
10989 * except.c: Don't do anything useful when cross compiling.
10990
d11ad92e 10991Tue May 10 03:04:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10992
10993 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
d11ad92e 10994 (push_overloaded_decl): Likewise.
a4443a08
MS
10995
10996 * cvt.c (convert): Don't look for void type conversion.
10997
d11ad92e 10998Mon May 9 18:05:41 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10999
11000 * init.c (do_friend): Only do a pushdecl for friends, not
11001 pushdecl_top_level.
11002
d11ad92e 11003Mon May 9 13:36:34 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
a4443a08
MS
11004
11005 * decl.c (lookup_name_current_level): Put empty statement after
11006 the label OUT to make the code valid C.
11007
d11ad92e 11008Mon May 9 12:20:57 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11009
11010 * typeck.c (build_binary_op_nodefault): Only complain about
11011 comparing void * and a function pointer if void * is smaller.
11012
d11ad92e 11013Sun May 8 01:29:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11014
11015 * decl.c (lookup_name_current_level): Move through temporary binding
11016 levels.
11017
11018 * parse.y (already_scoped_stmt): Revive.
11019 (simple_stmt): Use it again.
11020
11021 * decl.c (poplevel): Always call poplevel recursively if we're
11022 dealing with a temporary binding level.
11023
6060a796 11024Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
11025
11026 * decl.c (finish_decl): Make sure we run cleanups for initial values
11027 of decls. Cures memory leak.
d11ad92e
MS
11028 * decl.c (expand_static_init): Likewise for static variables.
11029 * decl2.c (finish_file): Likewise for globals.
a4443a08 11030
d11ad92e 11031Sat May 7 03:57:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11032
11033 * typeck.c (commonparms): Don't complain about redefining default
11034 args.
11035
11036 * decl.c (duplicate_decls): Don't complain twice about conflicting
11037 function decls.
11038 (decls_match): Don't look at default args.
11039 (redeclaration_error_message): Complain about redefining default
11040 args.
11041
11042 * call.c (build_overload_call_real): Also deal with guiding
11043 declarations coming BEFORE the template decl.
11044
11045 * pt.c (unify): Allow different parms to have different
11046 cv-qualifiers.
11047 (unify): Allow trivial conversions on non-template parms.
11048
d11ad92e 11049Fri May 6 03:53:23 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11050
11051 * pt.c (tsubst): Support OFFSET_TYPEs.
d11ad92e 11052 (unify): Likewise.
a4443a08
MS
11053
11054 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
11055
11056 * init.c (build_offset_ref): Fix error message.
d11ad92e 11057 * search.c (lookup_field): Likewise.
a4443a08
MS
11058
11059 * call.c (build_scoped_method_call): Pass binfo to
11060 build_method_call.
d11ad92e 11061 * typeck.c (build_object_ref): Likewise.
a4443a08
MS
11062
11063 * typeck2.c (binfo_or_else): Don't return a _TYPE.
11064
11065 * class.c (finish_struct): Don't complain about re-use of inherited
11066 names or shadowing of type decls.
d11ad92e 11067 * decl.c (pushdecl_class_level): Likewise.
a4443a08
MS
11068
11069 * decl.c (finish_enum): Set the type of all the enums.
11070
11071 * class.c (finish_struct): Don't get confused by access decls.
11072
11073 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
11074 _TYPE. You can stop using TYPE_NAME for that now.
11075
11076 * parse.y: Lose doing_explicit (check $0 instead).
11077 * gxx.gperf: 'template' now has a RID.
d11ad92e 11078 * lex.h (rid): Likewise.
a4443a08
MS
11079 * lex.c (init_lex): Set up the RID for 'template'.
11080
11081 * parse.y (type_specifier_seq): typed_typespecs or
11082 nonempty_type_quals. Use it.
11083 (handler_args): Fix bogus syntax.
11084 (raise_identifier{,s}, optional_identifier): Lose.
11085 * except.c (expand_start_catch_block): Use grokdeclarator to parse
11086 the catch variable.
11087 (init_exception_processing): The second argument to
11088 __throw_type_match is ptr_type_node.
11089
d11ad92e 11090 Fri May 6 07:18:54 1994 Chip Salzenberg <chip@fin.uucp>
a4443a08
MS
11091
11092 [ change propagated from c-decl.c of snapshot 940429 ]
11093 * cp/decl.c (finish_decl): Setting asmspec_tree should not
11094 zero out the old RTL.
11095
6060a796 11096Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
11097
11098 Add alpha exception handling support to the compiler.
11099 Quick and dirty backend in except.c.
11100
11101 * cp/*: Remove most remnants of old exception handling support.
11102 * decl.c (finish_function): Call expand_exception_blocks to put
11103 the exception hanlding blocks at the end of the function.
11104 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
11105 comes after expand_decl_init.
11106 * except.c: Reimplementation.
11107 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
11108 * lex.c (init_lex): Always have catch, try and throw be reserved
11109 words, so that we may always parse exception handling.
11110 * parse.y: Cleanup to support new interface into exception handling.
11111 * tree.def (THROW_EXPR): Add.
11112
d11ad92e 11113Thu May 5 17:35:37 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
11114
11115 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
11116 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
11117
d11ad92e 11118Thu May 5 16:17:27 1994 Kung Hsu <kung@mexican.cygnus.com>
8d2733ca
MS
11119
11120 * parse.y (already_scoped_stmt): move expand_end_binding() to
11121 fix the unmatched LBB/LBE in stabs.
11122
d11ad92e 11123Thu May 5 14:36:17 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
11124
11125 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
11126 identifiers.
11127 (pushdecl): Check TREE_MANGLED.
d11ad92e 11128 (xref_tag): Likewise.
8d2733ca
MS
11129 * cp-tree.h (TREE_MANGLED): This identifier is a
11130 DECL_NESTED_TYPENAME (named to allow for future use to denote
11131 mangled function names as well).
11132
11133 Implement inconsistency checking specified in [class.scope0].
11134 * decl.c (lookup_name_real): Don't set ICV here after all.
11135 (finish_enum): Also set the type of the enumerators themselves.
11136 (build_enumerator): Put the CONST_DECL in the list instead of its
11137 initial value.
11138 (pushdecl_class_level): Check inconsistent use of a name in the
11139 class body.
11140 * class.c (finish_struct): Check inconsistent use of a name in the
11141 class body. Don't set DECL_CONTEXT on types here anymore.
11142 * parse.y (qualified_type_name): Note that the identifier has now
11143 been used (as a type) in the class body.
11144 * lex.c (do_identifier): Note that the identifier has now been used
11145 (as a constant) in the class body.
11146 * error.c (dump_decl): Print type and enum decls better.
11147
d11ad92e 11148Thu May 5 09:35:35 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
700f8a87
MS
11149
11150 * typeck.c (build_modify_expr): Warn about assignment to `this'.
11151
d11ad92e 11152Wed May 4 15:55:49 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11153
11154 * init.c (build_delete): Use the global operator delete when
11155 requested.
11156
11157 * decl.c (lookup_name_real): If we find the type we're looking in a
11158 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
11159 the type.
11160
11161 * class.c (finish_struct): Remove a couple of dependencies on
11162 language linkage.
11163
11164 * decl.c (pushtag): Classes do nest in extern "C" blocks.
11165 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
11166 the type.
11167 (pushtag): Remove another dependency on the language linkage.
11168
11169 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
11170 a const-qualified type.
11171
11172 * decl.c (push_overloaded_decl): Throw away built-in decls here.
11173 (duplicate_decls): Instead of here.
11174
d11ad92e 11175Wed May 4 15:27:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11176
11177 * typeck.c (get_member_function_from_ptrfunc): Do The Right
11178 Thing (I hope) if we're using thunks.
11179
d11ad92e 11180Wed May 4 13:52:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11181
11182 * parse.y (specialization): aggr template_type_name ';'.
11183 (named_class_head_sans_basetype): Use it.
d11ad92e 11184 (explicit_instantiation): Likewise.
700f8a87
MS
11185 (tmpl.2): Revert.
11186
11187 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
11188 rather than convert, to do conversions after the UDC.
11189
11190 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
11191 instances of the class.
11192
11193 * search.c (lookup_field): If the entity found by two routes is the
11194 same, it's not ambiguous.
11195
d11ad92e 11196Wed May 4 12:10:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11197
11198 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
11199 to prevent the compiler from crashing ...
11200
d11ad92e 11201Wed May 4 11:19:45 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11202
11203 * call.c (build_method_call): If we don't have an object, check
11204 basetype_path to figure out where to look up the function.
11205
11206 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
11207 build_method_call in case exp is NULL_TREE.
11208
d11ad92e 11209Tue May 3 16:02:53 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11210
11211 Give a vtable entries a unique named type, for the sake of gdb.
11212 * class.c (build_vtable_entry): The addres of a thunk now has
11213 type vtable_entry_type, not ptr_type_node.
11214 * method.c (make_thunk): Fix type of THUNK_DECL.
11215 * class.c (add_virtual_function, override_one_vtable): Use
11216 vfunc_ptr_type_node, instead of ptr_type_node.
11217 * cp-tree.h (vfunc_ptr_type_node): New macro.
11218 * decl.c (init_decl_processing): Make vtable_entry_type
11219 be a unique type of pointer to a unique function type.
11220
d11ad92e 11221Tue May 3 09:20:44 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11222
11223 * parse.y (do_explicit): Sets doing_explicit to 1.
11224 (explicit_instantiation): Use do_explicit rather than TEMPLATE
11225 directly, add "do_explicit error" rule.
11226 (datadef): Set doing_explicit to 0 after an explicit instantiation.
11227 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
11228 explicit instantiation.
11229 (named_class_head_sans_basetype): Remove aggr template_type_name
11230 ';' again.
11231
d11ad92e 11232Mon May 2 23:17:21 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11233
11234 * search.c (lookup_nested_tag): Lose.
11235
11236 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
11237 (lookup_name_nonclass): Lose.
11238
11239 * decl.c (poplevel_class): Add force parameter.
11240 (lookup_name_real): Fix handling of explicit scoping which specifies
11241 a class currently being defined. Add 'nonclass' argument.
11242 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
11243
11244 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
11245 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
11246 called from finish_struct.
11247
d11ad92e 11248Mon May 2 19:06:21 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11249
11250 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
11251 (It seeems redundant, given build_ptrmemfunc_type.)
11252 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
11253 build_classof): Use vtable_entry_type instead of memptr_type.
11254 * method.c (emit_thunk): Call poplevel with functionbody==0
11255 to prevent DECL_INITIAL being set to a BLOCK.
11256
d11ad92e 11257Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11258
11259 * parse.y (named_class_head_sans_basetype): Add "aggr
11260 template_type_name ';'" rule for forward declaration of
11261 specializations.
11262
d11ad92e 11263Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11264
11265 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
11266
11267 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
11268 stamp-objlist does.
700f8a87 11269
bfef964b
JM
11270 * Makefile.in (../cc1plus): Depend on OBJDEPS.
11271 (OBJDEPS): Dependency version of OBJS.
11272
d11ad92e 11273Mon May 2 12:51:31 1994 Kung Hsu <kung@mexican.cygnus.com>
700f8a87
MS
11274
11275 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
11276 DECL_IGNORED_P.
11277
d11ad92e 11278Fri Apr 29 12:29:56 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11279
11280 * class.c (finish_struct): Clear out memory of local tags. And
11281 typedefs.
11282
11283 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
11284 type.
11285 * search.c (get_matching_virtual): Be more helpful in error message.
11286
11287 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
11288
11289 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
d11ad92e 11290 (default_copy_constructor_body): Likewise.
700f8a87
MS
11291
11292 * class.c (finish_struct): Don't gratuitously create multiple decls
11293 for nested classes.
11294
d11ad92e 11295Thu Apr 28 23:39:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11296
11297 Avoid clobbering the arg types of other functions when reverting
11298 static member functions.
11299 * decl.c (revert_static_member_fn): Rearrange arguments, don't
11300 require values for 'fn' and 'argtypes', add warning to comment
11301 above.
11302 (decls_match): Rearrange arguments in call to rsmf.
11303 (grok_op_properties): Don't pass values for fn and argtypes.
11304 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
11305
d11ad92e 11306Thu Apr 28 16:29:11 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11307
11308 * Make-lang.in (cc1plus): Depend on stamp-objlist.
11309 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
11310 (OBJS): Cat ../stamp-objlist to get language independent files.
11311 Include ../c-common.o.
15fa00e9
DE
11312 (../cc1plus): Delete reference to BC_OBJS.
11313
d11ad92e 11314Thu Apr 28 02:12:08 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11315
11316 * search.c (compute_access): No really, deal with static members
11317 properly. Would I lie to you?
11318
11319 Implement lexical hiding of function declarations.
11320 * pt.c (tsubst): Use lookup_name to look for function decls to guide
11321 instantiation.
11322 * method.c (build_opfncall): Use lookup_name_nonclass to look for
11323 non-member functions.
11324 * init.c (do_friend): Use lookup_name_nonclass to look for
11325 functions.
11326 * error.c (ident_fndecl): Use lookup_name to look for functions.
11327 * decl2.c (lookup_name_nonclass): New function, skips over
11328 CLASS_VALUE.
11329 * decl.c (struct binding_level): Lose overloads_shadowed field.
11330 (poplevel): Don't deal with overloads_shadowed.
11331 (push_overloaded_decl): Do lexical hiding for functions.
11332 * class.c (instantiate_type): Don't check non-members if we have
11333 members with the same name.
11334 * call.c (build_method_call): Use lookup_name_nonclass instead of
11335 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
d11ad92e 11336 (build_overload_call_real): Likewise.
700f8a87
MS
11337
11338 * decl.c (duplicate_decls): Check for ambiguous overloads here.
11339 (push_overloaded_decl): Instead of here.
11340
11341 * decl.c (pushdecl): Back out Chip's last change.
11342
11343 * decl.c (grok_op_properties): operators cannot be static members.
11344
11345 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
11346 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
11347 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
11348
11349 * method.c (do_inline_function_hair): Don't put friends of local
11350 classes into global scope, either.
11351
11352 * typeck2.c (build_functional_cast): Don't look for a function call
11353 interpretation.
11354
6060a796 11355Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11356
11357 * cp-tree.h: disable use of backend EH.
11358
d11ad92e 11359Wed Apr 27 21:01:24 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11360
11361 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
11362 * Makefile.in (INCLUDES): Move definition to same place as
11363 parent makefile.
11364 (ALLOCA): Define.
11365 (OLDAR_FLAGS): Delete.
11366 (OLDCC): Define.
11367 (DIR): Delete.
11368 (CLIB): Define.
11369 (####site): Delete.
11370 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
11371
d11ad92e 11372Wed Apr 27 19:10:04 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
11373
11374 * decl.c (xref_tag): not to use strstr(), it's not available on
11375 all platforms.
11376
d11ad92e 11377Wed Apr 27 18:10:12 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11378
11379 * class.c (finish_struct): Resolve yet another class/pmf confusion.
11380
11381 * call.c (build_overload_call_real): Don't take the single-function
11382 shortcut if we're dealing with an overloaded operator.
11383
6060a796 11384Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11385
11386 * search.c (get_base_distance): Search the virtual base class
11387 binfos, incase someone wants to convert to a real virtual base
11388 class.
11389 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
11390 instead of convert_pointer_to, as it now will work.
11391
d11ad92e 11392Wed Apr 27 15:36:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11393
11394 * cvt.c (convert_to_reference): Don't complain about casting away
11395 const and volatile.
11396
11397 * typeck.c (build_unary_op): References are too lvalues.
11398
6060a796 11399Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11400
11401 * class.c (override_one_vtable): We have to prepare_fresh_vtable
11402 before we modify it, not after, also, we cannot reuse an old vtable,
11403 once we commit to a new vtable. Implement ambiguous overrides in
11404 virtual bases as abstract. Hack until we make the class
11405 ill-formed.
11406
d11ad92e 11407Wed Apr 27 01:17:08 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11408
11409 * parse.y (unary_expr): Expand new_placement[opt] and
11410 new_initializer[opt] inline.
11411
11412 * search.c (lookup_fnfields): Don't throw away the inheritance
11413 information here, either.
11414 (compute_access): Handle static members properly.
11415
11416 * init.c (build_member_call): Always set basetype_path, and pass it
11417 to lookup_fnfields.
11418
11419 * search.c (lookup_field): Deal properly with the case where
11420 xbasetype is a chain of binfos; don't throw away the inheritance
11421 information.
11422 (compute_access): protected_ok always starts out at 0.
11423
11424 * init.c (resolve_offset_ref): Don't cast `this' to the base type
11425 until we've got our basetype_path.
11426
11427 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
11428
11429 * cvt.c (build_up_reference): Use build_pointer_type rather than
11430 TYPE_POINTER_TO.
11431
11432 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
11433 as well.
11434
11435 * cvt.c (type_promotes_to): Retain const and volatile, add
11436 float->double promotion.
11437
11438 * decl.c (grokdeclarator): Don't bash references to arrays into
11439 references to pointers in function parms. Use type_promotes_to.
11440
6060a796 11441Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11442
11443 Finish off Apr 19th work.
11444
11445 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
11446 might_have_abstract_virtuals.
11447 * class.c (strictly_overrides, override_one_vtable,
11448 merge_overrides): New routines to handle virtual base overrides.
11449 * class.c (finish_struct): Call merge_overrides to handle overrides
11450 in virtual bases.
11451
d11ad92e 11452Tue Apr 26 12:45:53 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11453
11454 * typeck.c (build_function_call): Call build_function_call_real with
11455 LOOKUP_NORMAL.
11456
11457 * *: Don't deal with TYPE_EXPRs.
11458
11459 * tree.c (lvalue_p): If the type of the expression is a reference,
11460 it's an lvalue.
11461
11462 * cvt.c (convert_to_reference): Complain about passing const
11463 lvalues to non-const references.
11464 (convert_from_reference): Don't arbitrarily throw away const and
11465 volatile on the target type.
11466
11467 * parse.y: Simplify and fix rules for `new'.
11468
11469 * decl.c (grok_op_properties): operator void is illegal.
11470
d11ad92e 11471Mon Apr 25 02:36:28 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11472
11473 * parse.y (components): Anonymous bitfields can still have declspecs.
11474
11475 * decl.c (pushdecl): Postpone handling of function templates like we
11476 do C functions.
11477
11478 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
11479 convert_pointer_to fails.
11480
11481 * call.c (compute_conversion_costs_ansi): A user-defined conversion
11482 by itself is better than that UDC followed by standard conversions.
11483 Don't treat integers and reals specially.
11484
11485 * cp-tree.h: Declare flag_ansi.
11486
11487 * typeck.c (c_expand_return): pedwarn on return in void function
11488 even if the expression is of type void.
11489 (build_c_cast): Don't do as much checking for casts to void.
11490 (build_modify_expr): pedwarn about array assignment if this code
11491 wasn't generated by the compiler.
11492
11493 * tree.c (lvalue_p): A comma expression is an lvalue if its second
11494 operand is.
11495
11496 * typeck.c (default_conversion): Move code for promoting enums and
11497 ints from here.
11498 * cvt.c (type_promotes_to): To here.
11499 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
11500 promotion semantics for reals.
11501
d11ad92e 11502Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11503
11504 * Make-lang.in (c++.install-common): Check for g++-cross.
11505 * Makefile.in: Remove Cygnus cruft.
11506 (config.status): Delete.
11507 (RTL_H): Define.
11508 (TREE_H): Use complete pathname, some native makes have minimal
11509 VPATH support.
11510 (*.o): Use complete pathname to headers in parent dir.
11511 (doc, info, dvi): Delete.
11512
d11ad92e 11513Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
700f8a87
MS
11514
11515 * Make-lang.in (c++.install-common): Check for g++-cross.
11516 * Makefile.in: Remove Cygnus cruft.
11517 (config.status): Delete.
11518 (RTL_H): Define.
11519 (TREE_H): Use complete pathname, some native makes have minimal
11520 VPATH support.
11521 (*.o): Use complete pathname to headers in parent dir.
11522 (doc, info, dvi): Delete.
11523
d11ad92e 11524Sun Apr 24 00:47:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11525
11526 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
11527 with different return type.
11528 (decls_match): Compare return types strictly.
11529
d11ad92e 11530Fri Apr 22 12:55:42 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11531
11532 * cvt.c (build_type_conversion): Do try to convert through other
11533 pointers. This will fail if the class defines multiple pointer
11534 conversions.
11535
11536 * error.c (dump_type_prefix): Print out pointers to arrays properly.
d11ad92e 11537 (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]')
39211cd5
MS
11538
11539 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
11540 incomplete type.
11541
11542 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
11543 checking for shadowing a builtin. If we're redeclaring a builtin
11544 function, bash the old decl to avoid an ambiguous overload.
11545
11546 * cvt.c (convert_to_reference): Don't force arrays to decay here.
11547
11548 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
11549
11550 * decl.c (duplicate_decls): Don't assume that the decls will have
11551 types.
11552
d11ad92e 11553 Mon Apr 18 11:35:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11554
11555 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
11556 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
11557 in a global scope.
11558
d11ad92e 11559 Fri Apr 22 06:38:56 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11560
11561 * cp/typeck2.c (signature_error): Use cp_error for "%T".
11562
d11ad92e 11563 Mon Apr 18 11:59:59 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11564
11565 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
11566 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
11567 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
11568
d11ad92e 11569 Mon Apr 18 11:55:18 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11570
11571 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
11572 * cp/decl.c (duplicate_decls): Put new type in same obstack as
11573 old ones, or permanent if old ones in different obstacks.
11574
d11ad92e 11575 Mon Apr 18 11:48:49 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11576
11577 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
11578 * cp/parse.y (attrib): Handle string args as expressions,
11579 merging the two rules. `mode' attribute now takes a string arg.
11580 Delete the rule for an identifier as arg.
11581
d11ad92e 11582 Mon Apr 18 11:24:00 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11583
11584 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
11585 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
11586 (pointer_diff): Likewise the division.
11587
d11ad92e 11588 Sun Mar 6 19:43:39 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11589
11590 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
11591 * cp/decl.c (finish_decl): Issue warning for large objects,
11592 if requested.
11593
d11ad92e 11594 Sat Feb 19 22:20:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11595
11596 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
11597 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
11598 * cp/decl.c (duplicate_decls): Merge section name into new decl.
11599
d11ad92e 11600 Tue Feb 8 09:49:17 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11601
11602 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
11603 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 11604 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
11605
11606 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
11607
11608 * cp/decl.c (finish_enum): Start from 0 when determining precision
11609 for short enums.
11610
11611 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
11612
11613 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
11614 casting $$.
11615
d11ad92e 11616 Wed Nov 17 19:22:09 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11617
11618 * cp/typeck.c (build_binary_op_nodefault): Propagate code
11619 from C front-end to optimize unsigned short division.
11620 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
11621
d11ad92e 11622 Wed Nov 17 19:17:18 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11623
11624 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
11625 constant, prefer 'const char &' to 'int'.
11626
d11ad92e 11627 Wed Feb 3 13:11:48 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11628
11629 * cp/class.c (finish_struct_methods): Handle multiple
11630 constructors in fn_fields list.
11631
d11ad92e 11632Fri Apr 22 12:48:10 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
11633
11634 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
11635 types not to be dumped in stabs, like types in #pragma interface.
11636 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
11637 mark unknown type.
11638
d11ad92e 11639Fri Apr 22 03:27:26 1994 Doug Evans <dje@cygnus.com>
15fa00e9
DE
11640
11641 * Language directory reorganization.
11642 See parent makefile.
11643
d11ad92e 11644Thu Apr 21 18:27:57 1994 Per Bothner <bothner@kalessin.cygnus.com>
39211cd5
MS
11645
11646 * cp-tree.h (THUNK_DELTA): It is normally negative, so
11647 use signed .i variant of frame_size rather than unsigned .u.
11648 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
11649 use "VT" rather than "vt" due to binary incompatibility.
11650 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
11651 rather than sizeof, since it is now an expression.
11652 * class.c (modify_one_vtable): Modify to skip initial element
11653 containing a count of the vtable.
11654
d11ad92e 11655Thu Apr 21 00:09:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11656
11657 * lex.c (check_newline): Force interface_unknown on main input file.
11658
11659 * pt.c (do_pending_expansions): Always emit functions that have been
11660 explicitly instantiated.
11661 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
11662 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
11663 DECL_EXPLICITLY_INSTANTIATED on all my methods.
11664 * parse.y (explicit_instantiation): Call do_type_instantiation for
11665 types.
11666 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
11667 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
11668 that has been explicitly instantiated.
11669 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
11670 DECL_LANG_FLAG_4.
11671 * class.c: Move import_export_vtable to decl2.c, and comment out all
11672 uses.
11673
d11ad92e 11674Wed Apr 20 16:51:06 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11675
11676 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
d11ad92e 11677 (do_pending_inlines): Likewise.
7177d104 11678
6060a796 11679Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11680
11681 Reimplement vtable building, and most vtable pointer setting.
11682 Allows for earier maintenance, easier understandability, and most
11683 importantly, correct semantics.
11684
11685 * class.c (build_vtable): Removed unneeded
11686 SET_BINFO_VTABLE_PATH_MARKED.
d11ad92e 11687 * class.c (prepare_fresh_vtable): Likewise. Added argument.
7177d104
MS
11688 * class.c (modify_vtable_entry): General cleanup.
11689 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
11690 modify_vtable_entries): Removed.
11691 * class.c (add_virtual_function): General cleanup.
11692 * class.c (finish_base_struct): Setup BINFO_VTABLE and
11693 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
11694 work.
11695 * class.c (finish_vtbls): New routine, mostly from
11696 unmark_finished_struct.
11697 * class.c (overrides): New routine.
11698 * class.c (modify_one_vtable): New routine, mostly from
11699 modify_other_vtable_entries and modify_vtable_entries.
11700 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
11701 modify_all_vtables): New routines.
11702 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
11703 call. General cleanup on how pending_hard_virtuals are handled.
11704 General cleanup on modifying vtables. Use finish_vtbls, instead of
11705 unmark_finished_struct.
11706 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
11707 get_first_matching_virtual, get_matching_virtual,
11708 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
11709 * cvt.c (convert_pointer_to_real): cleanup error message.
11710 * decl.c (grokfndecl): General cleanup.
11711 * decl.c (finish_function): Change init_vtbl_ptrs call to
11712 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
11713 expand_indirect_vtbls_init.
11714 * init.c (expand_virtual_init): Remove unneeded argument.
11715 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
11716 two arguments to make more general. Made more general. Now can be
11717 used for vtable pointer initialization from virtual bases.
11718 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
11719 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
11720 expand_direct_vtbls_init.
11721 * init.c (expand_virtual_init): General cleanup.
11722 * init.c (expand_default_init): Change expand_vbase_vtables_init
11723 call to expand_indirect_vtbls_init.
11724 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
11725 call to expand_indirect_vtbls_init.
11726 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
11727 call to expand_indirect_vtbls_init.
11728 * search.c (get_first_matching_virtual): Rename to
11729 get_matching_virtual. General cleanup and remove setting of
11730 DECL_CONTEXT. That is now done in a cleaner way in
11731 modify_vtable_entry and add_virtual_function.
11732 * search.c (expand_vbase_vtables_init): Rename to
11733 expand_indirect_vtbls_init. General cleanup. Use
11734 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
11735 pointers from virtual bases are set up.
11736 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
11737 Removed.
11738
11739 * *.[chy]: Remove support for VTABLE_USES_MASK.
11740
d11ad92e 11741Tue Apr 19 12:51:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11742
11743 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
11744 reference and pointer types instead of bashing the types directly.
11745
11746 * call.c (build_overload_call_real): Use the TREE_CODE to determine
11747 whether the function is overloaded or not, rather than
11748 TREE_OVERLOADED.
11749 * *: Remove all uses of TREE_OVERLOADED.
11750
11751 * decl.c (grokdeclarator): Only complain about initializing const
11752 fields when -ansi or -pedantic.
11753
d11ad92e 11754Tue Apr 19 12:42:42 1994 Doug Evans <dje@canuck.cygnus.com>
7177d104
MS
11755
11756 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
11757
d11ad92e 11758Mon Apr 18 00:17:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11759
11760 Do overloading on a block-by-block basis, not function-by-function.
11761 * decl.c: Lose overloads_to_forget.
11762 (struct binding_level): Add overloads_shadowed field.
11763 (poplevel): Restore overloads_shadowed.
11764 (push_overloaded_decl): Use overloads_shadowed instead of
11765 overloads_to_forget.
11766 (finish_function): Don't look at overloads_to_forget.
11767
11768 Copy enum_overflow logic from c-decl.c.
11769 * decl.c (start_enum): Initialize enum_overflow.
11770 (build_enumerator): Use enum_overflow. Also use current_scope().
11771
11772 * search.c (current_scope): Move Brendan's comment from
11773 build_enumerator here.
11774
11775 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
11776 discarding const/volatile.
11777
d11ad92e 11778Sat Apr 16 01:18:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11779
11780 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
d11ad92e 11781 (comp_target_types): Likewise.
7177d104
MS
11782
11783 * decl.c (lookup_name): Don't unset got_scope here.
11784
11785 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
11786 got_scope != NULL_TREE.
11787
d11ad92e 11788Fri Apr 15 16:36:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11789
11790 Horrible kludge to prevent templates from being instantiated by
11791 their base classes.
11792 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
11793 before we get to left_curly.
11794 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
11795
11796 * error.c (dump_decl): If it's a typedef, print out the name of the
11797 decl, not just the underlying type.
11798
11799 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
11800 update the IDENTIFIER_TYPE_VALUE of its name.
11801
11802 * decl2.c (finish_file): When processing the initializer for a
11803 static member, pretend that the dummy function is a member of the
11804 same class.
11805
d11ad92e 11806Fri Apr 15 15:56:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104 11807
63718c49
GB
11808 * class.c (build_vtable_entry): revert Apr 4 change.
11809 * decl2.c (mark_vtable_entries): replace pure virtual function
11810 decl with abort's.
7177d104 11811
d11ad92e 11812Fri Apr 15 13:49:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11813
11814 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
11815 mismatch, and don't pedwarn on 0/function pointer mismatch.
11816
11817 * typeck2.c (digest_init): Lose code for special handling of unions.
11818 (process_init_constructor): Since they're handled just fine here.
11819 Pedwarn on excess elements.
11820
11821 * decl2.c (grokfield): Complain about local class method declaration
11822 without definition.
11823
d11ad92e 11824Fri Apr 15 13:19:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11825
11826 * method.c (emit_thunk): Add extern declaration for
11827 current_call_is_indirect (needed for hppa).
11828
d11ad92e 11829Thu Apr 14 16:12:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11830
11831 Improve local class support; allow classes in different blocks to
11832 have the same name.
11833 * decl.c (pushtag): Support local classes better.
11834 (pushdecl_nonclass_level): New function for pushing mangled decls of
11835 nested types into the appropriate scope.
11836 (xref_defn_tag): Use pushdecl_nonclass_level instead of
11837 pushdecl_top_level.
11838 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
11839 class methods.
d11ad92e 11840 * method.c (do_inline_function_hair): Likewise.
7177d104
MS
11841
11842 * class.c (finish_struct): It is legal for a class with no
11843 constructors to have nonstatic const and reference members.
11844
d11ad92e 11845Thu Apr 14 07:15:11 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
11846
11847 * decl.c (push_overloaded_decl): Avoid giving errors about
11848 built-ins, since duplicate_decls will have given warnings/errors
11849 for them.
11850
d11ad92e 11851Thu Apr 14 03:45:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11852
11853 * cvt.c (convert_to_reference): Warn about casting pointer type to
11854 reference type when this is probably not what they wanted.
11855
d11ad92e 11856Wed Apr 13 13:12:35 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11857
11858 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
11859 static consts any more (toplev.c has now been modified to
11860 not emit warnings if they are unused).
11861
d11ad92e 11862Wed Apr 13 00:22:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11863
11864 * decl.c (grok_op_properties): If op new/delete get here with
11865 METHOD_TYPEs, do a revert_static_member_fn.
11866
11867 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
11868 * init.c (is_aggr_typedef): Don't look at
11869 IDENTIFIER_CLASS_TYPE_VALUE.
d11ad92e
MS
11870 (get_aggr_from_typedef): Likewise.
11871 (get_type_value): Likewise.
7177d104
MS
11872 * call.c (build_scoped_method_call): Don't rely on overloaded
11873 template names having IDENTIFIER_CLASS_VALUE set.
11874
11875 * parse.y (component_decl_1, fn.def2): Revert rules for
11876 constructors.
11877 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
11878 clobbered.
11879
11880 * decl.c (start_function): Only warn about `void main()' if pedantic
11881 || warn_return_type.
11882
d11ad92e 11883Tue Apr 12 02:14:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11884
11885 Clean up overloading of the template name.
11886 * class.c (pushclass): overload the template name whenever pushing
11887 into the scope of a template class, not just if it is
11888 uninstantiated.
11889 (popclass): Correspondingly.
11890 * search.c (push_class_decls): Don't overload_template_name.
11891 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
11892 DECL_CONTEXT on things.
11893 * parse.y (left_curly): Don't overload_template_name.
11894 * class.c (finish_struct): Don't undo_template_name_overload.
11895
11896 * method.c (build_opfncall): Only pass one argument to global op
11897 delete.
11898
11899 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
11900 decide how many arguments to use for vec delete.
11901
11902 * decl.c (grok_op_properties): Be consistent in modifying
11903 current_class_type.
11904 (grokdeclarator): Only complain about function decls with no return
11905 type if we're being pedantic.
11906
d11ad92e 11907Mon Apr 11 00:10:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11908
11909 Add support for operator new [] and operator delete [].
11910
11911 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
11912 * ptree.c (print_lang_type): Indicate vec new/delete.
11913 * parse.y: Support vec new/delete.
11914 * method.c (build_decl_overload): Deal with vec new/delete.
d11ad92e 11915 (build_opfncall): Likewise.
7177d104
MS
11916 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
11917 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
11918 * init.c (init_init_processing): Set up BIVN and BIVD.
11919 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
11920 since it doesn't happen any more.
11921 (build_new): Support vec new. Always call something.
11922 (build_x_delete): Support vec delete.
11923 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
11924 and pass it to build_x_delete.
11925 * decl2.c (delete_sanity): Don't change behavior by whether or not
11926 the type has a destructor. Pass use_global_delete to
11927 build_vec_delete.
11928 (coerce_delete_type): Make sure that the type returned has a first
11929 argument of ptr_type_node.
11930 * decl.c (init_decl_processing): Also declare the global vec
11931 new/delete.
11932 (grokdeclarator): Also force vec new/delete to be static.
11933 (grok_op_properties): Note presence of vec new/delete, and play with
11934 their args. If vec delete takes the optional size_t argument, set
11935 TYPE_VEC_DELETE_TAKES_SIZE.
11936 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
11937 checking for one delete or the other.
11938 (lang_type): gets_new and gets_delete are now two bits long. The
11939 low bit is for the non-array version. Lose gets_placed_new.
11940 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
11941 delete defined by this class wants to know how much space it is
11942 deleting.
11943 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
11944 add a header containing the number of elements in the vector; i.e.
11945 when the elements need to be destroyed or vec delete wants to know
11946 the size.
11947 * class.c (finish_struct_methods): Also check for overloading vec
11948 delete.
11949 * call.c (build_method_call): Also delete second argument for vec
11950 delete.
11951
11952 * decl.c (grokdeclarator): Correct complaints again.
11953 (grokdeclarator): Fix segfault on null declarator.
11954 (decls_match): Also accept redeclaration with no arguments if both
11955 declarations were in C context. Bash TREE_TYPE (newdecl) here.
11956 (duplicate_decls): Instead of here.
11957
11958 * parse.y (nested_name_specifier_1): Lose rules for dealing with
11959 syntax errors nicely, since they break parsing of 'const i;'.
11960
11961 * decl.c (lookup_name): if (got_scope == current_class_type)
11962 val = IDENTIFIER_CLASS_VALUE (name).
11963
11964 * search.c (lookup_nested_tag): Look in enclosing classes, too.
11965
11966 * spew.c (yylex): Only look one character ahead when checking for a
11967 SCOPE.
11968
11969 * lex.c (check_newline): Read first nonwhite char before
11970 incrementing lineno.
11971
11972 * decl.c (grokdeclarator): Don't claim that typedefs are variables
11973 in warning.
11974
11975 * parse.y: Divide up uses of unqualified_id into
11976 notype_unqualified_id and unqualified_id, so that TYPENAME can be
11977 used as an identifier after an object.
11978
11979 * class.c (push_nested_class): Don't push into non-class scope.
11980
11981 * decl.c (grokdeclarator): If an identifier could be a type
11982 conversion operator, but has no associated type, it's not a type
11983 conversion operator.
11984
11985 * pt.c (unify): Check for equality of constants better.
11986
11987 * decl.c (grokdeclarator): Don't complain about access decls.
11988
d11ad92e 11989Sun Apr 10 02:39:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11990
11991 * decl.c (grokdeclarator): pedwarn about data definitions without
11992 types here.
11993
11994 * parse.y (datadef): Don't pedwarn about decls without types here,
11995 since that is valid for functions.
11996 (fn.def2, component_decl): Support constructors with declmods again.
11997 (nomods_initdecls): For decls without any mods, so that we don't try
11998 to get declspecs from some arbitrary $0.
11999
12000 * search.c (lookup_field): Use cp_error.
12001
12002 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
12003 here; it breaks destructors for non-aggr types.
12004
12005 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
12006 a type being defined, like the comment says.
12007 If got_scope is not an aggregate, just return NULL_TREE.
12008
12009 * pt.c (create_nested_upt): Kung's code for creating types nested
12010 within uninstantiated templates now lives here (it used to live in
12011 hack_more_ids). It needs to be expanded.
12012
12013 * parse.y: Stop calling see_typename so much.
12014
12015 * decl.c (lookup_name): Deal with TTPs and UPTs.
12016
12017 * lex.c (real_yylex): Don't set looking_for_typename just because we
12018 saw a 'new'.
12019 (dont_see_typename): #if 0 out.
12020
12021 * spew.c (yylex): Increment looking_for_typename if the next
12022 character is SCOPE, rather than setting it to 1; this way, the value
12023 from seeing an aggr specifier will not be lost. This kinda relies
12024 on looking_for_typename never being < 0, which is now true.
12025
12026 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
12027 too.
12028 (named_class_head_sans_basetype): Accept template types, too. Oops.
12029
d11ad92e 12030Fri Apr 8 16:39:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12031
12032 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
12033
12034 * parse.y: Lose START_DECLARATOR.
12035
12036 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
12037 for a class.
12038
12039 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
12040 A::foo' syntax. Catch invalid scopes better.
12041
12042 * parse.y, lex.c: lose TYPENAME_COLON.
12043
12044 * decl2.c (groktypefield): #if 0 out.
12045
12046 * decl.c (lookup_name): If the type denoted by got_scope is
12047 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
12048
12049 * class.c (push_nested_class): Don't try to push into
12050 error_mark_node.
12051
d11ad92e 12052Fri Apr 8 07:26:36 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
12053
12054 * Makefile.in (stamp-parse): Update count of conflicts to 33.
12055
d11ad92e 12056Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12057
12058 A saner implementation of nested types that treats template types
12059 no differently from non-template types. There are still some
12060 shortcomings of our system; most notably, it is difficult to look
12061 for a nested type that is hidden by another name, because of the way
12062 we keep track of hidden types. But this shouldn't be a problem for
12063 just about anyone. Perhaps lookup_field should be fixed up a bit.
12064
12065 * spew.c: Moved handling of nested types/scoping from the lexer
12066 into the parser. Removed variable template_type_seen_before_scope.
12067 Removed functions frob_identifier, hack_more_ids, and various cruft
12068 that was #if 0'd out in the past, reducing the size of the file from
12069 1146 lines to 450 lines. We can't quite do away with spew.c yet,
12070 though; we still need it for do_aggr () and checking for SCOPE after
12071 the current identifier. And setting lastiddecl.
12072
12073 * parse.y: Moved handling of nested types/scoping from the lexer
12074 into the parser, using a new global variable `got_scope'. Reduced
12075 the number of states by 53. Implemented all uses of explicit global
12076 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
12077 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
12078 scoped_typename. Added nonterminals nested_type,
12079 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
12080 nested_name_specifier, global_scope, overqualified_id, type_name.
12081 Changed many others. Added 9 new reduce/reduce conflicts, which are
12082 nested type parallels of 9 that were already in the grammar for
12083 non-nested types. Eight of the now 33 conflicts should be removed
12084 in the process of resolving the late binding between variable and
12085 function decls.
12086
12087 * gxxint.texi (Parser): Update.
12088
12089 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
12090
12091 * lex.h: Add decl for got_scope.
12092
12093 * lex.c (see_typename): Claim to be the lexer when calling
12094 lookup_name.
12095
12096 * decl.c (lookup_name): When called from the lexer, look at
12097 got_scope and looking_at_typename; otherwise don't.
12098
6060a796 12099Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12100
12101 31th Cygnus<->FSF merge.
12102
d11ad92e 12103Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12104
12105 * decl2.c (mark_vtable_entries): Call this to mark all the
12106 entries in the vtable addressable.
12107 (finish_decl_parsing): Handle SCOPE_REFs.
12108
12109 * decl.c (decls_match): Always call compparms with strict == 1.
12110 Handle the special case of C function redecl here.
12111 (duplicate_decls): Only keep the old type if the new decl takes no
12112 arguments.
12113
12114 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
12115
6060a796 12116Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12117
12118 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
12119 17:48:41.
12120
d11ad92e 12121Wed Apr 6 16:05:10 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12122
12123 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
12124 ch-tree.h: Every place these functions were called, the result was
12125 immediately passed to expand_expr_stmt. Reduce redundancy by
12126 calling expand_expr_init *inside* these functions. These
12127 makes for a simpler interface, and we don't have to build
12128 compound expressions. Hence, rename these function to:
12129 expand_virtual_init and expand_vbase_vtables_init respectively.
12130 * init.c, decl.c: Change callers of these functions.
12131 * init.c, cp-tree.h (expand_virtual_init): Make static.
12132
12133 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
12134 rather than DECL_SAVED_INSNS before emitting inlines.
12135
d11ad92e 12136Wed Apr 6 13:06:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12137
12138 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
12139
12140 * decl.c (duplicate_decls): If this is a new declaration of an
12141 extern "C" function, keep the type (for the argtypes).
12142 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
12143 (decls_match): Call compparms with a value of strict dependent on
12144 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
12145
12146 * typeck.c (compparms): ... is only equivalent to non-promoting
12147 parms if we're not being strict.
12148
12149 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
12150
12151 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
12152 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
12153
12154 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
12155 virtuals.
12156
d11ad92e 12157Tue Apr 5 17:48:41 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12158
12159 Support for implementing vtables with thunks.
12160 * tree.def (THUNK_DECL): New TREE_CODE.
12161 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
12162 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
12163 * cp-tree.h (memptr_type): New variable.
12164 * class.c (build_vtable_entry): Build thunk if necessary.
12165 * class.c (build_vfn_ref): If using thunks, don't need
12166 to add delta field from vtable (there is none!).
12167 * decl.c: Add memptr_type as well as vtable_entry_type.
12168 If using thunks, the latter is just ptr_type_node.
12169 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
12170 * decl2.c (finish_vtable_vardecl): Handle thunks.
12171 * expr.c (cplus_expand_expr): Support THUNK_DECL.
12172
12173 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
12174 * decl.c (start_function): Set current_extern_inline based on
12175 DECL_THIS_EXTERN, not TREE_PUBLIC.
12176 * decl.c (finish_function): Call mark_inline_for_output if needed,
12177
12178 Improve intelligence about when to emit inlines.
12179 * cp-tree.h (lang_decl_flags): New field saved_inline.
12180 * cp-tree.h (DECL_SAVED_INLINE): New macro.
12181 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
12182 * decl.h, decl.c (pending_addressable_inlines): Removed.
12183 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
12184 * decl2.c (mark_inline_for_output): Do nothing if
12185 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
12186 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
12187 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
12188 * decl2.c (finish_file): Writing out inlines later, so we can
12189 also handle the ones needed for vtbales.
12190 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
12191
12192 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
12193 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
12194 instead. (The rationale is that these optimizations both break binary
12195 compatibility, but should become the default in a future release.)
12196
6060a796 12197Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12198
12199 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
12200 of a fndecl, as we might not be from that vfield.
12201
d11ad92e 12202Tue Apr 5 17:43:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12203
12204 * class.c (add_virtual_function): fix bug for pure virtual, so
12205 that DECL_VINDEX of the dummy decl copied won't be error.
12206 (see also Apr 4 change)
12207
d11ad92e 12208Tue Apr 5 17:23:45 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12209
12210 * typeck.c (c_expand_return): Before checking that we're not
12211 returning the address of a local, make sure it's a VAR_DECL.
12212 (And don't worry about it being a TREE_LIST.)
12213
d11ad92e 12214Tue Apr 5 13:26:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12215
12216 * parse.y (YYDEBUG): Always define.
d11ad92e 12217 * lex.c (YYDEBUG): Likewise.
7177d104 12218
d11ad92e 12219Mon Apr 4 11:28:17 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12220
12221 * class.c (finish_struct): backup out the change below, put the
12222 new change for the same purpose. The change below breaks code.
12223
12224 * class.c (finish_struct): if pure virtual, copy node and make
12225 RTL point to abort, then put in virtual table.
12226 * decl2.c (grok_function_iit): reinstate Mar 31 change.
12227
d11ad92e 12228Sat Apr 2 03:12:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12229
12230 * init.c (build_new): pedwarn about newing const and volatile
12231 types.
12232
12233 * tree.c (get_identifier_list): Only do the special handling
12234 thing if we're dealing with the main variant of the record type.
12235
12236 * cvt.c (convert_to_reference): When converting between
12237 compatible reference types, use the pointer conversion machinery.
12238 Don't just blindly overwrite the old type.
12239
d11ad92e 12240Fri Apr 1 17:14:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12241
12242 * call.c (build_method_call): When looking at global functions,
12243 be sure to use instance_ptr for the first argument, not some version
12244 of it that has been cast to a base class. Also do this before
12245 comparing candidates.
12246
d11ad92e 12247Thu Mar 31 19:50:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12248
12249 * call.c (build_method_call): Constructors can be called for
12250 const objects.
12251
d11ad92e 12252Thu Mar 31 16:20:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12253
12254 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
12255 fucntions. They can be defined somewhere else.
12256
12257Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12258
12259 * decl.c (init_decl_processing): Declare __builtin_return_address
12260 and __builtin_frame_address for C++ as well.
12261
6060a796 12262Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12263
12264 * typeck2.c (store_init_value): Integral constant variables are
12265 always constant, even when doing -fpic.
12266
12267Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12268
12269 * decl.c (redeclaration_error_message): Pass the types to
12270 comptypes.
12271
6060a796 12272Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12273
12274 Cures incorrect errors about pure virtuals in a class, when they
12275 have been overridden in a derived class.
12276
12277 * search.c (get_abstract_virtuals): Reimplement.
12278 * search.c (get_abstract_virtuals_1): New routine.
12279
d11ad92e 12280Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12281
12282 * pt.c (push_template_decls): Make the pushed level pseudo
12283 global.
12284
12285 * parse.y (extdefs): Don't pop everything if the current binding
12286 level is pseudo_global.
12287
12288 * decl.c (pop_everything): Stop on reaching a pseudo-global
12289 binding level.
12290
12291 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
12292
12293 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
12294 the old decl actually had an initializer.
12295
12296 * {various}: Clean up gcc -W complaints.
12297
12298 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
12299 (DECL_CONTEXT (NODE) != NULL_TREE).
12300
12301 * parse.y (lang_extdef): Call pop_everything if necessary.
12302
12303 * decl.c (pop_everything): New function for popping binding
12304 levels left over after a syntax error.
12305 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
12306 a function is a member.
12307
6060a796 12308Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12309
12310 Cures calling a more base base class function, when a more derived
12311 base class member should be called in some MI situations.
12312
12313 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
12314 binfos from the binfo given as the second argument to make_binfo,
12315 instead of the unspecialized ones from the TYPE_BINFO.
d11ad92e
MS
12316 * class.c (finish_base_struct): Likewise, update callers.
12317 * search.c (dfs_get_vbase_types): Likewise.
12318 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
7177d104 12319 * decl.c (xref_tag): Use NULL_TREE instead of 0.
d11ad92e 12320 * lex.c (make_lang_type): Likewise.
7177d104 12321
d11ad92e 12322Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12323
12324 * decl.c (pushdecl): If pushing a C-linkage function, only do a
12325 push_overloaded_decl.
12326 (duplicate_decls): Standard overloading does not shadow built-ins.
12327
d11ad92e 12328Tue Mar 29 00:54:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12329
12330 * pt.c (end_template_decl): Don't call push_overloaded_decl.
12331
12332 * init.c (do_friend): Don't call push_overloaded_decl.
12333
12334 * decl.c (pushdecl): Call push_overloaded_decl for functions and
12335 function templates.
12336 (duplicate_decls): functions and function templates are not
12337 duplicates, but don't complain about calling this function to
12338 compare them.
12339 (push_overloaded_decl): Don't deal with linkage. Call
12340 duplicate_decls.
12341 (redeclaration_error_message): Deal with linkage.
12342
12343 * decl.c (start_function): If push_overloaded_decl returns an
12344 older version of the function, deal with it.
12345
12346 * decl.c (start_function): Be sure only to push_overloaded_decl
12347 for non-members.
12348
12349 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
12350 methods.
12351 (start_function): Lose broken and redundant code for checking old
12352 decl.
12353
12354 * init.c (add_friend): Give line numbers of both friend decls
12355 when warning about re-friending.
12356
12357 * pt.c (tsubst): Use comptypes rather than == to compare the
12358 types of the method as declared and as defined, since default
12359 parameters may be different.
12360
12361 * call.c (build_method_call): Use brendan's candidate printing
12362 routine.
12363
12364 * decl.c (start_method): Methods defined in the class body are
12365 inline whether or not it's a template class.
12366
d11ad92e 12367Mon Mar 28 16:39:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12368
12369 * parse.y (initdcl0): Add "extern" to current_declspecs if
12370 have_extern_spec && ! used_extern_spcec.
12371
12372 * tree.c (really_overloaded_fn): A fn with more than one
12373 overload.
12374
12375 * pt.c (end_template_decl): Use really_overloaded_fn.
12376
12377 * decl.c (duplicate_decls): When smashing a decl into a previous
12378 definition, keep the old file and line.
12379 Don't deal with overloaded functions.
12380 Lose old code for checking arg types of functions.
12381 Check for overloaded C functions.
12382 (pushdecl): Deal with overloaded functions.
12383 (start_decl): Expect pushdecl to return an appropriate function decl.
d11ad92e 12384 (start_function): Likewise.
7177d104
MS
12385 (push_overloaded_decl): Don't check for overloaded C functions.
12386
12387 * *.c: Stop using DECL_OVERLOADED, it being archaic.
12388 TREE_OVERLOADED should probably go, too.
12389
d11ad92e 12390Mon Mar 28 14:00:45 1994 Ron Guilmette <rfg@netcom.com>
7177d104
MS
12391
12392 * typeck.c (comp_target_types): Call comp_target_parms with
12393 strict == 1.
12394
d11ad92e 12395Sun Mar 27 00:07:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12396
12397 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
12398 sections if we're compiling with -ansi or -pedantic.
12399
12400 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
12401
12402 * decl2.c (grokfield): Don't pedwarn twice about initializing
12403 field.
12404
12405 * decl.c (push_overloaded_decl): Warn about shadowing
12406 constructor.
12407 (redeclaration_error_message): Don't allow 'int a; int a;'
12408
12409 * cvt.c (build_up_reference): Only check for valid upcast if
12410 LOOKUP_PROTECT is set, not just any flag.
12411
d11ad92e 12412Fri Mar 25 01:22:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12413
12414 * lex.c (check_newline): When we see a #pragma implementation,
12415 also set it for the main input file.
12416
12417 * init.c (build_new): Convert array size argument to size_t.
12418
12419 * parse.y (primary): If we're doing a parenthesized type-id, call
12420 groktypename before passing it to build_new.
12421
12422 * call.c (build_method_call): Deal properly with const and
12423 volatile for instances of reference type.
12424
12425 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
12426 (pedantic) pedwarn'.
12427
12428 * decl.c (grokdeclarator): Don't complain about putting `static'
12429 and `inline' on template function decls.
12430
d11ad92e 12431Thu Mar 24 23:18:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12432
12433 * call.c (build_method_call): Preserve const & volatile on
12434 `this'.
12435
6060a796 12436Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12437
12438 * init.c (build_new, build_vec_delete): Use global new and delete
12439 for arrays.
d11ad92e 12440 * decl2.c (delete_sanity): Likewise.
7177d104 12441
d11ad92e 12442Thu Mar 24 02:10:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12443
12444 * cvt.c (convert_to_reference): If i is an lvalue,
12445 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
12446 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
12447
d11ad92e 12448Wed Mar 23 17:45:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12449
12450 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
12451 and DECL_TEMPLATE_INSTANTIATIONS.
12452
12453 * init.c (build_new): Handle array typedefs properly.
12454
6060a796 12455Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12456
12457 30th Cygnus<->FSF merge.
12458
6060a796 12459Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12460
12461 * class.c (modify_vtable_entries): Avoid running off the end of the
12462 virtuals list when processing a virtual destructor.
d11ad92e 12463 * class.c (get_vtable_entry): Likewise.
7177d104 12464
d11ad92e 12465Wed Mar 23 00:23:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12466
12467 * decl.c (duplicate_decls): If two template decls don't match,
12468 just return 0.
12469
d11ad92e 12470Tue Mar 22 23:49:41 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12471
12472 * typeck.c (convert_for_assignment): Don't pedwarn about
12473 converting function pointer to void *.
12474
6060a796 12475Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12476
12477 Major revamp of pointer to member functions. Cures major
12478 nonfunctionality when used in casts, and MI situations.
12479
12480 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
d11ad92e
MS
12481 * typeck.c (convert_for_assignment): Likewise.
12482 * typeck2.c (digest_init): Likewise.
7177d104
MS
12483 * typeck2.c (process_init_constructor): Simplify by moving code into
12484 digest_init.
12485 * typeck2.c (digest_init): Do default_conversions on init value, if
12486 we are processing pointer to member functions.
12487 * class.c (get_vfield_offset): Now non-static. Convert bit offset
12488 into byte offset.
d11ad92e 12489 * cp-tree.h (get_vfield_offset): Likewise.
7177d104
MS
12490 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
12491 instance, before fetching vtable pointer.
12492 * typeck.c (get_delta_difference): New routine.
12493 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
12494 get vtable pointer out of right subobject.
12495
6060a796 12496Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12497
12498 * search.c (get_binfo): Return NULL instead of aborting, when
12499 passed a UNION_TYPE.
12500
d11ad92e 12501Tue Mar 22 12:44:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12502
12503 These patches implement handling of redefinition/redeclaration of
12504 templates.
12505
12506 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
12507 considered compatible.
12508
12509 * parse.y (template_def): Pass defn argument to end_template_decl.
12510
12511 * pt.c (end_template_decl): Add defn argument. Check for
12512 redefinition. Simplify.
12513
12514 * error.c (OB_UNPUT): New macro, to remove mistakes.
12515 (aggr_variety): Subroutine of dump_aggr_type.
12516
12517 * decl.c (decls_match): Support templates.
12518 (duplicate_decls): No longer static. Don't try to lay out template
12519 decls.
12520 (pushdecl): Simplify.
12521
12522 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
12523 DECL_INITIAL.
12524
d11ad92e 12525Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12526
12527 * error.c (dump_decl): Support class template decls.
12528 (dump_type): Don't adorn template type parms.
12529
12530 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
12531 if it was a definition.
12532 (redeclaration_error_message): Do the cp_error thang, and reject
12533 redefinition of templates.
12534
d11ad92e 12535Mon Mar 21 19:36:06 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12536
12537 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
12538 in FIELD context, when appropriate. Also,
12539 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
12540 Also, simplify check for bogus return specifiers.
12541
d11ad92e 12542Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12543
12544 * parse.y (after_type_declarator1): Expand type_quals.
d11ad92e
MS
12545 (notype_declarator1): Likewise.
12546 (absdcl1): Likewise.
7177d104 12547
d11ad92e 12548Sat Mar 19 01:05:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12549
12550 * decl.c (grokdeclarator): Treat class-local typedefs like static
12551 members; i.e. 'typedef int f();' means that f is a function type,
12552 not a method type.
12553
12554 * parse.y (decl): Change direct_* back to *.
12555 (type_id): Change direct_abstract_declarator to absdcl.
12556 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
12557
d11ad92e 12558Fri Mar 18 12:47:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12559
12560 These two patches fix crashes on instantiating a template inside a
12561 function with C linkage or containing labels.
12562
12563 * class.c (current_lang_stacksize): No longer static.
12564
12565 * decl.c (struct saved_scope): Add lang_base, lang_stack,
12566 lang_name, lang_stacksize, and named_labels.
12567 (push_to_top_level): Save them.
12568 (pop_from_top_level): Restore them.
12569
12570 * gxxint.texi (Parser): Update.
12571
12572 These two patches finish moving the task of expr/declarator
12573 ambiguity resolution from the lexer to the parser, and add one more
12574 r/r conflict. START_DECLARATOR can now be nuked.
12575
12576 * parse.y (decl): Add "direct_" in typespec X rules.
12577 (direct_declarator): New nonterminal for
12578 direct_after_type_declarator and direct_notype_declarator.
12579 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
12580 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
12581 (named_parm): Add typespec direct_declarator rule.
12582
12583 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
12584
12585 These two patches disable some excessive cleverness on the part of
12586 g++; a non-class declaration always hides a class declaration in the
12587 same scope, and g++ was trying to unhide it depending on the
12588 enclosing expression.
12589
12590 * spew.c (arbitrate_lookup): #if 0 out.
12591
12592 * decl.c (lookup_name): Never call arbitrate_lookup.
12593
12594 * parse.y (complex_notype_declarator1): Add '*'
12595 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
12596
12597 * parse.y (complex_direct_notype_declarator): Restore id_scope
12598 see_typename TYPENAME rule, remove all other rules beginning with
12599 those tokens.
12600 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
12601
d11ad92e 12602Thu Mar 17 17:30:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12603
12604 These changes fix the compiler's handling of the functional cast/
12605 object declaration ambiguities in section 6.8 of the ARM. They also
12606 add 11 reduce/reduce conflicts. Sigh.
12607
12608 * parse.y: Add precedence decls for OPERATOR and '~'.
12609 (notype_unqualified_id): New nonterminal, encompasses all of the
12610 ANSI unqualified-id nonterminal except TYPENAMEs.
12611 (expr_or_declarator): New nonterminal to delay parsing of code like
12612 `int (*a)'.
12613 (primary): Use notype_unqualified_id.
12614 (decl): Add typespec initdecls ';' and typespec declarator ';'
12615 rules.
12616 (initdcl0): Deal with the above.
12617 (complex_notype_declarator1): A notype_declarator that is not also
12618 an expr_or_declarator.
12619 (complex_direct_notype_declarator): A direct_notype_declarator that
12620 doesn't conflict with expr_or_declarator. Use
12621 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
12622 (functional_cast): New nonterminal, for the three functional cast
12623 rules. So that they can be moved after
12624 complex_direct_notype_declarator.
12625 (see_typename): Don't accept type_quals any more.
12626
12627 * decl2.c (reparse_decl_as_expr): New function to deal with parse
12628 nodes for code like `int (*a)++;'.
12629 (reparse_decl_as_expr1): Recursive subroutine of the above.
12630 (finish_decl_parsing): New function to deal with parse nodes for
12631 code like `int (*a);'. See the difference?
12632
6060a796 12633Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12634
12635 These changes break binary compatibility in code with classes
12636 that use virtual bases.
12637
12638 * search.c (dfs_get_vbase_types): Simplify and correct to make
12639 sure virtual bases are initialized in dfs ordering.
12640 * search.c (get_vbase_types): Simplify and make readable.
12641
d11ad92e 12642Thu Mar 17 12:01:10 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12643
12644 * parse.y: s/ typename / type_id /g
12645
d11ad92e 12646Wed Mar 16 17:42:52 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12647
12648 * parse.y (typespec): add SCOPE TYPENAME for global scoped
12649 type. e.g. ::B x.
12650
12651 * decl.c (complete_array_type): fix a bug that in -pendantic
12652 mode even there's no initializer, it will continue to build
12653 default index.
12654
d11ad92e 12655Wed Mar 16 17:43:07 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12656
12657 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
12658 all of the scoped PTYPENAME rules.
12659
6060a796 12660Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12661
12662 * init.c (build_offset_ref): The value of A::typedef_name is
12663 always the TYPE_DECL, and never an error.
12664
d11ad92e 12665Tue Mar 15 20:02:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12666
12667 * search.c (get_base_distance_recursive): Two binfos can only
12668 represent the same object if they are both via_virtual.
12669
12670 * class.c (finish_base_struct): Check vbases for ambiguity, too.
12671
12672 * search.c (get_vbase_types): Accept binfo argument, too.
12673
d11ad92e 12674Tue Mar 15 19:22:05 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12675
12676 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
12677 initializer also, because back-end requires it.
12678
d11ad92e 12679Tue Mar 15 15:33:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12680
12681 * error.c (dump_expr): Support member functions (which show up as
12682 OFFSET_REFs).
12683
6060a796 12684Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12685
12686 * init.c (build_new): Set the return type of multidimensional
12687 news correctly.
12688
d11ad92e 12689Fri Mar 11 15:35:39 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12690
12691 * call.c (build_method_call): if basetype not equal to type
12692 of the instance, use the type of the instance in building
12693 destructor.
12694
d11ad92e 12695Thu Mar 10 17:07:10 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12696
12697 * parse.y (direct_notype_declarator): add push_nested_type for
12698 'template_type SCOPED_NAME' rule.
12699
d11ad92e 12700Tue Mar 8 00:19:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12701
12702 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
12703
d11ad92e 12704Sat Mar 5 04:47:48 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12705
12706 * parse.y (regcast_or_absdcl): New nonterminal to implement late
12707 reduction of constructs like `int ((int)(int)(int))'.
12708 (cast_expr): Use it.
12709 (sub_cast_expr): Everything that can come after a cast.
12710 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
12711 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
12712 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
12713 '(' complex_parmlist ')' and regcast_or_absdcl.
12714 (parmlist): Split
12715 (complex_parmlist): Parmlists that are not also typenames.
12716 (parms_comma): Enabler.
12717 (named_parm): A parm that is not also a typename. Use declarator
12718 rather than dont_see_typename abs_or_notype_decl. Expand
12719 typed_declspecs inline.
12720 (abs_or_notype_decl): Lose.
12721 (dont_see_typename): Comment out.
12722 (bad_parm): Break out abs_or_notype_decl into two rules.
12723
d11ad92e 12724Fri Mar 4 18:22:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12725
12726 * decl2.c (reparse_decl_as_casts): New function to change parse
12727 nodes for `(int)(int)(int)' from "function taking int and returning
12728 function taking int and returning function taking int" to "... cast
12729 to int, cast to int, cast to int".
12730
12731 * decl2.c (reparse_decl_as_expr): Recursive function to change
12732 parse nodes for `A()()' from "function returning function returning
12733 A" to "A().operator()".
12734
12735 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
12736 `typespec fcast_or_absdcl' rule.
12737 (fcast_or_absdcl): New nonterminal to implement late reduction of
12738 constructs like `A()()()()'.
12739 (typename): Replace `typespec absdcl1' rule with
12740 `typespec direct_abstract_declarator' rule.
12741 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
12742 with `fcast_or_absdcl type_quals' rule.
12743
6060a796 12744Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12745
12746 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
12747 matches Section 5.5.
12748
d11ad92e 12749Fri Mar 4 14:01:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12750
12751 * error.c (dump_type_prefix): Don't print basetype twice for
12752 pmfs.
12753
6060a796 12754Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12755
12756 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
12757 so that it is like setHandler(&A::handlerFn). Cures an `invalid
12758 lvalue in unary `&''.
12759
d11ad92e 12760Fri Mar 4 11:15:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12761
12762 * gxxint.texi (Copying Objects): New section discussing default
12763 op= problems with virtual inheritance.
12764
12765 * decl2.c (grokoptypename): Just does grokdeclarator and
12766 build_typename_overload, since the parser can't call grokdeclarator
12767 directly.
12768
12769 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
12770 and TREE_TYPE on generated identifiers.
12771
12772 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
12773
12774 * parse.y (parm): Convert `const char *' to `__opPCc' here.
12775
12776 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
12777 if we can't figure out what to do.
d11ad92e 12778 (dump_type*): Likewise.
7177d104
MS
12779
12780 * typeck2.c (build_m_component_ref): 'component' is an expr, not
12781 a decl. Also move the IS_AGGR_TYPE check after the stripping of
12782 REFERENCE_TYPE.
12783
6060a796 12784Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12785
12786 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
12787 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
12788 lvalue in unary `&''.
12789
d11ad92e 12790Thu Mar 3 12:38:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12791
12792 * parse.y: Add precedence specification for START_DECLARATOR.
12793 (type_quals): Move before primary.
12794 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
12795
12796 * decl2.c (grokoptypename): Lose.
12797
12798 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
12799 rather than waiting until later.
12800
d11ad92e 12801Wed Mar 2 14:12:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12802
12803 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
12804 than expanding it inline.
12805 (typename): Expand empty option of (former) absdcl inline.
d11ad92e 12806 (abs_or_notype_decl): Likewise.
7177d104
MS
12807 (absdcl): Lose empty rule.
12808 (conversion_declarator): New nonterminal for 'typename' of 'operator
12809 typename'.
12810 (operator_name): Use it instead of absdcl.
12811
12812 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
12813 TYPEOF, and SIGOF.
12814 (typed_declspecs): Accept typed_typespecs, rather than typespec
12815 directly. Add rules with reserved_typespecquals.
12816 (reserved_declspecs): Don't accept typespecqual_reserved at the
12817 beginning of the list. The typed_declspecs rule will deal with this
12818 omission.
12819 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
12820 directly.
12821
12822 * parse.y (direct_notype_declarator,
12823 direct_after_type_declarator, direct_abstract_declarator): Split up
12824 the declarator1 nonterminals to match the draft standard and avoid
12825 ambiguities.
12826 (new_type_id, new_declarator, direct_new_declarator,
12827 new_member_declarator): New nonterminals to implement the subset of
12828 'typename' allowed in new expressions.
12829 (unary_expr): Use new_type_id instead of typename.
12830 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
12831 (abs_member_declarator, after_type_member_declarator): Lose.
12832
12833 * parse.y (absdcl1): Don't require parens around
12834 abs_member_declarator.
12835 (abs_member_declarator): Lose see_typename from rules.
d11ad92e 12836 (after_type_member_declarator): Likewise.
7177d104
MS
12837
12838 * tree.c (get_identifier_list): New function, containing code
12839 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
12840 (get_decl_list): Use it.
d11ad92e 12841 (list_hash_lookup_or_cons): Likewise.
7177d104
MS
12842
12843 * parse.y (typed_declspecs, declmods): It's not necessary to hash
12844 the declspecs on class_obstack, so don't. This way typed_typespecs
12845 can reduce to typed_declspecs.
12846
d11ad92e 12847Wed Mar 2 14:29:18 1994 Jason Merrill <jason@cygnus.com>
7177d104
MS
12848
12849 * cvt.c (build_up_reference): If we aren't checking visibility,
12850 also allow base->derived conversions.
12851
d11ad92e 12852Mon Feb 28 15:14:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12853
12854 * typeck.c (build_c_cast): Remove bogus hack when converting
12855 to a reference type.
12856
12857 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
12858 Removed, not used.
12859 (lang_stype::methods, lang_decl::next_method): New fields.
12860 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
12861 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
12862
12863 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
12864 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
12865 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
12866 a non-inline virtual function to control emitting of vtables.
12867 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
12868 * search.c (build_vbase_vtables_init): Don't assemble_external
12869 (yet) if flag_vtable_hack.
d11ad92e 12870 * class.c (build_vfn_ref): Likewise.
7177d104 12871
d11ad92e 12872Mon Feb 28 14:54:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12873
12874 * parse.y (component_decl): Don't include "typed_declspecs
12875 declarator ';'" speedup, since it breaks enums.
12876
d11ad92e 12877Fri Feb 25 15:43:44 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12878
12879 * class.c (finish_struct): Minor optimization for building
12880 fn_fields list.
12881
d11ad92e 12882Fri Feb 25 15:23:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12883
12884 * decl.c (start_function): Fix detection of function overloading.
12885
6060a796 12886Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12887
12888 * lex.c (check_newline): #pragma interface can take a string
12889 argument, just like #pragma implementation. #pragma implementation
12890 checks for garbage on the line, line #pragma interface does. Main
12891 input files do not auto implement like named files, #pragma
12892 implementation must be used explicitly.
12893
d11ad92e 12894Thu Feb 24 17:09:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12895
12896 * parse.y (components): Handle list of one again.
d11ad92e 12897 (notype_components): Likewise.
7177d104
MS
12898 (after_type_declarator1): Take maybe_raises out again.
12899
12900 * gxxint.texi (Parser): Document additional r/r conflict.
12901
d11ad92e 12902Wed Feb 23 14:42:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12903
12904 * gxxint.texi (Parser): Add node.
12905
12906 * Makefile.in (stamp-parse): Update expected conflict count.
12907
12908 * parse.y (various): Replace "declmods declarator" with "declmods
12909 notype_declarator". The comment saying that "declmods declarator ';'"
12910 corresponds to "int i;" was wrong; it corresponds to "const i;".
12911 (component_decl): Add "typed_declspecs declarator ';'" rule; this
12912 *does* correspond to "int i;". Change "declmods components" to
12913 "declmods notype_components".
12914 (components): Don't deal with a list of one anymore.
12915 (notype_components): New nonterminal, corresponds to notype_declarator.
12916 ({after_,no}type_component_decl{,0}): More new nonterminals.
12917 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
12918 Eliminates four reduce/reduce conflicts.
12919
12920 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
12921 (nontrivial_exprlist): New nonterminal: A list of at least two
12922 expr_no_commas's.
12923 (nonnull_exprlist): Depend on nontrival_exprlist.
12924 Eliminates four reduce/reduce conflicts.
12925
12926 (named_class_head): Move intermediate code block into separate
12927 nonterminal so that we can stick %prec EMPTY on it.
12928
12929 Add more %prec EMPTY's to eliminate remaining shift/reduce
12930 conflicts.
12931
12932 (after_type_declarator): Add maybe_raises to fndecl rules.
12933 (after_type_declarator_no_typename): Remove.
12934 For correctness.
12935
12936 Document remaining reduce/reduce conflicts.
12937
d11ad92e 12938Tue Feb 22 12:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12939
12940 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
12941 (TYPE_BINFO (type)) if we care about the path.
12942
12943 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
12944 options are.
12945
6060a796 12946Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12947
12948 * Makefile.in (mostlyclean): lex.c is a source file, don't
12949 remove.
12950
d11ad92e 12951Sat Feb 19 01:27:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12952
12953 * parse.y: Eliminate 20 shift/reduce conflicts.
12954
d11ad92e 12955Fri Feb 18 11:49:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12956
12957 * pt.c (type_unification): Add subr argument; if set, it means
12958 that we are calling ourselves recursively, so a partial match is OK.
12959 (unify): Support pointers to methods and functions.
12960 (tsubst): Support method pointers.
12961 * decl.c (build_ptrmemfunc_type): No longer static, so that
12962 tsubst can get at it.
12963
12964 * init.c (is_aggr_typedef): Pretend template type parms are
12965 aggregates.
12966 * decl2.c (build_push_scope): If cname refers to a template type
12967 parm, just grin and nod.
12968
12969 * call.c (build_overload_call_real): Pass subr argument to
12970 type_unification.
d11ad92e
MS
12971 * pt.c (do_function_instantiation): Likewise.
12972 * class.c (instantiate_type): Likewise.
7177d104
MS
12973
12974 * search.c (get_base_distance): If BINFO is a binfo, use it and
12975 don't mess with its BINFO_INHERITANCE_CHAIN.
12976
12977 * cvt.c (convert_to_reference): Fix temporary generation.
12978 If ambiguous, return error_mark_node.
12979
12980 * init.c (build_new): Put back some necessary code.
12981
d11ad92e 12982Thu Feb 17 15:39:47 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12983
12984 * init.c (build_new): Deal with array types properly.
12985
12986 * search.c (get_binfo): Become a shell for get_base_distance.
12987 (get_binfo_recursive): Lose.
12988 (get_base_distance_recursive): Find the path to the via_virtual base
12989 that provides the most access.
d11ad92e 12990 (get_base_distance): Likewise.
7177d104
MS
12991
12992 * parse.y (explicit_instantiation): Syntax is 'template class
12993 A<int>', not 'template A<int>'.
12994
12995 * typeck.c (convert_for_initialization): Remove bogus warning.
12996
12997 * parse.y (datadef): Revert patch of Oct 27.
12998
d11ad92e 12999Thu Feb 17 15:12:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13000
13001 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
13002 rather than integer_type_node. Does wonders for the Alpha.
13003
d11ad92e 13004Thu Feb 17 13:36:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13005
13006 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
13007 goes onto the same obstack as its target type.
13008
d11ad92e 13009Wed Feb 16 00:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13010
13011 * cvt.c (convert_to_reference): If converting via constructor
13012 on local level, go back to build_cplus_new approach.
13013
13014 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
13015 to error_mark_node to prevent expand_expr from building a cleanup
13016 for this variable.
13017
13018 * lex.c (default_assign_ref_body): Return *this from the memcpy
13019 version, too.
13020
13021 * decl.c (grok_reference_init): Just return if called with
13022 error_mark_node, don't worry about initializing non-const reference
13023 with temporary.
13024
13025 * cvt.c (convert_to_reference): Do the right thing for
13026 non-aggregate reference conversions, pedwarn when generating a
13027 non-const reference to a temporary.
13028
13029 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
13030 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
13031 again.
13032
d11ad92e 13033Tue Feb 15 19:47:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13034
13035 * decl.c (grok_reference_init): Pawn off a lot of the work on
13036 convert_to_reference. Generally do the right thing.
13037
13038 * cvt.c (convert_to_reference): Conform to the initial comment;
13039 i.e. don't create temps if decl != error_mark_node. Handle
13040 cleanups better for temps that do get created. Don't pretend
13041 that we can use an 'A' to initialize a 'const double &' just by
13042 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
13043
13044 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
13045 constructor calls.
13046
d11ad92e 13047Mon Feb 14 14:50:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13048
13049 * decl.c (grok_reference_init): Make a temporary for initializing
13050 const reference from constant expression.
13051
d11ad92e 13052Mon Feb 14 11:31:31 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13053
13054 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
13055 * decl.c (pushdecl): Define decl in correct binding_level
13056 (which isn't always the inner_binding_level).
13057
13058 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
13059 It's ugly, and I don't think it's the right thing to do.
13060
13061 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
13062 Remove NEW_CLASS_SCOPING, assuming it is always 1.
13063 * decl.c (pop_decl_level): Removed; manually inlined.
13064
d11ad92e 13065Sun Feb 13 19:04:56 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13066
13067 * class.h (candidate): Add basetypes field.
13068
13069 * call.c (build_method_call): Do access checking after choosing a
13070 function, not before.
13071
13072 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
13073 (mostlyclean): Remove ../cc1plus.
13074
d11ad92e 13075Fri Feb 11 11:52:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13076
13077 * class.c (finish_struct): Don't allow adjusting access to a field
13078 of a base class if a local field has the same name.
13079
13080 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
13081
d11ad92e 13082hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
7177d104 13083
63718c49 13084 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
13085 with destructor names when either NO_DOLLAR_IN_LABEL or
13086 NO_DOT_IN_LABEL are not defined.
13087
13088 Now `template <class T, T f(T&), const T*> class A {...}' works.
13089
13090 * pt.c (grok_template_type): substitute template parm types
13091 with actual types in complex type as well.
13092 (coerce_template_parms): update the grok_template_type ()
13093 function call.
13094
13095 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
13096
13097 * decl.c (grok_op_properties): Allow operator++/-- to have
13098 default arguments.
13099
13100 * typeck2.c (store_init_value): Don't abort when called to
13101 initialize a type that needs constructing with a CONSTRUCTOR.
13102
13103 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
13104 store_init_value fails, build and expand an INIT_EXPR. If
13105 store_init_value succeeds, call expand_decl_init.
13106
6060a796 13107Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13108
13109 * class.c (build_vbase_path): Use complete_type_p instead of
13110 resolves_to_fixed_type_p to determine if the virtual bases are in
13111 their right place for the type of expr. Cures problem of thinking a
13112 virtual base class is one place, when it is in fact someplace else.
13113
6060a796 13114Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13115
13116 * init.c (resolve_offset_ref): Make sure we first convert to
13117 intermediate type, if given, when dealing with members off `this'.
13118 Solves an incorrrect `type `foo' is not a base type for type
13119 `multiple'' when it is infact, a base type.
13120
6060a796 13121Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13122
13123 * class.c (modify_other_vtable_entries): Use get_binfo, instead
13124 of binfo_value. Solves problem with compiler giving a `base class
13125 `B' ambiguous in binfo_value (compiler error)' on complex MI
13126 herarchies, when a virtual function is first defied in a virtual
13127 base class.
13128
6060a796 13129Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13130
13131 * class.c (build_vbase_path): Don't complain about ambiguous
13132 intermediate conversion when converting down to a virtual base
13133 class, even if they might seem to be ambiguous.
13134
d11ad92e 13135Thu Feb 10 12:18:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13136
13137 * typeck2.c (build_functional_cast): #if 0 out constructor
13138 inheritance code, improve error messages.
13139
13140 * class.c (finish_base_struct): Complain about base with only
13141 non-default constructors in derived class with no constructors.
13142
13143 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
13144
6060a796 13145Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13146
13147 * search.c (build_mi_virtuals, add_mi_virtuals,
13148 report_ambiguous_mi_virtuals): Removed unneeded code.
d11ad92e 13149 * class.c (finish_struct_bits): Likewise.
7177d104 13150
d11ad92e 13151Wed Feb 9 11:27:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13152
13153 * pt.c (end_template_instantiation): Push decl before
13154 pop_from_top_level.
13155
13156 * typeck2.c (build_m_component_ref): Make sure datum is of
13157 aggregate type.
13158
13159 * init.c (get_type_value): New function, returns
13160 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
13161
13162 * call.c (build_method_call): Don't die on call to destructor for
13163 non-type.
13164
13165 * decl.c (grokdeclarator): Complain about virtual op new and op
13166 delete, make static virtuals unvirtual instead of unstatic.
13167
13168 * typeck.c (build_c_cast): Also call default_conversion on
13169 methods.
13170
13171 * decl.c (grokdeclarator): Don't complain about anonymous
13172 bitfields.
13173
13174 * parse.y (simple_stmt, for loops): Move the continue point after
13175 the cleanups.
13176
13177 * class.c (finish_struct): Fix setting of
13178 TYPE_HAS_COMPLEX_INIT_REF.
13179
d11ad92e 13180Tue Feb 8 13:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13181
13182 * init.c (build_new): Deal with `new double (1)'.
13183
13184 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
13185 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
13186 TYPE_NEEDS_CONSTRUCTING.
13187
13188 * decl.c (duplicate_decls): Propagate access decls.
13189
13190 * typeck2.c (process_init_constructor): Accept empty_init_node
13191 for initializing unions.
13192
13193 * class.c, lex.c, cp-tree.h: Use
13194 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
13195 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
13196 some places.
13197
13198 * decl.c (finish_decl): Don't complain about uninitialized const
13199 if it was initialized before.
13200
d11ad92e 13201Mon Feb 7 18:12:34 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13202
13203 * lex.c (default_assign_ref_body): Don't deal with vbases for
13204 now.
13205
13206 * decl.c (finish_decl): Fix reversed logic for objects and other
13207 things that need to be constructed but have no initializer.
13208
13209 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
13210 set by grok_op_properties or finish_decl.
13211
13212 * decl.c: Don't warn about extern redeclared inline unless
13213 -Wextern-inline is given.
d11ad92e
MS
13214 * decl2.c (lang_decode_option): Likewise.
13215 * cp-tree.h: Likewise.
7177d104 13216
d11ad92e 13217Mon Feb 7 17:29:24 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13218
13219 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
13220 declaration.
13221
13222 * decl.c (pushdecl_with_scope): New function.
13223 * decl.c (pushdecl_top_level): Use new function.
13224 * decl.c (pushtag): Initialize newdecl.
13225 * decl.c (pushtag): Push new type decl into correct scope.
13226
d11ad92e 13227Mon Feb 7 14:42:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13228
13229 * call.c, cvt.c, init.c, search.c, cp-tree.h:
13230 Eradicate LOOKUP_PROTECTED_OK.
13231
d11ad92e 13232Mon Feb 7 13:57:19 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13233
13234 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
13235 'globalize' to signify implicit declarations.
13236 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
13237 * decl.c (set_identifier_type_value_with_scope): New function.
13238 * decl.c (set_identifier_local_value): Simplify.
13239 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
13240 forward declaration (followed by ';' and not preceded by 'friend').
13241 * class.c, decl.c, except.c, init.c, parse.y,
13242 pt.c, search.c: Add new argument to calls to xref_tag and
13243 pushtag.
13244
d11ad92e 13245Mon Feb 7 00:22:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13246
13247 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
13248 ACCESSIBLY_DERIVED_FROM_P meant before.
13249 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
13250
13251 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
13252
13253 * search.c (get_base_distance_recursive): Members and friends of
13254 a class X can implicitly convert an X* to a pointer to a private or
13255 protected immediate base class of X.
d11ad92e 13256 (get_binfo_recursive): Likewise.
7177d104
MS
13257 (get_base_distance): Ignore ambiguity if PROTECT < 0.
13258 (get_binfo): Lose multiple values of PROTECT.
13259 (compute_access): Protected is OK if the start of the
13260 search is an accessible base class of current_class_type.
13261
13262 * method.c (build_opfncall): Do check access on operator new here.
13263
13264 * decl.c (finish_function): Don't check access on operator new
13265 here.
13266
d11ad92e 13267Sun Feb 6 14:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13268
13269 * decl.c (xref_tag): The base of a derived struct is NOT always
13270 public. Duh.
13271
13272 * pt.c (do_explicit_instantiation): New function, called from
13273 parser to do explicit function instantiation.
13274 (type_unification): Allow the args list to be terminated with
13275 void_list_node.
13276 (do_pending_expansions): Look at i->interface for non-member
13277 templates.
13278
13279 * parse.y (datadef): Move explicit_instantiation here.
13280 (structsp): From here.
13281 (datadef): Complain about `int;'.
13282
d11ad92e 13283Sun Feb 6 12:33:18 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13284
13285 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
13286 second parameter, and simplify first from a TREE_LIST where
13287 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
13288 * pt.c (instantiate_member_templates): Simplify argument list
13289 from a TREE_LIST to just an IDENTIFIER.
13290 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
13291 * parse.y (template_instantiate_once): Simplify accordingly.
13292 * decl.c (inner_binding_level): New. Use various places to
13293 simplify.
13294
d11ad92e 13295Sun Feb 6 02:49:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13296
13297 * typeck2.c (build_functional_cast): int() -> int(0).
13298
d11ad92e 13299Sat Feb 5 00:53:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13300
13301 * class.c (finish_struct): Don't do a bitwise copy for op= if the
13302 class has a virtual function table.
13303
13304 * typeck.c (convert_for_initialization): Restore warnings about
13305 not using defined op=. Should really be my_friendly_aborts, I
13306 s'pose.
13307
d11ad92e 13308Fri Feb 4 14:21:00 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13309
13310 * class.c (finish_struct): Tidy up conditions for doing bitwise
13311 copies of objects.
13312
13313 * decl.c (build_default_constructor): #if 0 out.
13314
13315 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
13316 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
13317
13318 * decl.c (grokdeclarator): Don't return void_type_node for
13319 friends being defined here.
13320
13321 * init.c (perform_member_init): Only do the init if it's useful.
13322
13323 * lex.c (default_copy_constructor_body): If we don't need to do
13324 memberwise init, just call __builtin_memcpy.
d11ad92e 13325 (default_assign_ref_body): Likewise.
7177d104
MS
13326
13327 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
13328
6060a796 13329Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13330
13331 * lex.c (reinit_parse_for_method, cons_up_default_function):
13332 Don't give warn_if_unknown_interface warning when it came from a
13333 system header file.
d11ad92e
MS
13334 * pt.c (end_template_decl, instantiate_template): Likewise.
13335 * decl.c (start_decl): Likewise.
7177d104 13336
d11ad92e 13337Fri Feb 4 00:41:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13338
13339 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
13340 enums.
13341
13342 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
13343 IS_AGGR_TYPE, since we don't know it's a type.
13344
d11ad92e 13345Thu Feb 3 11:36:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13346
13347 * decl.c (grokdeclarator): Don't complain about anonymous unions.
13348
13349 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
13350 anonymous, but had a name given to it by a typedef.
13351
13352 * decl.c (grokdeclarator): When renaming an anonymous struct, set
13353 TYPE_WAS_ANONYMOUS.
13354
13355 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
13356
13357 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
13358
13359 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
13360 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
13361
13362 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
13363 anonymous structs that get typedef'd.
13364
13365 * decl.c (grokdeclarator): Always return void_type_node for
13366 friends.
13367
13368 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
13369 friends.
13370 (dump_function_decl): Don't print out default args for
13371 a function used in an expression.
13372
13373 * decl.c (grokdeclarator): Give error on abstract declarator used
13374 in an invalid context (i.e. `void (*)();').
13375
13376 * error.c (cp_line_of): Support _TYPE nodes.
d11ad92e 13377 (cp_file_of): Likewise.
7177d104
MS
13378
13379 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
13380 it can happen for the RHS of an assignment stmt where the LHS is
13381 a COND_EXPR.
13382
13383 * init.c (expand_aggr_init_1): Deal with bracketed initializer
13384 lists properly.
13385
13386 * class.c (finish_struct): Deal with enumerators and typedefs
13387 again.
13388
d11ad92e 13389Wed Feb 2 11:30:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13390
13391 * class.c (finish_struct): Tidy up loop over fields.
13392
13393 * errfn.c (cp_thing): Don't advance twice after a format.
13394
13395 * class.c (finish_struct): Complain about needing a constructor
13396 if a member has only non-default constructors, and don't try to
13397 generate a default constructor.
13398
13399 * decl.c (finish_decl): Also do the constructor thing if
13400 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
13401
13402 * search.c (unuse_fields): New function: mark all fields in this
13403 type unused.
13404 (dfs_unuse_fields): Helper function.
13405
13406 * class.c (pushclass): If the new class is the same as the old
13407 class, still unuse the fields.
13408 (unuse_fields): Move to search.c.
13409
13410 * decl.c (grok_op_properties): Add friendp argument.
13411 (grokfndecl): Pass it.
d11ad92e 13412 (start_method): Likewise.
7177d104
MS
13413
13414 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
13415 ::delete calls.
13416
13417 * parse.y (unary_expr): Pass new parameter to delete_sanity.
13418
13419 * lex.c (default_copy_constructor_body): Don't choke if the union
13420 has no fields.
d11ad92e 13421 (default_assign_ref_body): Likewise.
7177d104
MS
13422
13423 * call.c (compute_conversion_costs_ansi): Do the right thing for
13424 ellipsis matches.
13425
13426 * decl.c (push_to_top_level): Optimize.
13427
13428 * decl.c (start_function): Look for the lexical scope of a friend
13429 in DECL_CLASS_CONTEXT.
13430
13431 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
13432
d11ad92e 13433Tue Feb 1 15:59:24 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13434
13435 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
13436
13437 * init.c (init_init_processing): Don't assign BIN/BID to the
13438 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
13439 (build_new): Check TREE_GETS_PLACED_NEW.
13440
13441 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
13442 op new with placement, set TREE_GETS_PLACED_NEW.
13443
13444 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
13445
13446 * class.c (finish_struct): Don't treat anonymous unions like
13447 other aggregate members. Do synthesize methods for unions without
13448 a name, since they may or may not be "anonymous unions".
13449
13450 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
13451 in anonymous unions.
13452
13453 * lex.c (default_copy_constructor_body): Support unions.
d11ad92e 13454 (default_assign_ref_body): Likewise.
7177d104 13455
d11ad92e 13456Mon Jan 31 12:07:30 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13457
13458 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
13459
13460 * error.c (args_as_string): New function (%A), like type_as_string
13461 except NULL_TREE -> "..."
13462
13463 * call.c (build_overload_call_real): Fix for new overloading.
13464
13465 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
13466 here.
13467
13468 * parse.y (operator_name): Instead of here.
13469
13470 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
13471 of functions.
13472
13473 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
13474
13475 * method.c (build_opfncall): Don't need to massage return value
13476 any more, call build_overload_call with all flags.
13477
13478 * typeck.c (build_x_binary_op): Put back speculative call to
13479 build_opfncall.
d11ad92e
MS
13480 (build_x_unary_op): Likewise.
13481 (build_x_conditional_expr): Likewise.
7177d104 13482
6060a796 13483Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13484
13485 * cvt.c (build_type_conversion_1): Change call to pedwarn into
13486 warning, and conditionalize upon warn_cast_qual.
13487
d11ad92e 13488Fri Jan 28 11:48:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13489
13490 * search.c (lookup_field): If xbasetype is a binfo, copy it to
13491 avoid clobbering its inheritance info.
13492
13493 * call.c (build_method_call): Don't overwrite basetype_path with
13494 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
13495
13496 * search.c (compute_access): Fix handling of protected inheritance
13497 and friendship with the enclosing class.
13498
13499 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
13500 initialization of arbitrary variable.
13501
13502 * typeck2.c (build_functional_cast): Only try calling a method if
13503 one exists.
13504
13505 * decl.c (grokdeclarator): Move handling of constructor syntax
13506 initialization into first loop for generality.
13507 (parmlist_is_random): Lose.
13508
13509 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
13510 to default function.
13511
d11ad92e 13512Thu Jan 27 19:26:51 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13513
13514 * decl.c (grokparms): Abort if we get called with something we don't
13515 expect.
13516
6060a796 13517Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13518
13519 * call.c (build_overload_call_real): Change argument complain to
13520 flags to match style of rest of code. Pass it down to
13521 build_function_call_real as necessary.
13522 * call.c (build_overload_call, build_overload_call_maybe): Change
13523 argument complain to flags to match style of rest of code.
13524 * cp-tree.h (build_function_call_real): Added fourth flags
13525 argument.
13526 * cvt.c (convert_to_reference): Only give warning messages, if
13527 LOOKUP_COMPLAIN is set.
13528 * typeck.c (build_x_function_call): Change simple complain
13529 argument to build_overload_call_maybe and build_overload_call, to
13530 LOOKUP_COMPLAIN to match style of rest of code.
d11ad92e 13531 * typeck2.c (build_functional_cast): Likewise.
7177d104
MS
13532 * typeck.c (build_function_call_real): Add flags, so that we can
13533 not complain, if we don't want to complain. Complain about
13534 arguments, if we are complaining, otherwise don't.
13535 * typeck.c (build_function_call, build_function_call_maybe):
13536 Stick in flags argument.
13537 * typeck.c (build_x_binary_op, build_x_unary_op,
13538 build_x_conditional_expr, build_x_compound_expr): Follow style of
13539 build_x_indirect_ref, as it is more correct and more common.
13540
d11ad92e 13541Thu Jan 27 14:36:20 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13542
13543 * call.c (build_method_call): Don't check for being called with
13544 a pointer.
13545
13546 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
13547 static initializer function.
13548
13549 * init.c (build_member_call): Use convert_force here, too.
13550
13551 * search.c (compute_access): Only treat static members specially
13552 if they are referenced directly.
13553
d11ad92e 13554Wed Jan 26 18:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13555
13556 * gxxint.texi (Access Control): New node.
13557
13558 * search.c (current_scope): New function; returns whichever of
13559 current_class_type and current_function_decl is the most nested.
13560 (compute_access): Total overhaul to make it clearer and more
13561 correct. Don't use the cache for now; in the only situation where
13562 it was used before, it gained nothing. This frees up three of the
13563 DECL_LANG_FLAGs for possible other use!
13564
13565 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
13566
13567 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
13568
13569 * call.c (build_method_call): Use convert_force to cast `this' --
13570 rely on the access checking for the method itself.
13571
13572 * init.c (is_friend): Do the nesting thing, handle types. I am
13573 my own friend.
13574 (is_friend_type): Become a shell for is_friend.
13575 (add_friend): Never stick in ctype.
13576 Why are the friendship functions in init.c, anyway?
13577
6060a796 13578Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13579
13580 * cvt.c (build_type_conversion_1): Don't conditionalize call to
13581 pedwarn upon pedantic.
13582
6060a796 13583Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13584
13585 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
13586 gets a warning if one tries to initialize a non-const & from a
13587 non-lvalue.
13588 * cvt.c (convert_to_reference): Use %P format for argument
13589 numbers in warnings.
13590
6060a796 13591Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13592
13593 * init.c (build_delete): Follow style in call.c to construct the
13594 virtual call to the desctructor, as that code is right. Fixes a
13595 problem of the compiler saying a pointer conversion is ambiguous.
13596
d11ad92e 13597Wed Jan 26 11:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13598
13599 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
13600 VTABLE_NAME_FORMAT to VTABLE_NAME.
13601
13602 * *: s/visibility/access/g
13603
d11ad92e 13604Tue Jan 25 18:39:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13605
13606 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
13607
6060a796 13608Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13609
13610 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
13611 they break libg++.
13612
d11ad92e 13613Tue Jan 25 13:11:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13614
13615 * decl.c (duplicate_decls): Fix pointer arithmetic.
13616
d11ad92e 13617Mon Jan 24 15:50:06 1994 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13618
13619 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
13620 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
13621 clauses on a declaration.
13622
d11ad92e 13623Mon Jan 24 17:06:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13624
13625 * class.c (finish_struct): Do synthesize methods for anon
13626 structs, just not unions.
13627
d11ad92e 13628Mon Jan 24 13:50:13 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13629
13630 * decl.c (xref_tag): handle anonymous nested type.
13631 * decl.c (globalize_nested_type): add no globalize bit check.
13632 * spew.c (hack_more_ids) : templated nested decl not push top
13633 level.
13634
13635 * parse.y : get rid of 'goto do_components'. It is much better
13636 for debugging.
13637
13638 * decl.c (is_anon_name): get rid of the function and use the
13639 macro ANON_AGGRNAME_P.
13640 * pt.c : ditto.
13641
d11ad92e 13642Fri Jan 21 14:06:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13643
13644 * class.c (finish_struct): Don't synthesize any methods for
13645 anonymous structs/unions.
13646
13647 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
13648
d11ad92e 13649Thu Jan 20 18:56:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13650
13651 * method.c (build_opfncall): Call build_indirect_ref on
13652 synthesized instance for operator delete.
13653
13654 * pt.c (type_unification): Don't abort if called with a list of
13655 types in ARGS.
13656
13657 * class.c (instantiate_type): Deal with function templates.
13658
d11ad92e 13659Thu Jan 20 16:55:35 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
13660
13661 * Makefile.in (CC): Default to cc not gcc.
13662
d11ad92e 13663Thu Jan 20 13:47:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13664
13665 * typeck.c (build_modify_expr): Call constructor if appropriate.
13666
13667 * decl.c (push_to_top_level): Clear out class-level bindings cache.
13668
d11ad92e 13669Wed Jan 19 13:51:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13670
13671 * call.c (resolve_scope_to_name): Work recursively (previously only
13672 looked down one level).
13673
13674 * lex.c (do_pending_inlines): If we're still dealing with the last
13675 batch of inlines, don't start working on a new one.
13676
13677 * Makefile.in (stamp-parse): Update conflict count.
13678 (TAGS): Fix.
13679
13680 * parse.y (explicit_instantiation): New rule; implements
13681 'template A<int>' syntax (though not 'template foo(int)' yet).
13682 (structsp): Add explicit_instantiation.
13683
d11ad92e 13684Tue Jan 18 13:53:05 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13685
13686 * class.c (finish_struct, etc.): Simplify decision to synthesize
13687 a destructor.
13688
13689 * call.c, class.c, cp-tree.h, decl.c, init.c,
13690 ptree.c, search.c, typeck.c, typeck2.c: Nuke
13691 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
13692 * init.c (expand_aggr_init_1): Don't try non-constructor methods
13693 of initializing objects.
13694 (build_new): Don't try other methods if the constructor lookup fails.
13695
13696 * class.c (finish_base_struct): Set cant_have_default_ctor and
13697 cant_synth_copy_ctor properly.
d11ad92e 13698 (finish_struct): Likewise.
7177d104 13699
d11ad92e 13700Mon Jan 17 13:58:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13701
13702 * typeck.c (build_modify_expr_1): #if 0 out again.
13703 (build_modify_expr): #if 0 out memberwise init code again.
13704
13705 * lex.c (default_copy_constructor_body): Be const-correct.
d11ad92e 13706 (default_assign_ref_body): Likewise.
7177d104
MS
13707
13708 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
13709 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
13710 (expand_aggr_init): Disable silent conversion from initializer list
13711 to list of args for a constructor.
13712
13713 * class.c (base_info): Lose needs_default_ctor.
d11ad92e
MS
13714 (finish_base_struct): Likewise.
13715 (finish_struct): Likewise.
7177d104
MS
13716
13717 * decl.c (init_decl_processing): Don't turn off flag_default_inline
13718 just because flag_no_inline is on.
13719 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
13720 constructor.
13721
13722 * class.c (finish_struct): Synthesize default ctor whenever
13723 allowed.
13724
13725 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
13726
6060a796 13727Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13728
13729 * Makefile.in, configure: Handle the C++ front-end in a
13730 subdirectory.
13731 * cp-*: Move C++ front-end to cp/*.
13732
d11ad92e 13733Fri Jan 14 14:09:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13734
13735 * cp-typeck.c (build_function_call_real): Modify to match other
13736 instances of taking the address of the function.
13737
13738 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
13739 there are non-synthesized constructors.
13740 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
13741 Always generate copy constructor if possible.
13742
13743 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
13744 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
13745
13746 * cp-lex.c (default_copy_constructor_body): Use init syntax
13747 for all bases.
13748
13749 * cp-type2.c (store_init_value): Only give error for initializer list
13750 if TYPE_HAS_REAL_CONSTRUCTOR.
13751
d11ad92e 13752Thu Jan 13 15:38:29 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13753
13754 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
13755 (lang_decl): Add synthesized bitfield to decl_flags.
13756
13757 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
13758 artificial methods, rather than a line # of 0.
13759
d11ad92e 13760Fri Jan 14 18:25:29 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13761
13762 * cp-decl (xref_tag): fix a bug in conflict type.
13763 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
13764 type reference.
13765 * cp-spew.c (yylex) : generated SCOPED_NAME token.
13766 * cp-lex.c (yyprint): handle SCOPED_NAME.
13767
6060a796 13768Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13769
13770 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
13771 not right.
13772
d11ad92e 13773Thu Jan 13 14:00:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13774
13775 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
13776 have type_flags.
13777
6060a796 13778Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13779
13780 Ensure that all vtable pointers are initialized with all the right
13781 values.
13782
13783 * cp-class.c (is_normal): Changed to reflect new meaning of
13784 CLASSTYPE_VFIELD_PARENT.
13785 * cp-class.c (maybe_fixup_vptrs): Use of
13786 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
13787 BINFO_MODIFIED instead.
13788 * cp-class.c (finish_struct): Changed to reflect new meaning of
13789 CLASSTYPE_VFIELD_PARENT.
13790 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
13791 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
13792 coding it here.
13793 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
13794 re-implement.
13795 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
13796 * cp-tree.h (vfield_parent): Changed to integer.
13797 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
13798 meaning.
13799 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
13800
d11ad92e 13801Wed Jan 12 18:24:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13802
13803 * cp-decl.c (xref_tag): re-implement globalize nested type.
13804 * cp-decl2.c (grok_x_components): ditto.
13805 * cp-parse.y: ditto.
13806 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
13807
d11ad92e 13808Wed Jan 12 14:08:09 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13809
13810 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
13811 decls with a definition attached.
13812
13813 * cp-typeck.c (build_modify_expr): Undo previous change in the case
13814 of INIT_EXPRs.
13815
d11ad92e 13816Tue Jan 11 19:33:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13817
13818 * cp-typeck.c (build_modify_expr): Replace code for generating
13819 assignment semantics for classes with an error.
13820 (build_modify_expr_1): #if 0 out.
13821
13822 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
13823 behavior for overloaded functions (it doesn't push anything).
13824
13825 * cp-class.c (finish_struct): When generating default op=,
13826 set TYPE_HAS_ASSIGNMENT.
13827
6060a796 13828Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13829
13830 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
13831 invalid.
13832 * cp-typeck.c (convert_for_assignment): Simplify.
13833 * cp-decl2.c (warn_enum_clash): Removed.
13834 * invoke.texi (-Wenum-clash): Removed.
13835 * toplev.c (-Wenum-clash): Removed.
13836
d11ad92e 13837Mon Jan 10 17:48:37 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13838
13839 * cp-decl.c (finish_decl): fix incorrect popclass call.
13840
13841 * cp-decl.c (is_anon_name): new function, check whether the name
13842 is anonymous name generated by compiler.
13843 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
13844 * cp-spew.c (hack_more_ids): handle nested type in template.
13845 * cp-parse.y : handle nested type reference in uninstantiated
13846 template.
13847 * cp-call.c (build_method_call): handle uninstantiated template
13848 case.
13849 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
13850 type in template.
13851 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
13852 type by name.
13853 * cp-pt.c (tsubst): handle nested type search by name.
13854
d11ad92e 13855Mon Jan 10 14:32:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13856
13857 * cp-init.c (build_member_call): Propagate qualifiers to new type.
13858
13859 * cp-call.c (build_method_call): Count functions the new way.
13860
d11ad92e 13861Fri Jan 7 19:03:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13862
13863 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
13864 too.
13865
d11ad92e 13866Tue Jan 4 16:45:51 1994 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13867
13868 * cp-parse.y: change to handle whether to globalize nested class.
d11ad92e 13869 * cp-decl.c(xref_tag, maybe_globalize_type): Likewise.
7177d104 13870
d11ad92e 13871Mon Jan 3 22:22:32 1994 Gerald Baumgartner <gb@cygnus.com>
7177d104
MS
13872
13873 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
13874 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
13875 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
13876 gplus.gperf toplev.c: Incorporated C++ signature extension.
13877 * cp-sig.c: New file, contains most of signature processing.
13878 * cp-hash.h: Regenerated from gplus.gperf.
13879
13880 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
13881 and `-fno-handle-signatures' command line flags.
13882
13883 * gcc.texi: Changed the last-modification date.
13884 * invoke.texi: Added `-fhandle-signatures' in the list of
13885 C++ language options. Added explanation for this option.
13886
6060a796 13887Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13888
13889 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
13890 harsh here.
13891
6060a796 13892Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13893
13894 * cp-pt.c (do_pending_expansions): Decide to expand a template
13895 member function, based upon it's class type, not the class type of
13896 the first place it was declared.
13897
6060a796 13898Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13899
13900 * cp-class.c (is_normal): New routine, use to determine when the
13901 given binfo is the normal one. (The one that should have the simple
13902 vtable name.)
13903 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
13904 to check if two fndecls are `the same'. Sometimes this routine can
13905 modify the main vtable, and normal should be 1, in that case, so use
13906 is_normal() to determine if this is the main vtable for the class.
13907 Don't recurse down virtual bases, as they are shared, and we take
13908 care of them elsewhere.
13909 * cp-class.c (modify_vtable_entries): If we have already updated the
13910 vtable with the new virtual, don't do it again.
13911 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
13912 appropriate. Do virtual function overriding in virtual bases, after
13913 normal overriding, so that the base function list in DECL_VINDEX is
13914 not overridden, before we have a chance to run through the list.
13915 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
13916 Make sure we pass the right address into modify_vtable_entries.
13917 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
13918 binfo is the one that has the vtable that we based our vtable on.
13919
d11ad92e 13920Fri Dec 24 09:40:52 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
13921
13922 * cp-typeck.c (c_expand_start_case): Use default_conversion to
13923 convert expression from reference type if necessary.
13924
d11ad92e 13925Wed Dec 22 17:58:43 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13926
13927 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
13928 trying to read its TREE_VALUE.
13929
13930 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
13931 (finish_struct): Instead of here.
13932
d11ad92e 13933Tue Dec 21 14:34:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13934
13935 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
13936 have TYPE_PTRMEMFUNC_P set before we try to build its
13937 CLASSTYPE_ID_AS_LIST.
13938 (get_decl_list): Likewise, when trying to read it.
13939
13940 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
13941 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
13942
d11ad92e 13943Mon Dec 20 13:35:03 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13944
13945 * cp-typeck.c (rationalize_conditional_expr): New function.
13946 (unary_complex_lvalue): Use it.
13947 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
13948 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
13949 SAVE_EXPR either.
13950
13951 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
13952 (lang_decode_option): Set warn_return_type, not explicit_*, for
13953 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
13954 decide if it should go into jump_optimize or not.
13955 * cp-tree.h (explicit_warn_return_type): Deleted.
13956 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
13957 (finish_function): Also complain about no return in a non-void fn if
13958 we're being pedantic (don't rely on use of -Wreturn-type).
13959
d11ad92e 13960Fri Dec 17 15:45:46 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13961
13962 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
13963 static if it's being done inside another function.
13964
13965 * cp-search.c (compute_visibility): Check for friendship both ways.
13966
d11ad92e 13967Fri Dec 17 14:28:25 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13968
13969 * cp-cvt.c (build_default_binary_type_conversion): Make error
13970 messages more helpful.
13971
13972 * cp-error.c (op_as_string): New function, returns "operator =="
13973 given EQ_EXPR or suchlike.
13974
d11ad92e 13975Fri Dec 17 13:28:11 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13976
13977 * cp-call.c (print_n_candidates): New function.
13978 (build_overload_call_real): Use it when we complain about a call
13979 being ambiguous.
13980
d11ad92e 13981Fri Dec 17 12:41:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13982
13983 * cp-call.c (build_method_call): Fix checking for static call
13984 context.
13985
13986 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
13987 to operator new.
13988
13989 * cp-init.c (build_new): Don't mess with rval when building
13990 indirect ref.
13991
d11ad92e 13992Thu Dec 16 16:48:05 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13993
13994 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
13995 NAME(type) may not be exist. It's not a problem for old compiler.
13996
d11ad92e 13997Thu Dec 16 14:46:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13998
13999 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
14000 never used for anything.
14001 (struct lang_type, member type_flags): Delete field
14002 `alters_visibility', and up `dummy' by 1.
14003 * cp-class.c (finish_base_struct): Delete code that copies the
14004 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
14005 (finish_struct): Delete code that sets it.
14006
d11ad92e 14007Thu Dec 16 14:44:39 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14008
14009 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
14010 build_method_call that I messed up before.
14011
14012 * cp-search.c (get_base_distance): If protect > 1, allow immediate
14013 private base.
14014
14015 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
d11ad92e 14016 (finish_struct): Likewise. Well, nigh-correctly; it won't deal
7177d104
MS
14017 properly with the case where a class contains an object of an
14018 ambiguous base class which has a protected op=. Should be fixed
14019 when the access control code gets overhauled.
14020 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
14021
d11ad92e 14022Thu Dec 16 12:17:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14023
14024 * cp-lex.c (real_yylex): Turn the code back on that deals with
14025 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
14026 avoid the ambiguity problems that led to it being turned off in the
14027 first place.
14028
14029 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
14030 to see if something is a method.
14031
6060a796 14032Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14033
14034 * cp-typeck.c (build_modify_expr): Avoid error messages on small
14035 enum bit fields.
14036 * cp-typeck.c (convert_for_assignment): Add missing argument to
14037 cp_warning and cp_pedwarn calls.
14038
d11ad92e 14039Wed Dec 15 18:25:32 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14040
14041 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
14042 initializers; it's just anachronistic.
14043
14044 * cp-decl.c (finish_decl): Don't require external-linkage arrays
14045 to have a complete type at declaration time when pedantic.
14046
d11ad92e 14047Tue Dec 14 11:37:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14048
14049 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
14050
14051 * cp-call.c (build_method_call): Don't dereference pointer given
14052 as instance.
14053
14054 * cp-decl.c (finish_function): Don't pass pointer to
14055 build_method_call.
d11ad92e 14056 (finish_function): Likewise.
7177d104 14057
d11ad92e 14058 * cp-typeck.c (build_x_function_call): Likewise.
7177d104 14059
d11ad92e 14060 * cp-method.c (build_component_type_expr): Likewise.
7177d104 14061
d11ad92e
MS
14062 * cp-init.c (build_member_call): Likewise.
14063 (build_new): Likewise.
7177d104 14064
d11ad92e 14065Mon Dec 13 18:04:33 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14066
14067 * cp-decl.c (xref_tag): fix regression created by changes made
14068 in Dec. 7 1993.
14069 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
14070
d11ad92e 14071Fri Dec 10 12:40:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14072
14073 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
14074 out the final evaluation of the function, so we can see if ELLIPSIS,
14075 USER, and EVIL were set at the end.
14076
14077 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
14078 only go for setting TRIVIAL_CODE if we are dealing with types that
14079 are compatible.
14080
6060a796 14081Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14082
14083 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
d11ad92e
MS
14084 * toplev.c (lang_options): Likewise.
14085 * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise.
7177d104 14086 * cp-decl.c (delta_type_node): New type for delta entries.
d11ad92e 14087 * cp-tree.h (delta_type_node): Likewise.
7177d104
MS
14088 * cp-decl.c (init_decl_processing): Setup delta_type_node.
14089 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
14090 delta_type_node instead of short_integer_type_node.
d11ad92e 14091 * cp-class.c (build_vtable_entry): Likewise.
7177d104 14092
d11ad92e 14093Thu Dec 9 16:19:05 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14094
14095 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
14096 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
14097 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
14098
6060a796 14099Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14100
14101 * cp-decl.c (finish_decl): Make sure things that can go into
14102 "common", do go into common, if -fcommon is given.
14103
d11ad92e 14104Wed Dec 8 13:01:54 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104 14105
63718c49
GB
14106 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
14107 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
14108 argument matching diagnostics to make instantly clear what the
14109 compiler is doing.
7177d104
MS
14110
14111 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
14112 then check to see if the penalty was increased due to
14113 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
14114
d11ad92e 14115Tue Dec 7 18:29:14 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14116
14117 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
14118 problem.
14119
d11ad92e 14120Tue Dec 7 16:09:34 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14121
14122 * cp-class.c (finish_struct): Before synthesizing methods, if no
14123 methods have yet been declared then set nonprivate_method. Don't
14124 set non_private method after synthesizing a method.
14125
14126 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
14127 is set, tie emitted code to the location of template instantiation,
14128 rather than definition.
14129
14130 * cp-tree.h: Declare flag_alt_external_templates.
14131
14132 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
14133
d11ad92e 14134 * toplev.c (lang_options): Likewise.
7177d104 14135
d11ad92e 14136Mon Oct 4 12:50:02 1993 Chip Salzenberg <chip@fin.uucp>
7177d104 14137
63718c49
GB
14138 [changes propagated from 930810 snapshot]
14139 * cp-decl.c (init_decl_processing): Make long long available for use
14140 as SIZE_TYPE and PTRDIFF_TYPE.
14141 (finish_decl): Allow file-scope static incomplete array.
14142 (grokdeclarator): Don't pass on const and volatile fron function
14143 value type to function type.
14144 Warn here for volatile fn returning non-void type.
14145 * cp-parse.y (attrib): Accept attributes `volatile' with alias
14146 `noreturn', and `const'.
14147 * cp-typeck.c (default_conversion): Don't lose const and volatile.
14148 (build_binary_op_nodefault): Generate pedantic warning for comparison
14149 of complete pointer type with incomplete pointer type.
14150 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104 14151
d11ad92e 14152Tue Dec 7 10:46:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14153
14154 * cp-init.c (expand_vec_init): When creating a temporary for copying
14155 arrays, use the type of the source, not the target.
14156
14157 * cp-cvt.c (convert): Pass an argument for errtype to
14158 convert_to_reference.
14159
14160 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
14161 methods, -> and `this'.
14162
d11ad92e 14163Mon Dec 6 17:12:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14164
14165 * cp-error.c (parm_as_string): New function; returns `this' or arg
14166 number. Corresponds to %P.
14167 (dump_expr): Deal with method calls.
14168
14169 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
d11ad92e 14170 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104
MS
14171 (warn_for_assignment): Lose.
14172
d11ad92e 14173Mon Dec 6 11:33:35 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14174
14175 * cp-call.c (ideal_candidate_ansi): Delete code that was never
14176 doing anything useful. Instead, sort once, and DO NOT wipe
14177 out any codes with EVIL_CODE, since that's what we use as a
14178 marker for the end of the list of candidates.
14179
14180 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
14181
d11ad92e 14182Mon Dec 6 12:49:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14183
14184 * cp-init.c (get_aggr_from_typedef): New function, like
14185 is_aggr_typedef but returns the _TYPE.
14186
14187 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
14188
d11ad92e 14189Sun Dec 5 18:12:48 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14190
14191 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
14192
d11ad92e 14193Thu Nov 25 23:50:19 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14194
14195 Delay language context change until beginning of next decl.
14196
14197 * cp-lex.h (c_header_level): Removed.
14198 (pending_lang_change): Declared.
14199 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
14200 (pending_lang_change): Defined.
14201 (check_newline): Rework code that recognizes line number and
14202 filename changes. Instead of pushing and popping lang context,
14203 increment and decrement pending_lang_change.
14204 (do_pending_lang_change): Push and pop lang context according
14205 to value of pending_lang_change.
14206 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
14207 (extdef): Same as extdef, but call do_pending_lang_change() first.
14208
d11ad92e 14209Mon Nov 15 15:39:15 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14210
14211 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
14212 compare of ptr with 0 only if pedantic in both cases.
14213
d11ad92e 14214Thu Nov 25 13:31:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14215
14216 Reinstate the below patch, which got lost in the Cygnus merge:
14217 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
14218 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
14219
d11ad92e 14220Wed Nov 17 19:03:30 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14221
14222 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
14223
d11ad92e 14224Fri Oct 22 20:43:37 1993 Paul Eggert <eggert@twinsun.com>
7177d104
MS
14225
14226 * cp-lex.c (real_yylex): Diagnose floating point constants
14227 that are too large.
14228
d11ad92e 14229Wed Nov 17 19:10:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14230
14231 * cp-type2.c (build_functional_cast): ARM page 16: When a class
14232 and an object, function or enumerator are declared in the same
14233 scope with the same name, the class name is hidden.
14234
d11ad92e 14235Wed Nov 17 19:07:18 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14236
14237 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
14238 and long double from each other when overloading.
14239 (compute_conversion_costs_{ansi,old}, build_method_call,
14240 build_overlay_call_real, convert_to_aggr): Always set and
14241 always use H_LEN member of candidate structure.
14242
d11ad92e 14243Mon Oct 11 23:10:53 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14244
14245 * cp-decl.c (duplicate_decls): Note redeclarations of library
14246 functions, and generate distinct warnings for them.
14247
d11ad92e 14248Mon Oct 4 12:26:49 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14249
14250 Support format warnings in G++.
14251
14252 * cp-tree.h: Protect against multiple inclusion.
14253 Declare all public functions in c-common.c (copy from c-tree.h).
14254 (STDIO_PROTO): Define.
14255 (warn_format): Declare.
14256 (record_format_info): Remove declaration.
14257 * cp-decl.c (init_decl_processing): Call init_function_format_info.
14258 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
14259 * cp-typeck.c (build_function_call_real): Call check_function_format.
14260 (record_format_info): Remove -- obsolete stub.
14261
d11ad92e 14262Sat Jul 24 12:04:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14263
14264 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
14265 following an extern one (for -Wredundant-decls).
14266 * cp-parse.y (primary): In statement expression case, if compstmt
14267 returns something other than a BLOCK, return it unchanged.
14268
d11ad92e 14269Thu Dec 2 20:44:58 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14270
14271 * cp-decl.c (warn_extern_redeclared_static): New function made
14272 from code extracted from pushdecl.
14273 (duplicate_decls, pushdecl): Call new function.
14274 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
14275 to be a TREE_LIST when function is declared in 'extern "C" {}'.
14276
d11ad92e 14277Fri Dec 3 16:01:10 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14278
14279 * cp-class.c (duplicate_tag_error): Use cp_error.
14280 (finish_base_struct): Check for ambiguity with direct base, and don't
14281 generate op= or copy ctor if it exists.
14282
d11ad92e 14283Fri Dec 3 15:32:34 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14284
14285 * cp-init.c (expand_member_init): when initializer name is null,
14286 don't try to build it now because emit_base_init will handle it.
14287
d11ad92e 14288Fri Dec 3 12:28:59 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14289
14290 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
14291 code such as ExceptionHandler::operator=.
14292
d11ad92e 14293Fri Dec 3 10:32:08 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14294
14295 * cp-decl.c (grokdeclarator): Don't try to print out dname when
14296 complaining about arrays of references if decl_context==TYPENAME,
14297 since it will be null.
14298
14299 * cp-decl2.c: Default to flag_ansi_overloading.
14300
d11ad92e 14301Thu Dec 2 18:05:56 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14302
14303 * cp-call.c (build_method_call): use binfo from instance if it's
14304 different from binfo (basetype_path) passed from above.
14305
d11ad92e 14306Wed Nov 17 19:14:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14307
14308 cp-error.c (dump_expr): Use unsigned chars to output a
14309 TREE_REAL_CST in hex.
14310
d11ad92e 14311Thu Dec 2 11:05:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14312
14313 * cp-class.c (finish_struct): Fix typo in setting
14314 cant_synth_asn_ref.
14315
14316 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
14317 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
14318
14319 * cp-lex.c (default_copy_constructor_body): Change
14320 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
d11ad92e 14321 (default_assign_ref_body): Likewise.
7177d104
MS
14322 (default_copy_constructor_body): Call operator= explicitly for
14323 base classes that have no constructor.
14324
d11ad92e 14325Thu Dec 2 10:47:15 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
14326
14327 * cp-call.c (build_method_call): If the instance variable is
14328 converted to error_mark_node when we're trying to convert it to the
14329 base type of a method we're looking up, return error_mark_node.
14330
d11ad92e 14331Thu Dec 2 10:41:16 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14332
14333 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
14334 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
14335
d11ad92e 14336Wed Dec 1 13:33:34 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14337
14338 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
14339 harshness_code, not the size of short, for clearing out the
14340 ansi_harshness.
14341
14342 * cp-call.c (print_candidates): New function.
14343 (build_method_call): When we had some candidates, but didn't get a
14344 usable match, don't report that we got an error with the first
14345 candidate. Instead, say there were no matches, and list the
14346 candidates with print_candidates. In the second pass, make sure we
14347 clear out ever_seen, so we can accurately count the number of
14348 functions that qualified.
14349
d11ad92e 14350Wed Dec 1 09:53:59 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14351
14352 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
14353 only if op1 is known to be != -1.
14354 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
14355
d11ad92e 14356Tue Nov 30 14:07:26 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14357
14358 * cp-method.c (hack_identifier): If the field itself is private, and
14359 not from a private base class, say so.
14360
d11ad92e 14361Mon Nov 29 03:00:56 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14362
14363 * cp-decl.c (grokdeclarator): Always warn on initialization of
14364 const member.
14365
d11ad92e 14366Wed Nov 24 00:49:35 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14367
14368 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
14369 (finish_base_struct): Set cant_synth_asn_ref properly.
14370
14371 * cp-lex.c (cons_up_default_function): Add section for operator=.
14372 (default_assign_ref_body): New function, mostly cribbed from
14373 default_copy_constructor_body.
14374
14375 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
14376 cant_synth_asn_ref, no_const_asn_ref.
14377 (finish_base_struct): Update no_const_asn_ref, note that you should
14378 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
14379 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
14380 initialize them properly. Set no_const_asn_ref properly. Set
14381 cant_synth_* in some of the situations where they should be set.
14382 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
14383 to cons_up_default_function for operator=.
14384
6060a796 14385Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14386
14387 * cp-cvt.c (convert_force): Add code to perform casting of pointer
14388 to member function types.
14389 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
14390 when the conversion should be done, regardless.
d11ad92e
MS
14391 * cp-tree.h (build_ptrmemfunc): Likewise.
14392 * cp-type2.c (digest_init): Likewise.
14393 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104 14394
d11ad92e 14395Tue Nov 23 18:06:58 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14396
14397 * cp-error.c (dump_expr): Do the right thing for variables of
14398 reference type.
14399
14400 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
14401 and its kin properly.
14402 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
14403
6060a796 14404Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14405
14406 * cp-method.c (build_opfncall): Don't count pointer to member
14407 functions as aggregates here, as we don't want to look up methods in
14408 them. The compiler would core dump if we did, as they don't have
14409 normal names.
14410 * cp-typeck.c (build_indirect_ref): Improve wording on error
14411 message.
14412
d11ad92e 14413Mon Nov 22 14:22:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14414
14415 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
14416 (since it's supported in other compiler bits).
14417
14418 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
14419 argument.
14420
14421 * cp-error.c (dump_function_decl): Don't print return type for
14422 constructors and destructors.
14423
14424 * cp-cvt.c (cp_convert_to_pointer): Import code from
14425 convert_to_pointer so we can return error_mark_node in the case of an
14426 error, and to allow more meaningful error messages.
14427 (build_type_conversion): Don't go through void* when trying
14428 to convert to a pointer type.
14429
14430 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
14431 after grokclassfn so that it's dealing with the right decl.
63718c49 14432 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
14433
14434 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
14435 no uses of it in the compiler).
14436
14437 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
14438 types.
d11ad92e 14439 (build_method_call): Likewise.
7177d104 14440
d11ad92e 14441Fri Nov 19 12:59:38 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14442
14443 * cp-tree.c (count_functions): Abstraction function.
14444
14445 * cp-call.c (build_overload_call_real): Deal with new overloading
14446 properly, remove dead code.
14447
14448 * gcc.c (default_compilers): Generate and use .ii files in the
14449 intermediate stage of compiling C++ source.
14450
d11ad92e 14451Fri Nov 19 11:26:09 1993 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
14452
14453 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
14454 address before using it, so it can be later safely compared.
14455
d11ad92e 14456Fri Nov 12 15:30:27 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14457
14458 * cp-pt.c (tsubst): Deal with new overloading.
14459
14460 * cp-typeck.c (fntype_p): is the arg function type?
14461 (comp_target_parms): pedwarn on conversion from (anything) to (...).
14462 (build_x_function_call): Deal with new overloading.
14463
14464 * cp-tree.c (decl_list_length): Deal with new overloading.
14465 (decl_value_member): Like value_member, but for DECL_CHAINs.
14466
14467 * cp-decl.c (duplicate_decls): Deal with new overloading.
d11ad92e 14468 (start_decl): Likewise.
7177d104
MS
14469
14470 * cp-class.c (instantiate_type): Deal with new overloading.
14471
14472 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
14473 (convert_harshness_old): Deal with new overloading.
d11ad92e 14474 (build_overload_call_real): Likewise.
7177d104 14475
d11ad92e 14476Mon Nov 8 13:50:49 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14477
14478 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
14479 if unambiguous, NULL_TREE otherwise.
14480 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
14481 (is_overloaded_fn): Returns whether or not the passed tree is
14482 a function or list of functions.
14483
14484 * cp-init.c (init_init_processing): use `get_first_fn' to find
14485 the FUNCTION_DEFN for new and delete.
14486
14487 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
14488 code size in half (I spit on special cases).
14489
d11ad92e 14490Tue Sep 7 20:03:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14491
14492 * cp-decl.c: Allow references and template type parameters as well
This page took 1.781928 seconds and 5 git commands to generate.