]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Set length of V.4 pic initialization
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
1bf2b2d2
BK
1Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2
3 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
4 arguments we compare against. Start the count of I at 1, not 0,
5 since argv[0] is still the command.
6
d2e5ee5c
MS
7Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8
9 * cp-tree.h (ptr_reasonably_similar): Add decl.
10
11Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12
13 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14 pointer. New local SPECBITS with the parm's value.
15 (grokdeclarator): Pass &specbits down.
16
17 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
19
20 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
21 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
22
23 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
24 not an error_mark_node.
25
26Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
27
28 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
29 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
30
31Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
32
33 * decl.c (grokdeclarator): When giving an anonymous struct a name,
34 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
35 not affected).
36
37 * typeck2.c (build_m_component_ref): If component is a pointer
38 to data member, resolve the OFFSET_REF now.
39
40 * call.c (convert_like): Don't go into infinite recursion.
41
42 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
43
44 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
45 * tree.c (layout_basetypes): And on the vbase ptr.
46
47Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
48
49 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
50 CHAR_TYPE_SIZE so bool is always the same size as another type.
51
52 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
53
54Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
55
56 * decl2.c (grok_x_components): Remove synthesized methods from
57 TYPE_METHODS of an anonymous union, complain about member
58 functions.
59 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
60 anonymous unions.
61 (finish_function): Just clear the DECL_RTL of our arguments.
62
63Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
64
65 * decl2.c (finish_file): Emit DWARF debugging info for static data
66 members.
67
68 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
69
70Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
71
72 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
73 IDENTIFIER_NODE.
74
75Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
76
77 * Make-lang.in (g++-cross$(exeext)): Fix typo.
78
79Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
80
81 Make the g++ driver now be a standalone program, rather than one
82 that tries to run the gcc driver after munging up the options.
83 * Make-lang.in (g++.c, g++spec.o): New rules.
84 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
85 added.
86 (g++$(exeext)): New rule, based on xgcc rule.
87 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
88 * g++spec.c: New file.
89 * g++.c: Removed file.
90
91Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
92
93 * cvt.c (build_up_reference): Arrange for any temporary values
94 that have been keep in registers until now to be put into memory.
95
faf5394a 96Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9a3b49ac 97
faf5394a
MS
98 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
99 that make -j3 bootstrap works better.
9a3b49ac 100
faf5394a
MS
101Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
102
103 * decl.c (pushtag): Do pushdecl for anon tags.
104
105Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
106
107 * typeck.c (c_expand_return): Fix logic.
108 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
109
faf5394a
MS
110Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
111
112 * g++.c (main): Make sure arglist has a final NULL entry. Add
113 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
114 stdin/stdout of the invoked program are redirected to
115 nowheresville.
116
117Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
118
119 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
120
121Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
122
123 * init.c (resolve_offset_ref): Handle obj.vfn better.
124 * typeck.c (build_component_ref): Set TREE_TYPE on result from
125 build_vfn_ref.
126
127Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
128
129 * typeck.c (convert_for_assignment): Also handle anachronistic
130 implicit conversions from (::*)() to cv void*.
131 * cvt.c (cp_convert_to_pointer): Likewise.
132
133Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
134
135 * lex.c (handle_cp_pragma): Fix bogus warning.
136
137Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
138
139 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
140 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
141
142Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
143
144 * class.c (finish_struct_1): Support DWARF2_DEBUG.
145 * search.c (dfs_debug_mark): Likewise.
146 * decl2.c (finish_vtable_vardecl): Likewise.
147 * decl.c (pushtag, finish_enum): Likewise.
148 * lex.c (check_newline): Use debug_* instead of calling *out
149 functions directly.
150
151Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
152
153 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
154 on some picky hosts.
155
156Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
157
158 * class.c (finish_struct_1): A class has a non-trivial copy
159 constructor if it has virtual functions.
160
161 * cvt.c (cp_convert): Always call a constructor.
162
163 * call.c (reference_binding): Still tack on a REF_BIND
164 for bad conversions.
165 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
166
167 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
168 (c_expand_return): Likewise.
169 * typeck2.c (digest_init): Likewise for { }.
170 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
171 * cvt.c (cp_convert): Handle failure better.
172
173Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
174
175 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
176 of GCC be path-relative.
177
178Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
179
180 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
181 it does need choose-temp.o and pexecute.o.
182
183Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
184
185 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
186 that we still use it.
187 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
188
189Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
190
191 * init.c (expand_default_init): Avoid calling constructors to
192 initialize reference temps.
193
194 * cvt.c (convert_to_reference): Fix.
195
196Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
197
198 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
199 (convert_to_reference): Likewise.
200 * typeck.c (convert_for_initialization): Likewise.
201 * init.c (expand_default_init): Likewise.
202 (expand_aggr_init_1): Likewise.
203 * cp-tree.h (CONV_NONCONVERTING): Lose.
204 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
205 * *.c: Adjust.
206 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
207
208Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
209
210 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
211
212Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
213
214 * init.c (expand_aggr_init_1): Don't crash on non-constructor
215 TARGET_EXPR.
216
217Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
218
219 * g++.c: Include gansidecl.h.
220 (VPROTO, PVPROTO, VA_START): Delete.
221 (choose_temp_base_try, choose_temp_base, perror_exec,
222 run_dos) [__MSDOS__]: Delete fns.
223 (pfatal_with_name): Delete fn.
224 (temp_filename): Declare like in gcc.c.
225 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
226 (error_count, signal_count): Define.
227 (error): Delete both definitions.
228 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
229 (pfatal_pexecute): Add fn from gcc.c.
230 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
231 code to use the pexecute stuff also used by gcc.c.
232 (MIN_FATAL_STATUS): Define.
233 * Make-lang.in (g++): Add dependency on and linking with
234 choose-temp.o and pexecute.o.
235
236 * cp-tree.h: Include gansidecl.h.
237 (STDIO_PROTO): Delete #undef/#define.
238 * cvt.c (NULL): Delete #undef/#define.
239 * expr.c (NULL): Likewise.
240 * init.c (NULL): Likewise.
241 * rtti.c (NULL): Likewise.
242 * xref.c (NULL): Likewise.
243
244 * cp-tree.h (build_user_type_conversion): Add prototype.
245 * call.c (build_user_type_conversion): Delete prototype. Correct
246 decl of FLAGS arg to be an int.
247 * cvt.c (build_user_type_conversion): Likewise.
248
249Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
250
251 * cp-tree.def: Add TRY_BLOCK and HANDLER.
252 * except.c (expand_start_catch_block): Support templates.
253 * parse.y (try_block, handler_seq): Likewise.
254 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9a3b49ac
MS
255
256Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
257
258 * pt.c (current_template_args): New fn.
259 (push_template_decl): Use it.
260 * decl.c (grokdeclarator): Use it.
261
262 * decl2.c (build_expr_from_tree): Dereference ref vars.
263
264 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
265 the decl-specifier-seq.
266
267 * decl.c (grok_op_properties): Don't force the type of a conversion
268 op to be complete. Don't warn about converting to the same type
269 for template instantiations.
270
271 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
272 methods.
273
274Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
275
276 * typeck.c (get_delta_difference): Remove previous bogusness.
277 Don't give errors if force is set.
278
279Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
280
281 * decl2.c (finish_file): Don't emit debug info.
d2e5ee5c 282 * decl.c (pushdecl): Lose obsolete code.
9a3b49ac 283 (grokdeclarator): Still do the long long thing after complaining.
d2e5ee5c
MS
284 * search.c (note_debug_info_needed): Don't do anything if we're in a
285 template.
9a3b49ac
MS
286 * method.c (synthesize_method): For non-local classes,
287 push_to_top_level first.
288
289Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
290
291 * typeck.c (get_delta_difference): Add no_error parameter.
292 (build_ptrmemfunc): Call get_delta_difference with no_error set;
293 we don't want error messages when converting unrelated
294 pointer-to-member functions.
295
296Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
297
298 * error.c (dump_expr): Improve the wording on error messages that
299 involve pointer to member functions.
300
301Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
302
303 * cvt.c (cp_convert_to_pointer): Move code for conversions from
304 (::*)() to void* or (*)() up a bit, so that we can convert from
305 METHOD_TYPEs as well.
306
307Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
308
309 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
310 There are no 'member' types.
311 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
312 (build_x_typeid): Handle errors.
313
314Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
315
316 * typeck.c (convert_for_assignment): Handle anachronistic implicit
317 conversions from (::*)() to void* or (*)().
318 * cvt.c (cp_convert_to_pointer): Likewise.
319 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
320 conversions from here.
321 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
322 * lang-options.h: Likewise.
323 * decl2.c (warn_pmf2ptr): Define.
324 * cp-tree.h: Declare it.
325 * typeck2.c (digest_init): Allow pmfs down into
326 convert_for_initialization.
327
328Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
329
330 * typeck.c (c_expand_return): Fix for returning overloaded fn.
331
332Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
333
334 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
335 * decl.c (grok_reference_init): Pass DIRECT_BIND.
336 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
337 DIRECT_BIND.
338 * call.c (convert_like): Don't pass INDIRECT_BIND.
339 * typeck.c (convert_arguments): Likewise.
340 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
341
342Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
343
344 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
345 similar code in build_up_ref.
346 * cvt.c (build_up_reference): Drastically simplify.
347
691c003d
MS
348Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
349
350 * typeck.c (signed_or_unsigned_type): If the given type already
351 as the correct signedness, then just return it.
352
353 * typeck.c ({un,}signed_type): If can't do anything, call
354 signed_or_unsigned_type.
355
356Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
357
358 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
359 current_class_type is NULL.
360
361Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
362
363 * class.c (finish_struct_1): Avoid empty structs by adding a field
364 so layout_type gets the mode right.
365
366 * typeck.c (c_expand_return): Drastically simplify.
367
368Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
369
370 * typeck.c (decay_conversion): Handle overloaded methods.
371
372Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
373
374 * call.c (build_over_call): A TARGET_EXPR has side-effects.
375
f49422da
MS
376Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
377
378 * cvt.c (convert_to_pointer_force): Add code to support pointer to
379 member function to pointer to function conversions.
380 * init.c (resolve_offset_ref): Add code to allow faked up objects,
381 ignoring them if they are not used, and giving an error, if they
382 are needed.
383 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
384 code, and so that we can give an error, if we needed an object,
385 and one was not provided.
386 (build_c_cast): Don't call default_conversion when we want to
387 convert to pointer to function from a METHOD_TYPE.
388
389Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
390
391 * Make-lang.in (cplib2.ready): Fix logic.
392
393 * decl.c (shadow_tag): Only complain about non-artificial function
394 members.
395
396 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
397
398Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
399
400 * expr.c (cplus_expand_expr): Pre-tweak call_target like
401 expand_inline_function would.
402
403 * pt.c (mark_decl_instantiated): If extern_p, call
404 mark_inline_for_output.
405
3d4683cb
MS
406Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
407
408 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
409 pmd conversions.
410
411 * typeck.c (get_delta_difference): Fix wording, as we can be used
412 for pointer to data members.
413
414Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
415
416 * pt.c (tsubst): If the function decl isn't a member of this
417 template, return a copy of the decl (including copying the
418 lang-specific part) so we don't hose ourselves later.
419
420Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
421
422 * class.c (finish_struct): Remove DWARF-specific tag handling.
423 * decl.c (pushtag): Likewise.
424 (finish_function): Always clear DECL_ARGUMENTS on function decls with
425 no saved RTX.
426 * decl2.c (finish_file): Emit DWARF debugging info for static data
427 members.
428
429Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
430
431 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
432 isn't the same as the new one before we whack it.
433
434Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
435
436 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
437 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
438 warn_traditional and warn_strict_prototypes; remove ancient
439 'overload' code; remove references to flag_traditional.
440
5156628f
MS
441Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
442
443 * input.c (sub_getch): Handle 8-bit characters in string literals.
444
445Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
446
447 * tree.c (mapcar): Handle CONSTRUCTORs.
448 (copy_to_permanent): Handle expression_obstack properly.
449
450 * Make-lang.in (cplib2.txt): Also depend on the headers.
451
452 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
453 INT_TYPE_SIZE.
454 (expand_class_desc): Use USItype for offset field.
455 * tinfo.h (struct __class_type_info): Likewise.
456
457 * method.c (build_overload_int): TYPE_PRECISION should be applied
458 to types.
459
460Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
461
462 * call.c (build_new_op): A COND_EXPR involving void must be a
463 builtin.
464
465Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
466
467 * typeck.c (build_x_component_ref): New fn.
468 (build_object_ref): Use it.
469 * parse.y (primary): Use it.
470 * decl2.c (build_expr_from_tree): Use it.
471 * cp-tree.h: Declare it.
472
473 * decl.c (start_decl): variable-sized arrays cannot be initialized.
474 * error.c (dump_type_suffix): Handle variable arrays.
475
476Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
477
478 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
479
480Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
481
482 * decl.c (lookup_name_real): Don't try to look up anything in a
483 TYPENAME_TYPE.
484
485 * tinfo2.cc (__throw_type_match_rtti): Oops.
486
487Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
488
489 * Make-lang.in (exception.o): Use -fno-PIC for now.
490
491Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
492
493 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
494 calling them.
495 (get_tinfo_fn_dynamic): Extracted from build_typeid.
496 * tinfo2.cc (__dynamic_cast): Adjust.
497
498 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
499 (build_x_typeid): Likewise.
500
501 * parse.y: Call build_x_typeid instead of build_typeid.
502 * cp-tree.def: Add TYPEID_EXPR.
503 * pt.c (tsubst_copy): Handle typeid.
504 * decl2.c (build_expr_from_tree): Likewise.
505 * rtti.c (build_x_typeid): Throw bad_typeid from here.
506 (build_typeid): Not here.
507 * cp-tree.h: Declare build_x_typeid.
508
509Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
510
511 * call.c (convert_like): Pull out constant values.
512
513 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
514
515Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
516
517 * decl.c (init_decl_processing): Create short int types before
518 creating size_t in case a machine description needs to use
519 unsigned short for size_t.
520
521Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
522
523 * Make-lang.in (exception.o): Turn off pic.
524
525 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
526 type, multi-level ptr conversions.
527
528 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
529 (throw_bad_cast): Use it.
530 (throw_bad_typeid): New fn.
531 (build_typeid): Throw bad_typeid as needed.
532 Use build_call.
533 (synthesize_tinfo_fn): Handle functions and arrays before checking
534 for cv-quals.
535
536 * Remove .h from standard C++ headers, add new.h, move into inc
537 subdirectory.
538
539 * exception*: Remove pointer from object, constructors. Add
540 default exception::what that uses type_info::name. Add
541 __throw_bad_typeid.
542
543 * init.c (build_new): Don't add a cookie to new (void *) T[2].
544
545Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
546
547 * Make-lang.in: Building C++ code depends on cc1plus.
548
549Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
550
551 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
552 a HOST_WIDE_INT, not a tree.
553
554Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
555
556 * exception.cc: Don't include <stdlib.h>.
557
558 * Make-lang.in (c++.clean): Remove cplib2.*.
559
560Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
561
562 * parse.y (component_decl_1, component_costructor_declarator case):
563 Pass attributes/prefix_attributes in tree list.
564
565Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
566
567 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
568
569Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
570
571 * lex.c (do_identifier): Don't do deferred lookup in a template
572 header.
573
574 * typeck2.c (store_init_value): Oops.
575
576 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
577 New files for C++ lang-support library.
578 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
579 (CXX_LIB2FUNCS): Define.
580 And rules for building the C++ lang-support code.
581 * config-lang.in (headers): Define.
582 (lib2funcs): Define.
583
584Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
585
586 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
587 digest_init.
588 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
589 * typeck2.c (store_init_value): Check for initializing pmf with { }
590 here.
591 (process_init_constructor): Not here.
592
593Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
594
595 * pt.c (begin_template_parm_list): Increment
596 processing_template_decl here.
597 (end_template_parm_list): Not here.
598 (process_template_parm): No need to add 1 to it now.
599 * *.c: Use processing_template_decl instead of current_template_parms
600 to check for being in a template.
601
602 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
603 (tsubst_copy): Handle CONSTRUCTOR.
604 (instantiate_decl): Set up context properly for variables.
605 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
606 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
607
608Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
609
610 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
611
7fcdf4c2
MS
612Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
613
614 * method.c (make_thunk): Call comdat_linkage before setting the
615 TREE_CODE.
616
617 * decl2.c (comdat_linkage): Use make_decl_one_only.
618 (import_export_decl): Likewise.
619 * decl.c (init_decl_processing): Check supports_one_only instead of
620 SUPPORTS_WEAK.
621
622Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
623
624 * decl2.c (grokfield): Tighten checking for access decls.
625
626 * decl.c (make_typename_type): Resolve references to
627 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
628 (lookup_name_real): Types that depend on a template parameter get
629 an implicit 'typename' unless they're in the current scope.
630 (start_decl_1): We don't care about incomplete types that depend
631 on a template parm.
632 (grokdeclarator): Resolve 'typename's in the type specifier that
633 refer to members of the current scope.
634
635 * call.c (build_over_call): Remove 'inline called before
636 definition' diagnostic.
637 (build_method_call): Likewise.
638 * decl.c (duplicate_decls): Downgrade 'used before declared
639 inline' to a warning, only with -Winline.
640
641Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
642
643 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
644
c11b6f21
MS
645Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
646
647 * call.c (build_method_call): When calling a signature
648 default implementation, as in other cases, let instance_ptr simply
649 be instance.
650
651Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
652
653 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
654
655Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
656
657 * except.c (expand_start_catch_block): Add a pushlevel so that -g
658 works on hppa and SPARC.
659
660Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
661
662 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
663
664Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
665
666 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
667 before testing whether it's a signature.
668
669Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
670
671 * call.c (build_new_method_call): Don't complain about signature
672 pointers and references not being an aggr type.
673 (build_this): If a signature pointer or reference was passed in,
674 just return it.
675 (build_new_method_call): If instance is a signature pointer, set
676 basetype to the signature type of instance.
677 * sig.c (build_signature_method_call): Deleted basetype and
678 instance parameters, they can be found as the DECL_CONTEXT of
679 function and as the first argument passed in.
680 * cp-tree.h: Changed declaration of build_signature_method_call.
681 * call.c (build_method_call): Deleted first two arguments in call
682 of build_signature_method_call.
683 (build_over_call): Added call to build_signature_method_call.
684
685Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
686
687 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
688 target_expr.
689
690Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
691
692 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
693
9ffa2541
BM
694Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
695
696 * except.c (expand_start_try_stmts): Move to except.c in the backend.
697 (expand_end_try_stmts): Remove.
698
699 * init.c (perform_member_init): Use add_partial_entry () instead
700 of directly manipulating lists.
701 (emit_base_init): Ditto.
702
c11b6f21
MS
703Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
704
705 * except.c (expand_exception_blocks): Always make sure USE and
706 CLOBBER insns that came at the end still do, the backend relies
707 upon this.
708
709Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
710
711 * call.c (build_over_call): We can only use a TARGET_EXPR of the
712 right type.
713
714Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
715
716 * cvt.c (convert_to_reference): Revert last change, don't complain
717 about temp without target decl.
718
719Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
720
721 * decl.c (grokdeclarator): Don't core dump when void() is given.
722
723Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
724
725 * decl.c (copy_args_p): Don't crash.
726
727Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
728
729 * pt.c (tsubst): And support template args inside the exception
730 specification.
731
732 * pt.c (tsubst): Add support for exception specifications in
733 template functions.
734
735Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
736
737 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
738 fields now.
739 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
740 (start_function): Likewise.
741 (start_method): Likewise.
742 (grokfield): Likewise.
743 (make_call_declarator): Add throw spec parameter.
744 (set_quals_and_spec): Add routine.
745 * lex.c (set_quals_and_spec): Likewise.
746 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
747 * decl.c (shadow_tag): Eliminate the throw spec parameter to
748 grokdeclarator.
749 (groktypename): Likewise.
750 (start_decl): Eliminate the throw spec parameter. Eliminate the
751 throw spec parameter to grokdeclarator. Eliminate the throw spec
752 field in DECL_STMT.
753 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
754 (grokfndecl): Remove useless set of raises.
755 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
756 the throw spec parameter to start_decl. Pull the throw spec out
757 of the call declarator.
758 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
759 (start_function): Eliminate the throw spec parameter. Eliminate
760 the throw spec parameter to grokdeclarator.
761 (start_method): Likewise.
762 * decl2.c (grokfield): Likewise.
763 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
764 (grokoptypename): Likewise.
765 (finish_file): Eliminate the throw spec parameter to
766 start_function. Add throw spec to make_call_declarator.
767 * except.c (init_exception_processing): Add throw spec to
768 make_call_declarator. Eliminate the throw spec parameter to
769 start_decl.
770 (expand_start_catch_block): Eliminate the throw spec parameter to
771 grokdeclarator.
772 (expand_builtin_throw): Add throw spec to make_call_declarator.
773 Eliminate the throw spec parameter to start_function.
774 (start_anon_func): Likewise.
775 * lex.c (make_call_declarator): Add throw spec parameter.
776 (set_quals_and_spec): New routine.
777 (cons_up_default_function): Add throw spec to make_call_declarator.
778 Eliminate the throw spec parameter to grokfield.
779 * method.c (synthesize_method): Eliminate the throw spec parameter
780 to start_function.
781 * pt.c (process_template_parm): Eliminate the throw spec parameter
782 to grokdeclarator.
783 (tsubst): Add throw spec to make_call_declarator.
784 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
785 (do_function_instantiation): Eliminate the throw spec parameter to
786 grokdeclarator. Eliminate the throw spec parameter to
787 start_function.
788 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
789 to start_function.
790 * parse.y (datadef): Remove non-winning optimization.
791 (decl): Likewise.
792 (fndef): Remove ambiguous error productions uncovered by grammer
793 fixing.
794 (constructor_declarator): Add exception_specification_opt here.
795 (component_constructor_declarator): Likewise.
796 (direct_after_type_declarator): Likewise.
797 (complex_direct_notype_declarator): Likewise.
798 (direct_abstract_declarator): Likewise.
799 (fn.def1): Remove exception_specification_opt.
800 (fn.def2): Likewise.
801 (condition): Likewise.
802 (initdcl0): Likewise.
803 (initdcl): Likewise.
804 (notype_initdcl0): Likewise.
805 (nomods_initdcl0): Likewise.
806 (component_decl_1): Likewise.
807 (component_declarator): Likewise.
808 (after_type_component_declarator0): Likewise.
809 (after_type_component_declarator): Likewise.
810 (notype_component_declarator): Likewise.
811
812Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
813
814 * call.c (build_over_call): Also use an INIT_EXPR when
815 initializing anything from an rvalue.
816
817 * call.c (build_over_call): Call stabilize_reference when building
818 an INIT_EXPR instead of calling the copy ctor.
819
820 * call.c (joust): Extend the previous change to all comparisons.
821
822 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
823 NO_LINKAGE_HEURISTICS.
824
825 * decl2.c (finish_file): Emit any statics that weren't already.
826
827 * typeck.c (build_static_cast): Implement.
828 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
829 * decl.c (grokparms): Use can_convert_arg instead of
830 implicit_conversion directly.
831 (copy_args_p): New fn.
832 * cvt.c (convert_to_reference): Don't complain about temp with
833 static_cast.
834 (build_up_reference): Handle TARGET_EXPRs.
835 * call.c (build_over_call): Elide unnecessary temps.
836 (can_convert*): Use new overloading code.
837
838Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
839
840 * call.c: Move TYPE_PTR*_MACROS ...
841 * cp-tree.h: To here.
842 * typeck.c (build_reinterpret_cast): Implement.
843
844 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
845 ptr_complete_ob.
846 (joust): If we're comparing a function to a builtin and the worst
847 conversion for the builtin is worse than the worst conversion for the
848 function, take the function.
849
850 * typeck.c (build_const_cast): Implement.
851 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
852 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
853
854Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
855
856 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
857 too early. Make sure we explode if exprtype turns out to be a
858 NULL_TREE when it shouldn't be.
859
860Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
861
862 * cp-tree.h: New routine make_call_declarator.
863 * lex.c (make_call_declarator): Define it.
864 * except.c (init_exception_processing): Use it.
865 (expand_builtin_throw): Likewise.
866 (start_anon_func): Likewise.
867 * decl2.c (finish_file): Likewise.
868 * lex.c (cons_up_default_function): Likewise.
869 * parse.y: Likewise.
870 * pt.c (tsubst): Likewise.
871
872Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
873
874 * decl2.c (groktypefield): Remove unused code.
875
876Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
877
878 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
879 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
880 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
881 nonempty_cv_qualifiers.
882 * hash.h: Rebuild.
883
884 * lex.c (make_pointer_declarator): Change type_quals into
885 cv_qualifiers.
886 (make_reference_declarator): Likewise.
887
d11ad92e
MS
888Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
889
890 * decl.c (start_function): Only check interface_* for templates
891 with flag_alt_external_templates.
892
893 * call.c (build_new_op): Check for comparison of different enum types.
894 (build_over_call): Fix arg # output.
895
896 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
897
898Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
899
900 * call.c (build_new_op): Check for erroneous args.
901
902 * call.c (build_new_method_call): Add missing args to cp_error.
903
904 * tree.c (error_type): Dont print reference-to-array.
905
906 * typeck.c (convert_for_assignment): Don't say contravariance for
907 removing const.
908
909Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
910
911 * call.c (build_over_call): Diagnose bad convs for `this'.
912
913 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
914 on _ctor_arg.
915
916 * call.c (convert_like): Handle bad convs.
917 (build_over_call): Handle bad convs better.
918
919 * decl2.c: -fansi-overloading is now the default.
920
921 * call.c (build_new_method_call): Check for erroneous args.
922
923 * pt.c (instantiate_class_template): Propagate
924 TYPE_USES_MULTIPLE_INHERITANCE.
925
926Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
927
928 * call.c (enforce_access): Add static to routine.
929
930Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
931
932 * call.c (build_user_type_conversion_1): Fix bad handling.
933 (compare_ics): Likewise.
934
935Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
936
937 * call.c (standard_conversion): Oops.
938
939Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
940
941 * g++.c: Update test for win32 (&& ! cygwin32).
942
943Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
944
945 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
946 (ptr_reasonably_similar): New fn.
947 * call.c (BAD_RANK): New rank.
948 (ICS_BAD_FLAG): New macro.
949 (standard_conversion): Handle almost-right pointer conversions.
950 (reference_binding): Handle bad rvalue bindings.
951 (add_*_candidate): Stuff.
952 (build_over_call): Pass bad conversions to convert_for_initialization.
953 (compare_ics): Handle bad convs.
954 (joust): Likewise.
955
956Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
957
958 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
959 integer_type_node when computing pointer offsets.
960
961Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
962
963 * tree.c (lvalue_type): New fn.
964 (error_type): New fn.
965 * call.c (op_error): Use error_type.
966 (add_conv_candidate): Use lvalue_type.
967 (add_builtin_candidates): Likewise.
968 * error.c (args_as_string): Use error_type.
969
970Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
971
972 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
973 (tsubst): Not here.
974
975 * decl.c (init_decl_processing): With -ansi, __null's type is the
976 signed integral type with the same number of bits as a pointer.
977 Introduce a new variable null_node for it.
978 * cp-tree.h: Adjust.
979 * call.c (null_ptr_cst_p): Adjust.
980
981Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
982
983 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
984 optimize.
985
986Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
987
988 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
989 fns of classes without virtual functions.
990
991 * call.c (add_function_candidate): Handle `this' specially.
992 (compare_ics): Likewise.
993
994Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
995
996 * typeck.c (build_conditional_expr): Fix handling of __null.
997
998 * decl2.c (comdat_linkage): New fn.
999 (import_export_vtable): Use it.
1000 (import_export_decl): Use it.
1001 * method.c (make_thunk): Use it.
1002
73aad9b9
JM
1003Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1004
1005 * pt.c (end_template_decl): If we don't actually have parms, return.
1006 * parse.y (template_header): Accept 'template <>'.
1007
1008 * errfn.c: Allow 5 args.
1009
1010Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1011
1012 * tree.c (make_temp_vec): New fn.
1013 * pt.c (push_template_decl): Handle partial specs.
d11ad92e 1014 (instantiate_class_template): Likewise.
73aad9b9
JM
1015 (more_specialized): Use get_bindings.
1016 (more_specialized_class): New fn.
1017 (get_class_bindings): New fn.
1018 (most_specialized_class): New fn.
1019 (do_function_instantiation): List candidates for ambiguous case.
1020 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
1021 (shadow_tag): Call push_template_decl for partial specializations.
d11ad92e 1022 * parse.y: Likewise.
73aad9b9
JM
1023 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
1024 DECL_TEMPLATE_MEMBERS.
1025 * call.c (print_z_candidates): Reduce duplication.
1026
1027Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1028
1029 * decl2.c (lang_decode_option): Allow -fansi-overloading.
1030
1031Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1032
1033 * pt.c (get_bindings): New fn.
d11ad92e 1034 (most_specialized): Likewise.
73aad9b9
JM
1035 (do_function_instantiation): Use them.
1036 (add_maybe_template): New fn.
1037 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
1038 * call.c (build_new_op): Handle guiding decls.
d11ad92e
MS
1039 (build_new_function_call): Likewise.
1040 * decl2.c (finish_file): Likewise.
73aad9b9
JM
1041
1042 * decl2.c (mark_used): Do synthesis here.
1043 * call.c (build_method_call): Not here.
1044 (build_over_call): Or here.
1045 * typeck.c (build_function_call_real): Or here.
1046 * tree.c (bot_manip): Call mark_used on functions used in default
1047 args.
1048
2eee5e3a
MM
1049Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1050
1051 * decl2.c (import_export_vtable): Delete code that disabled vtable
1052 heuristic on systems with ASM_OUTPUT_EXTERNAL.
1053
c73964b2
MS
1054Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1055
1056 * typeck.c (build_x_function_call): Handle static call context
1057 better.
1058
1059 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
1060 the function, not its outer block.
1061
1062 * call.c (build_field_call): Pass fields on to build_opfncall
1063 regardless of TYPE_OVERLOADS_CALL_EXPR.
1064 (build_method_call): Pass on to build_new_method_call sooner.
1065
1066 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
1067 gives us.
1068 * class.c (instantiate_type): Don't put a POINTER_TYPE to
1069 METHOD_TYPE on an expression. Also make a copy of rhs instead of
1070 modifying it.
1071
1072Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1073
1074 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
1075 (add_builtin_candidate): Don't take enums for ++.
1076 (build_new_method_call): Handle non-aggregates and field calls.
1077 Move new overloading code from...
1078 * cvt.c: Here.
1079
1080 * decl.c (grokparms): Don't check default args in templates.
1081
1082Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1083
1084 * cvt.c (build_new_op): Fix args to build_unary_op.
1085 (add_builtin_candidates): Don't call type_promotes_to on float.
1086
1087 * decl.c (grokparms): Check the type of the default arg.
1088
1089 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
1090 returning NULL_TREE.
1091
1092 * typeck.c (build_x_binary_op): Avoid doing extra work.
d11ad92e
MS
1093 (build_x_unary_op): Likewise.
1094 (build_x_conditional_expr): Likewise.
c73964b2
MS
1095 * cvt.c (build_over_call): Return.
1096 (add_builtin_candidate): Fix MEMBER_REF.
d11ad92e 1097 (build_new_op): Likewise.
c73964b2
MS
1098
1099Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
1100
1101 * method.c (build_overload_name): Put bug fix into code but leave
1102 disabled for now so we can be bug compatible with older releases
1103 that do repeats incorrectly. In the future, we can enable it.
1104
1105Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1106
1107 * cvt.c (convert_like): Don't call build_cplus_new twice.
1108
1109 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
1110 Control new overloading code with -fansi-overloading.
1111
1112Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1113
1114 * cvt.c (build_over_call): Call build_cplus_new.
d11ad92e
MS
1115 * call.c (build_method_call): Likewise.
1116 * typeck.c (build_function_call_real): Likewise.
c73964b2
MS
1117 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
1118 the COND_EXPR in a TARGET_EXPR so they use the same slot.
1119
1120 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
1121 recursive calls.
1122 * typeck.c (complete_type): Propagate
1123 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
1124
1125Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1126
1127 * cvt.c (joust): More ?: kludging. Sigh.
1128 (build_over_call): Don't try to synthesize global fns.
1129
1130 * search.c (lookup_conversions): Use binfo marking.
1131
1132Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
1133
1134 * search.c (build_mi_matrix): Use the correct value of cid
1135 when determining the new mi_size.
1136
1137Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1138
1139 * cvt.c (add_builtin_candidates): Do consider type conversion ops
1140 for the first parms of += et al.
1141 (strip_top_quals): New fn.
1142 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
d11ad92e 1143 (implicit_conversion): Likewise.
c73964b2
MS
1144 (add_builtin_candidates): Be careful about arrays.
1145 (build_new_method_call): Handle vtable optimization.
1146
1147Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1148
1149 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
1150 * cvt.c (reference_binding): Use it.
1151 (implicit_conversion): Use it.
1152 (add_builtin_candidate, COND_EXPR): Use it.
1153
1154 * cvt.c (build_new_function_call): Check for error args.
1155
1156 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
1157
1158 * gxx.gperf: Add __null.
1159 * hash.h: Regenerate.
1160 * lex.h: Add RID_NULL.
1161 * lex.c (init_lex): Create null_pointer_node here, stick it in
1162 RID_NULL.
1163 * decl.c (init_decl_processing): Still set its type here.
1164 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
d11ad92e 1165 (convert_to_pointer_force): Likewise.
c73964b2
MS
1166 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
1167 if (! pedantic).
1168 * call.c (convert_harshness): Use null_ptr_cst_p.
d11ad92e 1169 * typeck.c (convert_for_assignment): Likewise. Don't produce
c73964b2
MS
1170 null_pointer_node.
1171
1172 * error.c (args_as_string): Handle lists of actual args, too.
1173 * cvt.c (null_ptr_cst): Support (void*)0 for now.
1174 (build_user_type_conversion_1): Improve diagnostics.
1175 (build_new_function_call): Likewise.
1176 (build_object_call): Likewise.
1177 (build_new_method_call): Likewise. Move call before def diagnostic...
1178 (build_over_call): Here.
1179
1180 * cvt.c (build_new_method_call): Don't complain about no match if
1181 LOOKUP_SPECULATIVELY.
1182 (build_over_call): Fix 'this' for virtual fn.
1183 (build_new_method_call): Add diagnostic.
1184
1185Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1186
1187 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
1188 constructors to be passed in.
1189 (build_over_call): Likewise.
1190 (build_user_type_conversion_1): Pass them in.
1191 (convert_like): Likewise.
1192 (build_object_call): Handle overloaded conversions.
1193 (build_over_call): Pass the right args to build_vfn_ref.
1194 (standard_conversion): Fix pmf convs.
1195 (joust): Handle comparing statics and non-statics.
1196 (build_new_method_call): New fn.
1197 * call.c (build_method_call): Call it if NEW_OVER.
1198
1199Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
1200
1201 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
1202 %D instead.
1203
1204Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
1205
1206 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
1207 instead of just maybe_build_cleanup so that we deallocate the
1208 thrown object.
1209
1210Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1211
1212 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
1213 * cp-tree.h (finish_prevtable_vardecl): Add decl.
1214
14548a19
MS
1215Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
1216
c73964b2
MS
1217 * pt.c (instantiate_class_template): Call complete_type. Also, if
1218 we're at the end of the file and we just instantiated a template
1219 class with a vtable, call finish_prevtable_vardecl.
1220
14548a19
MS
1221 * error.c (dump_decl): Don't explode (or explode more gracefully
1222 as appropriate) if the object being dumped has a null type.
d11ad92e 1223 (dump_expr): Likewise.
14548a19
MS
1224
1225 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
1226 by counting the number of nodes that we'll need before allocating
1227 the array.
1228 (lookup_fnfields): Fix comment.
1229 (breadth_first_search): Fix comment.
1230
1231Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1232
1233 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
1234 TYPE_ALIGN.
1235 * class.c (finish_struct): Call cplus_decl_attributes here.
1236 (finish_struct_1): Not here.
1237 * cp-tree.h: Adjust.
1238
1239 * pt.c (type_unification): New parameter STRICT.
1240 (unify): If STRICT, don't allow cv addition or base deduction.
1241 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
1242
1243Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1244
1245 * search.c (get_template_base{_recursive}): New fns.
1246 * pt.c (more_specialized): New fn.
1247 (do_function_instantiation): Use it.
1248 (unify): Handle base deduction.
1249 * cvt.c (joust): Use more_specialized.
1250 Don't arbitrarily choose between non-builtin candidates.
1251 (build_over_call): Call require_complete_type.
1252
1253 * decl.c (start_function): Statics are static even in a #pragma
1254 interface file.
1255
1256 * decl2.c (import_export_vtable): Disable vtable heuristic on
1257 systems with ASM_OUTPUT_EXTERNAL.
1258
1259 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
1260 (standard_conversion): No std conv to enum type.
1261
1262 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
1263 for ptm's.
1264
1265 * cvt.c (reference_binding): Bind directly to a base subobject of
1266 a class rvalue.
1267
1268 * cvt.c (build_new_op): Enforce access control.
1269
1270Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
1271
1272 * typeck2.c (process_init_constructor): When scanning the
1273 union for a named field, skip things that aren't FIELD_DECLs.
1274
1275 * method.c (synthesize_method): Don't scan fndecl's rtl if
1276 we're at the end of the file; just assume the function can't
1277 be inlined.
1278
1279Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1280
1281 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
1282 it failed.
1283
1284 * cvt.c (build_user_type_conversion_1): Handle overloaded
1285 conversion ops.
1286
1287 * cvt.c (add_builtin_candidates): Don't consider type conversion
1288 operators for the first parameter of operator=.
1289
1290Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
1291
1292 * typeck.c (complete_type): Only call layout_type if we're not
1293 expanding a template.
1294
1295Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1296
1297 * cvt.c (compare_ics): Oops.
1298
1299 * cvt.c (op_error): Oops.
1300
1301 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
1302 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
1303 (build_conv): Use them.
1304 (implicit_conversion): Use them.
1305 (convert_like): Handle them.
1306 (build_new_op): Handle builtin COND_EXPR again.
1307 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
1308 in lists of types for COND_EXPR.
1309 (add_builtin_candidate): Add enum candidates for COND_EXPR.
1310
1311Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
1312
1313 * typeck.c (build_modify_expr): Always attempt to build a call to
1314 the assignment operator, even if we're using a default one.
1315 (convert_for_initialization): Call complete_type.
1316
1317Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1318
1319 * cvt.c (reference_binding): A REF_BIND gets the reference type.
1320 (implicit_conversion): Likewise.
1321 (convert_like): Likewise.
1322 (compare_ics): Likewise.
1323 (compare_qual): Likewise.
1324 (print_z_candidates): Handle no candidates.
1325 (build_new_op): Don't handle builtin COND_EXPR for now.
1326
1327Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
1328
1329 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
1330
1331Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1332
1333 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
1334
1335 * cvt.c (build_builtin_candidate): Oops.
1336 (build_new_op): Oops.
1337
1338 * method.c (build_opfncall): Pass COND_EXPR on.
1339 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
1340 (add_builtin_candidate{,s}): Likewise.
1341 (add_builtin_candidates): Likewise.
1342 (print_z_candidates, op_error, build_new_op): Likewise.
1343 (type_decays_to): New fn.
1344 * lex.c (init_lex): Just say ?: for COND_EXPR.
1345
1346Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1347
1348 * typeck.c (complete_type): Call layout_type rather than building
1349 a new array type.
1350
1351 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
1352 only use ptrdiff_t.
1353
1354Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1355
1356 * cvt.c: Always compile the new overloading code (but don't use it).
1357 (implicit_conversion): Add a BASE_CONV when converting to
1358 the same class type.
1359 (convert_like): Handle BASE_CONV.
1360
1361Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1362
1363 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
1364 (add_builtin_candidate): Likewise.
1365
1366 NEW_OVER changes:
1367 * typeck.c (build_x_function_call): Try an operator function
1368 whenever we call an object of class type.
1369 * method.c (build_opfncall): Pass CALL_EXPRs through.
1370 * cvt.c (implicit_conversion): Do const-ref case first.
1371 (add_conv_candidate, build_object_call, op_error): New fns.
1372 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
1373 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
1374 builtin candidates.
1375 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
1376 Fall back on preincrement handling. Use op_error.
1377 Handle warn_synth.
1378 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
1379 an error_mark_node.
1380 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
1381 properly.
1382
1383Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
1384
1385 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
1386
1387Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
1388
1389 * typeck.c (build_component_ref_1): Use build_component_ref
1390 instead of open coding it here.
1391
1392Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1393
1394 * g++.c (main): Don't link with -lg++.
1395
1396 NEW_OVER changes:
1397 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
1398 result of build_type_conversion.
1399 (cp_convert): Only call build_method_call for ctors if
1400 build_type_conversion failed.
1401 (ptr_complete_ob): New function.
1402 (TYPE_PTR{,OB,MEM}_P): New macros.
1403 ({add,build}_builtin_candidate{,s}): New functions.
1404 (print_z_candidates): Handle builtins.
1405 (build_user_type_conversion_1): Don't use conversion fns for
1406 converting to a base type.
1407 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
1408 (build_user_type_conversion): Use convert_from_reference.
1409 (build_new_op): New function.
1410 (build_over_call): Fix handling of methods.
1411 (compare_ics): Handle AMBIG_CONV properly.
1412 * typeck2.c: Increment abort count.
1413 * method.c (build_opfncall): Forward most requests to build_new_op.
1414 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
1415
1416Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1417
1418 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
1419 invalid second argument to dump_expr_list.
1420
594740f3
MS
1421Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
1422
1423 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
1424
1425Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
1426
1427 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
1428 ASSEMBLE_EXTERNAL.
1429
1430Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
1431
1432 * typeck2.c (process_init_constructor): New pedwarn for using { }
1433 to initialize a pointer to member function.
1434 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
1435 we can avoid the new error.
1436
1437Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
1438
1439 * typeck.c (build_ptrmemfunc1): New function to hide details of
1440 pointer to member functions better.
1441
1442Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
1443
1444 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
1445 methods into the actual method, as we know the implied object is
1446 not used.
1447
1448Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1449
1450 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
1451 inside a system header.
1452
1453Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
1454
1455 * call.c (build_method_call): Call complete_type on the
1456 instance type.
1457
1458Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
1459
1460 * typeck.c (build_component_ref): Always build up an OFFSET_REF
1461 for obj_ptr->func so that we can know which object to use in a
1462 method call.
1463
1464Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
1465
1466 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
1467 around things. Also improve maintainability.
1468
1469Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
1470
1471 * decl.c (grokdeclarator): Check for overflow when evaluating an
1472 array dimension.
1473
1474Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
1475
1476 * cvt.c (cp_convert): Don't check for ambiguity with constructor
1477 if NEW_OVER.
1478
1479 * typeck.c (build_x_function_call): Pass function overload
1480 questions to new overloading code if NEW_OVER.
1481 * init.c (expand_aggr_init_1): Only check for type conversion ops
1482 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
1483 Don't check for ambiguity with constructor if NEW_OVER.
1484 * cvt.c (convert_to_reference): Dereference the result of a type
1485 conversion operator.
1486 (build_conv): Propagate ICS_USER_FLAG.
1487 (implicit_conversion): Call instantiate_type.
1488 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
1489 (add_function_candidate): Fix cv-quals on argtype.
1490 (print_z_candidates): New function.
1491 (build_new_function_call): Call it.
1492 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
1493 consider non-converting constructors.
1494 Call print_z_candidates.
1495 Return an AMBIG_CONV for an ambiguous conversion.
1496 (build_user_type_conversion): Handle AMBIG_CONV.
1497 (convert_like): Fix test for building TARGET_EXPR.
1498 Call instantiate_type.
1499 Handle AMBIG_CONV and LVALUE_CONV.
1500 (build_over_call): Handle 0 args and ellipsis.
1501 * cp-tree.def: Add AMBIG_CONV.
1502
e92cc029
MS
1503Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
1504
1505 * decl.c (lookup_name_real): If we find mem in obj when parsing
1506 `obj->mem', make sure we return the right value.
1507
1508Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
1509
1510 * search.c (get_base_distance): Call complete_type.
1511
1512Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
1513
1514 * decl.c (store_bindings): Make static.
1515
1516Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1517
1518 * init.c (expand_aggr_init_1): Don't check type conversions if
1519 NEW_OVER.
1520
1521 * cvt.c (z_candidate): Put back template field.
1522 (add_function_candidate): Set it.
1523 (add_template_candidate): Likewise.
1524 (joust): Use it.
1525 (compare_qual): Handle references and pointers to members.
1526 (compare_ics): Handle reference bindings.
1527
1528 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
1529
1530Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
1531
1532 * call.c (compute_conversion_costs): Call complete_type.
1533
1534 * tree.c (vec_binfo_member): Use comptypes instead of comparing
1535 pointers, so we can handle template parameters.
1536
1537Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
1538
1539 * cvt.c (cp_convert_to_pointer): We have to call complete_type
1540 here; let's make it explicit instead of a side effect of an
1541 error check.
1542
1543Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1544
1545 * cvt.c (z_candidate): Remove template field.
1546 (reference_binding): Handle binding to temporary.
1547 (implicit_conversion): Likewise.
1548 (add_function_candidate): Handle artificial constructor parms.
1549 Handle functions with too few parms.
1550 (add_template_candidate): New function.
1551 (build_user_type_conversion_1): Handle constructors.
1552 (convert_like): Likewise.
1553 (build_over_call): Likewise.
1554 (build_new_function_call): Support templates.
1555 (compare_ics): Fix reference, inheritance handling.
1556
1557Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
1558
1559 * decl.c: Add signed_size_zero_node.
1560 (init_decl_processing): Build it.
1561 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
1562 when we're trying to make a negative delta.
1563
1564Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1565
1566 Stop doing this damn index==strchr variable name confusion.
1567 * class.c (add_virtual_function): Change local var INDEX to be
1568 named IDX.
1569 (add_method): Likewise.
1570 * lex.c (print_parse_statistics): Likewise.
1571 * search.c (make_memoized_table_entry): Likewise.
1572 (lookup_fnfields_here): Likewise.
1573 (lookup_field): Likewise.
1574 (lookup_fnfields): Likewise.
1575 (get_baselinks): Likewise.
1576 * sig.c (build_signature_table_constructor): Likewise.
1577 (build_signature_method_call): Likewise.
1578 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
1579 (get_member_function_from_ptrfunc): Likewise.
1580 (build_ptrmemfunc): Change local var INDEX to be IDX.
1581 (c_expand_start_case): Likewise.
1582
1583Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1584
1585 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
1586 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
1587 (convert_to_reference): Use build_type_conversion to convert to
1588 the reference type directly.
1589 (standard_conversion): Fix void* case, non-conversions.
1590 (reference_binding): Fix expr == 0 case, non-conversions.
1591 (convert_like): Support REF_BIND.
1592 (compare_qual): Split out from compare_ics.
1593 (compare_ics): Use it, handle icses with only a qual_conv.
1594
1595 * init.c (expand_vec_init): Don't crash if decl is NULL.
1596
1597Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
1598
1599 * mpw-config.in: New file, configury for Mac MPW.
1600 * mpw-make.sed: New file, makefile editing for MPW.
1601
1602Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1603
1604 * pt.c (instantiate_class_template): Call repo_template_used.
1605
1606 * search.c (lookup_conversions): Only lookup conversions in
1607 complete types.
1608
1609Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1610
1611 * cp-tree.def: Renamed from tree.def, to avoid confusion with
1612 gcc's tree.def.
1613 * cp-tree.h, lex.c: Include cp-tree.def.
1614 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
1615
1616Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
1617
1618 * init.c (build_vec_delete_1): Call complete_type.
1619
1620Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
1621
1622 * except.c (start_anon_func): Make sure anonymous functions are
1623 never external.
1624
1625Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1626
1627 * decl.c (finish_function): If function_depth > 1, set nested.
1628
1629 * decl2.c (grokbitfield): Revert Bob's change.
1630 * class.c (finish_struct_1): Fix handling of named bitfield widths.
1631
1632Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1633
1634 * pt.c (add_pending_template): Handle types.
1635 (lookup_template_class): With -fexternal-templates, just add the class
1636 to pending_templates instead of instantiating it now.
1637 * decl2.c (finish_file): Handle types in pending_templates.
1638
1639Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
1640
1641 * decl2.c (grokbitfield): Handle constant decls appropriately.
1642 Give an appropriate error message now instead of spewing core
1643 later.
1644
1645Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1646
1647 * decl2.c: Don't turn on thunks by default for now.
1648
1649Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
1650
1651 * typeck.c (complete_type): Handle error_mark_node.
1652 (common_type, OFFSET_TYPE): Handle template_type_parms.
1653
1654Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1655
1656 * pt.c (instantiate_decl): If at_eof, call import_export_decl
1657 regardless of DECL_INLINE.
1658
1659 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
1660
1661 * class.c (finish_struct_bits): Copy TYPE_SIZE.
1662
1663 * rtti.c (build_dynamic_cast): Support templates.
1664 * tree.def: Support DYNAMIC_CAST_EXPR.
1665 * pt.c (tsubst_copy): Likewise.
1666 * decl2.c (build_expr_from_tree): Likewise.
1667
1668Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1669
1670 * typeck.c (build_static_cast): Support templates.
1671 (build_const_cast): Likewise.
1672 * tree.def: Support CONST/STATIC_CAST_EXPR.
1673 * pt.c (tsubst_copy): Likewise.
1674 * decl2.c (build_expr_from_tree): Likewise.
1675
1676Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1677
1678 * decl2.c (finish_vtable_vardecl): Don't trust
1679 TREE_SYMBOL_REFERENCED for vtables of local classes.
1680
1681Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1682
1683 * pt.c (tsubst_copy): Handle operator T.
1684
1685Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1686
1687 * init.c (build_delete): Move creation of PARMS inside test of
1688 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
1689
1690Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
1691
1692 * typeck.c (build_conditional_expr): Don't assume that
1693 the arguments to ?: are always pointers or records.
1694
1695Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1696
1697 * decl2.c (import_export_decl): Still emit static/weak/comdat
1698 copies of inline template functions with -fno-implicit-templates.
1699
1700Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
1701
1702 * init.c (build_delete): Determine the complete basetype
1703 path to the destructor we're calling.
1704
1705Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
1706
1707 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
1708 initialize the enum, because we really and truly don't know where
1709 it came from.
1710 (start_enum): Don't copy integer_zero_node because
1711 build_enumerator will do it.
1712
1713Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1714
1715 * decl.c (finish_function): Do access control on base destructors.
1716
1717 * pt.c (tsubst, case FUNCTION_DECL): Set up
1718 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
1719 hose us.
1720
1721Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
1722
1723 * cvt.c (build_up_reference): If we have already extended the
1724 lifetime of the temporary, don't try it again.
1725 * typeck.c (c_expand_return): Don't try and convert the return
1726 value twice when we want a reference, once is enough.
1727
a0128b67
MS
1728Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
1729
1730 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
1731 LOOKUP_ONLYCONVERTING at all for now.
1732
1733 * search.c (add_conversions): Put the conversion function in
1734 TREE_VALUE, the basetype in TREE_PURPOSE.
1735 * cvt.c (build_type_conversion): Adjust.
1736 * cvt.c (build_expr_type_conversion): Adjust.
1737 * call.c (user_harshness): Adjust.
1738
1739Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
1740
1741 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
1742 backend's benefit.
1743
14548a19
MS
1744Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
1745
1746 * except.c (expand_start_catch_block): Add a dummy region, if we
1747 get an error, so that we can avoid core dumping later.
1748
a0128b67
MS
1749Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
1750
1751 * cp-tree.h (OFFSET_REF): Remove.
1752 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
1753 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
d11ad92e
MS
1754 * init.c (expand_aggr_init_1): Likewise.
1755 (build_new): Likewise.
1756 * typeck.c (expand_target_expr): Likewise.
a0128b67
MS
1757
1758Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1759
1760 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
1761 TARGET_EXPR.
1762
e349ee73
MS
1763Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
1764
1765 * cvt.c (build_up_reference): Redo how and when temporaries are
1766 created.
1767 * decl.c (grok_reference_init): Don't try and be smart about
1768 running cleanups.
1769
1770Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
1771
1772 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
1773 (TARGET_EXPR...), now that it has 4 arguments.
d11ad92e 1774 * tree.c (build_cplus_new): Likewise.
e349ee73
MS
1775
1776Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1777
1778 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
1779
1780 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
1781 * decl.c (struct saved_scope): Remove named_labels,
1782 {base,member}_init_list.
1783 (maybe_push_to_top_level): Don't set them. Call
1784 push_cp_function_context if appropriate.
1785 (pop_from_top_level): Likewise.
1786
1787 * method.c (do_build_assign_ref): Remove obsolete check of
1788 TYPE_HAS_ASSIGN_REF (basetype).
1789
1790 * decl.c (grokfndecl): Diagnose user definition of
1791 implicitly-declared methods.
1792
1793Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
1794
1795 * method.c (do_build_copy_constructor): Add code to give
1796 meaningful error messages instead of crashing.
1797 (do_build_assign_ref): Don't synthesize assignment operators for
1798 classes containing reference or const members.
1799
1800 * class.c (struct base_info): Remove cant_synth_copy_ctor
1801 and cant_synth_asn_ref.
1802 (finish_base_struct): Remove the code that tries to conditionalize
1803 synthesis of copy constructors & assignment operators based on
1804 access permissions. Instead, let it fail when it tries to
1805 synthesize the copy constructor. This will give meaningful error
1806 messages instead of silently generating code to perform a bitcopy.
1807
1808Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
1809
1810 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
1811 determining types for constant values.
1812
1813 * decl.c (struct named_label_list): Use instead of stuffing
1814 random items into a TREE_LIST node.
1815 (named_label_uses): Use the new struct.
d11ad92e
MS
1816 (poplevel): Likewise.
1817 (lookup_label): Likewise.
e349ee73
MS
1818 (define_label): Add an error message to tell the user the line
1819 where the goto is located in addition to the destination of the
1820 goto.
1821 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
1822 named_label_uses.
d11ad92e 1823 (finish_function): Likewise.
e349ee73
MS
1824
1825 (start_decl): Complain about defining a static data member
1826 in a different type from which it was declared.
1827
1828Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1829
1830 * cvt.c (build_expr_type_conversion): Adjust.
1831
1832Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1833
1834 * call.c (build_method_call): Always convert 'this' to the
1835 appropriate type.
1836
1837 * search.c (add_conversions): Put the conversion function in
1838 TREE_VALUE, the type in TREE_PURPOSE.
1839 * cvt.c (build_type_conversion): Adjust.
1840 * call.c (user_harshness): Adjust.
1841
1842 * method.c (emit_thunk): Call temporary_allocation and
1843 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
1844
1845 * tree.c (build_cplus_array_type): Handle tweaking of
1846 TYPE_MAIN_VARIANT here.
1847 * typeck.c (common_type): Not here.
1848
1849 * typeck.c (complete_type): Only try to complete an array type if
1850 it has a domain.
1851
1852Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1853
1854 * decl.c (grokvardecl): Call complete_type.
1855 (grokdeclarator): Call complete_type for PARM_DECLs.
1856
1857Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1858
1859 * pt.c (instantiate_class_template): Re-set
1860 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
1861
1862Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
1863
1864 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
1865 smart enough to do it right.
d11ad92e 1866 * tree.c (cp_expand_decl_cleanup): Likewise.
e349ee73
MS
1867 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
1868 cp_expand_decl_cleanup.
d11ad92e
MS
1869 (store_parm_decls): Likewise.
1870 (hack_incomplete_structures): Likewise.
1871 * except.c (push_eh_cleanup): Likewise.
e349ee73
MS
1872
1873Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
1874
1875 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
1876 frontend to the backend where it belongs.
d11ad92e
MS
1877 * tree.c (unsave_expr): Likewise.
1878 (unsave_expr_now): Likewise.
1879 * tree.def (UNSAVE_EXPR): Likewise.
1880 * cp-tree.h (unsave_expr): Likewise.
1881 (unsave_expr_now): Likewise.
e349ee73
MS
1882
1883Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
1884
1885 * init.c (emit_base_init): Make sure the partial EH cleanups live
1886 on the function_obstack.
1887
ce122a86
MS
1888Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
1889
1890 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
1891 when checking for pointer types.
1892
1893Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1894
1895 * pt.c (instantiate_class_template): Remove obsolete check for
1896 access declarations.
1897
1898Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
1899
1900 * call.c (build_overload_call): Simplify calls to
1901 build_overload_call by removing last parameter.
d11ad92e
MS
1902 (build_method_call): Likewise.
1903 * cp-tree.h: Likewise.
1904 * method.c (build_opfncall): Likewise.
1905 * typeck.c (build_x_function_call): Likewise.
ce122a86
MS
1906
1907Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
1908
1909 * call.c (default_parm_conversions): Factor out common code.
1910 (build_method_call): Use it.
1911 (build_overload_call_real): Use it.
1912
4ac14744
MS
1913Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
1914
1915 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
1916 but pedwarn as the code is bogus.
d11ad92e 1917 * typeck.c (decay_conversion): Likewise.
4ac14744
MS
1918 (build_function_call_real): Use build_addr_func instead of
1919 default_conversion. Don't allow pointer-to-method functions down
1920 here.
1921 (build_unary_op): Use real pointer-to-member functions instead of
1922 fake ones.
1923 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
1924 (convert_for_assignment): Removed some obsolete code.
1925 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
1926 build_x_function_call instead of current_class_ptr. Only call
1927 digest_init once on an initializer, we do this just checking
1928 TREE_TYPE.
1929 (build_expr_from_tree): Pass current_class_ref to
1930 build_x_function_call instead of current_class_ptr.
d11ad92e
MS
1931 * init.c (build_member_call): Likewise.
1932 * pase.y: Likewise.
4ac14744
MS
1933 * error.c (dump_expr): Handle OFFSET_REFs better.
1934 * pt.c (unify): Handle pointer-to-member functions better.
1935 * decl.c (finish_function): Clear out current_class_ref just like
1936 we do for current_class_ptr.
1937
1938 * typeck.c (get_delta_difference): Handle virtual bases better.
1939
1940Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
1941
1942 * sig.c (build_signature_table_constructor): Use the delta for
1943 the original basetype for this virtual function with thunks.
1944 (build_signature_method_call): We still need to adjust 'this'
1945 with thunks.
1946
1947Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
1948
1949 * call.c (build_addr_func): New routine. Used to get the `real'
1950 address of a function or a method. Needed to avoid getting a
1951 pointer-to-member function.
1952 (build_call): New routine to build CALL_EXPRs.
1953 (build_method_call): Use it.
d11ad92e
MS
1954 * cvt.c (convert_to_aggr): Likewise.
1955 * typeck.c (build_function_call_real): Likewise.
4ac14744
MS
1956 * sig.c (build_signature_table_constructor): Use build_addr_func.
1957 * cp-tree.h (build_call, build_addr_func): Declare them.
1958
1959Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
1960
1961 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
1962 * parse.y: Remove uses of LOOKUP_AGGR.
1963
1964Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
1965
1966 * *.[chy]: Rename current_class_decl to current_class_ptr, and
1967 C_C_D to current_class_ref.
1968
1969Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1970
1971 * call.c (convert_harshness): Tighten up pointer conversions.
1972
1973Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
1974
1975 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
1976 (finish_file): Likewise.
1977
1978Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1979
1980 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
1981
1982 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
1983 code.
1984
1985Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1986
1987 * decl2.c: Turn on thunks by default where supported.
1988
4dabb379
MS
1989Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
1990
1991 * cp-tree.h (build_overload_call_maybe): Removed.
1992 * call.c (build_overload_call_real): Invert meaning of last arg to
1993 be require_complete.
d11ad92e 1994 (build_overload_call): Likewise.
4dabb379
MS
1995 * typeck.c (build_x_function_call): Use build_overload_call_real
1996 instead of build_overload_call_maybe.
1997
a50f0918
MS
1998Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1999
2000 * decl2.c (finish_file): Don't try to emit functions that haven't
2001 been compiled.
2002
2003Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2004
2005 * decl2.c (finish_vtable_vardecl): Oops.
2006
2007 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
2008 Also store the bindings from previous_class_values.
2009 (pop_from_top_level): Restore them.
2010
2011Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2012
2013 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
2014 symbol has been referenced.
2015 (finish_file): Re-join synthesis/vtable loop with inline emission
2016 loop, disable inlining when an inline is output.
2017
2018Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
2019
2020 * except.c (init_exception_processing): Setup saved_in_catch.
2021 (push_eh_cleanup): Reset __eh_in_catch.
2022 (expand_start_catch_block): Set __eh_in_catch.
2023
2024Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
2025
2026 * except.c (push_eh_cleanup): Add tracking for whether or not we
2027 have an active exception object.
2028 (expand_builtin_throw): Use it to make sure a rethrow without an
2029 exception object is caught.
2030
2031Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
2032
2033 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
2034 cache.
2035
809c8c30
JM
2036Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2037
2038 * decl2.c (finish_file): Also use sentries for vars with
2039 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
2040 created).
2041
2042 * lex.c (handle_cp_pragma): Disable #pragma
2043 interface/implementation if SUPPORTS_ONE_ONLY > 1.
2044
2045Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2046
2047 * method.c (emit_thunk): Wrap default case in
2048 temporary/permanent_allocation.
2049
2050 * method.c (make_thunk): Use DECL_ONE_ONLY.
2051 (emit_thunk): Call assemble_end_function.
2052
46b02c6d
MS
2053Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2054
2055 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
d11ad92e 2056 (import_export_decl): Likewise.
46b02c6d
MS
2057 (finish_prevtable_vardecl): Disable vtable hack if
2058 SUPPORTS_ONE_ONLY > 1.
2059
2060Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
2061
2062 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
2063 PREDECREMENT_EXPRs take two arguments, not one.
2064
2065Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
2066
2067 * class.c (build_vtable_entry): Don't build thunks for abstract
2068 virtuals.
2069
2070 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
2071 frontend.
2072
2073Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2074
2075 * class.c (set_rtti_entry): Use size_zero_node.
d11ad92e 2076 (build_vtable): Likewise.
46b02c6d
MS
2077
2078Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
2079
2080 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
d11ad92e 2081 (prepare_fresh_vtable): Likewise.
46b02c6d
MS
2082
2083Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
2084
2085 * method.c (emit_thunk): Call mark_used on the target function.
2086
2087 * call.c (build_method_call): Don't warn about pending templates.
2088
c7690c68
JM
2089Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2090
2091 * decl2.c (finish_file): Fix list walking logic.
2092
46b02c6d
MS
2093 * typeck2.c (check_for_new_type): Only warn if -pedantic.
2094
2095Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
2096
2097 * class.c (finish_struct_1): Remove old code for
2098 dont_allow_type_definitions.
d11ad92e 2099 * cp-tree.h: Likewise.
46b02c6d
MS
2100 * spew.c: Make sure cp-tree.h is included before parse.h, so the
2101 definition of flagged_type_tree is found before it is used.
d11ad92e 2102 * lex.c: Likewise.
46b02c6d
MS
2103 * parse.y: Added the ftype member to the type union, and changed a
2104 number of rules to use it instead of ttype. Added calls to
2105 check_for_new_type() as appropriate.
2106 * typeck2.c (check_for_new_type): New function for checking
2107 if a newly defined type appears in the specified tree.
2108 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
2109 for check_for_new_type().
2110
67d743fe
MS
2111Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2112
c7690c68
JM
2113 * decl2.c (finish_file): Only use a sentry if the decl is public.
2114
67d743fe
MS
2115 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
2116 don't pass LOOKUP_ONLYCONVERTING.
2117
2118Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
2119
2120 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
2121 properly keeps track of const and volatile type modifiers.
2122
2123Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2124
2125 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
2126 * pt.c (comp_template_args): Use it.
2127
2128 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
2129 assemble_external for artificial function decls.
2130
2131 * decl.c (cp_finish_decl): Oops.
2132
2133Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2134
2135 * decl2.c (import_export_decl): Put static data member templates
2136 into common storage, or make them weak, depending on whether they
2137 are dynamically or statically initialized.
2138 (get_sentry): New function.
2139 (finish_file): Do import_export_decl for static data members before
2140 building the init/fini functions. Don't init/fini a variable that's
2141 EXTERNAL. Use a sentry for variables in common. Fix mismatching
2142 push/pop_temp_slots.
2143 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
2144 expand_static_init thang.
2145 * method.c (get_id_2): New function.
2146
2147Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
2148
2149 * parse.y (empty_parms): Make sure we use C++-style prototypes
2150 when we're declaring member functions.
2151
2152Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2153
2154 * Makefile.in (CONFLICTS): 16 s/r conflicts.
2155 * parse.y (self_template_type): New nonterminal.
2156
a80e4195
MS
2157Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2158
2159 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
2160 name.
2161 * parse.y (base_class.1): Allow 'typename foo::bar'.
2162
2163 * lex.c (check_newline): Remove #pragma code that plays with the
2164 input stream, since we now deal with tokens. Clear nextchar when
2165 we're done.
2166 (handle_cp_pragma): Use real_yylex.
2167 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
2168 in one place.
2169
2170 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
2171
2172 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
2173
2174Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2175
2176 * parse.y: New token SELFNAME for potential constructor.
2177 * spew.c (yylex): Handle it.
2178 * lex.c (identifier_type): Produce it.
2179
2180 * parse.y (complete_type_name): In :: case, don't push class binding.
d11ad92e 2181 (complex_type_name): Likewise.
a80e4195
MS
2182
2183Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
2184
2185 * typeck.c (build_reinterpret_cast): Handle pointer to member
2186 functions.
2187
2188Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
2189
2190 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
a80e4195 2191 pragmas.
f72bbc37 2192 (check_newline): Put the vtable/unit/implementation/interface pragma
a80e4195 2193 code into handle_cp_pragma, replacing it with a call.
f72bbc37 2194 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
a80e4195
MS
2195 args. Get the next token after handling the pragma token.
2196
2197Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2198
2199 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
d11ad92e 2200 (convert_to_pointer_force): Likewise.
a80e4195
MS
2201
2202 * init.c (build_new): Fix array new without -fcheck-new.
2203
2204Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2205
2206 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
2207 tree.c: Lose TYPE_NESTED_NAME.
2208
2209 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
2210 as identifiers.
2211
2212 * tree.def: Add VEC_INIT_EXPR.
2213 * expr.c (cplus_expand_expr): Handle it.
2214 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
2215 the extra file-scope symbol nastiness.
2216
2217Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2218
2219 * method.c (make_thunk): Thunks are static.
2220 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
2221
2222 * decl2.c (mark_vtable_entries): Emit thunks as needed.
2223 (finish_file): Don't emit them here.
2224
2225Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2226
2227 * rtti.c (build_dynamic_cast): Handle null pointers.
2228 (ifnonnull): New function.
f72bbc37 2229
6b5fbb55
MS
2230Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
2231
a80e4195
MS
2232 * call.c (build_method_call): Remember the original basetype we
2233 were called with. Give an error message instead of trying
2234 (incorrectly) to call a non-static member function through a
2235 non-inherited class.
2236
6b5fbb55
MS
2237 * search.c (expand_upcast_fixups): Mark the new fixup as
2238 DECL_ARTIFICIAL.
2239
2240Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2241
2242 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
2243
2244 * class.c (set_rtti_entry): Fix for thunks.
2245
2246 * decl2.c (import_export_decl): Still emit typeinfo fns for
2247 cv-variants of builtin types.
2248
2249 * rtti.c (expand_class_desc): Set up base_info_type_node here.
2250 (init_rtti_processing): Instead of here.
2251
2252Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2253
2254 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
2255 (build_typeid): Only complain about taking dynamic typeid without
2256 -frtti.
2257
2258 * decl2.c: flag_rtti defaults to 1.
2259
2260 * rtti.c (get_tinfo_var): The general class case is now smaller.
2261 (init_rtti_processing): Pack the latter three fields of base_info
2262 into 32 bits.
2263
2264Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
2265
2266 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
2267
2268Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
2269
2270 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
2271 (push_memoized_context): Split out code to undefer pop_type_level to
2272 (clear_memoized_cache): here.
2273 (pop_memoized_context): We can only handle one layer of deferral of
2274 pop_type_level so clear the cache, if there was a previous level.
2275
2276Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2277
2278 * rtti.c (init_rtti_processing): Build up base_info_type_node.
2279 (expand_class_desc): Use one pointer to an array of base_info
2280 structs, passed using a CONSTRUCTOR.
2281
2282Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
2283
2284 * class.c (build_vbase_path): Remove block extern for
2285 flag_assume_nonnull_objects here.
2286 (build_vfn_ref): Split out functionality into build_vtbl_ref.
2287 (build_vtbl_ref): New routine.
2288 (build_vtable): Set up rtti info here.
2289 (add_virtual_function): Note in CLASSTYPE_RTTI the best
2290 place where we can get the rtti pointers from to avoid having to
2291 search around for a place.
d11ad92e
MS
2292 (finish_base_struct): Likewise.
2293 (finish_struct_1): Likewise. Never create totally new vtables
2294 with totally new vtable pointers for rtti. Disable code to layout
2295 vtable pointers better until we want to break binary
2296 compatibility.
6b5fbb55
MS
2297 * rtti.c (build_headof_sub): New routine to convert down to a
2298 sub-object that has an rtti pointer in the vtable.
2299 (build_headof): Use it. Also, use build_vtbl_ref now to be more
2300 maintainable.
2301 (build_dynamic_cast): Make sure we have saved it, if we need to.
2302 * search.c (dfs_init_vbase_pointers): Disable code that deals with
2303 a more efficient vtable layout, enable later.
2304 * call.c (flag_assume_nonnull_objects): Moved declaration to
2305 * cp-tree.h: here. Declare build_vtbl_ref.
2306 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
2307 function calls that want a tree.
2308
2309Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2310
2311 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
2312 other X subobjects in the most derived type. Ack.
2313
2314 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
2315 get_typeid will do it for us.
2316 (get_typeid_1): Break out call-building for expand_*_desc to use.
2317 (get_typeid): Call it.
d11ad92e 2318 (expand_*_desc): Likewise.
6b5fbb55
MS
2319 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
2320 and void *.
2321 (init_decl_processing): Lose builtin_type_tdescs lossage.
2322 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
2323
2324Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
2325
2326 * pt.c (tsubst): When calling set_nested_typename, use
2327 TYPE_NESTED_NAME (current_class_type) instead of
2328 current_class_name.
2329
d11ad92e
MS
2330 * decl.c (pushdecl): Likewise.
2331 (pushdecl_class_level): Likewise.
6b5fbb55
MS
2332 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
2333 set_nested_typename.
2334
2335Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2336
2337 * rtti.c (synthesize_tinfo_fn): Handle arrays.
2338
2339 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
2340
2341Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2342
2343 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
2344 (init_rtti_processing): Lose bad_cast_type.
2345 (build_dynamic_cast): Use throw_bad_cast.
2346
2347 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
2348
2349 * decl2.c (finish_file): Don't synthesize artificial functions
2350 that are external and not inline.
2351
2352 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
2353
2354 * decl2.c (finish_file): Handle having new inlines added to
2355 saved_inlines by synthesis.
2356
2357 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
2358
2359Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2360
2361 RTTI rewrite to initialize nodes as needed, not require that
2362 users #include <typeinfo>, complete functionality and reduce wasted
2363 space.
2364 * rtti.c (init_rtti_processing): New fn.
2365 (build_typeid): The vtable entry is now a function.
2366 (get_tinfo_var): New fn.
d11ad92e 2367 (get_tinfo_fn): Likewise.
6b5fbb55
MS
2368 (get_typeid): Use it.
2369 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
2370 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
2371 points __rtti_*.
2372 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
2373 (synthesize_tinfo_fn): New fn.
2374 * method.c (build_t_desc_overload): Lose.
2375 (build_overload_with_type): More generic.
2376 * decl.c (init_decl_processing): Call init_rtti_processing.
2377 * class.c (set_rtti_entry): Use get_tinfo_fn.
2378 * decl2.c (mark_vtable_entries): Mark the rtti function.
2379 (finish_prevtable_vardecl): Don't build_t_desc.
2380 (import_export_decl): Handle tinfo functions.
d11ad92e 2381 (finish_file): Likewise.
6b5fbb55
MS
2382 * typeck.c (inline_conversion): New fn.
2383 (build_function_call_real): Use it.
2384 * cp-tree.h: Add decls.
2385
2386 * method.c (hack_identifier): Also convert component_refs from
2387 references.
2388
2389 * lex.c (cons_up_default_function): Use the type, not the name, in
2390 declspecs.
2391
2392 * decl2.c (import_export_vtable): Fix weak vtables.
2393
2394Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
2395
2396 * search.c (get_base_distance_recursive): Fix access checks for
2397 protected bases.
2398
2399Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2400
2401 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
2402 cp-tree.h.
2403 (convert_harshness): Add prototypes wrapped by PROTO.
2404 * decl2.c (grok_function_init): Likewise.
2405 (do_toplevel_using_decl): Change to void return type.
2406 * class.c (build_vtable_entry): Remove decl of make_thunk.
2407 (merge_overrides): Fix order of arg definitions.
2408 (finish_vtbls): Likewise.
2409 (fixup_vtable_deltas): Likewise.
2410 (modify_all_direct_vtables): Likewise.
2411 (modify_all_indirect_vtables): Likewise.
2412 * search.c (get_base_distance_recursive): Likewise.
2413 (get_abstract_virtuals_1): Likewise.
2414 (fixup_virtual_upcast_offsets): Likewise.
2415 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
2416 * init.c (perform_member_init): Fix order of arg definitions.
2417 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
2418 * cp-tree.h (make_thunk): Add decl.
2419 (overload_template_name, push_template_decl): Add decls.
2420 (do_toplevel_using_decl): Change to void return type.
2421 (vec_binfo_member): Add decl.
2422
cdf5b885
MS
2423Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2424
2425 * typeck.c (mark_addressable, convert_for_assignment,
2426 convert_for_initialization, pointer_int_sum, pointer_diff,
2427 unary_complex_lvalue): Add prototypes wrapped by PROTO.
2428 (convert_sequence): #if 0 fn decl, since definition also is.
2429
2430Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
2431
2432 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
2433 cast to pointer types for type searching.
2434
2435Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2436
2437 * typeck.c (get_delta_difference): Use cp_error, not error, in the
2438 case where BINFO == 0.
2439
2440Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
2441
2442 * call.c (build_method_call): Fix wording of error messages so
2443 constructors come out right.
2444
2445Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
2446
2447 * decl.c (push_overloaded_decl): Don't warn about hidden
2448 constructors when both the type and the function are declared
2449 in a system header file.
2450
c91a56d2
MS
2451Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
2452
2453 * class.c (finish_struct_1): Propagate the TYPE_PACKED
2454 flag for the type to the type's fields.
2455
2456Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2457
2458 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
2459
2460Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
2461
2462 * class.c (base_info, finish_base_struct): Replace
2463 needs_virtual_dtor with base_has_virtual.
2464
2465 (finish_struct_1): Remove the old code that tried to make default
2466 destructors virtual. Use base_has_virtual when checking if we need
2467 to add a vtable entry for the rtti code.
2468
2469Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2470
2471 * pt.c (push_template_decl): Complain about template decl with
2472 inappropriate declaration.
2473
2474Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
2475
2476 * typeck.c (build_x_unary_op): Remove bogus check for taking
2477 the address of a member function.
2478
2479Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2480
2481 * parse.y (constructor_declarator): Only push the class if
2482 we are not already in the class.
2483
2484Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
2485
2486 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
2487 Add additional argument to INIT_CUMULATIVE_ARGS.
2488
c91a56d2
MS
2489Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2490
2491 * decl.c (shadow_tag): Fix error about anon union with methods.
2492
2493 * parse.y (self_reference): Only generate a self-reference if this
2494 is a non-template class.
2495 (opt.component_decl_list): Only use it if it was generated.
2496
2497 * parse.y (component_decl_1): Use constructor_declarator.
d11ad92e
MS
2498 (fn.def2): Likewise.
2499 (notype_component_declarator0): Likewise.
c91a56d2
MS
2500
2501Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
2502
2503 * typeck.c (build_x_unary_op): Add checks for taking the address
2504 of a TARGET_EXPR or of a member function, and give appropriate
2505 warnings.
2506
2507Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2508
2509 * pt.c (process_template_parm): Allow template type parms to be
2510 used as types for template const parms.
2511
2512Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
2513
2514 * init.c (expand_vec_init): Ensure the eh cleanups are on the
2515 function_obstack.
2516
2517Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2518
2519 * decl.c (lookup_name_real): Be even more picky about the
2520 ambiguous lookup warning.
2521 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
2522 * parse.y (constructor_declarator): Rather than here.
2523
2524 * parse.y (constructor_declarator): New nonterminal.
2525 (fn.def1): Use it.
d11ad92e 2526 (explicit_instantiation): Likewise.
c91a56d2
MS
2527
2528Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2529
2530 Add implicit declaration of class name at class scope.
2531 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
2532 * parse.y (self_reference): New nonterminal.
2533 (opt.component_decl_list): Use it.
2534 (fn.def1): Add nested_name_specifier type_name cases.
2535 * class.c (build_self_reference): New function.
2536 (finish_struct): Handle access_default later, move self-reference
2537 decl to the end.
2538 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
2539 * cp-tree.h: Adjust.
2540
2541 * pt.c (do_function_instantiation): Separate handling of member
2542 functions and non-member functions properly.
2543
2544Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2545
2546 * pt.c (process_template_parm): Improve error for 'volatile class K'.
2547
2548 * class.c (finish_struct_1): Check the right slot for destructors.
2549
2550 * decl.c (start_enum): Complain about enum templates.
2551
2552Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
2553
2554 * init.c (resolve_offset_ref): Offset pointers to member data by one.
d11ad92e 2555 * typeck.c (unary_complex_lvalue): Likewise.
c91a56d2
MS
2556
2557Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
2558
2559 * typeck.c (c_expand_return): Check for a returned local
2560 array name, similar to the check for an ADDR_EXPR.
2561
2562Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2563
2564 * decl.c (cp_finish_decl): Don't build cleanups for static
2565 variables here.
2566
2567Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
2568
2569 * typeck.c (build_modify_expr): Fix error messages to be more
2570 accurate.
2571 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
2572 assignment operators.
d11ad92e 2573 * error.c (assop_as_string): Likewise. Add support for `%Q' for
c91a56d2
MS
2574 assignment operators.
2575
909e536a
MS
2576Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2577
c91a56d2
MS
2578 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
2579 give an error if initialized. Pedwarn about nested type with the
2580 same name as its enclosing class.
2581
909e536a
MS
2582 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
2583
2584 * typeck.c (require_complete_type): Be sure to instantiate the
2585 MAIN_VARIANT of the type.
2586
2587 * decl2.c (finish_file): Instantiate pending templates before
2588 processing static constructors and destructors.
2589
2590 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
2591 unless at_eof.
2592
2593Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
2594
2595 * decl2.c (delete_sanity): If error_mark_node is passed
2596 in as an expression, quit while we're ahead.
2597
2598 * decl.c (grokdeclarator): Give an error message if `friend'
2599 is combined with any storage class specifiers.
2600
fc378698
MS
2601Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
2602
2603 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
2604 definition of nonexistent nested type.
2605
2606 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
2607 not to say 'typedef'.
2608
2609Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2610
2611 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
2612 * search.c (dfs_walk, dfs_init_vbase_pointers,
2613 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
2614 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
2615
2616Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2617
2618 * except.c (build_throw): Support minimal parse.
2619 * pt.c (tsubst_copy): Support THROW_EXPR.
d11ad92e 2620 * decl2.c (build_expr_from_tree): Likewise.
fc378698
MS
2621
2622 * pt.c (mangle_class_name_for_template): Always allocate
2623 scratch_firstobj.
2624
2625Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
2626
2627 * cvt.c (cp_convert_to_pointer): Give an appropriate error
2628 when trying to cast from an incomplete type.
2629
2630Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2631
2632 * pt.c (instantiate_class_template): Don't bother setting up
2633 CLASSTYPE_TAGS explicitly, as the nested types will add
2634 themselves.
2635
2636Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
2637
2638 * decl.c (shadow_tag): Remove old error check for usage of
2639 an enum without a previous declaration.
2640 (xref_tag): Add error message about usage of enums without a
2641 previous declaration.
2642
2643Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2644
2645 * lex.c (do_identifier): Only do name consistency check if we're
2646 parsing.
2647
2648 * pt.c (push_template_decl): Don't crash if we get a member defn
2649 that doesn't match.
2650
2651 * decl.c (xref_tag_from_type): New function to do an xref without
2652 always having to figure out code_type_node.
2653 * cp-tree.h: Declare it.
2654 * pt.c (instantiate_class_template): Use it for friend classes.
2655 (lookup_template_class): Use it.
2656
2657 * typeck2.c (build_functional_cast): Pull out a single parm before
2658 passing it to build_c_cast.
2659
2660Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
2661
2662 * expr.c (do_case): Give an error message if a pointer is
2663 given as a case value.
2664
2665Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2666
2667 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
2668 an overload list.
2669
2670 * lex.c (cons_up_default_function): Really, now, interface hackery
2671 does not apply to synthesized methods.
2672
2673Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
2674
2675 * call.c (build_method_call): Ctors and dtors now have special names
2676 with respect to lookups.
d11ad92e
MS
2677 * class.c (add_method): Likewise.
2678 (grow_method): Likewise.
2679 (finish_struct_methods): Likewise.
2680 (warn_hidden): Likewise.
2681 (finish_struct_1): Likewise.
2682 * cvt.c (convert_to_reference): Likewise.
2683 (convert_to_aggr): Likewise.
2684 (cp_convert): Likewise.
2685 * decl2.c (check_classfn): Likewise.
2686 * init.c (expand_member_init): Likewise.
2687 (expand_default_init): Likewise.
2688 (expand_aggr_init_1): Likewise.
2689 (build_offset_ref): Likewise.
2690 (build_new): Likewise.
2691 (build_delete): Likewise.
2692 * lex.c (do_inline_function_hair): Likewise.
2693 * search.c (lookup_field_1): Likewise.
2694 (lookup_fnfields_here): Likewise.
2695 (lookup_field): Likewise.
2696 (lookup_fnfields): Likewise.
2697 (get_virtual_destructor): Likewise.
2698 (dfs_debug_mark): Likewise.
2699 (dfs_pushdecls): Likewise.
2700 (dfs_compress_decls): Likewise.
2701 * tree.c (layout_basetypes): Likewise.
2702 * typeck.c (build_component_ref): Likewise.
2703 (build_x_function_call): Likewise.
2704 (build_modify_expr): Likewise.
2705 (convert_for_initialization): Likewise.
2706 (build_functional_cast): Likewise.
2707 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
fc378698
MS
2708 (CTOR_NAME): New.
2709 (DTOR_NAME): New.
2710 * decl.c (ctor_identifier): New.
2711 (dtor_identifier): New.
2712 (init_decl_processing): Set them.
2713
2714Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
2715
2716 * typeck.c (build_component_ref): Don't get confused by fields whose
2717 context has no type name, like pointer to member functions.
2718
2719Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2720
2721 * decl.c (grokdeclarator): Handle typedef without declarator.
2722
2723 * pt.c (tsubst): Handle SCOPE_REF in declarator.
2724
2725 * parse.y (bad_parm): Catch another case of missing `typename'.
2726
2727 * lex.c (yyprint): Handle TYPE_DECLs.
2728
2729 * decl.c (start_function): Don't try to be clever.
2730
2731 * lex.c: Lose compiler_error_with_decl.
2732 * typeck2.c: Lose error_with_aggr_type.
2733 (incomplete_type_error): Use cp_* instead of old functions.
d11ad92e
MS
2734 (readonly_error): Likewise.
2735 * typeck.c (convert_arguments): Likewise.
2736 * search.c (lookup_nested_field): Likewise.
2737 * method.c (make_thunk): Likewise.
2738 * decl.c (grokparms): Likewise.
fc378698
MS
2739 * cp-tree.h: Update.
2740
2741 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
2742 and value.
2743
2744Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
2745
2746 * method.c (build_opfncall): When deleting a pointer to an
2747 array, build a new pointer to the tree past any ARRAY_TYPE
2748 nodes.
2749
2750Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2751
2752 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
2753
2754Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2755
2756 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
2757 and ! DECL_INLINE.
2758
2759 * decl.c (finish_function): Don't set nested based on
2760 hack_decl_function_context.
2761 * parse.y (function_try_block): Check for nested function.
d11ad92e 2762 (pending_inlines): Likewise.
fc378698
MS
2763
2764 * decl2.c (build_expr_from_tree): If a unary op already has a
2765 type, just return it.
2766
2767 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
2768
2769 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
2770 (finish_file): Check the return value of walk_vtables.
2771 (finish_prevtable_vardecl): Return int.
d11ad92e
MS
2772 (finish_vtable_vardecl): Likewise.
2773 (prune_vtable_vardecl): Likewise.
2774 * lex.c (set_vardecl_interface_info): Likewise.
fc378698
MS
2775 * cp-tree.h: Adjust return types.
2776
2777 * class.c (delete_duplicate_fields_1): Don't complain about
2778 duplicate nested types if they're the same type.
2779 (finish_struct): Remove check for duplicate.
2780 * decl2.c (grokfield): Don't check for typedef of anonymous type.
2781
2782Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2783
2784 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
2785
2786 * decl.c (grokdeclarator): Lose special handling of class-level
2787 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
2788 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
2789
2790 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
2791
2792 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
2793
2794 * search.c (compute_access): Fix handling of anonymous union
2795 members.
2796 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
2797 from anonymous unions to their members.
2798
2799 * typeck.c (build_x_function_call): For static member functions,
2800 hand off to build_member_call.
2801
2802Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2803
2804 * typeck.c (build_component_ref): Handle OFFSET_REFs.
2805
2806 * init.c (expand_vec_init): Fix init == 0 case.
2807
2808Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2809
2810 * init.c (build_new): Pedwarn about init and array new.
2811 (expand_vec_init): Handle lists, use convert_for_initialization
2812
2813 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
2814 when converting to an aggregate type.
2815 * cvt.c (cp_convert): Pass it through.
2816
2817 * typeck.c (build_conditional_expr): Handle user-defined
2818 conversions to slightly different types.
2819
2820 * decl.c (grokdeclarator): Force an array type in a parm to be
2821 permanent.
2822
2823 * decl2.c (do_using_directive): Sorry.
d11ad92e 2824 (do_namespace_alias): Likewise.
fc378698
MS
2825 * lex.c (real_yylex): Warn about using the `namespace' keyword.
2826
2827Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2828
2829 * parse.y (datadef): Move call to note_list_got_semicolon up.
2830
934c6b13
MS
2831Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
2832
2833 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
2834
2835Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
2836
2837 * decl.c (cp_finish_decl): The exception regions have to be
2838 nested, not overlapping. We start the exception region for a
2839 decl, after it has been fully built, and all temporaries for it
2840 have been cleaned up.
2841
2842Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
2843
2844 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
2845
e76a2646
MS
2846Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2847
2848 * tree.def: Add RETURN_INIT.
2849 * pt.c (instantiate_decl): Handle RETURN_INIT.
2850 * decl.c (store_return_init): Handle minimal_parse_mode.
2851
2852 * tree.c (cp_build_type_variant): Just return an error_mark_node.
2853 * decl.c (make_typename_type): Don't try to get the file and line
2854 of an identifier.
2855 * typeck.c (comptypes): Handle TYPENAME_TYPE.
2856
2857Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
2858
2859 * decl.c (poplevel): Make sure we clear out and restore old local
2860 non-VAR_DECL values by default when they go out of scope.
2861
2862Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2863
2864 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
2865 referring to addresses of variables and functions.
2866
2867 * error.c (dump_expr): Support SIZEOF_EXPR.
2868
2869 * init.c (do_friend): Use the return value of check_classfn.
2870
2871 * typeck.c (convert_arguments): Call complete_type.
2872
2873 * method.c (hack_identifier): After giving an error, set value to
2874 error_mark_node.
2875
2876Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2877
2878 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
2879 lossage for local classes.
2880 * cp-tree.h: Declare it.
2881 * decl.c (lookup_name_real): Evil, painful hack for local classes.
2882 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
2883 Use hack_decl_function_context.
2884 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
2885 (start_function): Use hack_decl_function_context.
d11ad92e
MS
2886 (finish_function): Likewise.
2887 * method.c (synthesize_method): Likewise.
2888 * lex.c (process_next_inline): Likewise.
2889 (do_pending_inlines): Likewise.
e76a2646
MS
2890 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
2891 done with it.
2892
2893Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
2894
2895 * sig.c (build_signature_pointer_or_reference_type): Align
2896 signature pointers/references on 8-byte boundaries so they can be
2897 grabbed 2 words at a time on a Sparc.
2898
2899Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
2900
2901 * method.c (hack_identifier): Requiring a static chain is now a
2902 hard error.
2903 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
2904 functions.
2905
2906Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2907
2908 * init.c (build_offset_ref): Call complete_type.
2909
2910 * decl.c (pop_from_top_level): Always pop previous_class_type.
2911
2912 * parse.y: Handle multiple decls in a for-init-statement.
d11ad92e 2913 * pt.c (tsubst_expr): Likewise.
e76a2646
MS
2914
2915 * pt.c (tsubst): Use tsubst_expr for the second operand of an
2916 ARRAY_REF.
2917
2918 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
2919 (poplevel_class): Set it here.
2920 (pop_from_top_level): Pop it here if we're returning to class scope.
2921 * class.c (pushclass): Don't set it here.
2922
2923 * decl.c (maybe_push_to_top_level): Save current_template_parms,
2924 and clear it if !pseudo.
2925 (pop_from_top_level): Restore it.
2926
2927 * decl2.c (finish_file): Push the dummy each time we walk the list
2928 of vtables.
2929
2930 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
2931 something for CAST_EXPR.
2932
2933Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2934
2935 * cvt.c (cp_convert): Warn about implicit conversion of the
2936 address of a function to bool, as it is always true.
2937
2938Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2939
2940 * typeck.c (c_expand_return): Fix warning for local externs returned.
2941
2942Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2943
2944 * tree.c (mapcar): Propagate const and volatile properly.
2945
2946 * typeck.c (complete_type): Be sure to instantiate the
2947 MAIN_VARIANT of the type.
2948
2949 * method.c (synthesize_method): Class interface hackery does not
2950 apply to synthesized methods.
2951
2952Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2953
2954 * pt.c (comp_template_args): Use comptypes rather than just
2955 checking for TEMPLATE_TYPE_PARM equivalence.
2956
2957 * typeck.c (build_x_function_call): Call complete_type before
2958 checking TYPE_OVERLOADS_CALL_EXPR.
2959
7ea63af7
MH
2960Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
2961
2962 * g++.c (main): Check also for new define ALT_LIBM.
2963
ec255269
MS
2964Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2965
2966 * pt.c (instantiate_class_template): If we don't have a pattern
2967 yet, that's OK.
2968 (coerce_template_parms): If we see a local class, bail.
2969
2970 * decl.c (grok_reference_init): Make sure there's a type before
2971 checking its code.
2972
2973 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
d11ad92e 2974 (push_template_decl): Likewise.
ec255269
MS
2975
2976 * parse.y (named_class_head): Set
2977 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
2978
2979 * decl.c (xref_tag): Diagnose redeclaration of template
2980 type-parameter name.
2981
2982 * error.c (dump_type): Handle anonymous template type parms.
2983
2984 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
2985 TYPE_STUB_DECL.
d11ad92e 2986 (coerce_template_parms): Likewise.
ec255269
MS
2987
2988Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
2989
2990 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
2991 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
2992
2993Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
2994
2995 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
2996 before trying to get its STUB_DECL.
d11ad92e 2997 (coerce_template_parms): Likewise.
ec255269
MS
2998
2999 * parse.y (template_type_parm): If they didn't use 'class',
3000 pretend they did after giving an error.
3001
3002 * pt.c (coerce_template_parms): Diagnose use of local class.
3003
3004 * decl.c (grok_reference_init): Use instantiate_type.
3005
3006 * error.c (dump_expr): Handle TEMPLATE_DECLs.
3007
3008 * parse.y (named_class_head): Diagnose mismatching types and tags.
3009
3010 * decl.c (pushdecl): Type decls and class templates clash with
3011 artificial type decls, not hide them.
3012
3013 * decl.c (redeclaration_error_message): Diagnose redefinition of
3014 templates properly.
3015 (duplicate_decls): Diagnose disallowed overloads for template
3016 functions, too.
3017
3018 * decl.c (start_decl): Call complete_type before checking for a
3019 destructor.
3020
3021 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
3022
3023 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
3024
5566b478
MS
3025Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3026
ec255269
MS
3027 * decl.c (grok_op_properties): Don't check for operator++(int) in
3028 a template.
3029
3030 * tree.c (perm_manip): Return a copy of variable and function
3031 decls with external linkage.
3032
3033 * tree.def: Change some of the min tree codes to type "1".
3034 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
3035 * method.c (build_overload_int): Emit something arbitrary for
3036 anything but an INTEGER_CST if we're in a template.
3037
3038 * decl.c (cp_finish_decl): Call complete_type before deciding
3039 whether or not to lay out the decl.
3040
5566b478
MS
3041 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
3042
3043Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3044
3045 * typeck2.c (build_x_arrow): Call complete_type.
3046
3047 * pt.c (add_pending_template): Broken out.
3048 (lookup_template_class): If -fexternal-templates, call it for all
3049 the methods of implemented types.
3050 (instantiate_class_template): Instead of instantiating them here.
3051 (instantiate_decl): Handle -fexternal-templates earlier.
3052
3053Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3054
3055 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
3056 memoized lookup stuff inside GATHER_STATISTICS.
3057
3058Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3059
3060 * decl.c (start_decl): Complain about array of incomplete type
3061 here.
3062 (grokdeclarator): Not here.
3063
3064 * parse.y (template_parm): Expand full_parm inline so we can set
3065 the rule's precedence.
3066
3067 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
3068 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
3069 * decl2.c (grokbitfield): Don't check for integer constant here.
3070 * class.c (finish_struct_1): Check here.
3071
3072 * decl.c (define_label): Make the min decl go on permanent_obstack.
3073
3074 * pt.c (unify): Don't handle CONST_DECLs.
3075 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
d11ad92e 3076 (tsubst_copy): Likewise.
5566b478
MS
3077
3078 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
3079 CONST_DECL for a template parm.
3080
3081Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
3082
3083 * decl.c (grokdeclarator): Complain about array of incomplete type
3084 here.
3085 (start_decl_1): Not here.
3086
3087 * pt.c (tsubst): Handle pointer-to-function declarators.
3088
3089 * method.c (hack_identifier): If pedantic, diagnose local class
3090 methods that require a static chain.
3091
3092 * decl.c (grok_op_properties): No longer static.
3093 * cp-tree.h: Declare it.
3094 * pt.c (tsubst): Call it for operators.
3095 Use tsubst_copy for TREE_VECs.
3096
3097 * parse.y (template_arg): The expr has precedence like '>'.
3098
3099Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3100
3101 * pt.c (coerce_template_parms): Don't coerce an expression using
3102 template parms.
3103 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
3104 (tsubst): Don't use build_index_2_type if the max_value uses template
3105 parms.
3106 * method.c (build_overload_int): Emit something arbitrary for an
3107 expression using template parms.
3108
3109 * parse.y (template_close_bracket): New non-terminal to catch use
3110 of '>>' instead of '> >' in template class names.
3111 (template_type): Use it.
3112 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
3113
3114 * tree.def: Add CAST_EXPR.
3115 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
3116 CONVERT_EXPR for minimal_parse_mode.
d11ad92e
MS
3117 * typeck.c (build_c_cast): Likewise.
3118 * pt.c (tsubst_copy): Likewise.
3119 * decl2.c (build_expr_from_tree): Likewise.
3120 * error.c (dump_expr): Likewise.
5566b478
MS
3121
3122Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3123
3124 * except.c (SetTerminate, SetUnexpected): Put back global vars.
3125 (init_exception_processing): Put back decl/init of
3126 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
3127 fns from libstdc++.
3128
3129 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
3130 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
3131 Delete unused fns.
3132 * cp-tree.h (declare_uninstantiated_type_level,
3133 uninstantiated_type_level_p): Delete prototypes.
3134
3135Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3136
3137 * pt.c (tsubst_expr): Add default return.
3138
3139Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3140
3141 * error.c (fndecl_as_string): Delete unused arg CNAME.
3142 * sig.c (build_signature_table_constructor,
3143 build_signature_method_call): Fix calls.
3144
3145 * class.c (the_null_vtable_entry): Delete var definition.
3146 (init_class_processing): Delete tree the_null_vtable_entry init.
3147 * decl.c (no_print_{functions, builtins}): Declare as static.
3148 (__tp_desc_type_node): #if 0 var definition.
3149 (init_type_desc): #if 0 init of __tp_desc_type_node.
3150 (vb_off_identifier): Move var decl into init_decl_processing.
3151 (current_function_assigns_this): Declare as static.
3152 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
3153 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
3154 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
3155 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
3156 * init.c (BI_header_type, BI_header_size): Declare as static.
3157 * pt.c (template_classes): Delete unused var.
3158 (add_pending_template): Delete decl for non-existent fn.
3159 (lookup_template_class): Delete vars CODE and TAG_CODE.
3160 (instantiate_template): Delete unused var TARGS.
3161 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
3162 Delete decls.
3163 (__tp_desc_type_node): #if 0 var decl.
3164 (fndecl_as_string): Fix prototype.
3165
3166Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3167
3168 * tree.def: Add GOTO_STMT.
3169 * pt.c (tsubst_expr): Support goto and labels.
3170 * decl.c (define_label): Support minimal parsing.
d11ad92e 3171 * parse.y (simple_stmt): Likewise.
5566b478
MS
3172
3173Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3174
3175 * xref.c (GNU_xref_member): Only define/set var I if
3176 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
3177 used.
3178 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
3179 (GNU_xref_end): Fix call.
3180 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
3181 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
3182
3183 * tree.c (build_exception_variant): Delete unused vars I, A, T,
3184 T2, and CNAME.
3185 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
3186 (mapcar): Delete unused var CODE.
3187 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
3188 (break_out_cleanups): Fix call.
3189 (bot_manip): Likewise.
3190 * call.c (build_method_call): Likewise.
3191 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
3192 Likewise.
3193 * typeck.c (unary_complex_lvalue, build_modify_expr,
3194 convert_for_initialization): Likewise.
3195 * typeck2.c (build_functional_cast): Likewise.
3196 * cp-tree.h (build_cplus_new): Fix prototype.
3197
3198 * repo.c (open_repo_file): Delete unused var Q.
3199 (repo_compile_flags, repo_template_declared,
3200 repo_template_defined, repo_class_defined, repo_inline_used,
3201 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
3202 (repo_get_id, repo_vtable_used): Declare as static.
3203 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
3204 prototypes.
3205
3206Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3207
3208 * parse.y (pending_inlines): Add function_try_block case.
3209
3210 * pt.c (unify): Fix for template const parms.
3211
3212Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3213
3214 * lex.c (extract_interface_info): Delete forward decl.
3215 (default_copy_constructor_body, default_assign_ref_body): Delete
3216 decls for non-existent functions.
3217 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
3218 (init_lex): Delete setting them.
3219 (cons_up_default_function): Delete unused vars FUNC_BUF,
3220 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
3221 #if 0'd synth code.
3222 (toplevel, expression_obstack): Delete unused extern decls.
3223 (tree_node_kind): Delete unused enum.
3224 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
3225 GATHER_STATISTICS.
3226 (tree_node_kind_names): Delete unused extern decl.
3227 (synth_obstack): Delete unused var.
3228 (init_lex): Don't set it.
3229 (init_parse): Add decl before use.
3230 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
3231 (current_unit_{name, language}): Delete unused vars.
3232 (check_newline): Don't bother setting them, just accept the #pragma.
3233 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
3234 (current_unit_{name, language}): Delete decls.
3235
3236 * search.c: Wrap all of the memoized functions, macros, and
3237 variables inside #ifdef GATHER_STATISTICS.
3238 (lookup_field, lookup_fnfields): Likewise.
3239 (init_search_processing): Likewise.
3240 (reinit_search_statistics): Wrap whole function.
3241 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
3242
3243 * decl.c (finish_function): Only call pop_memoized_context if
3244 GATHER_STATISTICS is defined.
3245 (start_function): Likewise for push_memoized_context.
3246 * class.c (pushclass, popclass): Likewise.
3247
3248 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
3249 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
3250
3251 * cvt.c (cp_convert): Delete unused local var FORM.
3252 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
3253 prototypes.
3254
3255Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3256
3257 * pt.c (do_poplevel): Oops; really return what we get from
3258 poplevel this time.
3259
3260Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3261
3262 * cp-tree.h (is_aggr_type): Add prototype.
3263
3264 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
3265 * method.c ({push,pop}_cp_function_context): Delete decls.
3266 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
3267 (SetUnexpected, SetTerminate): Delete unused vars.
3268 (init_exception_processing): Don't set SetUnexpected or
3269 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
3270 (output_exception_table_entry): Delete unused array LABEL.
3271 (expand_internal_throw): Delete unused var PARAMS.
3272 (expand_start_catch_block): Delete unused var CLEANUP.
3273 (emit_exception_table): Delete unused var EH_NODE_DECL.
3274 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
3275 GOTO_UNWIND_AND_THROW. Don't set them.
3276 (end_eh_unwinder): Add top decl.
3277 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
3278 (exception_section, push_rtl_perm, do_function_call,
3279 lang_interim_eh, push_eh_cleanup, eh_outer_context,
3280 expand_end_eh_spec, end_eh_unwinder): Declare as static.
3281 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
3282 throw_used): Likewise.
3283 * cp-tree.h (expand_end_eh_spec): Delete prototype.
3284
3285 * search.c (dfs_mark, dfs_mark_vtable_path,
3286 dfs_unmark_vtable_path, dfs_mark_new_vtable,
3287 dfs_unmark_new_vtable, dfs_clear_search_slot,
3288 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
3289 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
3290 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
3291 functions.
3292 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
3293 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
3294 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
3295 Only define #ifdef GATHER_STATISTICS.
3296 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
3297 is defined.
3298 (vbase_decl): Delete var definition.
3299 (init_search): Delete old decl.
3300 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
3301 never actually used.
3302 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
3303 (get_base_distance_recursive): Delete unused fourth arg
3304 BASETYPE_PATH. Fix call .
3305 (get_base_distance): Fix call.
3306 (push_class_decls): Delete unused var ID.
3307 (make_memoized_table_entry): Declare as static.
3308 (breadth_first_search): Declare as static.
3309 (tree_has_any_destructor_p): Declare as static.
3310 (pop_class_decls): Delete unused arg pop_class_decls.
3311 * class.c (popclass): Fix call to pop_class_decls.
3312 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
3313 tree_has_any_destructor_p): Delete prototypes.
3314
3315 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
3316 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
3317 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
3318 (build_user_desc): Delete unused var T.
3319 (build_class_desc): Delete unused vars T and OFF.
3320 (build_t_desc): Delete unused var NAME_STRING.
3321 (build_headof): Make static.
3322 (get_bad_cast_node): Likewise.
3323 (get_def_to_follow): Likewise.
3324 * cp-tree.h (init_type_desc): Add prototype.
3325 (build_headof): Remove prototype.
3326
3327Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3328
3329 * pt.c (tsubst): Only look for matching decls at file scope for
3330 non-member functions.
3331
3332 * call.c (build_scoped_method_call): Handle scoped destructor
3333 calls in templates.
3334
3335 * decl.c (*_top_level): Also save previous_class_values.
3336
3337 * pt.c (tsubst_expr): Support do {} while loops.
d11ad92e
MS
3338 * parse.y (simple_stmt): Likewise.
3339 * tree.def: Likewise.
5566b478
MS
3340
3341 * method.c (build_overload_identifier): For a class nested in a
3342 template class, don't mangle in the template parms from our
3343 context.
3344
3345 * lex.c, cp-tree.h: Remove support for template instantiations in
3346 the pending_inlines code.
3347 * pt.c: Remove dead functions and unused arguments.
3348 (uses_template_parms): TYPENAME_TYPEs always use template parms.
3349 * parse.y: Stop passing anything to end_template_decl.
3350 * tree.c (print_lang_statistics): Only print tinst info #ifdef
3351 GATHER_STATISTICS.
3352
3353Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3354
3355 * init.c (expand_recursive_init{,_1}): Delete decls.
3356 (sort_member_init): Delete unused var INIT.
3357 (emit_base_init): Delete unused var X.
3358 (build_offset_ref): Delete unused var CNAME.
3359 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
3360 (emit_base_init): Delete unused local var BASE. Delete extern
3361 decl of IN_CHARGE_IDENTIFIER.
3362 (build_delete): Delete unused local var VIRTUAL_SIZE.
3363
3364 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
3365 (build_delete): Fix call.
3366 * decl2.c (delete_sanity): Likewise.
3367 * cp-tree.h (build_vec_delete): Update prototype.
3368
3369 * typeck.c (common_base_type): Delete unused var TMP.
3370 (build_binary_op): Delete local var ARGS_SAVE.
3371 (build_array_ref): Delete unused var ITYPE.
3372 (c_expand_return): Delete unused var USE_TEMP.
3373
3374 * typeck.c (compexcepttypes): Delete unused arg STRICT.
3375 (comptypes): Fix calls.
3376 * decl.c (duplicate_decls): Likewise.
3377 * cp-tree.h (compexcepttypes): Delete extra arg.
3378
3379 * decl2.c (check_classfn): Delete unused second arg CNAME.
3380 * decl.c (start_decl, grokfndecl): Fix calls.
3381 * init.c (do_friend): Likewise.
3382 * cp-tree.h (check_classfn): Update prototype.
3383
3384 * cp-tree.h (signature_error, import_export_vtable,
3385 append_signature_fields, id_in_current_class, mark_used,
3386 copy_assignment_arg_p): Add decls.
3387 * decl2.c (mark_used): Delete decl.
3388
3389 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
3390
3391 * class.c (get_vtable_entry): Diable unused function.
3392 (doing_hard_virtuals): Delete unused static global var.
3393 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
3394 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
3395 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
3396 (modify_one_vtable): Delete unused var OLD_RTTI.
3397 (finish_struct_anon): Delete unused vars OFFSET and X.
3398 (finish_struct_bits): Delete unused var METHOD_VEC.
3399 (get_basefndecls): Delete unused var PURPOSE. Delete unused
3400 for-scope local variable METHODS.
3401
3402 * call.c (user_harshness): Delete unused/unneeded arg PARM.
3403 (ideal_candidate): Delete unused args BASETYPE and PARMS.
3404 (build_method_call): Delete unused args passed into ideal_candidate.
3405 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
3406 * cp-tree.h (synthesize_method): Add decl.
3407
3408 * decl.c (note_level_for_for): Give void return type.
3409 (pushdecl_nonclass_level): Likewise.
3410 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
3411 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
3412 (suspend_binding_level): Delete unused var LEVEL.
3413 (duplicate_decls): Delete unused var CTYPE.
3414 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
3415 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
3416 PTR_ENDLINK.
3417 (grokdeclarator): Delete unused var C.
3418 (grokdeclarator): Delete unused var SIZE_VARIES.
3419 (grokparms): Delete unused var SAW_VOID.
3420 (start_function): Delete unused var OLDDECL.
3421 (cplus_expand_expr_stmt): Delete unused var
3422 REMOVE_IMPLICIT_IMMEDIATELY.
3423
3424 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
3425
3426 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
3427
3428Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3429
3430 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
d11ad92e 3431 (build_min_nt): Likewise.
5566b478
MS
3432 * pt.c (do_pushlevel): Emit line note.
3433 (do_poplevel): Return what we get from poplevel.
3434 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
3435 * parse.y: Use do_pushlevel and do_poplevel.
3436 * cp-tree.h: Declare do_poplevel.
3437
3438 * cp-tree.h: Declare at_eof.
3439 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
3440 * decl2.c (import_export_decl): Renamed from import_export_inline.
3441 (finish_file): Call it to do interface handling for statics.
3442 * pt.c (tsubst_copy): Call mark_used on variables and functions
3443 used here.
3444
3445 * decl2.c (finish_file): Don't emit statics we can't generate.
3446 * pt.c (instantiate_decl): Don't set interface on instantiations
3447 we can't generate.
3448
3449 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
3450 * tree.c (print_lang_statistics): Print max template depth.
3451 * pt.c (push_tinst_level): Dump entire instantiation context.
3452 (instantiate_class_template): Use it and pop_tinst_level.
d11ad92e 3453 (instantiate_decl): Likewise.
5566b478
MS
3454
3455 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
3456 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
3457
3458Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
3459
3460 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
3461 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
3462 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
3463 the new template implementation.
3464
3465Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3466
3467 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
3468
cffa8729
MS
3469Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
3470
3471 * decl.c (cp_finish_decl): Delay emitting the debug information for
3472 a typedef that has been installed as the canonical typedef, if the
3473 type has not yet been defined.
3474
3475Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3476
3477 * decl2.c (grokfield): Still call pop_nested_class for access decls.
3478
3479Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3480
3481 * decl.c (lookup_label): Call label_rtx.
3482
3483 * decl.c (make_binding_level): New function.
3484 (pushlevel, pushlevel_class): Call it instead of explicit
3485 duplicate calls to xmalloc.
3486
3487 * decl.c (init_decl_processing): Delete useless build_pointer_type
3488 call.
3489
3490 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
3491 (sizet_ftype_string): Delete variable.
3492 (init_decl_processing): Add built-in functions fabsf, fabsl,
3493 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
3494 variable strlen_ftype, used for strlen.
3495
3496Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
3497
3498 * decl.c (push_to_top_level): Start from current_binding_level
3499 again for now; the stl hacks depend on g++ being broken in this
3500 way, and it'll be fixed in the template rewrite.
3501
3502 * tree.def: Add USING_DECL.
3503 * decl2.c (do_class_using_decl): Implement.
3504 (grokfield): Pass access decls off to do_class_using_decl instead of
3505 grokdeclarator.
3506 * error.c (dump_decl): Handle USING_DECLs.
3507 * decl.c (grokdeclarator): Remove code for handling access decls.
3508 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
3509 as access decls for now.
3510 (finish_struct): Don't check USING_DECLs for other uses of the name.
3511
3512 * search.c (get_matching_virtual): Use cp_error_at.
3513
3514Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3515
3516 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
3517 match c-typeck.c.
3518 (self_promoting_args_p): Move the check that TYPE is non-nil
3519 before trying to look at its main variant.
3520 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
3521
3522 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
3523 Delete macros.
3524 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
3525 (do_friend): Delete call to xref_friend.
3526 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
3527
3528 * typeck.c (convert_sequence): #if 0 unused function.
3529
3530 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
3531 be in decl_in_memory_p.
3532 (decl_in_memory_p): Delete decl.
3533 * expr.c (decl_in_memory_p): Delete fn.
3534 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
3535
3536 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
3537
3538Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
3539
3540 * class.c (finish_struct_1): Check for a pure-specifier on a
3541 non-virtual function here.
3542
3543 * decl2.c (grok_function_init): Don't check whether the function
3544 is virtual here.
3545 (grokfield): Don't call check_for_override here.
3546
3547 * decl.c (push_to_top_level): Start from inner_binding_level,
3548 check class_shadowed in class levels.
3549
3550Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
3551
3552 * decl.c (resume_level): Ignore things that don't have names, instead
3553 of core dumping.
3554
3555Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3556
3557 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
3558
3559Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
3560
3561 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
3562 synthesized dtor.
3563
3564 * parse.y (complete_type_name): Bind global_scope earlier.
d11ad92e 3565 (complex_type_name): Likewise.
cffa8729
MS
3566 (qualified_type_name): Remove.
3567
2ee887f2
MS
3568Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
3569
3570 * decl.c (grokfndecl): Move code that looks for virtuals in base
3571 classes...
cffa8729 3572 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
3573 (finish_struct_1): Call it.
3574
3575 * cp-tree.h: Declare warn_sign_compare.
3576
3577 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
3578 rather than extra_warnings to decide whether to warn about
3579 comparison of signed and unsigned.
3580
3581 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
3582 implies -Wsign-compare. -Wall doesn't imply -W.
3583
3584Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
3585
3586 * typeck.c (build_component_ref): Fix to handle anon unions in base
3587 classes as well.
3588
3589Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3590
3591 * class.c (resolves_to_fixed_type_p): Delete code dealing with
3592 a WITH_CLEANUP_EXPR, since we don't generate them any more.
3593 * cvt.c (build_up_reference): Likewise.
3594 * decl.c (grok_reference_init): Likewise.
3595 (cp_finish_decl): Likewise.
3596 * error.c (dump_expr): Likewise.
3597 * tree.c (real_lvalue_p): Likewise.
3598 (lvalue_p): Likewise.
3599 (build_cplus_new): Likewise.
3600 (unsave_expr_now): Likewise.
3601 * typeck.c (unary_complex_lvalue, build_modify_expr,
3602 c_expand_return): Likewise.
3603
3604Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3605
3606 Make the C++ front-end pay attention to attributes for structures.
3607 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
3608 finish_struct_1.
3609 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
3610 Take out old round_up_size use and setting the DECL_ALIGN possibly
3611 using it. Take out setting of TYPE_ALIGN to round_up_size, which
3612 can override what the attribute set.
3613 * cp-tree.h (finish_struct): Update prototype.
3614 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
3615 attributes to finish_struct.
3616 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
3617 value down into finish_struct.
3618 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
3619
3620Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
3621
3622 * decl.c (poplevel): Re-word dead for local handling.
3623 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
3624 (cp_finish_decl): If is_for_scope, check for duplicates so
3625 we can disable is_for_scope. Otherwise, preserve_temp_slots.
3626
3627 * lex.c (do_identifier): Use global binding in preference of
3628 dead for local variable.
3629
3630Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
3631
3632 * init.c (initializing_context): Handle anon union changes, the
3633 context where fields of anon unions can be initialized now has to be
3634 found by walking up the TYPE_CONTEXT chain.
3635
3636Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
3637
3638 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
3639 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
3640 (obscure_complex_init): If bss is supported, always set
3641 DECL_INITIAL to error_mark_node.
3642
3643Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3644
3645 * init.c (is_friend): Make sure there's a context before we see if
3646 it's an aggr type.
3647
3648Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
3649
3650 * init.c (is_friend): Classes are not friendly with nested classes.
3651
3652Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
3653
3654 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
3655 and record its result.
3656
9e9ff709
MS
3657Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
3658
3659 * class.c (finish_struct_anon): Switch around code to not move anon
3660 union elements around, nor mess up their contexts, nor offsets,
3661 instead we now build up the right number of COMPONENT_REFs for all
3662 the anon unions that may be present at build_component_ref time.
3663 * typeck.c (lookup_anon_field): New routine to handle field lookup
3664 on fields without names. We find them, based upon their unique type
3665 instead.
3666 * typeck.c (build_component_ref): Allow FIELD_DECL components.
3667 Handle finding components in anonymous unions, and ensure that a
3668 COMPONENT_REF is built for each level as necessary.
3669
3670Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
3671
3672 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
3673 code that ensures that copy ctors are used if appropriate.
3674
3675Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3676
3677 * init.c (build_vec_delete): Only give an error if base isn't an
3678 error_mark_node.
3679
3680Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
3681
3682 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
3683 (yylex): If we see `new', keep slurping.
3684
3685Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
3686
3687 * class.c (finish_struct_1): Move code for handling anon unions...
3688 (finish_struct_anon): to here. Fixup so that we do the offset
3689 calculations right, and so that the fields are physically moved to
3690 the containers's chain.
3691
3692Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3693
3694 * decl.c (grokdeclarator): Avoid trying to get an operand off an
3695 identifier node.
3696
3697Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
3698
3699 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
3700 POINTER_SIZE to agree with expr.c.
3701
3702Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
3703
3704 * search.c (lookup_field): Don't report ambiguities if protect is 0,
3705 instead return NULL_TREE.
3706
3707Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
3708
3709 * class.c (finish_struct_1): Call warn_hidden if we want warnings
3710 about overloaded virtual functions.
3711 (warn_hidden): New routine to warn of virtual functions that are
3712 hidden by other virtual functions, that are not overridden.
3713 (get_basefndecls): New routine, used by warn_hidden.
3714 (mark_overriders): New routine, used by warn_hidden.
3715 * search.c (get_matching_virtual): Remove old warning that just
3716 isn't very useful.
3717
3718Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3719
3720 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
3721
3722 * typeck.c (null_ptr_cst_p): Delete unused fn.
3723 (build_function_call_maybe): Delete unused fn.
3724
3725 * expr.c (extract_init): #if 0 the code after unconditional return 0
3726 for now.
3727
3728 Delete old cadillac code.
3729 * edsel.c: Remove file.
3730 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
3731 * Makefile.in (CXX_OBJS): Delete edsel.o.
3732 (edsel.o): Delete rule.
3733 * cp-tree.h (flag_cadillac): Delete var decl.
3734 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
3735 * decl2.c (flag_cadillac): Delete var definition.
3736 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
3737 (grokfield): Delete code depending on flag_cadillac.
3738 (finish_anon_union): Likewise.
3739 * class.c (finish_struct_1): Likewise.
3740 (pushclass): Likewise.
3741 (popclass): Likewise.
3742 (push_lang_context): Likewise.
3743 (pop_lang_context): Likewise.
3744 * decl.c (init_decl_processing): Likewise.
3745 (start_decl): Likewise.
3746 (cp_finish_decl): Likewise.
3747 (xref_tag): Likewise.
3748 (finish_enum): Likewise.
3749 (start_function): Likewise.
3750 (finish_function): Likewise.
3751 (finish_stmt): Likewise.
3752 * lex.c (lang_init): Likewise.
3753 (check_newline): Likewise.
3754
3755 * lex.c (do_pending_inlines): Delete synthesized method kludge.
3756
3757 Delete defunct, ancient garbage collection implementation.
3758 * rtti.c: New file with the RTTI stuff from gc.c.
3759 * gc.c: Removed file (moved the remaining stuff into rtti.c).
3760 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
3761 (rtti.o): New rule, replacing gc.o.
3762 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
3763 * cp-tree.h: Delete gc-related fn decls.
3764 (DECL_GC_OFFSET): Delete macro.
3765 (flag_gc): Delete extern decl.
3766 * decl.c (current_function_obstack_index): Delete var decl.
3767 (current_function_obstack_usage): Delete var decl.
3768 (start_function): Delete clearing of current_function_obstack_index
3769 and current_function_obstack_usage.
3770 (init_decl_processing): Delete code relying on -fgc.
3771 Delete call to init_gc_processing.
3772 (cp_finish_decl): Delete calls to build_static_gc_entry and
3773 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
3774 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
3775 and to expand_expr of a __gc_main call.
3776 (maybe_gc_cleanup): Delete var decl.
3777 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
3778 * decl2.c (flag_gc): Delete var decl.
3779 (lang_f_options): Delete offering of -fgc.
3780 (lang_decode_option): Delete -fgc and -fno-gc handling.
3781 (get_temp_regvar): Delete gc code.
3782 * init.c (build_new): Delete gc code.
3783 * lex.c (init_lex): Delete checking of flag_gc.
3784
3785 * typeck.c (convert_arguments): Delete gc code.
3786 (build_component_addr): Delete -fgc warning.
3787 (build_modify_expr): Delete gc code.
3788
3789 * decl2.c (build_push_scope): Delete fn.
3790 * cp-tree.h (build_push_scope): Delete decl.
3791
3792 * search.c (clear_search_slots): Delete fn.
3793 * cp-tree.h (clear_search_slots): Delete decl.
3794
3795 * search.c (tree_needs_constructor_p): Delete fn.
3796 * cp-tree.h (tree_needs_constructor_p): Delete decl.
3797
3798 * tree.c (id_cmp): Delete fn.
3799
3800 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
3801 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
3802
3803 * tree.c (decl_value_member): Delete fn.
3804 * cp-tree.h (decl_value_member): Delete decl.
3805
3806 * tree.c (list_hash_lookup_or_cons): Delete fn.
3807 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
3808
3809 * method.c (cplus_exception_name): Delete fn.
3810 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
3811
3812 * spew.c (shift_tokens): Delete fn.
3813
3814Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3815
3816 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
3817 to cp_finish_decl.
d11ad92e 3818 * parse.y: Likewise.
9e9ff709
MS
3819
3820Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3821
3822 * tree.c (build_cplus_staticfn_type): Delete function definition;
3823 never used.
3824 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
3825
3826 * tree.c (virtual_member): Delete function definition; never used.
3827 * cp-tree.h (virtual_member): Delete decl.
3828
45537677
MS
3829Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
3830
3831 * typeck.c (build_component_ref): Handle getting vbase pointers
3832 out of complex multiple inheritance better.
3833
3834Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
3835
3836 * typeck.c (build_object_ref): Make sure we use the real type, not
3837 any reference type.
3838
3839Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
3840
3841 * tree.c (build_exception_variant): Don't create new types if we
3842 don't have to, also build new types on the right obstack.
3843
3844Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3845
3846 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
3847 (push_to_top_level): Call it for b->type_shadowed on class binding
3848 levels.
45537677
MS
3849
3850Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
3851
3852 * search.c (expand_upcast_fixups): Fix so that offsets stored in
3853 vbase_offsets are always right. Fixes a problem where virtual base
3854 upcasting and downcasting could be wrong during conversions on this
3855 during virtual function dispatch at ctor/dtor time when dynamic
3856 vtable fixups for deltas are needed. This only sounds easier than
3857 it is. :-)
3858 (fixup_virtual_upcast_offsets): Change to reflect new calling
3859 convention for expand_upcast_fixups.
3860
3861Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3862
3863 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
3864 check that it's usable as the bitfield width.
3865
3866Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3867
3868 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
3869 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
3870 only ever used for functions in it.
3871
3872Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3873
3874 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
d11ad92e 3875 (nested_type): Likewise.
45537677
MS
3876 (nested_name_specifier): Use lastiddecl.
3877
3878 * decl.c (grokdeclarator): Adjust accordingly.
d11ad92e
MS
3879 * init.c (expand_member_init): Likewise.
3880 * parse.y (base_class): Likewise.
3881 * typeck2.c (build_functional_cast): Likewise.
45537677
MS
3882
3883 * typeck2.c (build_functional_cast): Fill in name after we've
3884 checked for non-aggr type.
3885
be99da77
MS
3886Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
3887
3888 * decl2.c (warn_pointer_arith): Default to on.
3889
3890Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3891
3892 * lex.c (is_rid): New function.
3893 * decl.c (grokdeclarator): Diagnose reserved words used as
3894 declarator-ids.
3895
3896Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
3897
3898 * tree.c (get_decl_list): Don't lose cv-quals.
3899
3900 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
3901 typespecs used as declarator-ids.
3902
3903Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
3904
3905 * decl.c (poplevel): When poping a level, don't give a warning for
3906 any subblocks that already exist.
3907
3908Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3909
3910 * typeck.c (build_object_ref): Finish what I started.
3911
3912 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
3913
3914 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
3915
3916 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 3917 scope.
be99da77
MS
3918
3919Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3920
3921 * decl.c (xref_tag): Handle passing a type in directly.
3922
3923 * parse.y (qualified_type_name): Pull out the type.
d11ad92e 3924 (nested_type): Likewise.
be99da77
MS
3925 Take types directly instead of as identifiers.
3926 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709 3927 as identifiers.
d11ad92e
MS
3928 * decl.c (xref_basetypes): Likewise.
3929 * init.c (expand_member_init): Likewise.
3930 (build_member_call): Likewise.
3931 (build_offset_ref): Likewise.
3932 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
3933 * method.c (do_build_assign_ref): Likewise.
be99da77
MS
3934 * decl.c (grokdeclarator): Handle a type appearing as the
3935 declarator-id for constructors.
3936 * method.c (do_build_copy_constructor): current_base_init_list now
3937 uses the types directly, not their names.
d11ad92e
MS
3938 * init.c (sort_base_init): Likewise.
3939 (expand_member_init): Likewise.
be99da77 3940 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77 3941
d11ad92e 3942Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
be99da77
MS
3943
3944 * tree.c (layout_basetypes): Call build_lang_field_decl instead
3945 of build_lang_decl if first arg is a FIELD_DECL.
be99da77
MS
3946
3947Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3948
3949 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
3950 non-empty.
3951 * except.c (expand_start_catch_block): Set TREE_USED to avoid
3952 warnings about the catch handler.
3953
3954Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
3955
3956 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 3957 expand_target_expr.
be99da77
MS
3958
3959Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3960
3961 Fix access control to use trees rather than integers.
3962 * class.c (access_{default, public, protected, private,
3963 default_virtual, public_virtual, private_virtual}_node): Add
3964 definitions.
3965 (init_class_processing): Do creation of those nodes.
3966 * cp-tree.h (access_type): Delete enum decl.
3967 (access_{default, public, protected, private, default_virtual,
3968 public_virtual, private_virtual}_node): Add decls.
3969 (compute_access): Change return type.
3970 * search.c (compute_access): Have tree return type, instead of enum.
3971 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
3972 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
3973 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
3974 * parse.y (VISSPEC): Make ttype rather than itype.
3975 (base_class_access_list): Likewise.
3976 * *.[cy]: Change all refs of `access_public' to `access_public_node',
3977 etc.
3978 * call.c (build_method_call): Make ACCESS be a tree.
3979 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
3980 * cvt.c (convert_to_aggr): Likewise.
3981 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
3982 Likewise.
3983 * method.c (hack_identifier): Likewise.
3984 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
3985
3986Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
3987
3988 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
3989 frontend, and make it more consistent with respect to
3990 warn_pointer_arith.
3991
3992Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3993
3994 * decl.c (pushdecl): Check for duplicate parameter names.
3995
3996Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
3997
3998 * decl.c (expand_static_init): Call assemble_external for atexit.
3999
4000Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
4001
4002 * except.c (do_unwind): Remove some generated dead code.
4003 (eh_outer_context): New routine, factor out some common code from
4004 expand_builtin_throw and end_eh_unwinder. Add code to do return
4005 address masking for the PA.
4006 (expand_builtin_throw): Use eh_outer_context instead of open coding
4007 it here.
d11ad92e 4008 (end_eh_unwinder): Likewise.
be99da77
MS
4009
4010Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
4011
4012 * except.c (expand_throw): Call assemble_external for __empty, if we
4013 use it.
4014
21451173
MS
4015Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
4016
4017 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
4018 NORMAL_RETURN_ADDR_OFFSET.
d11ad92e 4019 (end_eh_unwinder): Likewise.
21451173
MS
4020
4021Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
4022
4023 * gc.c (build_dynamic_cast): Make sure we don't cast away const
4024 when dealing with references, and make sure we handle dynamic
4025 casting to a cv qualified reference.
4026
4027Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
4028
4029 * except.c (struct eh_context): New structure top hold eh context
4030 information.
4031 (push_eh_context): New routine.
d11ad92e 4032 (pop_eh_context): Likewise.
21451173 4033 * decl.c (push_cp_function_context): Use them.
d11ad92e 4034 (pop_cp_function_context): Likewise.
21451173
MS
4035
4036Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
4037
4038 * decl2.c (finish_file): Also prune uninteresting functions in the
4039 inline emission loop.
4040
d11ad92e 4041Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21451173
MS
4042
4043 * sig.c (build_signature_table_constructor): Mark functions
4044 in the signature as referenced.
4045
4046Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
4047
4048 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
4049 the inline emission stuff.
4050
72b7eeff
MS
4051Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
4052
4053 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 4054 weak symbols.
72b7eeff
MS
4055 * lang-options.h: Add -f{no-,}weak.
4056 * decl.c (init_decl_processing): If the target does not support weak
4057 symbols, don't use them.
4058 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
4059
4060Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4061
4062 * init.c (expand_member_init): warning for base init after members.
4063
72b7eeff
MS
4064Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4065
4066 * cvt.c (build_expr_type_conversion): Don't convert to a reference
4067 type.
4068
4069Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
4070
4071 * method.c (report_type_mismatch): Improve wording for volatile
4072 mismatches.
4073
4074Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
4075
4076 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 4077 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
4078 copy constructors well. The compiler would do bitwise copying,
4079 instead of ctor calling in some cases.
4080
4081Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
4082
4083 * g++.c (my_strerror): Return "cannot access" if errno is 0.
4084 (pfatal_with_name, perror_exec): Don't assume that
4085 the returned value from my_strerror contains no '%'s.
4086 (concat): Remove.
4087 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
4088
4089Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
4090
4091 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
4092 TYPE_METHODS/TREE_CHAIN mean what they used to.
4093 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
4094 instead of TYPE_METHODS.
4095 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
d11ad92e 4096 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
72b7eeff
MS
4097 * cp-tree.h (CLASSTYPE_METHODS): Lose.
4098 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
4099 TYPE_METHODS.
4100 (struct lang_decl): Lose next_method field.
4101 (DECL_NEXT_METHOD): Lose.
4102 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
4103 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
4104 anymore.
4105 (finish_struct_methods): Don't mess with the TREE_CHAINs in
4106 fn_fields.
4107
4108 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
4109 vector.
4110
4111 * call.c (build_method_call): Synthesize here even when not inlining.
d11ad92e 4112 * typeck.c (build_function_call_real): Likewise.
72b7eeff
MS
4113
4114Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
4115
4116 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
4117 == DBX_DEBUG, call dbxout_start_new_source_file and
4118 dbxout_resume_previous_source_file when appropriate.
4119
4120Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
4121
4122 * except.c (start_anon_func): Push to the top level.
4123 (end_anon_func): Pop from the top level.
4124
4125Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
4126
4127 * cp-tree.h (build_cleanup): New routine to build cleanups.
4128 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
4129 call at ctor time and use atexit to run it later.
4130 * decl2.c (build_cleanup): New routine, taken from finish_file.
4131 (finish_file): Use build_cleanup instead, and don't put function
4132 local statics in global dtor list.
4133
4134Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
4135
4136 * except.c (expand_throw): Ensure that we have cleanups, if we try
4137 and expand cleanups.
4138
4139Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
4140
4141 * except.c (expand_throw): Add logic to manage dynamic cleanups for
4142 the EH object.
4143 (expand_end_catch_block): Use the magic of expand_goto, instead of
4144 emit_jump so that we get the cleanup for any catch clause parameter
4145 and the cleanup for the exception object. Update to reflect label
4146 changes.
4147 (push_eh_cleanup): New routine to register a cleanup for an
4148 exception object.
9e9ff709 4149 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
4150 nothing.
4151 (init_exception_processing): Setup empty_fndecl. Setup
4152 saved_cleanup.
4153 (expand_start_catch_block): Update to reflect label changes. Call
4154 push_eh_object to register the cleanup for the EH object.
4155 (start_anon_func): New routine to start building lambda expressions
4156 from trees.
4157 (end_anon_func): New routine to end them.
4158 (struct labelNode): Change so that we can use tree labels, or rtx
4159 labels.
4160 (saved_cleanup): Object to check for dynamic cleanups for the
4161 exception handling object.
4162 (push_label_entry): Change so that we can use tree labels, or rtx
4163 labels.
d11ad92e
MS
4164 (pop_label_entry): Likewise.
4165 (top_label_entry): Likewise.
72b7eeff
MS
4166 (expand_start_all_catch): Use tree label instead of rtx label, so
4167 that we can get the magic of expand_goto.
4168 (expand_end_all_catch): Update to reflect label changes.
4169
4170 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
4171 use UNSAVE_EXPRs.
4172 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
4173 building_cleanup logic, as we now use UNSAVE_EXPRs.
4174 * cp-tree.h (unsave_expr): Declare it.
4175 * decl.c (building_cleanup): Remove.
4176 (maybe_build_cleanup): Remove building_cleanup logic, and use
4177 UNSAVE_EXPR instead.
4178
4179Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
4180
4181 * gc.c (build_t_desc): Update error message to say <typeinfo>.
4182
4183Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4184
4185 * decl.c (pushdecl): Only warn about shadowing a local variable if
4186 warn_shadow is true.
4187
4188Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4189
4190 * typeck.c (build_binary_op_nodefault): Added warning about
4191 comparisons between different enum types with -Wall, unless
4192 -fenum-int-equiv set.
4193
4194Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
4195
4196 * class.c (finish_struct_1): Skip down to the inner type in
4197 multidimensional arrays. Ensures ctors will be made for types that
4198 need constructing.
4199
4200Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
4201
4202 * decl.c (last_dtor_insn): New to track the last compiler generated
4203 insn in a dtor.
4204 (store_parm_decls): Set it.
4205 (finish_function): Use it to see if the dtor is empty. Avoid doing
4206 vtable setup all the time, if we can.
4207 (struct cp_function): Add last_dtor_insn.
4208 (push_cp_function_context): Save it.
4209 (pop_cp_function_context): Restore it.
4210
4211Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
4212
4213 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 4214 warnings.
72b7eeff
MS
4215
4216Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
4217
4218 * typeck.c (expand_target_expr): Make sure targets get put into the
4219 current temp_slot_level, so that the free_temp_slots call will reuse
4220 them.
4221
4222Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
4223
4224 * class.c (finish_struct_1): Delay delta fixups for virtual bases
4225 until after we have done the hard virtuals, to avoid a bogus `every
4226 virtual function must have a unique final overrider' for virtual
4227 functions that are only overridden by hard virtuals.
4228
4229Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4230
4231 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 4232 template for a member function.
72b7eeff
MS
4233
4234Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
4235
4236 * g++.c (main): Add handling of -nodefaultlibs.
4237
4238Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
4239
4240 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
4241 distinguish between direct bindings of reference variables, and
4242 indirect bindings of reference variables.
4243 * cvt.c (build_up_reference): Use it.
4244 * typeck.c (convert_arguments): Use it to indicate this is an
4245 indirect binding.
4246 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
4247 as they are unused.
d11ad92e
MS
4248 (expand_static_init): Likewise.
4249 (cplus_expand_expr_stmt): Likewise.
4250 * decl2.c (finish_file): Likewise.
4251 * init.c (perform_member_init): Likewise.
4252 (emit_base_init): Likewise.
4253 (expand_aggr_vbase_init_1): Likewise.
72b7eeff 4254
72b7eeff
MS
4255Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4256
4257 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
4258 get a DECL_LANG_SPECIFIC node.
4259 * cp-tree.h (lang_decl_flags): Add new member `level'.
4260 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
4261 decl_flags level member.
4262
4263Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4264
4265 * call.c (build_method_call): Make sure instance has a
4266 TYPE_LANG_SPECIFIC node before we dive into it.
4267
d11ad92e 4268Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
72b7eeff
MS
4269
4270 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
4271
4272Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
4273
4274 * decl.c (duplicate_decls): When smashing decls, smash staticness in
4275 the usual way.
4276
4277Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
4278
4279 * decl.c (poplevel): Handle the merging of subblocks of cleanups
4280 when finishing blocks that have already been created (usually due to
4281 the fixup goto code). Fixes bad debugging information.
4282
4283Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
4284
4285 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
4286 that's not a list of overloaded functions.
4287
4288Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4289
4290 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
4291 before trying to use DECL_ABSTRACT_VIRTUAL_P.
4292
4293Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
4294
4295 * decl2.c (mark_used): New function for hooking into setting of
4296 TREE_USED on decls.
4297 * call.c (build_method_call): Use it.
d11ad92e
MS
4298 * class.c (instantiate_type): Likewise.
4299 * init.c (build_offset_ref): Likewise. Don't call assemble_external
72b7eeff 4300 for all like-named functions.
d11ad92e 4301 * method.c (hack_identifier): Likewise.
72b7eeff
MS
4302 (emit_thunk): Don't call assemble_external.
4303 (make_thunk): Create thunk as a FUNCTION_DECL so that it
4304 gets the right mode and ENCODE_SECTION_INFO works.
4305
4306 * parse.y: Use mark_used. Pass operator names to do_identifier.
4307 * lex.c (do_identifier): Handle operator names.
4308
4309 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
4310
72b7eeff
MS
4311Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4312
4313 * errfn.c: Include stdio.h.
4314 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
4315
4316Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
4317
4318 * typeck2.c (digest_init): Always convert initializers to the
4319 right type.
4320
4321Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
4322
4323 * init.c (member_init_ok_or_else): Don't allow member initializers
4324 for indirect members, as it is invalid.
4325
4326Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4327
4328 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
4329
4330Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
4331
4332 * parse.y (for.init.statement): Catch compound statements inside for
4333 initializations, if we're being pedantic.
4334
4335Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
4336
4337 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
4338 looking for.
4339
4340Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
4341
4342 * error.c (dump_expr): Don't core dump when a boolean expression is
4343 used as a default argument.
4344
4345Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4346
4347 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 4348 RETURN_IN_MEMORY.
72b7eeff
MS
4349
4350Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
4351
4352 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
4353 BLKmode type that would otherwise be returned in registers.
4354
4355Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4356
4357 * g++.c (WITHLIBC): New macro.
4358 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
4359 saw_libc and pass it at the end if it was set.
4360
4361Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4362
4363 * parse.y (fn.def1): Call split_specs_attrs in
4364 declmods notype_declarator case.
4365
21451173 4366Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
4367
4368 * Version 2.7.2 released.
4369
4370Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
4371
4372 * g++.c (pfatal_with_name): Add missing third argument to concat.
4373
e7843f33
MS
4374Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
4375
4376 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
4377 type.
4378
21451173 4379Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
4380
4381 * Version 2.7.1 released.
4382
4383Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
4384
4385 * call.c (convert_harshness): Handle references to arrays.
4386
4387Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
4388
4389 * typeck.c (comp_target_types): Check multi-level pointer
4390 conversions in both directions.
4391
4392Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
4393
4394 * parse.y (explicit_instantiation): Fix 'extern template' with no
4395 return type.
4396
4397Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
4398
4399 * parse.y (explicit_instantiation): Support automatic instantiation
4400 of constructors.
4401 (named_class_head_*): Support out-of-class definition of nested
4402 types.
4403
f30432d7
MS
4404Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
4405
4406 * search.c (envelope_add_decl): New routine. Fix so that
4407 methods are hidden in the same way that other members are.
4408 (dfs_pushdecls): Cleanup and move functionality out of line,
4409 into envelope_add_decl.
4410
4411Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
4412
4413 * typeck.c (mark_addressable): Only call assemble_external if we
4414 have started the output file.
4415
4416Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4417
4418 * decl.c (start_function): Fix earlier cv-quals change.
4419
4420Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
4421
4422 * parse.y (complex_direct_notype_declarator): Only push the class if
4423 we are not already in the class.
4424
4425Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
4426
4427 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
4428 Update olddecl's attributes too.
4429 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
4430 * typeck.c (common_type): Call merge_machine_type_attributes.
4431
4432Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
4433
4434 * typeck.c (mark_addressable): Add missing call to
4435 assemble_external.
4436
f30432d7
MS
4437Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
4438
4439 * decl.c (store_parm_decls): Make sure the unwinder start comes
4440 before the exception specification start.
4441 * except.c (expand_exception_blocks): Make sure the unwinder end
4442 comes after the terminate protected catch clause region and after
4443 the end of the exception specification region.
4444
4445Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
4446
4447 * lex.c (real_yylex): Fix identifier case for linemode.
4448 (handle_sysv_pragma): Don't abort when we see a pragma we don't
4449 recognize.
4450
4451Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
4452
4453 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
4454 * except.c (init_exception_processing): __throw doesn't take any
4455 arguments.
d11ad92e 4456 (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode
f30432d7
MS
4457 for all pointers. Use expand_builtin_return_addr to unwind the
4458 first level off the stack.
4459 (do_unwind): Always use Pmode, instead of SImode for all pointers.
4460 (expand_exception_blocks): Add a call to end_eh_unwinder.
4461 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
4462 independent stack unwinders for function/method calls.
4463
4464Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
4465
4466 * tree.c (unsave_expr_now): Make sure we process the argument list
4467 of any called functions. Fixes incorrect code generation for
4468 cleanups.
4469
4470Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
4471
4472 * typeck.c (get_member_function_from_ptrfunc): Save function if it
4473 needs it. Cures core dump on things like (this->*(f()))().
4474
4475Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4476
4477 * decl.c (start_function): Conform to gcc cv-quals convention (no
4478 expression has a cv-qualified type) in RESULT_DECLs.
d11ad92e 4479 * method.c (make_thunk): Likewise.
f30432d7
MS
4480
4481Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
4482
4483 * decl.c (pushtag): Add in the namespace name for the tag.
4484
4485Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
4486
4487 * parse.y (maybe_base_class_list, base_class_list, base_class,
4488 base_class_access_list): Make sure we see the typenames for base
4489 classes.
4490 * lex.c (see_typename): Instead of failing to see a typename when
4491 there is no next token, perfer a typename, and get the next token.
4492
4493Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
4494
4495 * decl.c (init_decl_processing): Add __builtin_expect.
4496
4497Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
4498
4499 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
4500 or from pointer to member functions, they must all be handled before
4501 this point.
4502
4503Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4504
4505 * init.c (resolve_offset_ref): Fix wording of non-static member
4506 being referenced as a static.
4507
4508Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4509
4510 * typeck.c (build_indirect_ref): Only bash pointer if we actually
4511 call build_expr_type_conversion.
4512
4513Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
4514
4515 * cvt.c (build_expr_type_conversion): Handle conversion from
4516 reference.
4517 * typeck.c (build_indirect_ref): Avoid infinite recursion.
4518
4519Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
4520
4521 * decl.c (expand_start_early_try_stmts): New routine to start a try
4522 block at the start of the function, for function-try-blocks.
4523 * cp-tree.h (expand_start_early_try_stmts): Declare it.
4524 * parse.y (function_try_block): Use it, instead of doing it here, as
4525 we don't want to include rtl.h here, as that conflicts with RETURN
4526 in the parser.
4527
4528Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
4529
4530 * lex.c (reinit_parse_for_block): Support saving inline
4531 function-try-blocks, uses peekyylex.
4532 * parse.y (eat_saved_input): New rule, permit the parser to see that
4533 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
4534 handlers of a function-try-block.
4535 (fndef): Use it.
4536 (component_decl): Make sure TRY and RETURN can come after fn.def2.
4537 * spew.c (peekyylex): New routine to peek at what will come next.
4538
cf54380f
JM
4539Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4540
f30432d7 4541 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 4542 parms.
f30432d7 4543
cf54380f
JM
4544 * decl.c (duplicate_decls): Turn off whining about virtual functions
4545 redeclared inline for now.
4546
f30432d7
MS
4547Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
4548
4549 * decl.c (store_in_parms): New routine to put things before we
4550 put base inits.
4551 * cp-tree.h (store_in_parms): Declare it.
4552 * decl.c (store_parm_decls): Use it to makr sure the starting of the
4553 eh spec comes before base inits.
4554 (finish_function): Use sequences instead of the obsolete
4555 reorder_insns.
4556 * parse.y (fndef): Enhance readability and maintainability. Update
4557 to include function_try_block syntax.
4558 (function_try_block): Add.
4559
4560Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4561
4562 * call.c (convert_harshness): Use comptypes, not ==, to check if
4563 TYPE and PARMTYPE are equivalent on a function type.
4564
d11ad92e 4565Tue Sep 12 17:31:33 1995 Douglas Rupp <drupp@cs.washington.edu>
2453e8d1
DR
4566
4567 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
4568
f30432d7
MS
4569Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
4570
4571 * except.c (expand_throw): Never allocate storage for thrown pointer
4572 to objects.
4573
4574Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
4575
4576 * except.c (expand_start_catch_block): Pointers to objects come
4577 back from catch matching already dereferenced, don't dereference
4578 again.
4579
4580Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
4581
4582 * except.c (expand_throw): Only decay the throw expression, don't do
4583 any default conversions. This is so that one can throw and catch
4584 characters, and not have them match integers.
4585
4586Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
4587
4588 * error.c (dump_aggr_type): Deal with anonymous unions that don't
4589 have a TYPE_NAME.
4590
38267a70
BK
4591Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4592
4593 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
4594
f30432d7
MS
4595Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
4596
4597 * except.c (expand_end_eh_spec): Handle empty EH specifications.
4598
4599Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
4600
4601 * cp-tree.h (expand_start_eh_spec): Declare new routine.
d11ad92e 4602 (expand_end_eh_spec): Likewise.
f30432d7
MS
4603 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
4604 exception specifications.
4605 * except.c (expand_leftover_cleanups): Remove unused parameter.
d11ad92e
MS
4606 (expand_end_catch_block): Likewise.
4607 (expand_exception_blocks): Likewise.
f30432d7
MS
4608 (expand_start_eh_spec): New routine to mark the start of an
4609 exception specification region.
4610 (expand_end_eh_spec): New routine to mark the end of an exception
4611 specification region.
4612 (expand_exception_blocks): Call expand_end_eh_spec to process
4613 exception specifications.
4614
b37d04bc
PB
4615Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
4616
4617 * lex.c (do_identifier): Use global binding in preference of
4618 dead for local variable.
4619
f30432d7
MS
4620Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
4621
4622 * cp-tree.h (build_exception_variant): Remove used first argument.
d11ad92e
MS
4623 * decl.c (duplicate_decls): Likewise.
4624 (grokfndecl): Likewise.
4625 (revert_static_member_fn): Likewise.
4626 * decl2.c (grok_method_quals): Likewise.
4627 * tree.c (build_exception_variant): Likewise.
4628 * typeck.c (common_type): Likewise.
f30432d7
MS
4629 * decl2.c (grokclassfn): After changing the type, call
4630 build_exception_variant, if necessary.
4631
4632Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
4633
4634 * except.c (expand_throw): Run cleanups for the throw expression.
4635
d11ad92e 4636Wed Aug 30 15:24:38 1995 Stephen L. Favor <sfavor@tigger.intecom.com>
f30432d7
MS
4637
4638 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
4639 the store_parm_decls call which does initialization in the emit_*
4640 code concerning label numbering.
4641
4642Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
4643
4644 * except.c (expand_internal_throw): Let the frontend be responsible
4645 for managing all frontend EH parameters, the backend routine only
4646 needs to deal with backend values. type and value are no longer
4647 passed to __throw.
d11ad92e
MS
4648 (init_exception_processing): Likewise.
4649 (expand_start_all_catch): Likewise.
4650 (expand_end_all_catch): Likewise.
4651 (expand_leftover_cleanups): Likewise.
4652 (expand_end_catch_block): Likewise.
4653 (expand_builtin_throw): Likewise.
4654 (expand_throw): Likewise.
f30432d7
MS
4655
4656Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4657
4658 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
4659 for a decl.
4660 * decl.c (cp_finish_decl): Use it.
4661
4662Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
4663
4664 * except.c (expand_internal_throw): Oops, almost forgot type and
4665 value are now trees.
4666
4667Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4668
4669 Fix the attribute handling to make sure they get noted before we
4670 create the function's RTL, in case they can affect that.
4671 * decl.c (grokfndecl): New arg ATTRLIST. Run
4672 cplus_decl_attributes before creating the decl's rtl.
4673 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
4674 (shadow_tag, groktypename, start_decl, start_method): Pass a
4675 NULL_TREE to grokdeclarator's new last arg.
4676 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
4677 (grokbitfield, grokoptypename): Pass a NULL_TREE to
4678 grokdeclarator's new last arg.
4679 * except.c (expand_start_catch_block): Likewise.
4680 * pt.c (process_template_parm, end_template_decl,
4681 do_function_instantiation): Likewise.
4682 * cp-tree.h (grokfield): Add arg.
4683 (grokdeclarator): Move the prototype from here...
4684 * decl.h: ...to here.
4685 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
4686 ATTRLIST argument.
4687 * parse.y: Create a list for the grokfield arg where appropriate,
4688 and pass it down instead of calling cplus_decl_attributes.
4689
4690Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
4691
4692 * except.c: Always allow turning on exception handling. Allow cross
4693 compilations to use EH.
4694
4695Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
4696
4697 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
4698 trees, instead of rtxs, and don't depend on using special machine
4699 dependent registers.
d11ad92e
MS
4700 (expand_internal_throw): Likewise.
4701 (init_exception_processing): Likewise.
4702 (expand_start_all_catch): Likewise.
4703 (expand_end_all_catch): Likewise.
4704 (expand_start_catch_block): Likewise.
4705 (expand_leftover_cleanups): Likewise.
4706 (expand_end_catch_block): Likewise.
4707 (expand_builtin_throw): Likewise.
4708 (expand_throw): Likewise.
f30432d7
MS
4709
4710Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4711
4712 * cvt.c (build_expr_type_conversion): Handle conversions to
4713 reference types.
4714
4715Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
4716
4717 * except.c (do_unwind): Work around backend bug with -fpic.
4718
fb409a19
PB
4719Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
4720
4721 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
4722 for-scoping, but supports (and warns about) old programs.
4723 Make the new mode (with value 1) the default.
4724 (lang_f_options): The on-value for flag_new_for_scope is now 2.
4725 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
4726 (DECL_SHADOWED_FOR_VAR): Likewise.
4727 * decl.c (struct binding_level): New fields dead_vars_from_for
4728 and is_for_scope.
4729 (note_level_for_for): New function.
4730 (poplevel): Special processing if is_for_scope.
4731 (pushdecl): Warn if for-scope variable shadows local.
4732 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
4733 and warn if conflicts.
4734 * parse.y (FOR): Call note_level_for_for.
4735
f30432d7
MS
4736Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
4737
4738 * decl2.c (import_export_inline): Class interface hackery does not
4739 apply to synthesized methods.
4740
4741Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
4742
4743 * search.c (virtual_context): Find the right context more often.
4744 Solves a `recoverable compiler error, fixups for virtual function'
4745 problem.
4746
4747Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
4748
4749 * except.c (expand_start_all_catch): Ensure that we always transfer
4750 control to the right EH handler, by rethrowing the end label on the
4751 region, instead of hoping we are nested and falling through.
d11ad92e 4752 (expand_leftover_cleanups): Likewise.
f30432d7
MS
4753 (end_protect): Since we now rethrow the end label, put a
4754 nop after it, so that outer regions are recognized.
4755 * init.c (build_vec_delete_1): New routine to handle most of vector
4756 deleting, all code moved here from build_vec_delete.
4757 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
4758 work.
4759 (expand_vec_init): If the array needs partial destructing, setup an
4760 EH region to handle it.
4761 (build_vec_delete): Move lots of code to build_vec_delete_1, use
4762 build_vec_delete_1 to do the grunt work.
4763
4764Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4765
4766 Handle decl attributes properly for function definitions without
4767 previous attribute-loaded declarations.
4768 * decl.c (start_function): New arg ATTRS. Add a call to
4769 cplus_decl_attributes with it before we create the RTL.
4770 * cp-tree.h (start_function): Update prototype.
4771 * parse.y (fn.def1): Pass ATTRS into start_function instead of
4772 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
4773 for other use.
4774 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
4775 start_function.
4776 * method.c (synthesize_method): Likewise.
4777 * except.c (expand_builtin_throw): Likewise for start on __throw.
4778
4779Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
4780
4781 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
4782 This changes -fvtable-thunks vtable layout, so a recompile will be
4783 necessary, if you use -fvtable-thunks.
4784 (get_vtable_entry): Use n, instead of i to be consistent with the
4785 rest of the compiler.
d11ad92e 4786 (get_vtable_entry_n): Likewise.
f30432d7
MS
4787 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
4788 are being used.
d11ad92e 4789 (finish_struct_1): Likewise.
f30432d7
MS
4790 (skip_rtti_stuff): New routine to collapse similar code from many
4791 different parts of the compiler. I think I got them all.
4792 (modify_one_vtable): Use it.
d11ad92e
MS
4793 (fixup_vtable_deltas1): Likewise.
4794 (override_one_vtable): Likewise.
4795 * decl2.c (mark_vtable_entries): Likewise.
4796 * tree.c (debug_binfo): Likewise.
4797 * search.c (expand_upcast_fixups): Likewise.
4798 (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to
f30432d7 4799 consistent with the rest of the compiler.
d11ad92e 4800 (get_abstract_virtuals): Likewise.
f30432d7
MS
4801 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
4802 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
d11ad92e 4803 (build_typeid): Likewise.
f30432d7
MS
4804 (build_classof): Remove old style way of doing rtti. Remove support
4805 for `classof' and `headof'.
d11ad92e
MS
4806 * gxx.gperf: Likewise.
4807 * hash.h: Likewise.
4808 * parse.y: Likewise.
f30432d7
MS
4809
4810Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
4811
4812 * decl.c (start_function): Clear ctor_label and dtor_label.
4813
4814 * class.c (finish_struct_1): Fix handling of access decls.
4815
4816Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4817
4818 * class.c (finish_struct): Only do minimal processing here, so it
4819 can be used for class template definitions, as well.
4820 (finish_struct_1): New function with the rest of the code.
4821
4822Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
4823
4824 * class.c (prepare_fresh_vtable): On second though, always build the
4825 offset (see Aug 10 change), unless -fvtable-thunks is given. It
4826 does this by calling the new routine set_rtti_entry.
d11ad92e 4827 (finish_struct): Likewise.
f30432d7
MS
4828 (set_rtti_entry): New routine to update the rtti information at the
4829 start of the vtable.
4830
4831Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4832
4833 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
4834 if it's declared in the C++ language spec.
4835 (dump_function_decl): Likewise.
4836 (dump_function_name): Likewise.
4837 (ident_fndecl): Make sure we got something back from lookup_name.
4838 * decl.c (start_function): Likewise.
4839
4840Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4841
4842 * call.c (build_method_call): Don't call build_new when calling a
4843 constructor without an instance.
4844
4845Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
4846
4847 * class.c (prepare_fresh_vtable): Always build the offset to the
4848 complete object, as it doesn't cost much. This allows dynamic_cast
4849 to void * to work when -frtti isn't given.
d11ad92e 4850 (finish_struct): Likewise.
f30432d7
MS
4851
4852Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
4853
4854 * except.c (build_eh_type): Split out some functionality to new
4855 routine named build_eh_type_type.
4856 (build_eh_type_type): New routine.
4857 (expand_start_catch_block): Use build_eh_type_type, as we never want
4858 the dynamic type of the catch parameter, just the static type.
4859 Fixes core dumps when -frtti is used and one catchs pointers to
4860 classes.
4861
4862Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
4863
4864 * except.c (expand_builtin_throw): Since we now use normal calling
4865 conventions for __throw, we have to remove the first layer off the
4866 stack, so that the next context we search for handlers is the outer
4867 context instead of the context that had the call to __throw, if we
4868 don't immediately find the desired context.
4869
4870Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4871
4872 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
4873 * cp-tree.h: Update.
4874
4875 * parse.y (template_type_parm): Add support for `typename'.
4876
4877Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
4878
4879 * except.c (expand_internal_throw): New internal routine to throw a
4880 value.
4881 (expand_end_all_catch, expand_leftover_cleanups): All throwers
4882 changed to use `expand_internal_throw' instead of jumping to throw
4883 label.
d11ad92e 4884 (expand_end_catch_block, expand_throw): Likewise.
f30432d7
MS
4885 (throw_label): Removed.
4886 (expand_builtin_throw): Changed so that EH parameters are passed by
4887 normal function call conventions. Completes Aug 4th work.
4888
4889Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
4890
4891 * cp-tree.h (expand_builtin_throw): Declare it.
4892 * decl2.c (finish_file): Call expand_builtin_throw.
4893 * except.c (make_first_label): Remove.
4894 (init_exception_processing): Don't use a LABEL_REF for throw_label,
4895 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
4896 other functions that don't really appear in those functions. This
4897 solves a problem where cc1plus consumed exponential amounts of
4898 memory when -Wall was used.
4899 (expand_end_all_catch, expand_leftover_cleanups,
4900 expand_end_catch_block, expand_throw): Change all uses of
4901 throw_label to match new style.
4902 (do_unwind): Rename parameter to inner_throw_label, as it is now
4903 different from throw_label. Also, assume that our caller will wrap
4904 the passed label with a LABEL_REF, if needed.
4905 (expand_builtin_throw): Make external, change so that the generated
4906 throw is now a real function.
4907 (expand_exception_blocks): Never generate throw code inside another
4908 function.
4909
4910Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
4911
4912 * decl.c (grokdeclarator): Move checking of mutable const objects
4913 and mutable static objects down, as we might decide during parsing
4914 to unset staticp or constp (for example, when const is part of the
4915 object being pointed to).
4916
4917Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
4918
4919 * except.c (output_exception_table_entry): Enhance portability to
4920 weird machines.
d11ad92e 4921 (emit_exception_table): Likewise.
f30432d7
MS
4922
4923Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
4924
4925 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
4926 non-virtual member functions.
4927
4928Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
4929
4930 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
4931 and const T all match.
4932
4933Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
4934
4935 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
4936 T&, T and const T all match.
4937
4938Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
4939
4940 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
4941 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
4942 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
4943 InsnSave. Also, numerous speed improvements, and correctness
4944 improvements. Double faulting in all situations should now be
4945 handled correctly.
4946 (expand_start_all_catch): Instead of having many terminate protected
4947 regions, just have one.
4948 (expand_start_catch_block): No longer have to protect
4949 false_label_rtx, as it isn't used for EH region marking.
4950 (expand_end_catch_block): Expand out EH cleanups here by using
4951 expand_leftover_cleanups.
4952 (expand_end_all_catch): Use sequences instead of playing with insn
4953 links directly.
d11ad92e 4954 (expand_exception_blocks): Likewise. Also protect all catch clauses
f30432d7
MS
4955 with one terminate region.
4956
4957Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4958
4959 * method.c (report_type_mismatch): Don't talk about an object
4960 parameter for non-methods.
4961
4962Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4963
4964 * class.c (finish_struct): Catch private and protected members of
4965 anonymous unions here.
4966 * decl2.c (finish_anon_union): And here.
4967 * parse.y: Instead of here.
4968
4969 * errfn.c (ARGSLIST): Support passing four args.
4970 * error.c (cv_as_string): New function.
4971 (cp_printers): Add it.
4972 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
4973
4974 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
4975
4976 * init.c (expand_aggr_init): Handle volatile objects, too.
4977
4978Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4979
4980 * decl.c (struct binding_level): Keep list of incomplete decls.
4981 (print_binding_level): Use list_length to count them.
4982 (pushdecl): Build up the list.
4983 (hack_incomplete_structures): Walk it and prune completed decls.
4984
4985Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4986
4987 * typeck.c (comp_target_types): Don't check const and volatile for
4988 function types.
d11ad92e 4989 (comp_ptr_ttypes_real): Likewise.
f30432d7
MS
4990
4991Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4992
4993 * typeck.c (comp_target_types): Fix.
4994
4995Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
4996
4997 * cp-tree.h (unsave_expr_now, build_unsave_expr,
4998 cp_expand_decl_cleanup): Declare new routines.
4999 * decl.c (cp_finish_decl, store_parm_decls,
5000 hack_incomplete_structures): Change all cals from
5001 expand_decl_cleanup to cp_expand_decl_cleanup.
d11ad92e 5002 * gc.c (protect_value_from_gc): Likewise.
f30432d7
MS
5003 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
5004 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
5005 (unsave_expr_now): Backend routine used by tree expander.
5006 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
5007 work around a limitation in the backend. The backend uses the
5008 cleanups multiple times, on disjoint control flows, so we cannot
5009 pass unsaved SAVE_EXPRs to the backend.
5010 * tree.def (UNSAVE_EXPR): New tree code.
5011 * typeck.c (c_expand_return): Move goto/return code up inside
5012 conditional, as we don't always want to do this, we only want to do
5013 this when we don't otherwise finish with this control flow.
5014
5015Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5016
5017 * parse.y (typespec): Only complain about typeof if we're not
5018 getting it from a system header.
5019
5020Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
5021
5022 Clean up prefix attribute handling.
5023 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
5024 (declmods): Likewise.
5025 (all rules that reference typed_declspecs and declmods): Call
5026 split_specs_attrs or strip_attrs to separate declspecs and attrs.
5027 (lang_extdef): Delete resetting of prefix_attributes.
5028 (template_def, notype_declarator rule): Use NULL_TREE for
5029 prefix_attributes.
5030 (condition): Use NULL_TREE for prefix_attributes.
5031 (setattrs): Deleted.
5032 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
5033 (component_decl): Delete resetting of prefix_attributes.
5034 (component_decl_1, notype_components rule): Use NULL_TREE for
5035 prefix_attributes.
5036 (simple_stmt): Delete resetting of prefix_attributes.
5037
5038Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5039
5040 * call.c (convert_harshness): Deal with reference conversions before
5041 others. Actually do array->pointer decay. Call comp_target_types
5042 with pointer types rather than their targets.
5043
5044 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
5045
5046Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5047
5048 * pt.c (to_be_restored): Move decl to global scope.
5049
5050Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5051
5052 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
5053
5054Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5055
5056 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
5057 to pedwarn.
5058
5059 * pt.c (instantiate_template): Also avoid instantiation if the
5060 function has already been declared to be a specialization.
5061
5062 * decl2.c (check_classfn): Ignore cname argument, and return the
5063 matching function.
5064
5065 * decl.c (start_decl): Handle declarations of member functions
5066 outside of the class (i.e. specialization declarations).
5067
5068Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5069
5070 * class.c (finish_struct): Don't mess with the type of bitfields.
5071
5072 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
5073
5074Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
5075
5076 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
5077 is not a parameter list (TREE_LIST).
5078 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
5079 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
5080 but don't set it otherwise.
5081
5082Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
5083
5084 * init.c (expand_default_init): Don't allow two-level conversions
5085 during construction.
5086
5087Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
5088
5089 * gc.c (build_headof): The type of dyncasting to a pointer to cv
5090 void, should be pointer to cv void.
5091
5092Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
5093
5094 * gc.c (build_dynamic_cast): Allow casting in const.
5095
5096Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
5097
5098 * typeck.c (build_const_cast): If we are passed error_mark_node,
5099 return it.
5100
5101Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5102
5103 * class.c (push_nested_class): Make sure TYPE is non-nil.
5104
5105 * cvt.c (type_promotes_to): Watch for error_mark_node on the
5106 incoming TYPE.
5107
5108Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
5109
5110 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
5111 (SIGTABLE_VB_OFF_NAME): New macro.
5112 (vt_off_identifier): Renamed from offset_identifier.
5113 (vb_off_identifier): Added extern declaration.
5114
5115 * decl.c (vt_off_identifier): Renamed from offset identifier.
5116 (vb_off_identifier): New variable to hold the identifier for the
5117 sigtable field vb_off.
5118 (init_decl_processing): Initialize vb_off_identifier.
5119 Renamed vt_off_identifier from offset_identifier.
5120 * sig.c (build_signature_method_call): Renamed offset_identifier and
5121 local variable offset to vt_off_identifer and vt_off, respecitively.
5122 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
5123
5124 * decl.c (init_decl_processing): Add vb_off field to
5125 sigtable_entry_type. Reorder fields so that pfn gets properly
5126 aligned at a 64 bit boundary on the Alpha.
5127 * sig.c (build_signature_table_constructor): Build the constructor
5128 according to the new layout. Set the vb_off field to -1 for now.
5129
5130 * decl.c (init_decl_processing): Align sigtable_entry_type on word
5131 boundaries instead of double word boundaries to save space.
5132
f30432d7
MS
5133Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
5134
5135 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
5136
5137Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5138
5139 * parse.y (opt.component_decl_list): Only forbid private/protected
5140 in anonymous unions. We need to make this know when the type is
5141 defined for an object, to not give the error.
5142
5143Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5144
5145 * parse.y (opt.component_decl_list): Don't allow access control
5146 as private or protected for union members.
5147
5148Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
5149
5150 * lex.c (check_newline): For 'p' case, move goto skipline line to
5151 before end brace for 'pragma'.
5152
5153Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
5154
5155 * g++.1: Tiny updates.
5156
5157Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
5158
5159 * decl.c (cp_finish_decl): Only destruct local static variables if
5160 they are constructed, and only construct the first time control
5161 passes completely through its declaration (if not initialized with a
5162 constant-expression).
d11ad92e 5163 (expand_static_init): Likewise.
f30432d7
MS
5164
5165Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5166
5167 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
5168 is a TEMPLATE_TYPE_PARM, give a match.
5169
f30432d7
MS
5170Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
5171
5172 * method.c (build_overload_value): Handle encoding of null pointer
5173 constants (or any pointer with a constant numeric value) for
5174 templates.
5175
42783eab
BK
5176Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5177
5178 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
5179 const vs non-const for void conversions.
5180
f30432d7
MS
5181Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
5182
5183 * except.c (expand_start_all_catch): Fix problem with finding an
5184 outer nested try block when there is no code to separate it from an
5185 inner try block.
5186
5187Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
5188
5189 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
5190 memory please when virtual bases are used.
5191
5192Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
5193
5194 * class.c (build_vbase_path): Avoid testing things that cannot be
5195 null to see if they are null.
5196 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
5197 * decl.c (finish_function): Pass a type into the new
5198 convert_pointer_to_vbase instead of a binfo.
5199 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
5200 and convert_pointer_to_real.
5201 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
5202 of the more cryptic call to get_vbase.
5203
e18923b4 5204Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
5205
5206 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
5207
f30432d7
MS
5208Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5209
5210 * pt.c (instantiate_template): Don't strip 'this' twice.
5211
5212 * pt.c (coerce_template_parms): Allow null pointer constants.
5213
5214 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
5215 set.
5216
f30432d7
MS
5217Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5218
5219 * decl.c (revert_static_member_fn): Also remove 'this' from
5220 DECL_ARGUMENTS.
5221 * decl2.c (check_classfn): Don't revert this function until we get a
5222 match.
5223
5224Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5225
5226 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
5227
5228Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
5229
5230 * decl2.c (finish_file): Handle global vector news.
5231 * init.c (build_new): Encode vector news so that later we will know
5232 how many elements there are.
5233
e18923b4 5234Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
5235
5236 * expr.c (cplus_expand_expr): Don't mess with temp slots.
5237
f30432d7
MS
5238 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
5239 returns null.
5240
5241 * decl2.c (check_classfn): Use revert_static_member_fn.
5242 * decl.c (revert_static_member_fn): Diagnose static member functions
5243 declared const or volatile.
5244
5245 * decl2.c (grokfield): Check for missing default args here, too.
5246 (check_default_args): Function to do the checking.
5247 * decl.c (pushdecl): Use it.
5248
5249 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
5250 if there is no `this'.
5251
5252Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5253
5254 * call.c (build_method_call): Downgrade 'called before definition'
5255 to a warning, as it ought to go away after Monterey.
5256
5257Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5258
5259 * pt.c (coerce_template_parms): Don't do extra checking on pointer
5260 to member arguments.
5261
5262 * class.c (finish_struct): const and reference members don't prevent
5263 a class from being an aggregate.
5264
5265 * class.c (finish_struct): Signatures are always aggregates.
5266
f7d9d4a8
JM
5267Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5268
f30432d7
MS
5269 * decl2.c (check_classfn): Improve error message.
5270
5271 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 5272
f7522313
JM
5273Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5274
f30432d7 5275 * typeck.c (comptypes): Don't ignore method quals.
f7522313 5276
f30432d7
MS
5277 * class.c (finish_struct): Non-abstract virtuals are always USED.
5278
5279 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
5280 IS_AGGR_TYPE, either.
5281 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
d11ad92e 5282 * cp-tree.h: Likewise.
f30432d7
MS
5283
5284 * cp-tree.h (lang_type): Add aggregate.
5285 (CLASSTYPE_AGGREGATE): New macro.
d11ad92e 5286 (TYPE_NON_AGGREGATE_CLASS): Likewise.
f30432d7
MS
5287 * class.c (finish_struct): Determine whether a class is an
5288 aggregate.
5289 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
5290 TYPE_NEEDS_CONSTRUCTING.
5291 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
5292 subobjects, too.
5293
5294 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
5295
5296 * decl.c (start_function): For pre-parsed functions, layout all of
5297 the parm decls again.
5298 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
5299 DECL_EXTERNAL.
5300
f30432d7
MS
5301 * pt.c (coerce_template_parms): Improve checking for invalid
5302 template parms.
5303
5304Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5305
5306 * decl.c (grokdeclarator): Forbid declaration of a static member
5307 with the same name as its enclosing class.
5308
d8f1d487
RK
5309Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5310
5311 * decl.c (finish_function): Clear current_class_decl.
5312
5313 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
5314 instead of truthvalue_conversion.
5315
5316 * class.c (finish_struct): A data member with the same name as the
5317 class doesn't suppress constructors.
5318
d11ad92e 5319Fri Jun 16 18:11:39 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
5320
5321 * decl.c (start_function): If current_class_decl is a signature
5322 pointer, don't dereference it but set C_C_D to current_class_decl.
5323
5324Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5325
5326 * decl.c (duplicate_decls): Complain about virtual functions
5327 redeclared to be inline.
5328
5329Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
5330
5331 * decl.c (get_unique_name): New routine to name unnamed namespaces.
5332 (push_namespace): Use get_unique_name for naming unnamed namespaces.
5333
d3c89e1f
JM
5334Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5335
d8f1d487 5336 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 5337 appropriate.
d8f1d487
RK
5338
5339Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
5340
5341 * search.c (get_vbase): New routine to switch hierarchies from the
5342 CLASSTYPE_VBASECLASSES to the normal one.
5343 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
5344 want to convert to a vbase pointer.
5345
5346Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5347
5348 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 5349 template_classes.
d8f1d487
RK
5350 (do_pending_expansions): Call instantiate_member_templates on all of
5351 the classes in template_classes.
5352
5353Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
5354
5355 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
5356 TYPE_MAIN_VARIANT if it is not filled in.
5357 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
5358 error instead of core dumping.
5359
5360Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5361
5362 * call.c (can_convert): Also check for distance > 0.
d11ad92e
MS
5363 (can_convert_arg): Likewise.
5364 (user_harshness): Likewise.
d8f1d487
RK
5365
5366Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5367
5368 * g++.c (MATH_LIBRARY): Provide default.
5369 (main): Always link with the math library if we link with libstdc++.
5370
5371 * decl.c (start_function): Complain about redefinition of a function
5372 even when the pending_inline version is compiled after the other
5373 version.
5374
5375Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5376
5377 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
5378 aggregate type.
5379
d11ad92e 5380Wed Jun 7 15:31:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
5381
5382 * init.c (build_vec_delete): Resolve an offset ref before we try to
5383 use it.
5384
5385Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5386
5387 * typeck.c (build_modify_expr): If the class lacks a constructor or
5388 assignment operator, return error_mark_node.
5389 (common_type): Use build_cplus_array_type.
5390
5391Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
5392
5393 * class.c (dont_allow_type_definitions): New variable set when types
5394 cannot be defined.
5395 (finish_struct): Use it.
5396 * cp-tree.h (dont_allow_type_definitions): Define it.
5397 * parse.y (primary, handler_seq): Set it.
5398
5399Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
5400
5401 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
5402 results from lookup_fnfields. Always give warning/error on bad
5403 code.
5404
d11ad92e 5405Mon Jun 5 11:39:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
5406
5407 * init.c (member_init_ok_or_else): Don't allow initialization of
5408 an ancestor's member from within a constructor.
5409
d11ad92e 5410Mon Jun 5 11:20:34 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
5411
5412 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
5413 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
5414 abstract virtual functions are handled correctly.
5415
5416 * sig.c (build_signature_table_constructor): Store the correct
5417 delta in signature table entries. It does not yet work for
5418 classes with virtual base classes as implementations of signatures.
5419 (build_signature_method_call): Add the delta to the object_ptr
5420 before generating the function call.
5421
5422 * call.c (build_method_call): Make instance_ptr the signature
5423 pointer itself instead of dereferencing the optr.
5424 * sig.c (build_signature_method_call): Dereference the optr for the
5425 direct and virtual calls.
5426
5427 * sig.c (build_signature_table_constructor): Make the tag for
5428 default implementations -1 instead of 2.
5429 (build_signature_method_call): Change the generated conditional
5430 expression correspondingly.
5431
5432 * sig.c (build_signature_pointer_constructor): Deleted the sorry
5433 message that said we can't handle multiple inheritance for
5434 implementations of signatures
5435 (build_signature_method_call): Use the offset from the sigtable
5436 entry instead of the vptr field from the signature pointer for
5437 building a virtual function call.
5438
5439 * class.c (build_vfn_ref): Deleted signature specific code, we don't
5440 call this function anymore from build_signature_method_call.
5441
5442 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
5443 field in the object now instead of in the signature pointer/ref.
5444 (build_vptr_ref): Deleted extern declaration.
5445 * sig.c (build_vptr_ref): Deleted.
5446 (build_signature_pointer_or_reference_type): Deleted construction of
5447 the vptr field.
5448 (build_signature_pointer_constructor): Deleted initialization of/
5449 assignment to the vptr field.
5450
5451 * sig.c (build_signature_table_constructor): Convert the signature
5452 table entry fields to their correct types.
5453
5454 * sig.c (build_signature_table_constructor): Don't call digest_init
5455 for the fields of a sigtable entry, it's wasted time.
5456
5457 * sig.c (build_signature_table_constructor): Correctly set the
5458 offset and index fields of a sigtable entry. Build the constructor
5459 the way digest_init does, digest_init can't handle initializing an
5460 anonymous union inside a struct.
5461 (build_signature_method_call): Use the index field instead of the
5462 delta field to get the vtable index.
5463
5464 * decl.c (init_decl_processing): Fix number of fields for building
5465 sigtable_entry_type.
5466
5467 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
5468 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
5469 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
5470 * decl.c (tag_identifier, offset_identifier): New variables to
5471 hold the identifiers for the sigtable fields tag and offset.
5472 (init_decl_processing): Initialize these variables.
5473 (init_decl_processing): Use these variables to build the
5474 sigtable_entry_type structure. Rename the code and offset fields
5475 to tag and delta, respectively; add offset and index fields. Changed
5476 types of fields from short_integer_type_node to delta_type_node.
5477 * sig.c (build_signature_table_constructor): Rename code and offset
5478 to tag and delta, respectively.
d11ad92e 5479 (build_signature_method_call): Likewise. Use above variables.
d8f1d487 5480
d8f1d487
RK
5481Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5482
5483 * decl.c (lookup_name_real): Don't try to look anything up in an
5484 erroneous object.
5485
5486Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
5487
5488 * method.c (build_overload_int): New routine. Break out
5489 functionality from build_overload_value so we can reuse it.
5490 (build_overload_value): Handle pointer to member functions as value
5491 parameters for templates.
5492 (build_overload_identifier): Since template parameters are shared
5493 among all instantiations, we have to substitute in the real types
5494 in TREE_TYPE (parm).
d11ad92e
MS
5495 pt.c (coerce_template_parms): Likewise.
5496 (push_template_decls): Likewise.
d8f1d487
RK
5497 (grok_template_type): Deleted as template parameters are shared
5498 among all instantiations.
5499
5500Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
5501
5502 * decl.c (grokdeclarator): Always give errors on constant overflow
5503 for array indices.
5504
5505Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5506
5507 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
5508 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
5509 reference type.
5510 (build_indirect_ref): Fix check for *&.
5511
72b7eeff
MS
5512Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
5513
5514 * Version 2.7.0 released.
5515
d11ad92e 5516Fri Jun 16 15:07:29 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
72b7eeff
MS
5517
5518 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
5519
5520Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5521
5522 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
5523
5524Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
5525
5526 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
5527 * decl.c (finish_decl): New routine to handle call backs from the
5528 mid end (declare_hidden_char_array).
5529
5530Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5531
5532 * decl.c (start_function): Handle setting C_C_D here.
5533 (set_C_C_D): Removed.
5534 (struct saved_scope): Remove class_decl.
5535 (push_to_top_level): Don't save current_class_decl.
5536 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
5537 (struct cp_function): Add C_C_D.
5538 (push_cp_function_context): Save C_C_D.
5539 (pop_cp_function_context): Restore C_C_D.
5540
5541Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5542
5543 * decl.c (set_C_C_D): New function. suspend_momentary before
5544 building C_C_D.
5545 (pop_from_top_level): Call it.
d11ad92e
MS
5546 (start_function): Likewise.
5547 (pop_cp_function_context): Likewise.
72b7eeff
MS
5548
5549 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
5550 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
5551
5552 * decl.c (push_cp_function_context): Save current_class_decl.
5553 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
5554 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
d11ad92e 5555 (start_function): Likewise.
72b7eeff
MS
5556
5557 * class.c (popclass): Don't mess with current_class_decl,
5558 current_vtable_decl, or C_C_D.
5559
5560Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
5561
5562 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
5563
d11ad92e 5564Wed May 24 15:55:18 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
b796119f
RK
5565
5566 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
5567 * decl2.c (finish_anon_union): Likewise.
5568 * method.c (largest_union_member): Likewise.
5569
d11ad92e 5570Wed May 24 14:41:11 1995 H.J. Lu <hjl@nynexst.com>
103894f1
L
5571
5572 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
5573
d11ad92e 5574Mon May 22 17:38:48 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fbb47000
RK
5575
5576 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
5577 Use $@ instead of output name so works even if have .exe.
5578 (cxxmain.o): Use cp if ln -s fails.
5579 (c++.install-man): Use $(exeext) in executable names.
5580 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
5581 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
5582
878cd289
MS
5583Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
5584
5585 * call.c (build_method_call): parms can be null, duh.
5586
5587Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
5588
5589 * call.c (build_method_call): If convert_arguments failed, just bail.
5590
5591Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5592
5593 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
5594
5595 * tree.c (copy_to_permanent): Oops.
5596
d11ad92e 5597Fri May 19 10:01:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
878cd289
MS
5598
5599 * cp-tree.h (break_out_target_exprs): Add decl.
5600
5601Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5602
5603 * decl.c (start_function): Move *all* interface handling stuff after
5604 the pushdecl.
5605
5606 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
5607 (perm_manip): Return t if permanent, otherwise 0.
5608 (copy_to_permanent): Use them.
5609 (bot_manip): Helper for break_out_target_exprs.
5610 (break_out_target_exprs): New function. Uses mapcar.
5611
5612 * typeck.c (convert_arguments): Use it.
5613
5614 * method.c (hack_identifier): Use convert_from_reference to
5615 dereference a reference.
5616
5617Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
5618
5619 * call.c (convert_harshness): Move reference bashing before pointer
5620 to member bashing.
5621
5622Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
5623
5624 * cvt.c (convert_to_reference): Only complain, if complaints are
5625 wanted.
d11ad92e
MS
5626 * typeck.c (build_function_call_real): Likewise. If
5627 LOOKUP_SPECULATIVELY is set and something won't work, return
5628 NULL_TREE.
5629 * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call.
878cd289 5630 (convert): Pass LOOKUP_NORMAL to cp_convert.
d11ad92e 5631 * typeck.c (convert_for_assignment): Likewise.
878cd289 5632 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 5633 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
5634 (convert_for_initialization): Use cp_convert instead of convert so
5635 that we can pass flags down.
5636 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
5637
c19a8067
JM
5638Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5639
878cd289
MS
5640 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
5641 decl type.
5642
c19a8067
JM
5643 * class.c (finish_struct): Don't complain about a class with no
5644 user-defined constructors but with a member that has no default
5645 constructor, as this is OK for aggregates.
5646
5647 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
5648 constructor call, mark slot addressable.
5649
d11ad92e 5650Tue May 16 18:37:51 1995 Douglas Rupp <drupp@cs.washington.edu>
eacd15bc
DR
5651
5652 * g++.c: Changed WINNT to _WIN32.
5653
a9aedbc2
MS
5654Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
5655
5656 * lex.c (handle_sysv_pragma): Don't use token_buffer.
5657
5658Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
5659
5660 * call.c (resolve_scope_to_name): Add initial semantic support for
5661 namespaces.
d11ad92e
MS
5662 * class.c (finish_struct): Likewise.
5663 * cp-tree.h (NAMESPACE_LEVEL): Likewise.
5664 * cvt.c (build_up_reference, convert_to_reference): Likewise.
5665 * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise.
5666 (resume_binding_level, toplevel_bindings_p): Likewise
5667 (namespace_bindings_p, declare_namespace_level): Likewise.
5668 (resume_level, push_namespace, pop_namespace): Likewise.
5669 (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise.
5670 (implicitly_declare, lookup_namespace_name): Likewise.
5671 (lookup_name_real, start_decl, make_temporary_for_reference): Likewise.
5672 (obscure_complex_init, finish_decl, expand_static_init): Likewise.
5673 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise.
5674 (store_parm_decls, hack_incomplete_structures): Likewise.
5675 * decl2.c (get_temp_name, finish_anon_union): Likewise.
5676 (current_namespace, push_namespace, pop_namespace): Likewise.
5677 (do_namespace_alias, do_toplevel_using_decl): Likewise.
5678 (do_class_using_decl): Likewise.
5679 * error.c (dump_decl): Likewise.
5680 * init.c (build_member_call, build_offset_ref): Likewise.
5681 * lex.c (identifier_type): Likewise.
5682 * parse.y (lang_extdef, using_decl, extdef): Likewise.
5683 (component_decl_1, nested_name_specifier_1): Likewise.
5684 * spew.c (yylex): Likewise.
5685 * tree.def (NAMESPACE_DECL): Likewise.
a9aedbc2
MS
5686
5687Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5688
5689 * decl.c (push_overloaded_decl): Return the new decl even if it
5690 can't be pushed.
5691
5692Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
5693
5694 * typeck.c (decay_conversion): Split out from default_conversion.
5695 (default_conversion): Call it.
d11ad92e 5696 (build_binary_op): Likewise.
a9aedbc2
MS
5697 (build_binary_op_nodefault): Use decay_conversion for truth ops.
5698
5699Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5700
5701 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
5702 (duplicate_decls): Always use the old decl's linkage info. Don't
5703 play with linkage of consts.
5704 (pushdecl): Don't play with linkage of consts.
5705 (redeclaration_error_message): Don't complain about an old public
5706 decl and a new non-public decl here.
5707 (grokvardecl): Handle linkage of consts here.
5708 (grokdeclarator): An 'extern inline' is public. Pass constp to
5709 grokvardecl.
5710 (start_function): Wait until after the pushdecl to do some linkage
5711 stuff.
5712
5713 * decl2.c (import_export_vtable): Make duplicates weak rather than
5714 static if supported.
d11ad92e
MS
5715 (import_export_inline): Likewise.
5716 * pt.c (do_pending_expansions): Likewise.
a9aedbc2
MS
5717
5718 * class.c (build_vbase_path): flag_assume_nonnull_objects only
5719 affects reference conversion.
5720
5721 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 5722 rtl_expr_chain.
a9aedbc2
MS
5723 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
5724
7154457b
PE
5725Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
5726
5727 * method.c (numeric_output_need_bar): Renamed from misspelling.
5728
45ca9d09
RK
5729 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
5730
7ab7b006
RK
5731Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5732
5733 * lang-options.h, lang-specs.h: New files.
5734
fd378c9d
JM
5735Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5736
5737 * typeck.c (default_conversion): Don't check for BLKmode before
5738 pulling out the decl_constant_value.
5739
5740 * decl.c (start_function): Clear named_labels and shadowed_labels.
5741
5742 * typeck.c (build_function_call_real): Also synthesize methods here.
5743
5744Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5745
5746 * decl2.c (finish_file): Synthesize exported methods before the
5747 reconsider loop.
5748
5749 * parse.y: Move declaration of flag_new_for_scope to file scope.
5750
863adfc0
MS
5751Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
5752
5753 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
5754 * parse.y (FOR): Conditionalize the pushing and poping of scope for
5755 the for-init-statement upon the new flag_new_for_scope.
5756 * parse.y (try_block): Simplify and use compstmt.
5757
5758Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5759
5760 * decl.c (define_function): Mark function decl artificial.
5761
5762Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5763
5764 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
5765
5766 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
d11ad92e 5767 * tree.c (build_cplus_method_type): Likewise.
863adfc0
MS
5768
5769 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
5770
5771 * typeck.c (build_function_call_real): If convert_arguments failed,
5772 just bail.
5773 (convert_arguments): If one of the arguments is error_mark_node,
5774 just bail.
5775
5776Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5777
5778 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
5779 decls that don't include it.
5780
5781Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5782
5783 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
5784 DECL_NOT_REALLY_EXTERN set aren't extern decls.
5785
5786 * typeck.c (build_indirect_ref): Don't call default_conversion for a
5787 parameter of reference_type.
5788 * cvt.c (convert_from_reference): Just use build_indirect_ref.
5789
5790 * pt.c (do_type_instantiation): Only instantiate member functions
5791 that actually come from templates.
5792
5793Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
5794
5795 * parse.y: Generalized cleanup of poplevels, and compound statements
5796 and compound statements in try blocks. Rewritten `for' rule so that
5797 the scope of variables declared in the for clause is shortened to
5798 span just to the end of the statement, instead of the whole
5799 containing block.
5800
5801Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5802
5803 * call.c (convert_harshness): Handle pointers to members better.
5804
5805Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5806
5807 * decl2.c (delete_sanity): Do access control here.
5808 * init.c (build_delete): Instead of here.
5809
5810 * Make-lang.in: Build c++filt.
5811
5812Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5813
5814 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
5815 update our IDENTIFIER_TYPE_VALUE.
5816
a5894242
MS
5817Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5818
5819 * lex.c (cons_up_default_function): Fix linkage of #pragma
5820 implemented functions.
5821
5822Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5823
5824 * method.c (build_overload_name): Simplify and fix repeated type
5825 folding.
5826
5827 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 5828 members.
a5894242
MS
5829
5830Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
5831
5832 * typeck2.c (process_init_constructor): Make sure initializers are
5833 fully digested.
5834
5835Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
5836
5837 * lex.c (cons_up_default_function): Always defer synthesis.
5838
5839Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5840
5841 * decl2.c (mark_inline_for_output): Don't play with pending_inline
5842 stuff.
5843
5844Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5845
5846 * call.c (user_harshness): New function; like build_type_conversion,
5847 but doesn't actually build anything.
5848 (compute_conversion_costs): Use it instead of build_type_conversion.
5849
5850Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
5851
5852 * typeck.c (build_function_call_real): Improve error message for
5853 calling a non-function.
5854
5855 * method.c (hack_identifier): Lose check for calling a data member.
5856
5857Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
5858
5859 * typeck2.c (build_functional_cast): Remove very old cruft.
5860 Seems like good code is generated without it.
5861
5862Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5863
5864 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
d11ad92e 5865 (do_build_copy_constructor): Likewise.
a5894242
MS
5866
5867 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
5868
5869 * decl.c (push_switch): New function.
d11ad92e 5870 (pop_switch): Likewise.
a5894242
MS
5871 (define_case_label): Check for jumping over initialization.
5872
5873 * call.c (build_method_call): Check for an inline function being
5874 called before its definition has been seen.
d11ad92e 5875 * typeck.c (build_function_call_real): Likewise.
a5894242
MS
5876
5877 * decl.c (duplicate_decls): Check for a function being redeclared
5878 inline after its address has been taken.
5879
5880 * typeck.c (build_conditional_expr): Handle related class lvalues.
5881
5882Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5883
5884 * pt.c (do_pending_expansions): Don't expand unused templates.
5885
5886 * parse.y (component_decl): Accept a lone semicolon.
5887
5888Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
5889
5890 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
5891 object parameter anymore.
5892
5893 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
5894
5895Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5896
5897 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
d11ad92e 5898 (lang_extdef): Likewise.
a5894242
MS
5899
5900 * parse.y (maybe_parmlist): New rule for use in declarators where
5901 this could either be a list of expressions or parameters. Calls
5902 suspend_momentary before deciding which.
5903 (direct_after_type_declarator): Use it.
5904 (complex_direct_notype_declarator): Use it.
5905
5906 * pt.c (tsubst): Propagate attributes const and noreturn.
5907
5908 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
5909 before doing the default thing.
5910
2db70b29
DE
5911Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
5912
5913 * typeck.c (common_type): Call lookup_attribute instead of
5914 value_member.
5915
d11ad92e 5916Tue Apr 25 18:07:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
91887f0b
RK
5917
5918 * Make-lang.in: Change "realclean" to "maintainer-clean".
5919
e8abc66f
MS
5920Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
5921
5922 * decl2.c (finish_file): Fix broken linked list handling.
5923
5924Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5925
5926 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
5927 as often.
d11ad92e 5928 (finish_struct): Likewise.
e8abc66f
MS
5929
5930 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
5931
5932 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
5933 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
5934
5935Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
5936
5937 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
5938 it is of the same type as the return value.
5939
5940Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5941
5942 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
5943 out its assembly.
5944
5945 * typeck.c (convert_for_initialization): Don't call a trivial copy
5946 constructor.
5947
5948 * typeck2.c (store_init_value): Only abort if the type has a
5949 non-trivial copy constructor.
5950
5951 * typeck.c (c_expand_return): If we're returning in a register and
5952 the return value is a TARGET_EXPR, expand it. Only do
5953 expand_aggr_init if we're returning in memory.
5954 (expand_target_expr): Function to expand a TARGET_EXPR.
5955 (build_modify_expr): Use it.
5956
5957 * tree.c (build_cplus_new): Layout the slot.
5958
5959 * expr.c (cplus_expand_expr): Use expand_call to expand the call
5960 under a NEW_EXPR, so the target is not discarded.
5961
5962Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
5963
5964 * gc.c (build_dynamic_cast): Tighten error checking.
5965
5966Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5967
5968 * expr.c (cplus_expand_expr): Only abort if the returned target is
5969 different from what we expected if the type has a non-trivial copy
5970 constructor.
5971
5972 * decl2.c (cplus_decl_attributes): Attributes applied to a template
5973 really apply to the template's result.
5974
5975 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
5976 to decide whether to consider a CALL_EXPR an lvalue.
5977
5978 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
5979 type has a non-trivial copy constructor.
5980
5981 * decl.c (start_function): If interface_known, unset
5982 DECL_NOT_REALLY_EXTERN on the function.
5983
5984Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5985
5986 * pt.c (do_function_instantiation): Handle explicit instantiation of
5987 member functions.
5988 (do_type_instantiation): Handle 'inline template class foo<int>',
5989 meaning just spit out the vtable.
5990
5991 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
5992 the consed functions.
5993
5994 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
5995
d11ad92e 5996Wed Apr 19 16:28:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
e8abc66f
MS
5997
5998 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
5999 typeck.c: Include output.h.
6000
d11ad92e 6001Wed Apr 19 14:57:21 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
e8abc66f
MS
6002
6003 * call.c (build_method_call): Allow a signature member functions to
6004 be called from a default implementation.
6005
6006Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6007
6008 * repo.c (finish_repo): Remember what directory we are in.
6009
6010 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
6011
6012 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
6013 out the second copy of the symbol name. Don't remember COLLECT_GCC.
6014
43f2999d
MS
6015Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
6016
6017 * search.c (virtual_context): New function to get the virtual
6018 context of a function.
6019 (expand_upcast_fixups): New function to generate runtime vtables.
d11ad92e 6020 (fixup_virtual_upcast_offsets): Likewise.
43f2999d
MS
6021 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
6022 ensure that the this offsets for upcasts from virtual bases into
6023 other virtual bases or non-virtual bases are correct at construction
6024 time and destruction time.
6025 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
6026 vtables in all virtual bases, instead of just one vtable in each
6027 virtual base.
d11ad92e 6028 (fixup_vtable_deltas1): Likewise.
43f2999d 6029
d11ad92e 6030Tue Apr 18 03:57:35 1995 Michael Meissner <meissner@cygnus.com>
44a8d0b3
MS
6031
6032 * Makefile.in (lex.o): Add dependency on c-pragma.h.
6033
6034 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
6035 appropriate, instead of 0.
6036
6037Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6038
6039 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
6040 comparing local and global decls.
6041
6042Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6043
6044 * typeck.c (convert_arguments): Only prohibit passing to ... of
6045 types with non-trivial copy constructors.
6046
6047 * repo.c (repo_template_used): Don't try to mess with no id.
6048
6049Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
6050
6051 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
6052
d11ad92e 6053Thu Apr 13 15:37:42 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
44a8d0b3
MS
6054
6055 * cp-tree.h (current_tinst_level): Delete declaration, since it's
6056 static inside pt.c.
6057
6058 * typeck.c (build_modify_expr): Catch incompatible array assignment.
6059
6060 * parse.y (attribute_list, attrib): Rewrite actions to feed the
6061 right stuff to decl_attributes.
6062
6063Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6064
6065 * search.c (dfs_debug_mark): Check for magic virtual like
6066 import_export_vtable.
6067
6068 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
6069 four args.
6070
6071Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
6072
6073 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
6074 decision.
6075
6076Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6077
6078 * decl.c (finish_decl): If we're writing out a static data member of
6079 a class, we want the debug info for that class.
6080
6081 * gc.c (build_t_desc): Check linkage of a class properly.
6082
6083 * class.c (finish_struct): Set the 'headof' offset for the main
6084 vtable properly.
6085 (prepare_fresh_vtable): Fix typeinfo pointer here.
6086 (modify_one_vtable): Instead of here.
6087
6088Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6089
6090 * repo.c (repo_get_id): New function to return the interesting
6091 identifier for a repo entity.
6092 (repo_template_used): Use it.
6093 (repo_template_instantiated): Mark the id as chosen.
6094 (init_repo): Record whether or not the id was chosen.
6095 (finish_repo): Note if an id was newly chosen.
6096
6097 * pt.c (do_function_instantiation): Call repo_template_instantiated.
d11ad92e 6098 (do_type_instantiation): Likewise. Don't diagnose multiple
44a8d0b3
MS
6099 instantiation.
6100
6101 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
6102 whether or not to synthesize a method.
6103
6104 Undo these changes:
6105 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6106 * class.c (modify_all_direct_vtables): ditto.
6107 * init.c (expand_direct_vtbls_init): expand more vtables if
6108 flag_rtti is on.
6109
79ff2c6c
MS
6110Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
6111
6112 * gc.c (build_headof): Use ptrdiff_type_node instead of
6113 integer_type_node on pointer arithmetic.
6114
6115Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6116
6117 * typeck.c (build_modify_expr): Undo previous change.
6118
6119Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6120
6121 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
6122
6123 * repo.c (get_base_filename): Put the .rpo file in the directory
6124 with the object file, not the source.
6125
6126 * typeck.c (build_conditional_expr): Handle pmf's better.
6127
6128 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
6129 the name of the symbol.
6130
6131Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6132
6133 * repo.c (open_repo_file): Make repo filename DOS-compliant.
6134 (*): Also write a new repo file if some previously-used
6135 templates are no longer used. Only remember the identifier.
6136
6137 * lex.c (cons_up_default_function): If this function belongs to a
6138 template class, call repo_template_used for it.
6139
6140 * repo.c (repo_template_used): Using a class means using its vtable,
6141 if any.
d11ad92e 6142 (finish_repo): Likewise.
79ff2c6c
MS
6143
6144 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
6145 if the type has a complex copy constructor.
6146
6147 * decl2.c (lang_decode_option): -frepo implies
6148 -fno-implicit-templates.
6149
6150 * decl.c (start_function): Clear current_{base,member}_init_list.
6151
6152 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
6153
6154Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6155
6156 * decl.c (struct cp_function): Add {base,member}_init_list.
6157 (push_cp_function_context): Save current_{base,member}_init_list.
6158 (pop_cp_function_context): Restore them.
6159
b19b4a78
MS
6160Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6161
6162 * repo.c (get_base_filename): Take filename parm, fix logic bug.
6163
6164 * typeck.c (build_compound_expr): Do not warn about a compound expr
6165 in which the first expression has no side effects.
6166 (build_x_compound_expr): Warn here instead.
6167 (build_conditional_expr): Don't warn about a conditional expression
6168 between an enum and the type it promotes to.
6169
6170 * init.c (build_new): Handle initialization of arrays of builtins
6171 properly.
6172
d11ad92e 6173Mon Apr 3 15:08:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b19b4a78
MS
6174
6175 * repo.c: Include config.h to get definitions of bcopy and rindex
6176 on systems that don't have them (e.g., SVR4).
6177
6178Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
6179
6180 * decl2.c (finish_table): Pass NULL_TREE instead of init to
6181 finish_decl so that it won't try and do error checking on the
6182 initializer.
6183
6184Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6185
6186 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
6187 determine whether this compile used -c -o.
6188 (open_repo_file): Use get_base_filename. Remove the extension.
6189 (finish_repo): Spit out the values of main_input_filename,
6190 COLLECT_GCC and COLLECT_GCC_OPTIONS.
6191
6192 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
6193
faae18ab
MS
6194Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6195
6196 * search.c (compute_access): Don't try to do access control on
6197 nested types.
6198
6199Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6200
6201 * repo.c: New file to handle things repo.
6202
6203 * pt.c (instantiate_template): Call repo_template_used if the
6204 definition is accessible.
6205 (mark_function_instantiated): Split out from
6206 do_function_instantiation.
6207 (mark_class_instantiated): Split out from do_type_instantiation.
6208
6209 * parse.y (template_instantiate_once): Call repo_template_used.
6210
6211 * lex.c (lang_init): Call init_repo.
6212
6213 * decl2.c: Handle flag_use_repository.
6214 (finish_file): Call finish_repo.
6215
6216 * decl.c (start_method): Call repo_template_used if this is a
6217 template method.
6218
6219 * Makefile.in (CXX_OBJS): Add repo.o.
6220 (repo.o): Add dependencies.
6221
6222 * Make-lang.in (CXX_SRCS): Add repo.c.
6223
6224 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
6225 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
6226
6227 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
6228 types used.
6229
6230 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
6231
6232Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6233
6234 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
6235 and result_type. When checking for comparison between signed
6236 and unsigned, use result_type rather than the (possibly shortened)
6237 type of op0. Also, don't warn about equality comparison of a
6238 signed operand to an unsigned constant that fits in the signed
6239 type.
6240
6241 * method.c (do_build_copy_constructor): Reverse
6242 current_base_init_list after we've built it up.
6243
6244Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
6245
6246 * except.c (build_throw): Never warn about the value of throw not
6247 being used.
6248
6249Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
6250
6251 * except.c (expand_start_catch_block): Check for bad catch parameter
6252 declarations.
6253
6254Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6255
6256 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
6257 DECL_EXTERNAL is not already set.
6258
6259Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
6260
6261 * method.c (emit_thunk): Let poplevel know that the last level is
6262 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
6263
6264Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6265
6266 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
6267 here.
6268
6269 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
6270 METHOD_TYPE.
6271 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
6272 all deferred inlines.
6273
6274Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6275
6276 * cp-tree.h (DECL_THIS_INLINE): New macro.
6277 (DECL_NOT_REALLY_EXTERN): New macro.
6278 (DECL_THIS_STATIC): New macro.
6279
6280 * decl.c: Lose all references to current_extern_inline. Break
6281 inline semantics into DECL_INLINE for actual inlining and
6282 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
6283 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
6284 emit an inline here. Associated changes.
d11ad92e
MS
6285 * lex.c: Likewise.
6286 * pt.c: Likewise.
6287 * typeck.c: Likewise.
faae18ab
MS
6288
6289 * call.c (build_method_call): Don't bother trying to handle inlines
6290 specially.
d11ad92e 6291 * cvt.c (convert_to_aggr): Likewise.
faae18ab
MS
6292
6293 * pt.c (do_function_instantiation): Handle instantiation of
6294 public inlines, too.
6295
6296Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
6297
6298 * except.c (init_exception_processing): Change the interface for
6299 __throw_type_match and add decl for new rtti matching routine
6300 __throw_type_match_rtti.
6301 (build_eh_type): New routine to build a run time descriptor for the
6302 expression given.
6303 (expand_start_catch_block): Update to use new calling convention for
6304 the matcher.
6305 (expand_throw): Update to use build_eh_type.
6306
08fb8ad0
WL
6307Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
6308
6309 * g++.c: Removed __NetBSD__ from conditional.
6310 Declare strerror if HAVE_STRERROR is defined; otherwise
6311 declare sys_errlist and sys_nerr.
6312 (my_strerror): New function.
6313
71851aaa
MS
6314Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6315
6316 * search.c (get_binfo): Don't try to be so clever.
6317
6318 * tree.c (copy_to_permanent): Also suspend_momentary().
6319
6320 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
6321 if the types are the same.
6322
6323 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 6324 we should.
71851aaa
MS
6325
6326 * init.c (build_member_call): Hand constructor calls off to
6327 build_functional_cast.
6328
6329 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
6330 the name of the type.
6331
d11ad92e 6332Tue Mar 28 13:13:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
6333
6334 * decl.c (grokdeclarator): Check for the decl returned by
6335 grokfndecl to be null before using build_decl_attribute_variant.
6336
d11ad92e 6337Mon Mar 27 18:04:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
6338
6339 * init.c (build_new): Use build_pointer_type instead of
6340 TYPE_POINTER_TO.
6341
7215f9a0
MS
6342Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6343
71851aaa
MS
6344 * typeck.c (build_conditional_expr): Handle pmfs.
6345 (convert_for_assignment): Fix pmf support.
6346
6347 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
6348 (cp_convert_to_pointer): Handle pmfs.
6349 (cp_convert): Pass pmfs to cp_convert_to_pointer.
6350
6351 * typeck.c (common_type): Handle inheritance for pmfs.
6352
6353 * typeck2.c (build_m_component_ref): Do access control.
6354
6355 * typeck.c (comp_target_types): Check for conversion to void *
6356 before checking trickier conversions.
6357
7215f9a0
MS
6358 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
6359
6360 * pt.c (push_tinst_level): Complain if template instantiation depth
6361 is greater than max_tinst_depth.
6362
6363 * typeck.c (common_type): Assume that we can call common_type to
6364 unify the target type of a pointer.
6365
6366Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6367
6368 * decl2.c (finish_file): Don't synthesize methods at
6369 finish_vtable_prevardecl time. Do synthesize methods that are not
6370 used, but are public and not external.
6371
6372 * cvt.c (build_type_conversion): Only give an error if for_sure.
6373
6374 * typeck.c (comp_target_types): Only support pointer conversions if
6375 nptrs > 0.
6376
d11ad92e 6377Wed Mar 22 19:30:15 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7215f9a0
MS
6378
6379 * init.c (build_new): Catch use of an initializer list where it
6380 shouldn't be.
6381
6382Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6383
6384 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
6385 non-constant.
6386
6387 * decl2.c: temp_name_counter is now public.
6388
6389 * decl.c (struct cp_function): Add temp_name_counter field.
6390 (push_cp_function_context): Save it.
6391 (pop_cp_function_context): Restore it.
6392
6393 * typeck.c (common_type): Handle unifying function types, and unify
6394 unmatched things to void* with a compiler_error, rather than
6395 silently like before.
6396
28cbf42c
MS
6397Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
6398
6399 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
6400 Brendan's last change and fix latent problem that causes TD entries
6401 to not come out when the things that need them has yet to be
6402 expanded.
6403
6404Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6405
6406 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
6407 and type1, since we might have changed op0 or op1.
6408
6409Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
6410
6411 * typeck.c (common_type): Don't mess up templates.
6412
6413Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6414
6415 * typeck.c (common_type): Handle ptms properly. Also handle
6416 T* -> void*.
6417 (build_binary_op_nodefault): New variable build_type controls what
6418 type is given to the expression when it is created. Set this to
6419 boolean_type_node for comparison ops instead of using result_type.
6420 (comp_target_types): Allow T * -> void *.
6421
6422 * cvt.c (cp_convert_to_pointer): Do access control when converting
6423 ptms, too.
6424
d11ad92e 6425Tue Mar 21 17:25:06 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6426
6427 * parse.y (extern_lang_string): Catch use of linkage specs that
6428 aren't all naming the same language.
6429
6430 * class.c (finish_struct): Delete accidental duplicate code.
6431
6432Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6433
6434 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
6435 comparing functions and incomplete types.
6436
6437 * decl.c (finish_function): Only unset current_function_decl if
6438 !nested.
6439 (duplicate_decls): Last change went too far; we only want to stop
6440 checking for value/reference ambiguity.
6441
6442Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
6443
6444 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
6445 out fresh, as the new type may be larger.
6446
6447Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6448
6449 * expr.c (extract_init): Try to expand the RTL for the
6450 initialization and figure out what it will look like so we can avoid
6451 run-time initialization. Disabled for now.
6452 (extract_scalar_init): Helper for scalar initialization.
6453 (extract_aggr_init): Helper for aggregate initialization.
6454
6455 * decl.c (duplicate_decls): Don't complain about ambiguous
6456 declarations.
6457 (obscure_complex_init): Now returns a tree. Call extract_init if
6458 we're optimizing and this is a toplevel decl.
6459 (finish_decl): Update accordingly.
6460
6461 * lex.c (check_newline): If we're just changing files (not pushing
6462 or popping), update input_file_stack->name.
6463
6464Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
6465
6466 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
6467 in the transitive unification code.
6468
d11ad92e 6469Mon Mar 20 16:07:50 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6470
6471 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
6472 non-functions.
6473 (grokdeclarator): Don't allow friends to be defined in local classes.
6474
6475Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6476
6477 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
6478 rather than DECL_SAVED_INSNS to decide whether or not this method
6479 was declared inline.
6480
6481 * method.c (synthesize_method): Turn off DECL_INLINE if
6482 function_cannot_inline_p thinks we're too large.
6483
6484 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
6485
6486Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6487
6488 * class.c (instantiate_type): Handle pmfs.
6489
6490 * typeck.c (convert_for_assignment): Check types when assigning one
6491 pmf to another.
6492
6493 * decl.c (define_label): Fix logic for printing out the name of the
6494 label in an error message.
6495
6496 * error.c (dump_expr): Support ARRAY_REF.
6497
d11ad92e 6498Fri Mar 17 17:43:02 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6499
6500 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
6501 (finish_prevtable_vardecl): Instead of here.
6502
6503Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6504
6505 * decl.c (expand_static_init): Also use expand_aggr_init if the
6506 initializer is a TREE_LIST.
6507 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
6508
6509 * pt.c (unify): Fix unification of return type.
6510
6511 * expr.c (fixup_result_decl): Use store_expr, rather than
6512 emit_move_insn, to move the return value into the place where
6513 callers will expect it.
6514
6515Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6516
6517 * init.c (build_offset_ref): Call assmble_external on functions.
d11ad92e 6518 * typeck.c (build_component_ref): Likewise.
28cbf42c 6519
d11ad92e 6520Thu Mar 16 20:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6521
6522 * decl.c (struct saved_scope): Add members base_init_list and
6523 member_init_list.
6524 (push_to_top_level): Save current_base_init_list and
6525 current_member_init_list to them.
6526 (pop_from_top_level): Put it back.
6527
6528Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6529
6530 * pt.c (instantiate_template): Call assemble_external.
6531
d11ad92e 6532Thu Mar 16 18:07:54 1995 Brendan Kehoe <brendan@phydeaux.cygnus.com>
28cbf42c
MS
6533
6534 * class.c: Include rtl.h, to get NULL_RTX.
6535 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
6536 on hosts with different sizes for each part of the union.
6537 * tree.c: Also include rtl.h.
6538 (layout_basetypes): Same change for DECL_SAVED_INSNS.
6539
6540Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6541
6542 * pt.c (unify): Fix array domain unification for 64-bit targets.
6543
6544 * decl2.c (finish_file): Push bizarre type decl before walking the
6545 vtables the first time.
6546 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
6547 with TREE_CHAIN (prev).
6548
6549 * init.c (emit_base_init): Use convert_pointer_to_real instead of
6550 convert_pointer_to when converting to a direct base.
6551
6552Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
6553
6554 * pt.c (type_unification): Handle transitive unification better.
6555
6556Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6557
6558 * decl2.c (walk_vtables): Always set prev to vars.
6559 (mark_vtable_entries): Call assemble_external on the vtable entries.
6560
6561 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 6562 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
6563
6564 Finally re-enable dynamic synthesis. This time it works.
6565 * method.c (synthesize_method): Pass decl_function_context (fndecl)
6566 to {push,pop}_cp_function_context.
6567 * decl.c (push_cp_function_context): Now takes a tree argument.
d11ad92e 6568 (pop_cp_function_context): Likewise.
28cbf42c 6569 * call.c (build_method_call): Enable synthesis.
d11ad92e 6570 * lex.c (cons_up_default_function): Likewise.
28cbf42c
MS
6571
6572Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
6573
6574 * parse.y (setattrs): Chain onto prefix_attributes rather than
6575 setting it.
6576
d11ad92e 6577Wed Mar 15 13:00:00 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6578
6579 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
6580 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
6581
d11ad92e 6582Mon Mar 13 21:00:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6583
6584 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
6585 and convert the size and integer_one_node to the index type.
6586
6587Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6588
6589 * typeck.c (get_member_function_from_ptrfunc): Save the instance
6590 argument, and tack it onto the front of the COND_EXPR to make the
6591 semantics come out right. Grab the instance argument from
6592 '*instance_ptrptr', rather than having it passed in separately.
6593
6594 * various: Change various consed-up comparison operations to have
6595 boolean type. Remove the instance argument in calls to
6596 get_member_function_from_ptrfunc.
6597
6598 * error.c (dump_expr): Dump true and false as "true" and "false".
6599
6600 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
6601 global init function.
6602
6603 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
6604 inline function is public.
6605
6606Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6607
6608 * init.c (is_friend): Be more careful about checking
6609 DECL_CLASS_CONTEXT on non-member functions.
6610
6611 * decl2.c (finish_vtable_vardecl): Don't bother calling
6612 assemble_external here.
6613 (prune_vtable_vardecl): New function that just splices out the
6614 vtable decl from the top-level decls.
6615 (import_export_inline): Unset DECL_EXTERNAL at first.
6616 (finish_file): Don't bother calling assemble_external here. Do
6617 splice out all of the vtables.
6618
6619Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6620
6621 * decl.c (finish_function): If we're not emitting the function yet,
6622 call assemble_external for it.
6623
6624 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
6625 here.
6626 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
6627 Also don't splice out the current vtable if it is unused.
6628 (finish_file): Move the second walk_vtables and the synthesis check
6629 inside the 'reconsider' loop. Move thunk emission after the
6630 'reconsider' loop.
6631
d11ad92e 6632Thu Mar 9 16:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6633
6634 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
6635 was passing bogus values for readonly and volatile from the original
6636 template decl, not the resultant type of the tsubst call.
6637
6638 * class.c (duplicate_tag_error): Use cp_error_at to point out the
6639 previous definition of the tag.
6640
6641Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6642
6643 * decl.c (start_function): Clear base_init_insns and protect_list.
6644 (struct cp_function): Add base_init_insns field.
6645 (push_cp_function_context): Also save base_init_insns.
6646 (pop_cp_function_context): Also restore base_init_insns.
6647
6648Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6649
6650 * init.c (member_init_ok_or_else): Check for initializing a static
6651 member here.
6652 (emit_base_init): Instead of here.
6653
6654Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6655
6656 * call.c (build_method_call): Disable synthesis as needed.
d11ad92e 6657 * lex.c (cons_up_default_function): Likewise.
b7484fbe 6658
d11ad92e 6659Tue Mar 7 10:14:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
f6abb50a
BK
6660
6661 * parse.y: New rules to allow attributes in a prefix position.
6662 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
6663 (setattr): New rule.
6664 (reserved_declspecs, declmods): Catch attributes here.
6665 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
6666 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
6667 descendent typedef.
6668 (grokdeclarator): Added code to support machine attributes.
6669 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
6670
b7484fbe
MS
6671Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6672
6673 * call.c (build_method_call): Don't synthesize methods outside of a
6674 function.
6675
6676 Make base initialization more re-entrant so that synthesis on the
6677 fly will work (and, eventually, template instantation on the fly).
6678 * init.c (sort_member_init): Don't bother with members that can't be
6679 initialized. Reorganize a bit. Don't initialize base members here.
6680 (sort_base_init): New function, like sort_member_init, but for base
6681 classes. Steals some code from emit_base_init.
6682 (emit_base_init): Simplify. Call sort_{member,base}_init before
6683 doing any initialization, so we don't have to save
6684 current_{member,base}_init_list in push_cp_function_context.
6685 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
6686 (expand_aggr_vbase_init): Simplify.
6687 * decl.c (struct cp_function): Add protect_list field.
6688 (push_cp_function_context): Also save protect_list.
6689 (pop_cp_function_context): Also restore protect_list.
6690 * call.c (build_method_call): Enable synthesis at point of call.
d11ad92e 6691 * lex.c (cons_up_default_function): Likewise.
b7484fbe
MS
6692
6693 * parse.y: Turn -ansi checks back into -pedantic checks.
6694
6695 * init.c (build_new): Fix -fcheck-new for array new.
6696
6697Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
6698
6699 * typeck.c (build_compound_expr): warn if left-hand operand of
6700 comma expression has no side-effects.
6701
6702Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6703
6704 * parse.y (primary): Change 'object qualified_id *' rules to 'object
6705 overqualified_id *'.
6706
d11ad92e 6707Fri Mar 3 12:48:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6708
6709 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
6710 Make the error look the same as the one we issue in c_sizeof.
6711
6712 * typeck.c (build_binary_op_nodefault): Give an error for trying
6713 to compare a pointer-to-member to `void *'.
6714
6715Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6716
6717 * typeck.c (build_unary_op): Handle bool increment with smoke and
6718 mirrors here, rather than in expand_increment where it belongs,
6719 because Kenner doesn't agree with me.
6720
d11ad92e 6721Fri Mar 3 00:08:10 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6722
6723 * decl.c (grokparms): Catch a PARM_DECL being used for a default
6724 argument as well.
6725
d11ad92e 6726Thu Mar 2 20:05:54 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6727
6728 * init.c (build_new): Don't allow new on a function type.
6729
6730 * parse.y (primary): Avoid a crash when seeing if the arg is of
6731 the same type as that given for the typespec in an explicit dtor call.
6732
6733Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6734
6735 * decl.c (finish_function): Change test for calling
6736 mark_inline_for_output.
6737
6738Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6739
6740 * typeck.c (build_modify_expr): Complain if
6741 build_default_binary_type_conversion fails.
6742
6743 * init.c (expand_default_init): Handle arguments of unknown type
6744 properly.
6745
6746 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
6747 if 'complain'.
6748 * various: Pass 'complain'.
6749
6750 * typeck.c (comptypes): Be more picky about comparing UPTs.
6751
d11ad92e 6752Wed Mar 1 11:03:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6753
6754 * decl.c (grokdeclarator): If declarator is null, say that the
6755 type used has an incomplete type.
6756
6757Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6758
6759 * pt.c (instantiate_template): Copy the template arguments to the
6760 permanent_obstack. Also use simple_cst_equal to compare them when
6761 looking for a previous instantiation.
6762
6763 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
6764 they are array domain types).
6765
6766Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6767
6768 * cp-tree.h: Define WANT_* constants for passing to
6769 build_expr_type_conversion.
6770 * cvt.c (build_expr_type_conversion): New function to build
6771 conversion to one of a group of suitable types.
6772 (build_default_binary_type_conversion): Use it.
d11ad92e
MS
6773 * decl2.c (grok_array_decl): Likewise.
6774 * typeck.c (build_unary_op): Likewise.
b7484fbe 6775 (build_array_ref): Tidy up a bit.
d11ad92e 6776 (build_binary_op): Likewise.
b7484fbe 6777
d11ad92e 6778Tue Feb 28 19:57:31 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6779
6780 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
6781
6782Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6783
6784 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
6785 reserved_declspecs' rule.
6786
6787 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
d11ad92e 6788 (direct_notype_declarator): Likewise.
b7484fbe
MS
6789 (complex_direct_notype_declarator): Add notype_qualified_id rule.
6790
6791 * lex.c (real_yylex): Handle :> digraph properly.
6792
d11ad92e 6793Tue Feb 28 12:26:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6794
6795 * decl.c (grokdeclarator): Check if it's a friend, not if it's
6796 non-virtual, that's being initialized. Move the check up to
6797 before FRIENDP would get cleared. Catch an unnamed var/field
6798 being declared void. Say just `field' instead of `structure field'
6799 in the error message. Only go for the operator name if DECLARATOR
6800 is non-null.
6801
6802Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6803
6804 * decl.c (start_function): Complain about abstract return type.
6805 (grokdeclarator): Complain about declaring constructors and
6806 destructors to be const or volatile. Complain about declaring
6807 destructors to be static.
6808
6809 * pt.c (uses_template_parms): Handle pmfs.
6810
6811 * decl.c (grokdeclarator): Don't call variable_size for array bounds
6812 that only depend on template constant parameters.
6813
d11ad92e 6814Mon Feb 27 15:38:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6815
6816 * error.c (dump_decl): Only look to see if it's a vtable if we
6817 actually have a name to check out.
6818
6819Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6820
6821 * cvt.c (convert_to_aggr): Lose misleading shortcut.
6822
6823Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
6824
6825 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
6826 not just for dwarf.
6827
d11ad92e 6828Sun Feb 26 00:10:18 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6829
6830 * decl.c (grokdeclarator): Don't allow a static member to be
6831 declared `register'.
6832
6833 * init.c (make_friend_class): Move up to a pedwarn for the warning
6834 about a class declaring friends with itself.
6835
6836 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
6837 or `inline friend class foo'. Only try to make a friend out of
6838 TYPE if we didn't already reset it to integer_type_node.
6839
d11ad92e 6840Sat Feb 25 22:32:03 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6841
6842 * decl.c (grokdeclarator): Don't allow initialization of a
6843 non-virtual function.
6844
6845 * decl.c (start_function): Do a pedwarn if we're changing `main'
6846 to have an int return type.
6847
6848Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6849
6850 * typeck.c (build_modify_expr): Handle simple assignment from
6851 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
6852
d11ad92e 6853Fri Feb 24 18:27:14 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6854
6855 * decl.c (grokdeclarator): Also don't allow virtual outside of a
6856 class decl for a scope method definition performed at global binding.
6857
6858 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
6859 of a bitfield.
6860
6861 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
6862
6863 * typeck.c (build_binary_op): Return an error_mark_node if either
6864 one of the args turned into an error_mark_node when we tried to
6865 use default_conversion.
6866
6867 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
6868
6869 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
6870 used on `__wchar_t'.
6871
6872Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
6873
6874 * except.c (end_protect_partials): Do it the right way.
6875
6876Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6877
6878 * typeck.c (build_binary_op_nodefault): Upgrade warning about
6879 comparing distinct pointer types to pedwarn.
6880
6881 * typeck2.c (digest_init): Cope with extra braces.
6882
6883 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
6884 of INT_CST_LT (..., interger_zero_node).
6885
d11ad92e 6886Wed Feb 22 14:45:52 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6887
6888 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
6889 function for systems that don't have EH.
6890
6891Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6892
6893 * call.c (can_convert_arg): Like can_convert, but takes an arg as
6894 well.
6895
6896 * pt.c (type_unification): Allow implicit conversions for parameters
6897 that do not depend on template parameters.
6898
d11ad92e 6899Tue Feb 21 18:43:48 1995 Douglas Rupp <drupp@cs.washington.edu>
1b65f56d
DR
6900
6901 * Make-lang.in, config-lang.in: ($exeext): New macro.
6902 * Make-lang.in: Try a "cp" if "ln" fails.
6903 * cp-tree.h (decl_attributes): Added argument.
6904 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
6905 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
6906 Modified spawnvp to have to correct number of arguments for OS/2, NT.
6907
b7484fbe
MS
6908Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
6909
6910 * decl.c (finish_function): Add calls to end_protect_partials to end
6911 the exception region that protects constructors so that partially
6912 constructed objects can be partially destructed when the constructor
6913 throws an exception.
6914 * init.c (perform_member_init, sort_member_init, emit_base_init):
6915 Added support for partially constructed objects.
6916 * init.c (build_partial_cleanup_for): New routine to do partial
6917 cleanups of a base class.
6918 * decl2.c (finish_file): Move the emitting of the exception table
6919 down, after we emit all code that might have exception regions in
6920 them.
6921 * except.c (end_protect_partials, might_have_exceptions_p): New
6922 routines.
6923 (emit_exception_table): Always output table if called.
6924 * cp-tree.h (protect_list, end_protect_partials,
6925 might_have_exceptions_p, emit_exception_table): Added.
6926
d11ad92e 6927Tue Feb 21 16:05:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
6928
6929 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
6930 address of a local variable.
6931 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
6932 were given a non-null PTR_TO_INSTPTR.
6933
6934Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6935
6936 * decl.c (duplicate_decls): Always lay out the merged decl.
6937
6938 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
d11ad92e 6939 (finish_prevtable_vardecl): Likewise.
59be85d7 6940
b7484fbe
MS
6941 * method.c (synthesize_method): Set interface_{unknown,only}
6942 according to the settings for our class, not the file where it comes
6943 from.
59be85d7 6944
b7484fbe 6945Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 6946
b7484fbe 6947 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 6948
e3417fcd
MS
6949Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6950
6951 * decl2.c (reparse_decl_as_expr): Support being called without a
6952 type argument.
6953
6954 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
6955 conflicts. Sigh.
6956
6957Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
6958
6959 * parse.y (template_def, fndef, fn.def1, return_init, condition,
6960 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
6961 component_decl_1, after_type_component_declarator0,
6962 notype_component_declarator0, after_type_component_declarator,
6963 notype_component_declarator, after_type_component_declarator,
6964 full_parm, maybe_raises, exception_specification_opt): Fix up,
6965 include exception_specification_opt maybeasm maybe_attribute and
6966 maybe_init if missing. Rename maybe_raises to
6967 exception_specification_opt to match draft wording. Use maybe_init
6968 to simplify rules.
6969
6970Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6971
6972 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
6973 built for news of scalar types.
6974
6975Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6976
6977 * typeck.c (build_binary_op_nodefault): Update code for warning
6978 about signed/unsigned comparisons from C frontend. Realize that the
6979 code in the C frontend is, if anything, even more bogus. Fix it.
6980 (build_binary_op): Undo default_conversion if it wasn't useful.
6981
6982 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
6983 PRE*CREMENT_EXPR.
6984
6985 * decl2.c (import_export_vtable): Don't try the vtable hack
6986 if the class doesn't have any real non-inline virtual functions.
6987 (finish_vtable_vardecl): Don't bother trying to find a non-inline
6988 virtual function in a non-polymorphic class.
d11ad92e 6989 (finish_prevtable_vardecl): Likewise.
e3417fcd
MS
6990
6991 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
6992
6993 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
6994
6995 * init.c (expand_virtual_init): Always call assemble_external.
6996
6997 * class.c (build_vfn_ref): Always call assemble_external.
6998 (build_vtable): Always call import_export_vtable.
d11ad92e 6999 (prepare_fresh_vtable): Likewise.
e3417fcd
MS
7000 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
7001
8ccc31eb
MS
7002Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7003
7004 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
7005 whether an enumerated type fits in a bitfield.
7006
7007Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7008
7009 * class.c (grow_method): Update method_vec after growing the class
f30432d7 7010 obstack.
8ccc31eb
MS
7011
7012Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
7013
7014 * parse.y (handler_seq): Push a level for the catch parameters.
7015
7016Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7017
7018 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
7019 bases, in case they've been clobbered.
7020
7021Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
7022
7023 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
7024 so that one day it will always be valid.
d11ad92e 7025 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
8ccc31eb
MS
7026
7027 * cp-tree.h (copy_binfo): Removed, unused.
d11ad92e 7028 * tree.c (copy_binfo): Likewise.
8ccc31eb
MS
7029
7030Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7031
7032 * init.c (build_new): Save the allocation before calling
7033 expand_vec_init on it.
7034
7035 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
7036 match the TYPE_PRECISION of the underlying type for constant folding
7037 to work.
7038
7039Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
7040
7041 * except.c (push_eh_entry, expand_start_all_catch,
7042 expand_leftover_cleanups, expand_end_catch_block): Keep track of
7043 the context in which the exception region occurs.
7044 (build_exception_table): If the region was not output, don't output
7045 the entry in the eh table for it.
7046
7047Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7048
7049 * init.c (expand_default_init): Only use a previous constructor call
7050 if it's a call to our constructor. Does the word "Duh" mean
7051 anything to you?
7052
7053 * decl.c (grokparms): Fine, just don't call
7054 convert_for_initialization at all. OK? Happy now?
7055
7056Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7057
7058 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
7059 method vector has a second element before returning it.
7060
7061 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
7062 convert_for_initialization.
7063
7064Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7065
7066 * typeck.c (build_modify_expr): Compare function name to
7067 constructor_name (current_class_type) instead of current_class_name.
7068
7069 * decl.c (grokparms): Don't do anything with the return value of
7070 convert_for_initialization.
7071
7072 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
7073
7074 * decl.c (duplicate_decls): Tweak error message.
7075
7076 * typeck.c (build_const_cast): Implement checking.
7077 (build_reinterpret_cast): Implement some checking.
7078
7079 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
7080 converting to the same aggregate type.
7081 (CONV_STATIC_CAST): Include it.
d11ad92e 7082 (CONV_C_CAST): Likewise.
8ccc31eb
MS
7083 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
7084 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
7085
7086Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7087
7088 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 7089 where necessary.
8ccc31eb
MS
7090
7091 * decl.c (auto_function): Now a function.
7092 * except.c (init_exception_processing): terminate, unexpected,
7093 set_terminate, and set_unexpected have C++ linkage.
7094
7095 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
7096 truthvalue_conversion for converting to bool, as it handles
7097 user-defined conversions properly.
d11ad92e 7098 (condition_conversion): Likewise.
8ccc31eb
MS
7099
7100 * except.c (expand_throw): Don't call convert_to_reference.
7101 Pass the correct parameters to build_new.
7102
7103 * method.c (do_build_assign_ref): Don't use access control when
7104 converting to a base reference here.
7105 (do_build_copy_constructor): Or here.
7106
7107 * init.c (build_new): Unset TREE_READONLY on the dereferenced
7108 pointer before assigning to it.
7109
7110 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
7111
7112 * decl2.c (delete_sanity): You can now delete pointer to const.
7113
7114Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
7115
7116 * decl.c (finish_function): Don't rely on actual parameters being
7117 evaluated left-to-right.
d11ad92e 7118 * except.c (expand_end_catch_block): Likewise.
8ccc31eb
MS
7119
7120Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7121
7122 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
7123 considered lvalues.
7124 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 7125 lvalue_p.
8ccc31eb
MS
7126
7127 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
7128 types.
7129 (convert_to_reference): Fix erroneous text substitution.
7130
7131 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
7132 Add new argument to all callers.
7133
7134 * typeck.c (convert_arguments): Check for error_mark_node before
7135 trying to do anything with the actual parameter.
7136
7137 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
7138 fold it.
7139 (bool_truthvalue_conversion): Remove. Fix all callers to call
7140 truthvalue_conversion instead.
7141 (various): Fold CLEANUP_POINT_EXPRs.
7142
7143 * parse.y (conditions): Call condition_conversion rather than
7144 building up a CLEANUP_POINT_EXPR.
7145
7146 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
7147 under -falt-external-templates.
7148
7149Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7150
7151 * init.c (build_new): Complain about new of const type without
7152 initializer. Other cleanup.
7153
7154 * call.c (compute_conversion_costs): Don't call
7155 build_type_conversion with a reference type; convert to the target
7156 type and check its lvaluetude.
d11ad92e 7157 * cvt.c (convert_to_reference): Likewise.
8ccc31eb
MS
7158
7159 * cvt.c (build_type_conversion_1): There will never be any need to
7160 dereference references here now.
7161
7162Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
7163
7164 * except.c (expand_builtin_throw): Make sure we only `use' the
7165 value of return_val_rtx.
7166
7167Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7168
7169 * parse.y (structsp): Don't complain about declaring a type being
7170 defined to be a friend.
7171
7172 * decl2.c (warn_if_unknown_interface): Note the template in question
7173 and the point of instantiation, for -falt-external-templates.
7174 * lex.c (reinit_parse_for_method): Pass the decl to
7175 warn_if_unknown_interface.
d11ad92e
MS
7176 * pt.c (instantiate_template): Likewise.
7177 (end_template_decl): Likewise.
8ccc31eb
MS
7178
7179 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
7180 nested name again, to make local classes work a bit better.
7181
7182 * typeck.c (build_function_call_real): Dereference reference after
7183 checking for incomplete type.
7184
7185 * init.c (build_new): Accept new of const and volatile types.
7186
7187Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
7188
7189 * decl.c (grokdeclarator): Fix error message.
7190
7191Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7192
7193 * typeck.c (convert_for_initialization): Do bash arrays when
7194 converting to a reference to non-array.
7195
7196Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7197
7198 * cvt.c (cp_convert): Don't call convert_to_reference, or
7199 automatically dereference references. Do pass reference conversions
7200 to cp_convert_to_pointer.
7201 (cp_convert_to_pointer): Support references.
7202
7203 * call.c (build_method_call): Don't build up a reference to the
7204 parameter here; let build_overload_call handle that.
7205
7206 * typeck.c (build_c_cast): Call convert_to_reference directly if
7207 converting to a reference type.
d11ad92e
MS
7208 * method.c (do_build_copy_constructor): Likewise.
7209 * method.c (do_build_copy_constructor): Likewise.
7210 (do_build_assign_ref): Likewise.
8ccc31eb
MS
7211
7212 * call.c (build_method_call): Dereference a returned reference.
d11ad92e 7213 * typeck.c (build_function_call_real): Likewise.
8ccc31eb
MS
7214
7215 * decl.c (xref_basetypes): Check for unions with basetypes here.
7216 (xref_tag): Instead of here.
7217
7218 * pt.c (process_template_parm): Template type parm decls are
7219 artificial.
7220
7221Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7222
7223 * parse.y (typed_declspecs): Add missing semicolon.
7224 (do_xref_defn): Resurrect.
7225 (named_class_head_sans_basetype): Move template specialization
7226 definition cases to named_class_head_sans_basetype_defn.
7227
7228 * decl2.c (grokfield): Call pushdecl_class_level after setting the
7229 TYPE_NAME, not before.
7230
7231Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7232
7233 * call.c (convert_harshness): Don't call sorry here. Don't allow
7234 conversions between function pointer types if pedantic.
7235
7236 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
7237
7238 * lex.c (cons_up_default_function): Use the full name for the return
7239 type of op=.
7240
7241 * decl.c (set_nested_typename): Don't worry about anonymous types,
7242 as they already have a unique name.
7243 (pushdecl): Remove redundant set_nested_typename
7244 (xref_tag): Split out base handling into xref_basetypes.
7245
7246 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
7247 not considered incomplete even though their definition is unknown.
7248
7249 * decl.c (xref_defn_tag): Lose.
7250 (xref_tag): xref_next_defn = ! globalize.
7251 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
7252 ones that should have it set will have it set by pushtag.
d11ad92e 7253 (pushdecl_class_level): Likewise.
8ccc31eb
MS
7254 (pushtag): Tidy up a bit.
7255 (set_nested_typename): Push a decl for the nested typename from
7256 here, rather than from xref_defn_tag.
7257
7258 * parse.y (do_xref): Lose.
7259 (named_class_head): If we see 'class foo:' we know it's a
7260 definition, so don't worry about base lists for non-definitions.
7261
7262 * pt.c (push_template_decls): Template parm decls are artificial.
7263
7264 * decl.c (duplicate_decls): Restore check for qualifier
7265 disagreement for non-functions.
7266 (decls_match): Remove check for qualifier disagreement.
7267
7268Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7269
7270 * decl.c (grok_reference_init): Convert initializer from
f30432d7 7271 reference.
d11ad92e 7272 * typeck.c (convert_for_initialization): Likewise.
8ccc31eb
MS
7273
7274 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
7275
7276 * cvt.c (cp_convert): Don't convert to the same class type by just
7277 tacking on a NOP_EXPR.
7278 (convert_to_reference): Use comp_target_types instead of comptypes
7279 so that we don't allow conversions two levels down.
7280
7281Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7282
7283 * class.c (build_vbase_path): Bash types to make the backend happy.
7284 * cvt.c (build_up_reference): Bash the types bashed by
7285 build_vbase_path to be reference types instead of pointer types.
d11ad92e 7286 (convert_to_reference): Likewise.
8ccc31eb
MS
7287
7288 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
7289 reference type.
7290
7291 * parse.y (structsp): Put back error for 'struct B: public A;'.
7292
7293Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
7294
7295 * except.c: Add support for mips systems that don't define __mips
7296 but do define mips, like Ultrix.
7297
7298Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
7299
7300 * except.c: Add support for exception handling on the Alpha.
7301
1038f4f9
MS
7302Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
7303
7304 * decl2.c (finish_file): Fix bug in Jan 31st change.
7305
d11ad92e 7306Tue Jan 31 16:59:15 1995 Gerald Baumgartner <gb@lorenzo.cs.purdue.edu>
1038f4f9
MS
7307
7308 * sig.c (build_signature_pointer_or_reference_type): Don't set
7309 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
7310 doesn't expect to find a copy constructor.
7311 * call.c (build_method_call): Treat signature pointers/reference
7312 as if IS_AGGR_TYPE were set.
7313
d18c083e
MS
7314Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
7315
7316 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
7317 (build_t_desc): Inform the user here if they try and build
7318 with -frtti and don't include <typeinfo.h>.
7319
7320 * decl2.c (finish_prevtable_vardecl): Support rescanning.
7321 (finish_file): Move finish_prevtable_vardecl up to before the global
7322 initializers are done as tdecls are initialized in the global
7323 initializer. Also Pick up any new tdecls or vtables needed by
7324 synthesized methods.
7325
7326 * class.c (finish_struct): Simplify. We have to do rtti scanning at
7327 end, so we might as well do all of it there.
7328
7329Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7330
7331 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
7332 targets, too.
7333
7334Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
7335
7336 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
7337 finish_vtable_vardecl. It has the first half functionality from
7338 that routine.
7339 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
7340 in finish_prevtable_vardecl.
7341 * decl2.c (finish_file): Call finish_prevtable_vardecl.
7342 * gc.c (build_generic_desc): Allow it to be called when not at the
7343 global binding layer, but behave as if we were.
7344 (build_t_desc): Rearrange a bit so that it really works and is
7345 easier to follow.
7346 * class.c (finish_struct): Don't decide on tdecls here, as we have
7347 to wait until the end of the file in general to decide whether or
7348 not they come out.
7349
7350Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7351
7352 * init.c (build_delete): Check access to operator delete before
7353 calling the destructor.
7354 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
7355 return error_mark_node.
7356 * call.c (build_method_call): Use the one-argument op delete even if
7357 it's an error.
7358
7359 * init.c (build_new): Fix -fthis-is-variable support.
d11ad92e 7360 * call.c (build_method_call): Likewise.
d18c083e
MS
7361
7362 * call.c (convert_harshness): Make conversion from a pointer to bool
7363 worse than conversion to another pointer.
7364
7365Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7366
7367 * init.c (build_new): Check new return value if -fcheck-new.
7368
7369 * lex.c (check_newline): Clear end_of_file when we're done, too.
7370
7371Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
7372
7373 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
7374 vtables whereever they go.
7375
7376 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
7377 right.
7378
7379Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
7380
7381 * decl2.c (finish_vtable_vardecl): Now set the
7382 interface/implementation of vtables on the first virtual function,
7383 if one exists, otherwise we use the old method. This is a major win
7384 in terms of cutting down the size of objects and executables in
7385 terms of text space and data space. Now most of the savings that
7386 #pragma interface/implementation gives is automatic in a fair number
7387 of cases.
7388
7389Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7390
7391 * decl.c (grokdeclarator): Discard the template parameters in a
7392 template constructor declaration so that the function is always
7393 named constructor_name (ctype).
7394
7395 * lex.c (check_newline): Use ungetc to put back the character before
7396 calling HANDLE_PRAGMA.
7397
7398Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
7399
7400 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
7401 make sure we still match them.
7402
7403Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7404
7405 * parse.y: Add END_OF_LINE token.
7406
7407 * lex.c (check_newline): Set linemode when we see a # directive, and
7408 unset it when we're done. Turn all 'return's into 'goto skipline'.
7409 Fix all uses of '\n', since we won't see it anymore. Put back the
7410 character we read before checking for a sysv or target pragma.
7411 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
7412 (handle_sysv_pragma): Don't look at the input stream; quit when we
7413 see an END_OF_LINE token.
7414
7415 * input.c (getch): Return EOF if we're in line mode and at the end
7416 of a line.
7417 (put_back): Don't put back an EOF.
7418
7419Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
7420
7421 * except.c (expand_throw): Do the newing of the exception object
7422 before we load the type descriptor or the address so that we don't
7423 wipe any of the values out.
7424
7425Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
7426
7427 * except.c (init_exception_processing): Don't use r12 on the rs6000.
7428
7429Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7430
7431 * decl.c (grokparms): Don't try to build up a reference at this point.
7432
7433 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
7434 will suffice to convert from integer_zero_node.
7435
d11ad92e 7436Wed Jan 25 15:02:09 1995 David S. Miller <davem@nadzieja.rutgers.edu>
b7484fbe
MS
7437
7438 * class.c (instantiate_type): Change error message text.
7439 * typeck2.c (store_init_value): Likewise.
7440
e1cd6e56
MS
7441Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
7442
7443 * pt.c (tsubst): When we copy a node, don't forget to copy
7444 TREE_CHAIN, we use it later.
7445
7446Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7447
7448 * typeck.c (convert_for_assignment): Initialize variable before use.
7449
7450Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7451
7452 * g++.c (main): Link with both libstdc++ and libg++ if called as
7453 something ending with "g++", otherwise only libstdc++. Move -lm to
7454 the end of the line.
7455
7456Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7457
7458 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 7459 compute_conversion_costs.
e1cd6e56
MS
7460
7461Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7462
7463 * search.c (get_matching_virtual): Give line number for previous
f30432d7 7464 declaration.
e1cd6e56
MS
7465
7466 * call.c (convert_harshness): Handle conversions to references
7467 better.
7468
7469 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
7470
7471Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
7472
7473 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
7474 as the TREE_CHAIN for methods will take us to the next differently
7475 named function, DECL_CHAIN won't.
7476
7477Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7478
7479 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
7480
7481 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
7482 warn_parentheses defaults to 0.
7483
7484 * decl.c (grokparms): Put back call to require_instantiated_type.
7485
7486Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
7487
7488 * except.c (exception_section): Use the data section on the rs6000.
7489 Change calling convention for named_section.
7490
7491Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
7492
f30432d7
MS
7493 * cp-tree.h : Make if (x=0) warn with wall
7494 * parse.y : Make if (x=0) warn with wall
e1cd6e56 7495
255512c1
JM
7496Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7497
e1cd6e56
MS
7498 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
7499 BITS_PER_UNIT otherwise.
7500
7501 * search.c (get_matching_virtual): Don't check the binfo if the
7502 types are the same.
7503
7504 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 7505 bool.
255512c1
JM
7506
7507Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7508
e1cd6e56
MS
7509 * various: Use boolean_type_node, boolean_true_node,
7510 boolean_false_node.
7511
7512 * search.c (get_matching_virtual): Allow covariant returns that
7513 don't require pointer adjustment.
7514
7515 * typeck.c (build_conditional_expr): Don't call default_conversion
7516 on ifexp.
7517
7518 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
7519
7520 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
7521
d11ad92e 7522Sun Jan 15 22:17:32 1995 David Binderman <dcb@lovat.fmrco.COM>
e1cd6e56
MS
7523
7524 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
7525
7526Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7527
e1cd6e56
MS
7528 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
7529 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
7530 for bool.
7531
7532Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7533
7534 * decl2.c (finish_file): We need to mess up if there are any
7535 variables in the list, not just if there is one with a constructor.
7536
7537Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7538
7539 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
7540 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
7541 (finish_function): Trust rest_of_compilation.
7542
7543 * decl2.c (finish_file): Also call functions designated as static
7544 constructors/destructors.
7545
7546 * decl.c (grokdeclarator): Allow access decls of operator functions.
7547 (grokparms): Only do convert_for_initialization if the initializer
7548 has a type.
7549 (duplicate_decls): Put back push_obstacks_nochange call.
7550
7551 * lex.c (real_yylex): Downgrade complaint about the escape sequence
7552 being too large from pedwarn to warning.
7553
7554 * decl.c (grokdeclarator): Don't complain about long long in system
7555 headers.
7556
7557 * lex.c (real_yylex): Handle digraphs.
7558
7559Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7560
7561 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
7562 affects C linkage declarations now.
7563
7564 * typeck.c (comp_target_types): Grok simple contravariant conversions.
7565 (common_type): t1 and t2 are interchangeable.
7566
7567 * various: Test return value of comp_target_types differently in
7568 different places; it now returns -1 for a contravariant conversion
7569 (which is fine in symmetric cases).
7570
7571 (common_type): Prefer long double to double even when
7572 they have the same precision.
7573
7574 * decl.c (grokparms): Call convert_for_initialization to check
7575 default arguments.
7576
7577 * init.c (build_new): void_type_node has a size (of 0).
7578
7579 * decl.c (decls_match): Also check for agreement of TREE_READONLY
7580 and TREE_THIS_VOLATILE.
7581 (push_class_level_binding): Properly handle shadowing of
7582 nested tags by fields.
7583
d11ad92e 7584 * search.c (dfs_pushdecls): Likewise.
e1cd6e56
MS
7585
7586 * decl2.c (finish_file): Don't second-guess self-initialization.
7587
7588 * cvt.c (convert_to_reference): Work with expr directly, rather than
7589 a copy.
7590
7591 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
7592
7593 * init.c (add_friend): Downgrade duplicate friend message from
7594 pedwarn to warning.
7595
7596 * decl.c (duplicate_decls): Push obstacks before calling common_type.
7597
7598Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
7599
7600 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
7601 exception table labels.
d11ad92e
MS
7602 (expand_start_all_catch): Likewise.
7603 (expand_leftover_cleanups): Likewise.
7604 (expand_end_catch_block): Likewise.
e1cd6e56
MS
7605 * except.c (make_first_label): new function.
7606 (expand_start_all_catch): add a call to make_first_label() before
7607 using a label as a jump destination.
d11ad92e
MS
7608 (expand_end_all_catch): Likewise.
7609 (expand_leftover_cleanups): Likewise.
7610 (expand_end_catch_block): Likewise.
7611 (expand_builtin_throw): Likewise.
7612 (expand_throw): Likewise.
e1cd6e56
MS
7613 * except.c: Add ARM processor support for exception handling.
7614
7615Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7616
7617 (complete_array_type): Copy code from C frontend.
7618
7619 * lex.c (real_yylex): Don't multiply the length of a wide string
7620 literal by WCHAR_BYTES.
7621
7622 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
7623 (duplicate_decls): Instead of here.
7624 (define_label): Complain about a label named wchar_t.
7625 (grokdeclarator): Complain about declarations of
7626 operator-function-ids as non-functions.
7627
7628 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
7629 COMPOUND_EXPRs.
7630 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
7631
7632 * lex.c (real_yylex): Don't skip whitespace when reading the next
7633 character after ->.
7634
7635Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
7636
7637 * except.c: Allow cc1plus to be built with native compiler on rs6000.
7638 (expand_start_all_catch): Add assemble_external calls for various
7639 routines we call.
d11ad92e
MS
7640 (expand_leftover_cleanups): Likewise.
7641 (expand_start_catch_block): Likewise.
7642 (do_unwind): Likewise.
7643 (expand_builtin_throw): Likewise.
e1cd6e56
MS
7644
7645Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7646
7647 * decl.c (pushtag): Only look for a previous decl in the current
7648 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
7649
7650 * gxx.gperf: Add __signature__ and __sigof__ keywords.
7651
7652 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
7653 does set flag_no_gnu_keywords and flag_operator_names.
7654
7655 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
7656 Unset extension keywords if -fno-gnu-keywords.
7657 Allow operator names ('bitand') if -foperator-names.
7658 Never unset 'asm'; -fno-asm only affects 'typeof'.
7659
7660 * decl.c (lookup_name_real): The got_object special lookup only
7661 applies to types.
7662
7663Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7664
7665 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
7666
7667 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 7668 'object' nonterminal.
e1cd6e56
MS
7669 (object): Set got_object.
7670
7671 * lex.h: Declare got_object.
7672
7673 * decl.c (lookup_name_real): Also lookup names in the context of an
7674 object specified.
7675
7676Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
7677
7678 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
7679 for things that have to be added to pointers, not size_type. Cures
7680 problems with pointer to members on Alphas.
d11ad92e
MS
7681 (build_binary_op_nodefault): Likewise.
7682 (get_delta_difference_: Likewise.
7683 (build_ptrmemfunc): Likewise.
e1cd6e56
MS
7684
7685Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7686
7687 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
7688 it.
7689
7690 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
7691 when dealing with overloaded member functions; just act like
7692 build_offset_ref.
7693 (commonparms): Remove misleading comment.
7694
7695 * decl.c (duplicate_decls): Complain about repeated default
7696 arguments here.
7697 (redeclaration_error_message): Instead of here.
7698 (pushdecl): Complain about missing default arguments here.
7699 (grokparms): Instead of here.
7700 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
7701 (grok_reference_init): Do not complain about missing initializer if
7702 declared 'extern'.
7703
7704 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
7705 function alternative and want_type is not set.
7706
7707Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7708
7709 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
7710 the decl when the type has no TYPE_NAME.
7711 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
7712 (lookup_name_real): Call lookup_field with want_type =
7713 prefer_type.
7714
7715 * search.c (lookup_field): Handle want_type properly in the presence
7716 of fields with the same name.
7717
7718 * decl.c (set_nested_typename): Set nested name for file-scope types
7719 to include leading ::.
7720 (pushdecl): Set the nested typename if the decl doesn't have one,
7721 rather than if the type's canonical decl doesn't have one.
7722
e1cd6e56
MS
7723Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7724
7725 * typeck.c (convert_for_assignment): Complain about contravariance
7726 violation here.
7727 (comp_target_types): Instead of here.
7728 (build_unary_op): resolve_offset_ref before checking for a valid
7729 type.
7730
7731 * spew.c (yylex): Decrement looking_for_typename after we see a
7732 _DEFN.
7733
7734 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 7735 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
7736
7737 * typeck.c (convert_for_assignment): Converting pointers to bool
7738 does not need a cast.
7739
7740Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7741
7742 * class.c (instantiate_type): Initialize nsubsts parm.
7743
d11ad92e 7744 * pt.c (do_function_instantiation): Likewise.
e1cd6e56
MS
7745
7746Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7747
7748 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
7749 DECL_SAVED_INSNS to determine whether or not we've seen a definition
7750 of this function.
d11ad92e 7751 (instantiate_template): Likewise.
e1cd6e56
MS
7752
7753 * call.c (convert_harshness): Allow const reference binding when
7754 called from the overloading code, but not when called from
7755 can_convert (since it isn't a conversion).
7756 (convert_harshness): Put back some disabled code.
7757
7758Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7759
7760 * call.c (convert_harshness): There is no implicit conversion from
7761 void* to other pointer types (unless the parameter is (void*)0).
7762 (convert_harshness): Non-lvalues do not convert to reference types.
7763
7764 * class.c (finish_struct_methods): Still set
f30432d7 7765 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
7766
7767 * call.c (can_convert): Don't use aggregate initialization.
7768
7769 * cp-tree.h: Declare lookup_conversions.
7770
7771Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
7772
7773 * parse.y (simple_stmt): Fix duplicate case value error messages to
7774 be more readable.
7775
7776Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7777
7778 * cvt.c (build_type_conversion): Total rewrite to use
7779 convert_harshness instead of reproducing conversion logic here. Now
7780 much shorter.
7781
7782 * call.c (convert_harshness): Support conversions to bool.
7783 (can_convert): Checks whether a conversion is less harsh
7784 than USER_CODE, for build_type_conversion.
7785
7786 * search.c (add_conversions): Function for passing to dfs_walk which
7787 adds all the type conversion operators in the current type to a list.
7788 (lookup_conversions): Calls dfs_walk with add_conversions and return
7789 the list.
7790 (dfs_walk): Don't require a qfn.
7791
7792 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
7793 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
7794
7795 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
7796 (grow_method): A separate function for building onto the growing
7797 method vector.
7798 (finish_struct_methods): Use it. Put all type conversion operators
7799 right after the constructors. Perhaps we should sort the methods
f30432d7 7800 alphabetically?
e1cd6e56
MS
7801
7802Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7803
7804 * call.c (build_method_call): Lose another misleading shortcut.
7805
7806Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
7807
7808 * gc.c (build_bltn_desc): Handle bool as a built-in type.
7809
7810Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
7811
7812 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
7813 on the complete type because of small virtual bases.
255512c1 7814
8145f082
MS
7815Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
7816
7817 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
7818 front end.
7819 (pushdecl): Also count decls pushed that are of a type being defined
7820 as incomplete things.
7821 * class.c (finish_struct): Move hack_incomplete_structures up to
7822 just after we set it as not being defined, so that the decls we
7823 build for RTTI don't count as incomplete.
7824
7825Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
7826
7827 * pt.c (tsubst): Fix problem with defining constructors in templated
7828 classes with virtual bases.
7829
7830Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
7831
7832 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
7833 expressions.
d11ad92e 7834 * gc.c (build_typeid): Likewise.
8145f082
MS
7835
7836Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
7837
7838 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
7839 don't assert on complex AGGR inits.
7840
7841Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
7842
7843 * method.c (build_overload_value): Handle pointer to members as
7844 template arguments.
7845
7846Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
7847
7848 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
7849 to do take the address of a data member for a pointer to data
7850 member.
7851
7852Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
7853
7854 * decl.c (grokdeclarator): Use the typedef name for linkage if the
7855 type doesn't otherwise have a name.
7856
d11ad92e 7857 * decl2.c (grokfield): Likewise.
8145f082
MS
7858
7859 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
7860 DECL_NAME of enums, structs and classes, we have to avoid trying to
7861 put it in the TYPE_FIELDS again.
7862
7863Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
7864
7865 * decl2.c (check_classfn): Ignore this parameter on static functions
7866 when checking to see if we match.
7867
7868Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
7869
7870 * typeck.c (unary_complex_lvalue): Handle address of non-left most
7871 pointers to members by calling get_delta_difference.
7872
5edb8b93
MS
7873Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
7874
7875 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
7876 static functions to early.
7877
7878Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
7879
7880 * method.c (make_thunk): Handle encoding of positive thunk offsets.
7881
7882Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
7883
7884 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
7885
6060a796
MS
7886Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
7887
7888 * decl2.c (check_classfn): Use decls_match to check if this has
7889 already been declared, as the DECL_ASSEMBLER_NAME may have been
7890 changed via asm("new_name").
7891 * decl.c (decls_match): Make public.
7892
7893Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
7894
7895 * *.[chy] (expand_aggr_init) Add fourth argument to handle
7896 distinction between = init and (init) style of initializations.
7897 * *.[chy] (finish_decl): Add fifth argument to to handle
7898 distinction between = init and (init) style of initializations.
7899
7900Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
7901
7902 Fix some random `explicit' bugs.
7903
7904 * cvt.c (convert_to_reference): Add third parameter to
7905 convert_force.
d11ad92e
MS
7906 (convert_force): Likewise.
7907 * call.c (build_method_call): Likewise.
7908 * decl2.c (setup_vtbl_ptr): Likewise.
7909 * init.c (expand_virtual_init): Likewise.
7910 (build_member_call): Likewise.
7911 (build_delete): Likewise.
7912 (build_vbase_delete): Likewise.
7913 * typeck.c (build_component_addr): Likewise.
7914 (build_c_cast): Likewise.
7915 (build_modify_expr): Likewise.
7916 * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can
6060a796
MS
7917 distinguish the context in which the conversion appears. Add thrid
7918 argument to build_c_cast.
7919 * cvt.c (cp_convert): Pass whether or not we want to consider
7920 non-converting constructors down to build_method_call.
7921 * decl2.c (reparse_absdcl_as_casts): Add third argument to
7922 build_c_cast.
d11ad92e
MS
7923 * gc.c (build_m_desc): Likewise.
7924 * init.c (build_new): Likewise.
7925 * parse.y (expr_no_commas): Likewise.
7926 (primary): Likewise.
7927 * typeck.c (build_x_function_call): Likewise.
7928 (build_static_cast): Likewise.
7929 (build_reinterpret_cast): Likewise.
7930 (build_const_cast): Likewise.
7931 (build_c_cast): Likewise.
7932 (build_ptrmemfunc): Likewise.
7933 * typeck2.c (build_functional_cast): Likewise.
6060a796
MS
7934 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
7935 expand_aggr_init_1 as inits are converted to the destination type.
7936
7937Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7938
7939 * Make-lang.in (cc1plus): Depends on c-pragma.o.
7940
7941 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
7942
7943 * lex.c (check_newline): If the #pragma is not recognized by g++,
7944 try machine-specific ones too.
7945 (handle_sysv_pragma): Copied from c-lex.c.
7946
7947Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
7948
7949 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
7950 reference better.
7951
7952Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7953
7954 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
7955 IS_AGGR_TYPE, since now they will not both be set on the same type.
7956
7957 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
7958 instantiations controlled by -fexternal-templates.
7959
7960 * decl.c (duplicate_decls): Don't complain about different values of
7961 __attribute__ ((const)) and ((noreturn)).
7962
81cdf787
DE
7963Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
7964
7965 * Makefile.in (BISONFLAGS): Delete --yacc.
7966 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
7967 (PARSE_C): Undo last patch.
7968
be99da77 7969Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 7970
3526f730 7971 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
7972 y.tab.c.
7973
6060a796
MS
7974Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7975
7976 * decl.c (finish_decl): Don't call obscure_complex_init for decls
7977 of indeterminate size.
7978
7979Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7980
7981 * decl.c (obscure_complex_init): Function to tweak the decl to
7982 prevent expand_decl from tring to initialize it.
7983 (finish_decl): Use it rather than writing the same code in three
7984 different places.
7985
7986 * parse.y (bad_parm): Stop trying to support parms without types.
7987
7988Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
7989
7990 * decl2.c (grokfield): Make asm specs on static member functions
7991 work.
7992
7993Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
7994
7995 * except.c (expand_throw): Make a copy of the thrown object.
7996
7997Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7998
7999 * parse.y: : has lower precedence than =.
8000
8001Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
8002
8003 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
8004 manglings.
8005 (grokvardecl): Add namespace into variable name.
8006
8007Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
8008
8009 * decl2.c (current_namespace_id): New routine to transform a simple
8010 name into a name in a namespace.
8011 * decl.c (grokdeclarator): Use it.
8012 * decl2.c (get_namespace_id): Find the name of the current
8013 namespace.
8014 (push_namespace, pop_namespace): Complete out missing
8015 functionality.
8016
8017Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8018
8019 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
8020 not be defined. Fix warning message for enums and restore warning
8021 for non-enums.
8022
8023 * decl2.c (push_namespace): Dummy function.
d11ad92e
MS
8024 (pop_namespace): Likewise.
8025 (do_namespace_alias): Likewise.
8026 (do_using_decl): Likewise.
8027 (do_using_directive): Likewise.
6060a796
MS
8028
8029 * parse.y: New token NSNAME for namespace names.
8030 (extdef): Add namespace, using definitions.
8031 (using_decl): New rule for using declarations.
8032 (any_id): New rule for identifiers with any degree of scoping.
8033 (identifier): Add NSNAME.
d11ad92e 8034 (notype_identifier): Likewise.
6060a796
MS
8035 (component_decl): Add using_decl.
8036 (nested_name_specifier): Add NSNAME SCOPE.
8037
8038 * typeck.c (convert_for_assignment): Handle conversions between
8039 enums and bool.
8040
8041 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
8042 FUNCTION_DECLs.
8043
8044Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
8045
8046 * class.c (finish_struct): Give an error if one tries to declare a
8047 bit-field's size greater than a long long, as the backend will dump.
8048 It is not an error to declare an enum bit-field greater than its
8049 precision. Warn if an enum bit-field is too small to hold all
8050 its values.
8051
8052Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
8053
8054 * typeck.c (convert_for_assignment): Use cp_convert instead of
8055 convert so that we don't get static casts.
8056
8057Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
8058
8059 * cvt.c (cp_convert): Don't complain about int->enum conversion if
8060 we are doing static casts.
8061
8062Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
8063
8064 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
8065 when dumping expressions in error messages.
8066
8067Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
8068
8069 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 8070 the return type is the right type, and make references work.
6060a796
MS
8071
8072Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8073
8074 * decl.c (poplevel): Don't be confused by function-scope
8075 declarations of non-nested functions.
8076 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
8077 (pushdecl): Use duplicate_decls to copy info from old decl into new
8078 function-scope one rather than doing it here.
8079
8080 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
8081 of this decl, in case this is a function-scope declaration.
8082
8083 * decl.c (finish_enum): Make sure that the type has the right
8084 precision when we call fixup_*_type.
8085
8086Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8087
8088 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
8089 want to build up references to rvalues if possible.
8090 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
8091
8092Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
8093
8094 * parse.y (maybe_raises): Handle throw ().
8095 * parse.y (ansi_raise_identifier): grok type-ids in exception
8096 specifications.
8097 * tree.c (build_exception_variant): Use list compare to check if
8098 two exception specifications match.
8099 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
8100 messages.
8101 * call.c (build_method_call): Remove TREE_RAISES.
d11ad92e
MS
8102 * cvt.c (convert_to_aggr): Likewise.
8103 * typeck.c (build_function_call_real, convert_arguments): Likewise.
8104 * init.c (expand_aggr_init_1): Likewise.
6060a796
MS
8105
8106Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
8107
8108 * except.c: Add support for m68k and mips exception handling
8109 support.
8110
8111Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
8112
8113 * except.c (expand_end_all_catch): Throw into outer context, if we
8114 fall off end of catch handlers.
8115
db5ae43f
MS
8116Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
8117
8118 * Makefile.in: Make is easier to decide where parse.[ch] will be
8119 built.
8120
af824546
DE
8121Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
8122
8123 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
8124 (GXX_INSTALL_NAME) Likewise.
8125 (CXX_CROSS_NAME) Use program_transform_cross_name.
8126 (GXX_CROSS_NAME) Likewise.
8127 (c++.install-man): Use program_transform_name on g++.1.
8128 (c++.uninstall): Likewise.
8129
db5ae43f
MS
8130Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
8131
8132 * parse.y (THROW): Fix precedence of throw expressions.
8133
8134Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
8135
8136 * typeck.c (build_unary_op): Allow promotions from bool to int on
8137 unary ~.
8138
8139Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8140
8141 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
8142 classes when appropriate.
8143 (build_overload_nested_name): When dealing with a function context,
8144 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
8145 avoid conflicts between local classes of the same name.
8146
8147Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
8148
8149 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
8150 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
8151 `explicit'.
8152 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
8153 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
8154 build_method_calls so that non-converting constructors are not used.
8155 * call.c (build_method_call): If we shouldn't use a non-converting
8156 constructor, then don't.
8157
8158Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8159
8160 * call.c (build_method_call): Don't try to synthesize methods yet.
8161
8162Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 8163
db5ae43f
MS
8164 * pt.c (push_template_decls): Create CONST_DECLs for template
8165 constant parameters, not VAR_DECLs.
8166
d11ad92e 8167Sat Nov 19 15:28:31 1994 Jim Wilson <wilson@chestnut.cygnus.com>
db5ae43f
MS
8168
8169 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
8170 shift count is less than size in bits of arg0.
8171
8172Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
8173
8174 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
8175 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
8176 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
8177 to add support for explicit, namespace, typename, and using, support
8178 for the rest is already in.
8179
db5ae43f
MS
8180Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
8181
8182 * gc.c (get_bad_cast_node): New routine to support compile time
8183 throws of bad_cast.
8184 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
8185 time.
8186
8187Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
8188
8189 * except.c: Add hppa support.
8190
8191Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
8192
8193 * except.c: Add rs6000 support.
8194
8195Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
8196
8197 * except.c (do_unwind): Add i[34]86 support.
8198
d11ad92e 8199Thu Nov 3 00:10:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8200
8201 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
8202 instantiations.
8203
d11ad92e 8204Wed Nov 2 15:08:24 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f 8205
14548a19 8206 * decl.c (finish_function): Emit types used in method parameters
db5ae43f
MS
8207 into symbol table.
8208
d11ad92e 8209Wed Nov 2 15:05:47 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8210
8211 * pt.c (process_template_parm): Allow pointer to member function
8212 template parameter types.
8213 (uses_template_parms): Handle pointer to member function
8214 CONSTRUCTORs.
8215
8216 * g++.c (main): Cast first argument of bzero to (char *).
8217 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
8218
d11ad92e 8219Mon Oct 31 14:50:48 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8220
8221 * gc.c (build_dynamic_cast): rewrite to make it work.
8222 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
8223 * class.c (modify_all_direct_vtables): ditto.
8224 * init.c (expand_direct_vtbls_init): expand more vtables if
8225 flag_rtti is on.
8226 * decl.c (init_type_desc): add default return.
8227
d11ad92e 8228Tue Oct 25 17:13:09 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8229
8230 * tree.c (debug_binfo): get rid of the initial size entry of
8231 vtable.
8232 * cp-tree.h: change flag_dossier to flag rtti, define type
8233 descriptor type nodes.
8234 * decl.c (init_type_desc): new function to initialize type
8235 descriptor type nodes.
8236 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
8237 * lex.c (init_lex): ditto.
8238 * decl.c : change variable flag_dossier to flag_rtti.
8239 * decl.c (duplicate_decls): get rid initial size entry of vtable.
8240 * decl.c (hack_incomplete_structures): take out assert 164.
8241 * search.c (get_abstract_virtuals_1): ditto.
8242 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
8243 CLASSTYPE_RTTI.
8244 * parse.y: ditto.
8245 * class.c (prepare_fresh_vtable): for virtual bases, get right
8246 offset.
8247 * class.c (add_virtual_function): change flag_dossier to
8248 flag_rtti.
8249 * class.c (modify_one_vtable): modify the right rtti entry.
8250 * class.c (override_one_vtable): get rid of size entry.
8251 * class.c (finish_struct): change flag_dossier to flag_rtti, and
8252 build extra vtables, build type descriptors for polymorphic
8253 classes.
8254 * gc.c (build_headof): make headof() works correctly with new
8255 rtti.
8256 * gc.c (build_typeid): make this function work with new rtti.
8257 * gc.c (get_typeid): make this function work with new rtti.
8258 * gc.c (build_bltn_desc): new function for new rtti.
8259 * gc.c (build_user_desc): ditto.
8260 * gc.c (build_class_desc): ditto.
8261 * gc.c (build_ptr_desc): ditto.
8262 * gc.c (build_attr_desc): ditto.
8263 * gc.c (build_func_desc): ditto.
8264 * gc.c (build_ptmf_desc): ditto.
8265 * gc.c (build_ptmd_desc): ditto.
8266 * gc.c (build_t_desc): ditto.
8267 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
8268
d11ad92e 8269Tue Oct 25 13:37:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8270
8271 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
8272 after checking for integral conversions.
ea943e1d 8273
72b7eeff
MS
8274Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
8275
8276 * Version 2.6.3 released.
8277
8278Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8279
8280 * typeck2.c (build_m_component_ref): Check the basetype of the
8281 member pointer against the main variant of the object type.
8282
8283Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8284
8285 * cvt.c (convert_to_reference): Make sure that the original expr
8286 gets its type back when converting a reference.
8287
8288 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
8289 (build_decl_overload): Instead of here.
8290
8291Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8292
8293 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
8294 function.
8295
8296 * typeck.c (convert_for_initialization): Handle initialization from
8297 a TARGET_EXPR.
8298
d11ad92e 8299Sun Nov 6 01:34:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
72b7eeff
MS
8300
8301 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
8302 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
8303 TYPE_READONLY and TYPE_VOLATILE from the argument.
8304 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
8305 present in parm from arg.
8306 (type_unification): Strip REFERENCE_TYPE from the argument type.
8307 (unify): Don't strip REFERENCE_TYPE from the argument type.
8308
d11ad92e 8309Sat Nov 5 22:42:15 1994 Greg McGary <gkm@magilla.cichlid.com>
72b7eeff
MS
8310
8311 * pt.c (do_type_instantiation): Check to see if there's a
8312 IDENTIFIER_TEMPLATE on a class before calling
8313 instantiate_member_templates().
8314
8315Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
8316
8317 * Version 2.6.2 released.
8318
8319Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
8320
8321 * Makefile.in (spew.o, lex.o, pt.o):
8322 Depend on $(srcdir)/parse.h, not parse.h.
8323
8324Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
8325
8326 * Version 2.6.1 released.
8327
d11ad92e 8328Sun Oct 23 13:19:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8329
db5ae43f
MS
8330 * decl2.c: Declare flag_access_control.
8331 (struct lang_f_options): Add access-control.
8332 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
8333 for the call to expand_aggr_init to copy the object out of the
8334 pcc_struct_return slot.
8335 * search.c (compute_access): if (!flag_access_control) return
8336 access_public.
eae89e04 8337
d11ad92e 8338Fri Oct 21 00:32:54 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8339
db5ae43f
MS
8340 * lex.c (cons_up_default_function): Don't try to defer method
8341 synthesis now.
8342
8343 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
8344 instead of abort, since the OSF/1 dynamic linker doesn't like to see
8345 relocation entries for abort.
eae89e04 8346
db5ae43f
MS
8347 * tree.c (array_type_nelts_total): Use sizetype, not
8348 integer_type_node.
d11ad92e 8349 (array_type_nelts_top): Likewise.
db5ae43f
MS
8350
8351Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
8352
8353 * decl.c (grokdeclarator): Added handling for catch parameters
8354 (CATCHPARM).
8355 * except.c (expand_start_catch_block): Use the new CATCHPARM context
8356 instead of NORMAL.
8357 * except.c (expand_throw): Don't let convert_to_reference complain
8358 about what we are doing.
8359
d11ad92e 8360Thu Oct 20 12:55:24 1994 Jim Wilson <wilson@cygnus.com>
db5ae43f
MS
8361
8362 * method.c (emit_thunk): Call instantiate_virtual_regs.
8363
8364Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
8365
8366 * except.c (expand_exception_blocks): Make sure throw code doesn't
8367 get put in function that won't be output.
eae89e04 8368
d11ad92e 8369Mon Oct 17 18:03:15 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8370
db5ae43f
MS
8371 * decl.c (init_decl_processing): Make alloca a builtin.
8372
d11ad92e 8373Thu Oct 27 21:10:25 1994 Craig Burley <craig@burley>
db5ae43f
MS
8374
8375 * g++.c (main): Only decrement "added" and set "library" to
8376 NULL when "library" != NULL (just like 940829 fix).
eae89e04 8377
c199879d
MS
8378Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
8379
8380 * except.c (expand_start_catch_block): Make sure the false label
8381 gets onto the permanent obstack, as it is used for the exception
8382 table.
8383
13306d4f
MS
8384Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
8385
8386 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
8387 be set just below, use current_fndecl instead.
8388
d11ad92e 8389Fri Oct 14 15:12:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8390
8391 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
8392 with LOOKUP_SPECULATIVELY.
8393 (expand_default_init): Abort if build_method_call returns NULL_TREE.
8394
8395 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
8396 the rhs is a TARGET_EXPR.
8397
8398 * parse.y (left_curly): Anonymous types are not affected by #pragma
8399 interface/implementation.
8400
8401 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
8402 default constructor if it isn't needed.
8403
8404 * lex.c (cons_up_default_function): Do synthesize methods for
8405 anonymous types if necessary.
8406
d11ad92e 8407Thu Oct 13 17:44:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8408
db5ae43f 8409 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d 8410
d11ad92e 8411Wed Oct 12 13:27:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8412
db5ae43f
MS
8413 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
8414
d11ad92e 8415 * init.c (expand_default_init): Likewise. Also remove some of the
db5ae43f
MS
8416 crufty code that assumes methods will not be synthesized properly.
8417
8418 * lex.c (cons_up_default_function): If the containing type has no
8419 name, these functions should never need to be called, so just
8420 declare them.
2f4f907d 8421
db5ae43f
MS
8422 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
8423 bitmask for lexing character constants.
8424
8425 * call.c (build_method_call): Disable code that tries to do tricky
8426 stuff with a default parameter that is a constructor call, but
8427 actually does other tricky stuff that breaks things.
2f4f907d
JM
8428
8429Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
8430
db5ae43f
MS
8431 * decl.c (finish_enum): Disable code which forces enums to be signed,
8432 since this conflicts with their use as bitfields. type_promotes_to
8433 handles promotion of enums of underlying unsigned types to signed
8434 integer types.
2f4f907d 8435
d11ad92e 8436Wed Oct 12 13:24:03 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8437
db5ae43f
MS
8438 * cvt.c (type_promotes_to): Also promote enums to long if
8439 appropriate.
2f4f907d 8440
db5ae43f
MS
8441 * typeck.c (default_conversion): Don't expect type_promotes_to to
8442 return a main variant.
2f4f907d 8443
d11ad92e 8444Wed Oct 12 12:19:45 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8445
db5ae43f
MS
8446 * call.c (build_scoped_method_call): Don't lose side effects in the
8447 object expression when calling a non-existent destructor.
2f4f907d 8448
d11ad92e 8449Fri Sep 2 19:05:21 1994 Rohan Lenard <rjl@iassf.easams.com.au>
2f4f907d 8450
db5ae43f
MS
8451 * call.c (build_scoped_method_call): Remove erroneous error message
8452 when destructor call is written as a scoped call.
2f4f907d 8453
d11ad92e 8454Tue Oct 11 23:48:31 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8455
8456 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 8457
13306d4f
MS
8458Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
8459
8460 * class.c (get_derived_offset): Added a type parameter to limit how
8461 far up the CLASSTYPE_VFIELD_PARENT chain we search.
8462 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
8463 offset to put into the vtable for the this parameter, make sure we
8464 don't offset from a parent of the DECL_CONTEXT of the function.
8465
d11ad92e 8466Tue Oct 11 16:10:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8467
8468 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
8469 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
d11ad92e 8470 (do_type_instantiation): Likewise.
db5ae43f
MS
8471
8472 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
8473 DECL_EXTERNAL and TREE_STATIC as appropriate.
8474
8475 * decl2.c (finish_file): Also synthesize methods that don't have
8476 DECL_EXTERNAL set. Set interface_unknown before doing so.
8477
8478 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
8479 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
8480
d11ad92e 8481Mon Oct 10 00:56:53 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8482
db5ae43f
MS
8483 * lex.c (cons_up_default_function): Mark methods in a template class
8484 as template instances. Store the values of interface_unknown and
8485 interface_only for do_pending_inlines.
8486 (do_pending_inlines): Use them.
8487
8488 * decl2.c (finish_file): If we haven't seen a definition of a
8489 function declared static, make the decl non-PUBLIC so compile_file
8490 can give an error.
cba8ba35 8491
d11ad92e 8492Sun Oct 9 02:42:29 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8493
db5ae43f 8494 * method.c (do_build_copy_constructor): Handle anonymous unions.
d11ad92e 8495 (do_build_assign_ref): Likewise.
db5ae43f
MS
8496 (largest_union_member): Move from lex.c.
8497
d11ad92e 8498Sat Oct 8 14:59:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8499
8500 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
8501 * pt.c (instantiate_member_templates): Lose redundant
8502 -fexternal-templates handling.
8503 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
8504 TREE_STATIC or DECL_INTERFACE_KNOWN.
8505 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
8506 of DECL_EXTERNAL for explicit instantiations.
8507 (do_function_instantiation): Do the new thing.
d11ad92e 8508 (do_type_instantiation): Likewise.
db5ae43f
MS
8509 (instantiate_template): Deal with member templates defined in a .cc
8510 file with -fexternal-templates.
8511 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
8512 decide whether to stick builtin_throw here.
8513 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
8514 rather than TREE_PUBLIC. Generally fix rules.
8515 (finish_file): Use DECL_INITIAL to determine whether or not a method
8516 has been synthesized, rather than TREE_ASM_WRITTEN.
8517 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
8518 TREE_PUBLIC.
d11ad92e
MS
8519 (pushdecl): Likewise.
8520 (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and
db5ae43f
MS
8521 DECL_INTERFACE_KNOWN.
8522 (redeclaration_error_message): Fix checking for conflicting linkage.
8523 (define_function): Set DECL_INTERFACE_KNOWN.
8524 (grokfndecl): Function decls are PUBLIC until we are sure about
8525 their linkage. Set DECL_DECLARED_STATIC as needed.
8526 (start_function): Deal with linkage. Move pushdecl after linkage
8527 magic.
8528 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
8529 * cp-tree.h (lang_decl_flags): Add interface_known and
8530 declared_static.
8531 (DECL_INTERFACE_KNOWN): New macro.
8532 (DECL_DECLARED_STATIC): New macro.
8533 (DECL_PUBLIC): New macro.
8534
8535 Clean up bogus use of TREE_PUBLIC.
8536 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
8537 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
8538 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35 8539
d11ad92e 8540Wed Oct 5 13:44:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8541
db5ae43f
MS
8542 * call.c (build_overload_call_real): Don't immediately do
8543 array->pointer conversion.
cba8ba35 8544
db5ae43f
MS
8545 * pt.c (type_unification): If not passing to a reference, strip
8546 cv-quals. Also handle array->pointer conversion.
cba8ba35 8547
d11ad92e 8548Tue Oct 4 17:45:37 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8549
db5ae43f
MS
8550 * decl.c (grokdeclarator): Don't warn about applying const to a
8551 const typedef or template type parameter.
8552
8553 * decl2.c (finish_file): Also synthesize methods after walking the
8554 vtables. Ugly ugly ugly.
cba8ba35 8555
d11ad92e 8556Mon Oct 3 15:02:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8557
db5ae43f
MS
8558 * various: Remove lingering remnants of old exception handling code.
8559
8560 * decl2.c (finish_file): Synthesize methods before walking the
8561 vtables, so that the vtables get emitted as needed.
8562
8563 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
8564 dealing with exceptions.
8565
8566Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
8567
8568 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
8569
d11ad92e 8570Mon Oct 3 02:59:28 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8571
8572 * decl2.c (finish_file): Fix inline handling.
cba8ba35 8573
d11ad92e 8574Sun Oct 2 00:21:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 8575
db5ae43f
MS
8576 * decl.c (grokdeclarator): Handle redundant scope even better.
8577 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 8578
db5ae43f
MS
8579 * method.c (synthesize_method): Pass toplev parameter to
8580 {push,pop}_cp_function_context depending on decl_function_context
8581 (fndecl).
cba8ba35 8582
db5ae43f
MS
8583 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
8584 built-in version.
cba8ba35 8585
db5ae43f
MS
8586 * method.c (synthesize_method): Don't be confused by __in_chrg
8587 parameter.
b3738072 8588
db5ae43f 8589 * class.c (popclass): Set C_C_D like start_function does.
b3738072 8590
db5ae43f 8591 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 8592
db5ae43f 8593 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
d11ad92e 8594 (direct_notype_declarator): Likewise.
db5ae43f 8595 (complex_direct_notype_declarator): Remove it here.
81613e43 8596
d11ad92e 8597Sat Oct 1 21:42:18 1994 Jason Merrill <jason@deneb.cygnus.com>
44c5421f 8598
db5ae43f
MS
8599 * init.c (resolve_offset_ref): Fix types used in resolving .*
8600 expressions.
8601
d11ad92e 8602Sat Oct 1 15:18:49 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8603
8604 Beginnings of work to synthesize methods only when needed.
8605 * call.c (build_method_call): Synthesize methods as necessary
8606 (currently never necessary).
8607 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
8608 on the wrong obstack.
8609 * decl.c (push_cp_function_context): Mostly copied from
8610 push_c_function_context.
8611 (pop_cp_function_context): Similarly.
8612 (finish_function): Reverse order of poplevel and pop_nested_class so
8613 that current_class_decl is restored properly.
d11ad92e 8614 (start_function): Likewise.
db5ae43f
MS
8615 (finish_function): Add parameter 'nested'. Don't call
8616 permanent_allocation if (nested).
8617 * various: Pass extra parameter to finish_function.
8618 * decl2.c (finish_file): Reorganize end-of-file inline handling,
8619 synthesizing methods as necessary.
8620 * lex.c (cons_up_default_function): Call mark_inline_for_output.
8621 Only synthesize methods immediately if #pragma implementation
8622 (currently disabled).
8623 (do_pending_inlines): Call synthesize_method.
8624 * method.c (synthesize_method): New function; all method synthesis
8625 goes through here. Calls do_build_assign_ref and
8626 do_build_copy_constructor.
8627 (build_default_constructor): Remove.
d11ad92e 8628 (build_dtor): Likewise.
db5ae43f
MS
8629 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
8630 done by synthesize_method.
8631 (build_copy_constructor): Similarly.
44c5421f 8632
eac293a1
MS
8633Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
8634
8635 * typeck.c (c_expand_return): Use magic so the backend can fixup the
8636 assignment into the return register, so cleanups won't clobber it.
8637
d11ad92e 8638Thu Sep 29 13:08:50 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
8639
8640 * method.c (hack_identifier): Don't call assemble_external for
8641 template decls.
8642
8643 * decl.c (finish_decl): Also end temporary allocation if the decl in
8644 question has a type of error_mark_node.
8645
6060a796 8646Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
8647
8648 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
8649 that if the ?: was a reference type, that the subparts will be also.
8650
d11ad92e 8651Wed Sep 28 16:14:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
eac293a1
MS
8652
8653 * except.c (register_exception_table): Use Pmode, not PTRmode.
8654
d11ad92e 8655Fri Sep 23 13:54:27 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
8656
8657 * lex.c (do_pending_inlines): Do method synthesis after the
8658 pending_inlines have been reversed.
8659
d11ad92e 8660Thu Sep 22 12:53:03 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
8661
8662 * decl2.c (finish_file): Fix Brendan's fix: Only call
8663 register_exception_table if there is a non-empty exception table.
8664
d11ad92e 8665Thu Sep 22 12:03:46 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8666
8667 * decl2.c (finish_file): Only do register_exception_table if
8668 -fhandle-exceptions is being used.
8669
d11ad92e 8670Wed Sep 21 19:01:51 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
8671
8672 * except.c (output_exception_table_entry): Simplify
8673 by using assemble_integer.
8674 (build_exception_table): Change to return a count.
8675 Cleanup to use standard macros, instead of hard-wired
8676 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
8677 (register_exception_table): New function. Generate call to builtin.
8678 * decl2.c (finish_file): Call register_exception_table.
8679 * cp-tree.h (build_exception_table): Fix prototype.
8680
d11ad92e 8681Wed Sep 21 13:20:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8682
8683 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
8684
8685 * decl2.c (delete_sanity): Give an error at trying to delete a
8686 function.
8687
d11ad92e 8688Wed Sep 21 11:47:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8689
8690 * lex.c (cons_up_default_function): Mark synthesized destructors
8691 inline.
8692
8693 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
8694 something other than __wchar_t, complaining if -pedantic and not in
8695 a system header.
8696
d11ad92e 8697Tue Sep 20 09:43:28 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8698
8699 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
8700 here.
8701
8702 * typeck.c (build_modify_expr): Require complete type after checking
8703 for error_mark_node.
8704
8705 * call.c (build_method_call): Print parmtypes when complaining of
8706 ambiguous call.
8707
8708 * typeck.c (build_modify_expr): Handle assignment to array from
8709 non-array.
8710
8711 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
8712
8713 * call.c (build_method_call): Don't bother with the exact match.
8714
d11ad92e 8715Mon Sep 19 00:51:39 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8716
8717 * init.c (expand_aggr_init): If we munge the type of the variable,
8718 also munge the type of the initializer.
8719
8720 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
8721 (init_decl_processing): Push artificial declaration of wchar_t so
8722 people don't have to declare it before they can use it.
8723
8724 * error.c (cp_line_of): return lineno in lieu of 0.
8725
8726 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
8727 int and bool.
8728 (build_component_ref): Fold the COMPONENT_REF in case it can be
8729 reduced.
8730
8731 * typeck2.c (store_init_value): Don't pedwarn about non-constant
8732 bracketed initializers for automatic variables.
8733
d11ad92e 8734Sun Sep 18 10:12:12 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8735
8736 * error.c (dump_decl): Don't say `typedef enum foo foo'.
8737
8738 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
8739 because they're affected by #pragma i/i. We'll deal with that when
8740 they get instantiated.
8741
8742 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
8743
8744 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
8745 ADDR_EXPRs if appropriate.
8746
8747 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
8748
8749 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
8750 initializer properly.
d11ad92e 8751 * typeck2.c (digest_init): Likewise.
f376e137
MS
8752
8753 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
8754 it uses build_cplus_array_type.
8755 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
8756
8757 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 8758 enums.
f376e137 8759
d11ad92e 8760Tue Sep 13 10:56:58 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8761
8762 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 8763 properly.
f376e137 8764
d11ad92e 8765Tue Sep 13 09:51:59 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8766
8767 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
8768 fact, static.
8769
d11ad92e 8770Mon Sep 12 14:40:30 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8771
8772 * decl.c (finish_decl): Lay out the rtl for DECL before doing
8773 grok_reference_init, in case it's static.
8774
d11ad92e 8775Mon Sep 12 12:45:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8776
8777 * class.c (finish_struct): Don't synthesize constructors if the
8778 class has a field with the same name as the class. Don't die on
8779 classes with no constructors or destructors. Don't die if the head
8780 and tail of the class are in different files.
8781
8782 * decl.c (grokdeclarator): Don't treat a function pointer field
8783 with the same name as the class as a constructor.
8784
d11ad92e 8785Fri Sep 9 13:17:00 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8786
8787 * typeck.c (build_c_cast): Pull constant values out of their
8788 variables here.
8789
8790 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
8791 FUNCTION_DECLs and TEMPLATE_DECLs.
8792
d11ad92e 8793Thu Sep 8 10:07:48 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8794
8795 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
8796 have it.
8797
8798 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
8799 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
8800 TREE_PUBLIC unless -fexternal-templates.
8801
d11ad92e 8802Wed Sep 7 13:17:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8803
8804 * pt.c (do_type_instantiation): Call instantiate_member_templates.
8805 Deal with specializations.
8806 (tsubst): Don't stick the mangled name in DECL_NAME for function
8807 instantiations. Don't push them, either.
8808
8809 * decl2.c (grokfield): Move code for generating the
8810 DECL_ASSEMBLER_NAME for static members from here.
8811 * method.c (build_static_name): To here.
8812 * decl.c (grokvardecl): Call build_static_name.
8813 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
8814
d11ad92e 8815Mon Sep 5 12:49:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8816
8817 * call.c (build_method_call): if -Wsynth, warn when selecting
8818 synthesized op= over user-supplied one cfront would select.
8819 * decl2.c (lang_decode_option): Handle -Wsynth.
8820
d11ad92e 8821Fri Sep 2 15:11:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8822
8823 * decl.c (finish_enum): Overhaul to fix several bugs.
8824 (start_enum): Disable useless code.
8825
d11ad92e 8826Thu Sep 1 16:04:54 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8827
8828 * typeck.c (c_expand_return): Warn about returning a reference to a
8829 temporary.
8830 (convert_arguments): Increment argument counter when using default
8831 arguments, too.
8832
d11ad92e 8833Wed Aug 31 14:29:22 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8834
8835 * decl.c (finish_decl): If the type of decl is error_mark_node,
8836 don't bother trying to do anything.
8837
8838 * typeck.c (convert_for_initialization): If the rhs contains a
8839 constructor call, pretend the lhs type needs to be constructed.
8840
8841 * init.c (expand_default_init): If we stick the object inside the
8842 initializer, mark the initializer used.
8843
d11ad92e 8844Tue Aug 30 13:50:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8845
8846 * method.c (build_assign_ref): return *this;
8847 (build_assign_ref): Fix base assignment order.
8848 (build_copy_constructor): Fix member init order.
8849
d11ad92e 8850Mon Aug 29 13:54:39 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8851
8852 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
8853 its argument.
8854
d11ad92e 8855Sat Aug 27 09:36:03 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8856
8857 * method.c (build_copy_constructor): Also copy virtual bases.
8858
d11ad92e 8859Fri Aug 26 17:05:15 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8860
8861 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
8862 any synthesis. Also first set deja_vu on all pending_inlines.
8863
8864 * method.c (build_assign_ref): Use build_member_call to invoke base
8865 operator=, rather than build_modify_expr. And use
8866 build_reference_type instead of TYPE_REFERENCE_TO.
8867 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
8868 basetype.
8869
8870 * decl2.c (grokfield): Don't complain about undefined local class
8871 methods.
8872
8873 * class.c (finish_struct): Don't try to synthesize methods here.
8874 * lex.c (do_pending_inlines): Instead, synthesize them here.
8875 (init_lex): Initialize synth_obstack.
8876 (cons_up_default_function): Stick synthesis request on
8877 pending_inlines.
8878
d11ad92e 8879Fri Aug 26 12:24:14 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8880
8881 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
8882 accept an RTL_EXPR in what we're about to use for the instance,
8883 since anything which would end up with pcc_struct_return set
8884 inside cplus_expand_expr.
8885
8886 * cp-tree.h (cons_up_default_function): Note change of prototype.
8887
d11ad92e 8888Thu Aug 25 23:05:30 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
8889
8890 * class.c (finish_struct): Undid change from Aug 21 testing
8891 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
d11ad92e 8892 * parse.y (left_curly): Likewise, undid change from Aug 21.
f376e137
MS
8893 * decl.c (xref_tag): Undid change from Aug 21, set
8894 CLASSTYPE_INTERFACE correctly, and added comments.
8895
d11ad92e 8896Thu Aug 25 00:36:31 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8897
8898 Rework approach to synthesized methods; don't go through the parser
8899 anymore.
8900 * class.c (finish_struct): Use new synthesis approach.
8901 * lex.c (cons_up_default_function): Now just creates declaration,
8902 not code.
8903 (largest_union_member): #if 0 out.
d11ad92e
MS
8904 (default_assign_ref_body): Likewise.
8905 (default_copy_constructor_body): Likewise.
f376e137
MS
8906 * method.c (build_default_constructor): New function to synthesize X().
8907 (build_copy_constructor): Synthesize X(X&).
8908 (build_assign_ref): Synthesize X::operator=(X&).
8909 (build_dtor): Synthesize ~X().
8910
8911 * error.c (cp_line_of): If we're dealing with an artificial
8912 TYPE_DECL, look at the type instead.
8913
d11ad92e 8914Wed Aug 24 11:11:50 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
8915
8916 * init.c (sort_member_init): Check warn_reorder.
8917 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
8918
8919 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
8920 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
8921 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
8922
6060a796 8923Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
8924
8925 * error.c (dump_decl): Improve wording, so that error messages
8926 dont't read template<, class foo>...
8927
d11ad92e 8928Mon Aug 22 15:30:51 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
8929
8930 * parse.y (label_colon): Also match a TYPENAME as a label name,
8931 since they may have declared a class by that name but have also
8932 tried to have a local label under the same name.
8933
8934 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
8935 for the message so they know at what point it was instantiated.
8936
d11ad92e 8937Sun Aug 21 23:07:35 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
8938
8939 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
8940 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
8941 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 8942 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
8943 * parse.y (left_curly): New final resting place for setting
8944 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
8945
8946 * class.c (finish_struct): Don't test for function/field name
8947 conflicts in signatures, since all the fields are compiler-constructed.
8948
d11ad92e 8949Fri Aug 19 14:04:47 1994 Kung Hsu <kung@mexican.cygnus.com>
f376e137
MS
8950
8951 * method.c (build_overload_nested_name): in qualified name
8952 mangling, the template with value instantiation will have numeric
8953 at end and may mixed with the name length of next nested level.
8954 Add a '_' in between.
8955 * method.c (build_overload_name): ditto.
8956 * method.c (build_overload_identifier): ditto.
8957
6060a796 8958Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
8959
8960 * error.c (dump_decl): Handle NULL args.
8961
db5ae43f
MS
8962Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
8963
8964 * g++.c: Rework last change so it's done like collect.c (and
8965 gcc.c).
8966
8967Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
8968
8969 * g++.c: Include <sys/errno.h> in case `errno' is a macro
8970 as permitted by ANSI C.
8971
6060a796 8972Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
8973
8974 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
8975 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
8976 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 8977 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
8978 * parse.y (left_curly): New final resting place for setting
8979 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
8980
d11ad92e 8981Thu Aug 11 11:32:42 1994 H.J. Lu <hjl@nynexst.com>
00595019
MS
8982
8983 * g++.c (main): Only decrement "added" and set "library" to
8984 NULL when "library" != NULL.
8985
d11ad92e 8986Sat Aug 13 00:14:52 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
8987
8988 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
8989 just because its class has a known interface.
8990 (decls_match): Deal with new format of template parms.
8991
8992 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
8993 DECL_EXTERNAL here.
8994
d11ad92e 8995Fri Aug 12 01:55:15 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
8996
8997 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
d11ad92e 8998 (xref_defn_tag): Likewise.
00595019
MS
8999 (pushdecl): Only allow artificial typedefs to be shadowed.
9000
9001 * init.c (emit_base_init): Pass the right binfos to
9002 expand_aggr_init_1.
9003
9004 * class.c (delete_duplicate_fields_1): Make it work right.
9005 (finish_struct): Catch function/field name conflict.
9006
9007 * decl2.c (check_classfn): Pass the function to cp_error, not just
9008 the name.
9009
9010 * init.c (sort_member_init): Warn when order of member initializers
9011 does not match order of member declarations.
9012 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
9013
9014 * error.c (dump_expr): Handle lists of functions.
9015
9016 * decl.c (start_function): #pragma interface only affects functions
9017 that would otherwise be static.
9018 (finish_decl): Don't warn about an unused variable if it has both
9019 constructor and destructor, since the 'resource allocation is
9020 initialization' idiom is relatively common.
9021
9022 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
d11ad92e 9023 (comp_target_parms): Likewise.
00595019
MS
9024 (compparms): Never consider default parms.
9025 (common_base_type): Don't choose a virtual baseclass if there is a
9026 more derived class in common.
9027 (build_conditional_expr): If pedantic, pedwarn about conversion to
9028 common base in conditional expr.
9029
9030 * class.c (instantiate_type): Handle template instantiation better.
9031
9032 * typeck.c (convert_arguments): Don't try to get tricky and convert
9033 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
9034 user-defined conversions.
9035
9036 * lex.c (check_for_missing_semicolon): Also give error at end of
9037 file.
9038
9039 * call.c (build_method_call): Don't promote arrays to pointers here.
9040
9041 * typeck.c (convert_arguments): Don't require the actual parameter
9042 to be of a complete type if the formal parameter is a reference.
9043
d11ad92e 9044Thu Aug 11 15:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9045
9046 * decl.c (grokdeclarator): Soften 'static' on member function error
9047 to pedwarn.
9048
9049 * init.c (build_new): Don't automatically save rval.
9050 (build_offset_ref): Do field lookup with proper basetype_path.
9051
d11ad92e 9052Thu Aug 11 12:46:54 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
00595019
MS
9053
9054 * errfn.c (cp_silent): Declare to mark when we should avoid
9055 emitting warnings and errors.
9056 (cp_error): Check it.
9057 (cp_warning): Likewise.
9058 (cp_pedwarn): Likewise.
9059 (cp_compiler_error): Likewise.
9060 (cp_error_at): Likewise.
9061 (cp_warning_at): Likewise.
9062 (cp_pedwarn_at): Likewise.
9063 * call.c (compute_conversion_costs): Set CP_SILENT when we start
9064 out, and make sure we turn it off before we leave.
9065
d11ad92e 9066Thu Aug 11 00:02:54 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9067
9068 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
9069 argument is obviously an array.
9070
d11ad92e 9071Wed Aug 10 15:32:04 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9072
9073 * typeck.c (c_expand_start_case): Do cleanups here.
9074
9075 * parse.y (xcond): Do bool conversion here, too.
9076 (simple_stmt, SWITCH case): Don't do cleanups here.
9077
9078 * decl.c (duplicate_decls): Don't treat builtins that have been
9079 explicitly declared specially.
9080
d11ad92e 9081Tue Aug 9 01:16:09 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9082
9083 * tree.c (make_deep_copy): Support copying pointer, reference,
9084 function, array, offset and method types.
9085
9086 * decl.c (init_decl_processing): Mark exit and abort as
9087 BUILT_IN_NONANSI so that duplicate_decls is kinder about
9088 redeclaration.
9089 (duplicate_decls): Don't give two errors for redeclaring a C
9090 function with the same parms but a different return type.
9091
9092 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
9093 (condition): Instead of here.
9094 (simple_stmt, SWITCH case): Also do cleanup here.
9095
9096 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
9097
9098 * call.c (build_method_call): Don't throw away the side effects of
9099 the object in a call to a non-existent constructor.
d11ad92e 9100 * parse.y (primary): Likewise.
00595019
MS
9101
9102 * method.c (build_decl_overload): Oop.
9103
9104 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
9105 warn about uselessness of specifying -fansi-overloading.
9106
9107 * method.c (build_decl_overload): Treat any non-member new with one
9108 parameter as __builtin_new.
9109
9110 * decl.c (init_decl_processing): Setup built-in meanings of exit,
9111 _exit and abort.
9112
d11ad92e 9113Mon Aug 8 15:03:30 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9114
9115 * error.c (dump_readonly_or_volatile): Put a space between const and
9116 volatile if both apply.
9117
9118 * init.c (perform_member_init): Clean up after this initialization.
9119 (emit_base_init): Clean up after each base init, not after all have
9120 been done.
9121 (expand_aggr_vbase_init_1): Clean up after this init.
9122
d11ad92e 9123Sun Aug 7 14:55:05 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9124
9125 * call.c (build_method_call): Deal with destroying references.
9126
9127 * parse.y (condition): Do bool_truthvalue_conversion here.
9128 (paren_expr_or_null): And here.
9129 (simple_if): Not here.
9130 (simple_stmt): Or here.
9131
d11ad92e 9132Sat Aug 6 22:29:45 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9133
9134 * parse.y (paren_expr_or_null): Wrap the expression in a
9135 CLEANUP_POINT_EXPR.
d11ad92e 9136 (condition): Likewise.
00595019 9137
d11ad92e 9138Sat Aug 6 19:46:37 1994 Rohan Lenard <rjl@easams.com.au>
00595019
MS
9139
9140 * call.c (build_scoped_method_call): Fix error message when
9141 destructor call refers to a nonexistent type.
9142
d11ad92e 9143Sat Apr 16 22:43:30 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9144
9145 * lex.h (rid): Deleted RID_RAISES, it's never used.
9146 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
9147 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
9148 they don't need to be touched in `grokdeclarator.'
9149 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
9150
9151 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
9152 RID_MAX as loop limit for finding declaration specifiers.
9153
d11ad92e 9154Sat Apr 3 21:59:07 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9155
9156 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
9157 access `yytname,' which is static in parse.c.
9158
d11ad92e 9159Fri Apr 2 23:36:57 1993 Gerald Baumgarnter <gb@cs.purdue.edu>
00595019
MS
9160
9161 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
9162 was `GNU_xref_def' instead of `GNU_xref_ref.'
9163
d11ad92e 9164Fri Aug 5 14:20:16 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9165
9166 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
9167 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
d11ad92e 9168 (do_type_instantiation): Likewise.
00595019
MS
9169
9170 * decl2.c (import_export_inline): Decides at EOF what an inline's
9171 linkage should be.
9172 (finish_file): Call it.
9173
9174 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
9175 and DECL_EXTERNAL from do_*_instantiation. Only set
9176 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
9177 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
9178 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
9179
6060a796 9180Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
9181
9182 * class.c (get_class_offset_1, get_class_offset): New routine to
9183 find the offset of the class where a virtual function is defined,
9184 from the complete type.
9185 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
9186 get_class_offset instead of virtual_offset as get_class_offset will
9187 always provide the right answer.
9188 * tree.c (virtual_offset): Remove. It only ever worked some of the
9189 time.
9190
d11ad92e 9191Tue Aug 2 12:44:21 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9192
9193 * call.c (build_method_call): Put back unary_complex_lvalue call
9194 that I thought was redundant.
9195
9196 * typeck.c (c_expand_return): Fix a case I missed before.
9197
d11ad92e 9198Sun Jul 31 17:54:02 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9199
9200 * pt.c (unify): Strip cv-quals from template type arguments (when
9201 'const T*' is matched to 'const char*', that does not mean that T is
9202 'const char').
9203
d11ad92e 9204Fri Jul 29 01:03:06 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9205
9206 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
9207 typedefs. Third time's the charm?
9208
9209 * parse.y (template_parm): Support default template parms.
d11ad92e
MS
9210 * pt.c (process_template_parm): Likewise.
9211 (end_template_parm_list): Likewise.
9212 (coerce_template_parms): Likewise.
9213 (mangle_class_name_for_template): Likewise.
9214 (push_template_decls): Likewise.
9215 (unify): Likewise.
9216 * method.c (build_overload_identifier): Likewise.
9217 * error.c (dump_decl): Likewise.
a292b002 9218
d11ad92e 9219Wed Jul 27 17:47:00 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9220
9221 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
9222
d11ad92e 9223Tue Jul 26 13:22:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9224
9225 * search.c (note_debug_info_needed): Also emit debugging information
9226 for the types of fields.
9227
d11ad92e 9228Mon Jul 25 00:34:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9229
9230 * pt.c (lookup_template_class): Pass 'template' to
9231 coerce_template_parms instead of 'in_decl', since it's a more
9232 meaningful context.
9233
9234 * typeck.c (c_expand_return): Make sure any cleanups for the return
9235 expression get run.
9236 (build_c_cast): Use CONVERT_EXPR for conversion to void.
9237
9238 * pt.c (do_type_instantiation): Also instantiate nested types.
9239
9240 * typeck.c (convert_for_assignment): Don't die when comparing
9241 pointers with different levels of indirection.
9242
9243 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
9244 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
9245 out.
9246
9247 * decl2.c (finish_anon_union): Don't die if the union has no
9248 members.
9249
9250 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
9251 so that 'typedef int foo, bar;' will work.
9252
9253 * decl2.c (finish_file): Don't call expand_aggr_init for
9254 non-aggregates.
9255
d11ad92e 9256Mon Jul 25 00:03:10 1994 Teemu Torma <tot@trema.fi>
a292b002
MS
9257
9258 * decl.c (finish_function): We can't inline constructors and
9259 destructors under some conditions with -fpic, but don't unset
9260 DECL_INLINE.
9261
d11ad92e 9262Mon Jul 25 00:03:10 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9263
9264 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
9265
d11ad92e 9266Sun Jul 24 14:19:31 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9267
9268 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
9269 non-fields.
9270 (finish_struct_methods): Use copy_assignment_arg_p.
9271
9272 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
9273 of giving an error.
9274
9275 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
9276 don't know how to compare the operands.
9277
9278 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
9279 as a declarator-id in their program. Like the Linux headers do.
9280 Arrgh.
9281
9282 * tree.c (lvalue_p): Treat calls to functions returning objects by
9283 value as lvalues again.
9284
9285 * typeck.c (build_component_addr): Use convert_force to convert the
9286 pointer in case the component type is also a private base class.
9287
9288 * search.c (get_matching_virtual): Fix bogus warning of overloaded
9289 virtual.
9290
9291 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
9292 TYPE_DECL to fix bogus shadowing warnings.
9293
d11ad92e 9294Fri Jul 22 01:15:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9295
9296 * init.c (expand_aggr_init_1): const and volatile mismatches do not
9297 prevent a TARGET_EXPR from initializing an object directly.
9298
d11ad92e 9299Tue Jul 19 17:55:37 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9300
9301 * cvt.c (build_up_reference): Allow building up references to
9302 `this', don't warn about making references to artificial variables
9303 (like `this').
9304
9305 * tree.c (lvalue_p): `this' is not an lvalue.
9306
9307 * call.c (build_method_call): Accept using a typedef name (or
9308 template type parameter) for explicit destructor calls.
9309
72b7eeff
MS
9310Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
9311
9312 * Version 2.6.0 released.
9313
d11ad92e 9314Wed Jul 13 03:57:54 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 9315
a292b002
MS
9316 * method.c (hack_identifier): Put back old code so lists of
9317 non-functions will be handled properly.
a5ef9010 9318
a292b002
MS
9319 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
9320 defined in the language-independent tree.h.
cf17cae3 9321
a292b002
MS
9322 * tree.c (count_functions): Avoid bogus warning when compiling this
9323 function.
cf17cae3 9324
d11ad92e 9325Mon Jul 11 18:37:20 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 9326
a292b002
MS
9327 * decl.c (grok_reference_init): Always save the initializer of a
9328 reference.
cf17cae3 9329
6060a796 9330Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
9331
9332 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
9333 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 9334 (disabled for now)
5b605f68 9335
d11ad92e 9336Fri Jul 8 12:59:38 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9337
9338 * method.c (hack_identifier): Fix for new overloading.
9339
9340 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 9341 zero.
5b605f68 9342
d11ad92e 9343Fri Jul 8 13:20:28 1994 Gerald Baumgartner <gb@cs.purdue.edu>
5b605f68
MS
9344
9345 * decl2.c (finish_file): Only call walk_sigtables, if
9346 flag_handle_signatures is turned on, don't waste time otherwise.
9347
d11ad92e 9348Fri Jul 8 02:27:41 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9349
9350 * decl.c (push_overloaded_decl): Don't create overloads of one when
9351 shadowing a class type.
a292b002 9352 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
9353
9354 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
9355 (grokdeclarator): Fix setting of TREE_STATIC.
9356 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
9357
d11ad92e 9358Thu Jul 7 22:20:46 1994 Gerald Baumgartner <gb@andros.cygnus.com>
311862c8
GB
9359
9360 * cp-tree.h (walk_sigtables): Created extern declaration.
9361 * decl2.c (walk_sigtables): Created function, patterned after
9362 walk_vtables, even though we only need it to write out sigtables.
9363 (finish_sigtable_vardecl): Created function.
9364 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
9365 (finish_file): Call walk_sigtables.
9366
9367 * sig.c (build_signature_table_constructor): Mark class member
9368 function pointed to from signature table entry as addressable.
9369
d11ad92e 9370Thu Jul 7 13:39:37 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9371
9372 * decl.c (start_decl): Check new decl of static member variable
9373 against the declaration in the class here.
9374 (grokvardecl): Instead of here.
9375
9376 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
9377 -fvtable-thunks.
d11ad92e 9378 (build_vtable): Likewise.
5b605f68
MS
9379
9380 * decl2.c (import_export_vtable): Move logic for deciding the
9381 interface of a template class from here.
9382 (import_export_template): To here.
9383 (finish_vtable_vardecl): Call import_export_template before
9384 import_export_vtable.
9385
6060a796 9386Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
9387
9388 * except.c (init_exception_processing): Setup interim_eh_hook to
9389 call lang_interim_eh.
9390 * except.c (do_unwind): Propagate throw object value across
9391 stack unwinding.
9392 * except.c (saved_throw_value): Used to hold the value of the object
9393 being thrown. It is always a reference to the real value.
9394 * except.c (expand_start_catch_block): Add handling for the
9395 value of the exception object.
9396 * except.c (expand_start_catch_block): Add handler for the handler,
9397 so that throws inside the handler go to the outer block.
d11ad92e 9398 * except.c (expand_end_catch_block): Likewise.
a3b49ccd
MS
9399 * parse.y (handler_args): Use parm instead, as the other doesn't yet
9400 handle references correctly.
9401
d11ad92e 9402Wed Jul 6 17:55:32 1994 Per Bothner <bothner@kalessin.cygnus.com>
a3b49ccd
MS
9403
9404 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
9405 vtable entry properly to abort.
9406
d11ad92e 9407Tue Jul 5 14:07:54 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9408
9409 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
9410 errors to warnings.
9411
9412 * call.c (build_overload_call_real): Handle fnname being a list of
9413 functions.
9414 * typeck.c (build_x_function_call): Pass list of functions to
9415 build_overload_call, not just the name.
9416 * tree.c (count_functions): Complain when called for invalid
9417 argument.
9418
9419 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
9420 and DECL_EXTERNAL on static members and initialized const members.
9421 * decl2.c (grokfield): Reflect this change.
9422
d11ad92e 9423Fri Jul 1 09:35:51 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9424
9425 * parse.y (init): ANSI C++ does not forbid { }.
9426
d11ad92e 9427Thu Jun 30 00:35:22 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9428
9429 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
9430 warn_nonvdtor defaults to off.
9431
9432 * class.c (instantiate_type): Use comptypes rather than relying on
9433 types to satisfy ==.
9434
9435 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
9436 might be static.
9437
9438 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
9439
9440 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
9441
9442 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
9443 build_cplus_new.
9444
d11ad92e 9445Wed Jun 29 22:31:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9446
9447 * decl2.c (finish_file): Maybe consider static inlines multiple
9448 times, in case they reference each other.
9449
d11ad92e 9450Tue Jun 28 11:58:38 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
9451
9452 * class.c (finish_struct): Don't `cons_up_default_function's
9453 for signatures.
9454 (finish_struct): Handle an empty method_vec correctly.
9455
9456 * decl.c (grokdeclarator): Don't warn about a signature being
9457 empty in a signature pointer declaration if we only saw a
9458 forward declaration of the signature. Changed `warning's into
9459 `cp_warning's.
9460
9461 * sig.c (build_sigtable): Don't die if a null signature table
9462 constructor is returned.
9463 (build_signature_pointer_constructor): If the signature table
9464 constructor is null, the _sptr field is set to a null pointer
9465 and cast to the appropriate type. Make copies of all null
9466 pointers so that the type null_pointer_node doesn't get changed.
9467 (build_signature_table_constructor): Added comments.
9468
9469 * sig.c (build_signature_pointer_constructor): Complain if we
9470 try to assign to/initialize a signature pointer/reference of
9471 an undefined signature.
9472
d11ad92e 9473Mon Jun 27 14:05:16 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
9474
9475 * typeck2.c (store_init_value): Don't be pedantic about
9476 non-constant initializers of signature tables/pointers/references.
9477
d11ad92e 9478Fri Jun 24 16:49:41 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
9479
9480 * decl.c (grokdeclarator): If we are grokking an opaque typedef
9481 in a signature, don't complain about it begin static.
9482
6060a796 9483Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
9484
9485 Fixes a problem of the this pointer being wrong in virtual calls to
9486 methods that are not overridden in more derived classes.
9487
9488 * class.c (fixup_vtable_delta): New routine. It will fixup the
9489 delta entries in vtables, wheever they need updating.
9490 * class.c (finish_struct): Call the new routine for all virtual
9491 bases, as they can have different offsets, than those used in base
9492 classes that we derive our vtable from.
9493
d11ad92e 9494Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
9495
9496 * typeck.c (build_binary_op): Use the types before default
9497 conversions in the error message.
9498
9499 * *.c: Use c_build_type_variant instead of build_type_variant where
9500 the type might be an array.
9501
9502 * call.c (build_method_call): Call build_type_variant and
9503 build_reference_type in the right order.
d11ad92e 9504 * decl.c (record_builtin_type): Likewise.
21474714 9505
d11ad92e 9506Wed Jun 29 16:58:53 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
9507
9508 * call.c (build_method_call): Call build_type_variant and
9509 build_reference_type in the right order.
d11ad92e 9510 * decl.c (record_builtin_type): Likewise.
21474714 9511
d11ad92e 9512Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
9513
9514 * typeck.c (build_binary_op): Use the types before default
9515 conversions in the error message.
9516
9517 * *.c: Use c_build_type_variant instead of build_type_variant where
9518 the type might be an array.
9519
d11ad92e 9520Sat Jun 25 11:50:54 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
9521
9522 * cvt.c (convert_to_reference): Try UDC's before doing the
9523 reinterpret_cast thang, though.
9524
d11ad92e 9525Fri Jun 24 01:24:01 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
9526
9527 * typeck.c (c_expand_return): Don't USE the return value location
9528 after we've expanded the jump.
9529
9530 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
9531 trying to write out an inline.
9532
9533 * cvt.c (build_up_reference): Also do address adjustment when the
9534 target type uses MI.
9535 (convert_to_reference): Try UDCs only after built-in conversions.
9536 (build_type_conversion_1): Don't play games with the argument to the
9537 method.
9538 (build_type_conversion): #if 0 out code for binding to reference.
9539
d11ad92e 9540Thu Jun 23 00:22:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465 9541
21474714
MS
9542 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
9543 whether to emit inlines.
9544
a3203465
MS
9545 * decl.c (grokdeclarator): Set explicit_int for decls that just
9546 specify, say, 'long'.
9547
9548 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 9549 anyaway).
a3203465 9550
d11ad92e 9551Wed Jun 22 13:40:49 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9552
9553 * cvt.c (build_up_reference): Don't call readonly_error.
9554 (convert_to_reference): Propagate const and volatile from expr to
9555 its type.
9556
9557 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
9558
9559 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
9560 creating a temporary.
9561 (convert_to_reference): Lose excessive and incorrect trickiness.
9562 (cp_convert): Call build_cplus_new with with_cleanup_p set.
9563
d11ad92e 9564 * typeck2.c (build_functional_cast): Likewise.
a3203465 9565
d11ad92e 9566Tue Jun 21 17:38:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9567
9568 * decl.c (grokdeclarator): signed, unsigned, long and short all
9569 imply 'int'.
9570
9571 * decl.c (grokdeclarator): Allow "this is a type" syntax.
9572 (grok_reference_init): Simplify and fix.
9573
d11ad92e 9574Sun Jun 19 17:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9575
9576 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
9577 type.
9578
d11ad92e 9579Sat Jun 18 04:16:50 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9580
9581 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
9582 tinkering to after call to pushdecl.
9583
d11ad92e 9584Fri Jun 17 14:48:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9585
9586 * call.c (build_method_call): Handle destructors for non-aggregate
9587 types properly.
9588
d11ad92e 9589Thu Jun 16 16:48:05 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9590
9591 * call.c (build_method_call): Make sure that the name given for the
9592 destructor matches the constructor_name of the instance.
9593
9594 * pt.c (do_function_instantiation): A non-extern instantiation
9595 overrides a later extern one.
d11ad92e 9596 (do_type_instantiation): Likewise.
a3203465 9597
d11ad92e 9598Wed Jun 15 19:34:54 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9599
9600 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
9601 unqualified array type.
9602
9603 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
9604 CONSTRUCTOR with no elements.
9605
9606 * decl.c (various): Lose empty_init_node.
9607 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
9608 thing depending on the value of DECL_COMMON instead of
9609 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
9610 don't have constructors, don't treat a real empty CONSTRUCTOR
9611 specially.
9612
9613 * typeck2.c (process_init_constructor): Don't treat empty_init_node
9614 specially.
9615
6060a796 9616Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
9617
9618 * class.c (override_one_vtable): Don't forget to merge in an old
9619 overrider when we wanted to reuse a vtable, but couldn't.
9620
d11ad92e 9621Wed Jun 15 15:03:16 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
9622
9623 * decl.c (start_decl): Put statics in common again.
9624
9625 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
9626 setting the type to error_mark_node.
9627
9628 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
9629 bitfield assignments.
9630
d11ad92e 9631Tue Jun 14 12:23:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9632
9633 * decl.c (grok_op_properties): Const objects can be passed by value.
9634
d11ad92e 9635Mon Jun 13 03:10:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9636
9637 * decl2.c (import_export_vtable): Force implicit instantiations to
9638 be interface_only when -fno-implicit-templates.
9639
9640 * decl.c (duplicate_decls): Redeclaring a class template name is an
9641 error.
9642
9643 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
9644 * xref.c (GNU_xref_decl): Support templates.
9645
d11ad92e 9646Sat Jun 11 17:09:05 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9647
9648 * decl.c (grok_op_properties): Split out checking for whether this
9649 function should suppress the default assignment operator.
d11ad92e 9650 * decl2.c (grok_function_init): Likewise.
f0e01782
MS
9651 (copy_assignment_arg_p): New function do do just that.
9652 Now considers virtual assignment operators that take a base as an
9653 argument to count as copy assignment operators.
9654
9655 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
9656 TREE_ASM_WRITTEN, as they are redundant.
9657
9658 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
9659 decl that has no LANG_SPECIFIC part.
9660 (do_type_instantiation): Force the debugging information for this
9661 type to be emitted.
9662
9663 * decl.c (start_decl): Clear up uses of various types of templates
9664 (say sorry for static data members, rather than "invalid template").
9665 (expand_static_init): Fix initialization of static data members of
9666 template classes.
9667
d11ad92e 9668Fri Jun 10 00:41:19 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9669
9670 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
9671
9672 * g++.c (main): Use -xc++-cpp-output for .i files.
9673
9674 * pt.c (tsubst): Give meaningful error about declaring template for
9675 a copy constructor which was not declared in the class template.
9676 (do_type_instantiation): Explicit instantiation before the class
9677 template is an error.
9678 (instantiate_template): Don't die if tsubst returns error_mark_node.
9679
d11ad92e 9680Thu Jun 9 19:04:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9681
9682 Don't synthesize the copy assignment operator if the one in a base
9683 class is pure virtual.
9684 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
9685 whether the type has a pure virtual copy assignment operator.
9686 * class.c (finish_base_struct): Don't generate the copy assignment
9687 operator if a base class has a pure virtual one.
9688 * decl.c (grok_op_properties): Add disabled code to set
9689 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
9690 actually set.
9691 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
9692
9693 * decl2.c (import_export_vtable): Always treat template
9694 instantiations as if write_virtuals >= 2, and treat implicit
9695 instantiations as external if -fno-implicit-templates.
9696 (finish_file): Output all pending inlines if
9697 flag_keep_inline_functions.
9698
6060a796 9699Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
9700
9701 * tree.c (layout_vbasetypes): Align virtual base classes inside
9702 complete objects, so that we don't core dump on machines such as
9703 SPARCs when we access members that require larger than normal
9704 alignments, such as a double. Also, we bump up the total alignment
9705 on the complete type, as necessary.
9706
d11ad92e 9707Wed Jun 8 16:18:14 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9708
9709 * gxxint.texi (Free Store): New section with code for examining
9710 cookie.
9711 (Limitations of g++): Remove operator delete entry, since it is no
9712 longer accurate. Fix access control entry.
9713
9714 * typeck.c (build_unary_op): Pedwarn about taking the address of or
9715 incrementing a cast to non-reference type.
9716 (build_modify_expr): Use convert instead of convert_force again.
9717
9718 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
9719 class type, not == RECORD_TYPE.
9720
9721 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
9722
9723 * typeck2.c (report_case_error): #if 0 out.
9724 * lex.c (real_yylex): Lose RANGE.
d11ad92e 9725 * parse.y: Likewise.
f0e01782 9726
d11ad92e 9727Tue Jun 7 18:17:35 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9728
9729 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
9730
d11ad92e 9731Mon Jun 6 19:39:57 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
9732
9733 * typeck.c (build_c_cast): Don't shortcut conversions to the same
9734 type. Don't replace consts with their values here, since that's now
9735 done in cp_convert.
9736
9737 * cvt.c (cp_convert): When converting to bool, take
9738 integer_zero_node to false_node and all other INTEGER_CSTs to
9739 true_node.
9740 (build_type_conversion): Don't complain about multiple conversions
9741 to float if we're not really converting.
9742
d11ad92e 9743Fri Jun 3 02:10:56 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927 9744
f0e01782
MS
9745 Implement 'extern template class A<int>;' syntax for suppressing
9746 specific implicit instantiations.
9747 * cp-tree.h: Update prototypes for do_*_instantiation.
9748 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
9749 instantiations.
9750 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
9751 instantiations.
d11ad92e 9752 (do_type_instantiation): Likewise.
f0e01782
MS
9753 * parse.y (explicit_instantiation): Support 'extern template class
9754 A<int>;' syntax.
9755 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
9756 and DECL_EXTERNAL on explicit instantiations.
9757
a0a33927
MS
9758 * cvt.c (cp_convert): Replace constants with their values before
9759 converting.
f0e01782 9760 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927 9761
d11ad92e 9762Thu Jun 2 03:53:30 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9763
9764 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
9765
d11ad92e 9766Wed Jun 1 18:57:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9767
9768 * typeck2.c (digest_init): Handle initializing a pmf with an
9769 overloaded method.
9770 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
9771
9772 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
d11ad92e
MS
9773 (xref_defn_tag): Likewise.
9774 * pt.c (process_template_parm): Likewise.
9775 (lookup_template_class): Likewise.
9776 (push_template_decls): Likewise.
9777 (instantiate_class_template): Likewise.
9778 (create_nested_upt): Likewise.
a0a33927
MS
9779 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
9780 TYPE_DECLs.
9781
9782 * typeck.c (convert_arguments): Make sure type is not NULL before
9783 checking its TREE_CODE.
9784
6060a796 9785Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
9786
9787 * class.c (get_derived_offset): New routine.
9788 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
9789 BINFO_VIRTUALS when we choose a new base class to inherit from.
9790 * class.c (modify_one_vtable): Use get_derived_offset to get the
9791 offset to the most base class subobject that we derived this binfo
9792 from.
9793 * class.c (finish_struct): Move code to calculate the
9794 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
9795 new calls to get_derived_offset in modify_one_vtable.
9796
d11ad92e 9797Wed Jun 1 16:50:59 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9798
9799 * init.c (build_member_call): Use build_pointer_type instead of
9800 TYPE_POINTER_TO.
9801
d11ad92e 9802Wed Jun 1 11:11:15 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
9803
9804 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
9805 try to use it in an error.
9806
6060a796 9807Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
9808
9809 * typeck.c (convert_arguments, convert_for_initialization): Don't
9810 strip NOP_EXPRs, when we are converting to a reference.
9811
d11ad92e 9812Wed Jun 1 01:11:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9813
9814 * typeck.c (build_modify_expr): Don't dereference references when
9815 initializing them.
9816
9817 * decl2.c (grokfield): Don't check for grokdeclarator returning
9818 error_mark_node any more.
9819
9820 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
9821 (start_method): Return void_type_node instead of error_mark_node.
9822
9823 * typeck.c (build_modify_expr): Resolve offset refs earlier.
9824
d11ad92e 9825Tue May 31 16:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9826
9827 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
9828
9829 * typeck.c (build_modify_expr): Dereference references before trying
9830 to assign to them.
9831
9832 * call.c (build_method_call): Don't confuse type conversion
9833 operators with constructors.
9834 * typeck2.c (build_functional_cast): Just call build_c_cast if there
9835 was only one parameter.
9836 * method.c (build_typename_overload): Don't set
9837 IDENTIFIER_GLOBAL_VALUE on these identifiers.
9838 * decl.c (grok_op_properties): Warn about defining a type conversion
9839 operator that converts to a base class (or reference to it).
9840 * cvt.c (cp_convert): Don't try to use a type conversion operator
9841 when converting to a base class.
9842 (build_type_conversion_1): Don't call constructor_name_full on an
9843 identifier.
9844 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
9845
9846 * decl.c (start_decl): Don't complain that error_mark_node is an
9847 incomplete type.
9848 (finish_decl): Check for type == error_mark_node.
9849
d11ad92e 9850Mon May 30 23:38:55 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9851
9852 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
9853 instantiations and inline members.
9854
9855 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
9856
9857 * lex.h: Declare looking_for_template.
9858
9859 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
9860 between type and template interpretations of an identifier.
9861
d11ad92e 9862Sat May 28 04:07:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9863
9864 * pt.c (instantiate_template): Zero out p if we found a
9865 specialization.
9866
9867 * decl.c (grokdeclarator): Elucidate warning.
9868 (grokdeclarator): If pedantic AND -ansi, complain about long long.
9869
9870 Make explicit instantiation work reasonably. It is now appropriate
9871 to deprecate the use of -fexternal-templates.
9872 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
9873 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
9874 (end_template_instantiation): Reflect changes in USE_TEMPLATE
9875 semantics.
9876 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
9877 (do_function_instantiation): Don't set EXPLICIT_INST if
9878 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
9879 appropriately otherwise.
9880 (do_type_instantiation): Set interface info for class. Set
9881 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
9882 flag_external_templates is set.
9883 * parse.y: Reflect changes in USE_TEMPLATE semantics.
9884 * decl2.c: New flag flag_implicit_templates determines whether or
9885 not implicit instantiations get emitted. This flag currently
9886 defaults to true, and must be true for -fexternal-templates to work.
9887 (finish_file): Consider flag_implement_inlines when
9888 setting DECL_EXTERNAL. Consider flag_implicit_templates when
9889 deciding whether or not to emit a static copy.
9890 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
9891 properly for template instantiations.
9892 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
9893 template class.
9894 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
9895 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
9896 (various others): Accessor macros for the above.
9897
d11ad92e 9898Fri May 27 13:57:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9899
9900 * typeck.c (build_binary_op_nodefault): Division by constant zero is
9901 an error.
9902
6060a796 9903Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
9904
9905 * class.c (override_one_vtable): Don't modify things we don't own.
9906
d11ad92e 9907Fri May 27 01:42:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9908
9909 * decl.c (finish_decl): Don't postpone processing the initializer of
9910 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
9911 PUBLIC const at toplevel.
9912 (grokdeclarator): pedwarn about initializing non-const or
9913 non-integral statics in the class body.
9914
9915 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
9916 TYPE_DECL.
9917
9918 * call.c (convert_harshness): Dereference reference on rhs before
9919 proceeding, properly grok passing const things to non-const
9920 references.
9921
9922 * typeck.c (build_unary_op): Soften error about taking the address
9923 of main() to a pedwarn.
9924
9925 * lex.c (default_copy_constructor_body): Unambiguously specify base
9926 classes (i.e. A((const class ::A&)_ctor_arg) ).
d11ad92e 9927 (default_assign_ref_body): Likewise.
a0a33927 9928
d11ad92e 9929Thu May 26 13:13:55 1994 Gerald Baumgartner <gb@mexican.cygnus.com>
a0a33927
MS
9930
9931 * decl2.c (grokfield): Don't complain about local signature
9932 method declaration without definition.
9933
9934 * call.c (convert_harshness): If `type' is a signature pointer
9935 and `parmtype' is a pointer to a signature, just return 0. We
9936 don't really convert in this case; it's a result of making the
9937 `this' parameter of a signature method a signature pointer.
9938
9939 * call.c (build_method_call): Distinguish calling the default copy
9940 constructor of a signature pointer/reference from a signature
9941 member function call.
9942
d11ad92e 9943Thu May 26 12:56:25 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9944
9945 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
9946 declarations.
9947
9948 * decl.c (duplicate_decls): A previous function declaration as
9949 static overrides a subsequent non-static definition.
9950 (grokdeclarator): Don't set TREE_PUBLIC on inline method
9951 declarations.
9952
d11ad92e 9953Wed May 25 14:36:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9954
9955 * decl.c (grokdeclarator): Handle initialization of static const
9956 members.
d11ad92e 9957 (finish_decl): Likewise.
a0a33927
MS
9958
9959 * decl2.c (grokfield): Allow initialization of static const members
9960 even when pedantic.
9961
9962 * decl2.c (grokfield): Deal with grokdeclarator returning
9963 error_mark_node.
9964
9965 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
9966 (grokfndecl): Check the return value of grok_ctor_properties.
d11ad92e 9967 (start_method): Likewise.
a0a33927
MS
9968
9969 * parse.y (absdcl): Expand type_quals inline.
9970
d11ad92e 9971Tue May 24 19:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9972
9973 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
9974 RECORD_TYPE.
9975
d11ad92e 9976Tue May 24 18:09:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
a0a33927
MS
9977
9978 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
9979 always use "__vt_%s".
9980 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
9981 when looking for a "sentinal" method (to decide on emitting vtables).
9982 * decl2.c (finish_file): Scan all decls for thunks that need
9983 to be emitted.
9984 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
9985 * method.c (make_thunk): Use a more meaningful label. If there
9986 exists a matching top-level THUNK_DECL re-use it; otherwise
9987 create a new THUNK_DECL (and declare it).
9988 * method.c (emit_thunk): Make thunk external/public depending
9989 on the underlying method.
9990
d11ad92e 9991Tue May 24 00:22:04 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
9992
9993 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
9994 lookup_name.
9995
9996 * call.c (build_overload_call_real): Don't immediately pick a
9997 function which matches perfectly.
9998
9999 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
10000 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
10001 reference (like 'int &const j').
10002
10003 * typeck.c (convert_arguments): Don't mess with i for methods.
10004 * call.c (build_method_call): Pass the function decl to
10005 convert_arguments.
10006
10007 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
10008 checking for which multi-level pointer conversions are allowed.
10009 (comp_target_types): Call it.
10010 (convert_for_assignment): Check const parity on the ultimate target
10011 type, too. And make those warnings pedwarns.
10012
d11ad92e 10013Mon May 23 14:11:24 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10014
10015 * error.c (dump_char): Use TARGET_* for character constants.
10016
d11ad92e 10017Mon May 23 13:03:03 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
10018
10019 * tree.c (debug_no_list_hash): Make static.
10020
10021 * decl.c (decls_match): Say the types don't match if newdecl ends up
10022 with a null type, after we've checked if olddecl does.
10023 (pushdecl): Check if the decls themselves match before looking for
10024 an extern redeclared as static, to avoid inappropriate and incorrect
10025 warnings.
10026
d11ad92e 10027Fri May 20 14:04:34 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10028
10029 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
10030 a pedwarn.
10031
10032 * typeck.c (build_c_cast): Casting to function or method type is an
10033 error.
10034
10035 * class.c (finish_struct): Make warning for anonymous class with no
10036 instances a pedwarn.
10037
10038 * Makefile.in (stamp-parse): Expect a s/r conflict.
10039
10040 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
10041 cast as an lvalue.
10042
d11ad92e 10043Thu May 19 12:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10044
10045 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
10046 than unsigned on platforms where sizeof(char)==sizeof(int).
10047
d11ad92e 10048Wed May 18 14:27:06 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10049
10050 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
10051 another variant.
10052 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
10053 and treat them as lvalues.
10054
10055 * decl.c (shadow_tag): Do complain about forward declarations of
10056 enums and empty declarations.
10057 * parse.y: Don't complain about forward declarations of enums and
10058 empty declarations.
10059
10060 * typeck.c (convert_for_assignment): Complain about changing
10061 the signedness of a pointer's target type.
10062
10063 * parse.y (stmt): Move duplicated code for checking case values from
10064 here.
10065 * decl2.c (check_cp_case_value): To here. And add a call to
10066 constant_expression_warning.
10067
10068 * typeck.c (convert_for_assignment): Don't complain about assigning
10069 a negative value to bool.
10070
10071 * decl.c (init_decl_processing): Make bool unsigned.
10072
10073 * class.c (finish_struct): Allow bool bitfields.
10074
d11ad92e 10075Wed May 18 12:35:27 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
2986ae00
MS
10076
10077 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
10078
d11ad92e 10079Wed May 18 03:28:35 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10080
10081 * cvt.c (build_type_conversion): Lose special handling of
10082 truthvalues.
10083
10084 * search.c (dfs_pushdecls): Improve shadowing warning.
10085
d11ad92e 10086Tue May 17 13:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10087
10088 * init.c (build_delete): Throw away const and volatile on `this'.
10089
10090 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
10091 rather than the enumerators.
10092 (pushtag): s/cdecl/c_decl/g
10093
d11ad92e 10094Mon May 16 23:04:01 1994 Stephen R. van den Berg <berg@pool.informatik.rwth-aachen.de>
2986ae00 10095
63718c49
GB
10096 * cp/typeck.c (common_type): Attribute merging.
10097 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 10098
63718c49 10099 * cp/parse.y: Revamp attribute parsing.
2986ae00 10100
d11ad92e 10101Mon May 16 01:40:34 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10102
10103 * decl.c (shadow_tag): Also check for inappropriate use of auto and
10104 register.
10105
10106 * method.c (build_overload_name): Clarify that the illegal case is a
10107 pointer or reference to array of unknown bound.
10108
10109 * error.c (dump_type_prefix): Print references to arrays properly.
10110
10111 * typeck.c (various): Be more helpful in pointer
10112 comparison diagnostics.
10113
10114 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
10115 fun?
10116
10117 * parse.y: Also catch an error after valid stmts.
10118
10119 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
10120 const.
10121
10122 * typeck.c (convert_for_initialization): If call to
10123 convert_to_reference generated a diagnostic, print out the parm
10124 number and function decl if any.
10125
10126 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
10127 specifying a line, not atarg.
10128
10129 * tree.c (build_cplus_method_type): Always make `this' const.
10130
10131 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
10132 a constructor or destructor, make `this' non-const.
10133
10134 * typeck.c (build_modify_expr): Don't warn specially about
10135 assignment to `this' here anymore, since it will be caught by the
10136 usual machinery.
10137
10138 * various: Disallow specific GNU extensions (variable-size arrays,
10139 etc.) when flag_ansi is set, not necessarily when pedantic is set,
10140 so that people can compile with -pedantic-errors for tighter const
10141 checking and such without losing desirable extensions.
10142
10143 * typeck2.c (build_functional_cast): Call build_method_call with
10144 LOOKUP_PROTECT.
10145 (process_init_constructor): Only process FIELD_DECLs.
10146
10147 * decl.c (finish_decl): Also force static consts with no explicit
10148 initializer that need constructing into the data segment.
10149
10150 * init.c (build_delete): Undo last patch, as it interferes with
10151 automatic cleanups.
10152
d11ad92e 10153Sat May 14 01:59:31 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10154
10155 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
10156 code.
10157
10158 * init.c (build_delete): pedwarn about using plain delete to delete
10159 an array.
10160
d11ad92e 10161Fri May 13 16:45:07 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10162
10163 * typeck.c (comp_target_types): Be more helpful in contravariance
10164 warnings, and make them pedwarns.
10165
10166 * decl.c (grokdeclarator): Use decl_context to decide whether or not
10167 this is an access declaration.
10168
10169 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
10170 has a conversion to enum or bool, too.
10171
6060a796 10172Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10173
10174 * method.c (emit_thunk): Make declaration for
10175 current_call_is_indirect local (needed for hppa).
10176
d11ad92e 10177Fri May 13 16:16:37 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10178
10179 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
d11ad92e 10180 (tsubst): Likewise.
2986ae00 10181
6060a796 10182Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10183
10184 * pt.c (tsubst): If there is already a function for this expansion,
10185 use it.
d11ad92e 10186 * pt.c (instantiate_template): Likewise.
2986ae00 10187
d11ad92e 10188Fri May 13 10:30:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
2986ae00
MS
10189
10190 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
10191 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
10192 generating debug info for unemitted symbols on some systems.
10193
10194 * cp-tree.h (build_static_cast, build_reinterpret_cast,
10195 build_const_cast): Add declarations.
10196
6060a796 10197Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10198
10199 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
10200 fix. We now try get_binfo, and if that doesn't find what we want,
10201 we go back to the old method, which still sometimes fails.
10202
d11ad92e 10203Fri May 13 01:43:18 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10204
10205 * parse.y (initdcl): Call cplus_decl_attributes on the right
10206 variable.
10207 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
10208 void_type_node.
10209
10210 * typeck.c (build_binary_op_nodefault): Change result_type for
10211 comparison ops to bool.
10212 (build_binary_op): Convert args of && and || to bool.
10213 * cvt.c (build_default_binary_type_conversion): Convert args of &&
10214 and || to bool.
10215 (build_default_unary_type_conversion): Convert arg of ! to bool.
10216 (type_promotes_to): bool promotes to int.
10217
6060a796 10218Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10219
10220 Implement the new builtin `bool' type.
10221 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
10222 bool.
10223 (build_unary_op): Convert arg of ! to bool.
10224 * parse.y: Know true and false. Use bool_truthvalue_conversion.
10225 * method.c (build_overload_value): Know bool.
d11ad92e 10226 (build_overload_name): Likewise.
2986ae00
MS
10227 * lex.c (init_lex): Set up RID_BOOL.
10228 * gxx.gperf: Add bool, true, false.
10229 * error.c (*): Know bool.
10230 * decl.c (init_decl_processing): Set up bool, true, false.
10231 * cvt.c (cp_convert): Handle conversion to bool.
d11ad92e 10232 (build_type_conversion): Likewise.
2986ae00
MS
10233 * *.c: Accept bool where integers and enums are accepted (use
10234 INTEGRAL_CODE_P macro).
10235
d11ad92e 10236Thu May 12 19:13:54 1994 Richard Earnshaw <rwe11@cl.cam.ac.uk>
8de7634e
RE
10237
10238 * g++.c: Use #ifdef for __MSDOS__, not #if.
10239
6060a796 10240Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10241
10242 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
10243 gives old behavior , and destroys temporaries earlier. Default
10244 behavior now conforms to the ANSI working paper.
10245
d11ad92e 10246Thu May 12 14:45:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10247
10248 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
10249 Use convert_force to convert the result of a recursive call when we
10250 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
10251 in COMPOUND_EXPRs any more.
10252 (various): Lose pedantic_lvalue_warning.
10253 (unary_complex_lvalue): Understand MODIFY_EXPR.
10254
10255 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
10256 we don't know what we're initializing.
10257
d11ad92e 10258Wed May 11 01:59:36 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10259
10260 * cvt.c (convert_to_reference): Modify to use convtype parameter.
10261 Only create temporaries when initializing a reference, not when
10262 casting.
10263 (cp_convert): New main function.
10264 (convert): Call cp_convert.
10265 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
10266 * cp-tree.h (CONV_*): New constants used by conversion code for
10267 selecting conversions to perform.
10268
10269 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
10270
10271 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
10272 call build_c_cast.
10273 * parse.y: Add {static,reinterpret,const}_cast.
d11ad92e 10274 * gxx.gperf: Likewise.
a4443a08
MS
10275
10276 * typeck.c (common_type): Allow methods with basetypes of different
10277 UPTs.
10278 (comptypes): Deal with UPTs.
10279 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
10280
10281 * pt.c (end_template_decl): Check for multiple definitions of member
10282 templates.
10283
10284 * call.c (build_method_call): Complain about calling an abstract
10285 virtual from a constructor.
10286
10287 * typeck.c (pointer_int_sum): Check for the integer operand being 0
10288 after checking the validity of the pointer operand.
10289
10290 * typeck2.c (digest_init): Pedwarn about string initializer being
10291 too long.
10292
d11ad92e 10293Tue May 10 12:10:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10294
10295 * decl.c (push_overloaded_decl): Only throw away a builtin if the
10296 decl in question is the artificial one.
10297
10298 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
10299 expand_{start,end}_case cannot happen in the middle of a block.
10300
10301 * cvt.c (build_type_conversion_1): Use convert again.
10302
d11ad92e 10303Tue May 10 11:52:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a4443a08
MS
10304
10305 * typeck2.c (digest_init): Make sure we check for signed and
10306 unsigned chars as well when warning about string initializers.
10307
10308 * init.c (emit_base_init): Check if there's a DECL_NAME on the
10309 member before trying to do an initialization for it.
10310
6060a796 10311Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10312
10313 * except.c: Don't do anything useful when cross compiling.
10314
d11ad92e 10315Tue May 10 03:04:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10316
10317 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
d11ad92e 10318 (push_overloaded_decl): Likewise.
a4443a08
MS
10319
10320 * cvt.c (convert): Don't look for void type conversion.
10321
d11ad92e 10322Mon May 9 18:05:41 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10323
10324 * init.c (do_friend): Only do a pushdecl for friends, not
10325 pushdecl_top_level.
10326
d11ad92e 10327Mon May 9 13:36:34 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
a4443a08
MS
10328
10329 * decl.c (lookup_name_current_level): Put empty statement after
10330 the label OUT to make the code valid C.
10331
d11ad92e 10332Mon May 9 12:20:57 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10333
10334 * typeck.c (build_binary_op_nodefault): Only complain about
10335 comparing void * and a function pointer if void * is smaller.
10336
d11ad92e 10337Sun May 8 01:29:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10338
10339 * decl.c (lookup_name_current_level): Move through temporary binding
10340 levels.
10341
10342 * parse.y (already_scoped_stmt): Revive.
10343 (simple_stmt): Use it again.
10344
10345 * decl.c (poplevel): Always call poplevel recursively if we're
10346 dealing with a temporary binding level.
10347
6060a796 10348Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10349
10350 * decl.c (finish_decl): Make sure we run cleanups for initial values
10351 of decls. Cures memory leak.
d11ad92e
MS
10352 * decl.c (expand_static_init): Likewise for static variables.
10353 * decl2.c (finish_file): Likewise for globals.
a4443a08 10354
d11ad92e 10355Sat May 7 03:57:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10356
10357 * typeck.c (commonparms): Don't complain about redefining default
10358 args.
10359
10360 * decl.c (duplicate_decls): Don't complain twice about conflicting
10361 function decls.
10362 (decls_match): Don't look at default args.
10363 (redeclaration_error_message): Complain about redefining default
10364 args.
10365
10366 * call.c (build_overload_call_real): Also deal with guiding
10367 declarations coming BEFORE the template decl.
10368
10369 * pt.c (unify): Allow different parms to have different
10370 cv-qualifiers.
10371 (unify): Allow trivial conversions on non-template parms.
10372
d11ad92e 10373Fri May 6 03:53:23 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10374
10375 * pt.c (tsubst): Support OFFSET_TYPEs.
d11ad92e 10376 (unify): Likewise.
a4443a08
MS
10377
10378 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
10379
10380 * init.c (build_offset_ref): Fix error message.
d11ad92e 10381 * search.c (lookup_field): Likewise.
a4443a08
MS
10382
10383 * call.c (build_scoped_method_call): Pass binfo to
10384 build_method_call.
d11ad92e 10385 * typeck.c (build_object_ref): Likewise.
a4443a08
MS
10386
10387 * typeck2.c (binfo_or_else): Don't return a _TYPE.
10388
10389 * class.c (finish_struct): Don't complain about re-use of inherited
10390 names or shadowing of type decls.
d11ad92e 10391 * decl.c (pushdecl_class_level): Likewise.
a4443a08
MS
10392
10393 * decl.c (finish_enum): Set the type of all the enums.
10394
10395 * class.c (finish_struct): Don't get confused by access decls.
10396
10397 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
10398 _TYPE. You can stop using TYPE_NAME for that now.
10399
10400 * parse.y: Lose doing_explicit (check $0 instead).
10401 * gxx.gperf: 'template' now has a RID.
d11ad92e 10402 * lex.h (rid): Likewise.
a4443a08
MS
10403 * lex.c (init_lex): Set up the RID for 'template'.
10404
10405 * parse.y (type_specifier_seq): typed_typespecs or
10406 nonempty_type_quals. Use it.
10407 (handler_args): Fix bogus syntax.
10408 (raise_identifier{,s}, optional_identifier): Lose.
10409 * except.c (expand_start_catch_block): Use grokdeclarator to parse
10410 the catch variable.
10411 (init_exception_processing): The second argument to
10412 __throw_type_match is ptr_type_node.
10413
d11ad92e 10414 Fri May 6 07:18:54 1994 Chip Salzenberg <chip@fin.uucp>
a4443a08
MS
10415
10416 [ change propagated from c-decl.c of snapshot 940429 ]
10417 * cp/decl.c (finish_decl): Setting asmspec_tree should not
10418 zero out the old RTL.
10419
6060a796 10420Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
10421
10422 Add alpha exception handling support to the compiler.
10423 Quick and dirty backend in except.c.
10424
10425 * cp/*: Remove most remnants of old exception handling support.
10426 * decl.c (finish_function): Call expand_exception_blocks to put
10427 the exception hanlding blocks at the end of the function.
10428 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
10429 comes after expand_decl_init.
10430 * except.c: Reimplementation.
10431 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
10432 * lex.c (init_lex): Always have catch, try and throw be reserved
10433 words, so that we may always parse exception handling.
10434 * parse.y: Cleanup to support new interface into exception handling.
10435 * tree.def (THROW_EXPR): Add.
10436
d11ad92e 10437Thu May 5 17:35:37 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
10438
10439 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
10440 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
10441
d11ad92e 10442Thu May 5 16:17:27 1994 Kung Hsu <kung@mexican.cygnus.com>
8d2733ca
MS
10443
10444 * parse.y (already_scoped_stmt): move expand_end_binding() to
10445 fix the unmatched LBB/LBE in stabs.
10446
d11ad92e 10447Thu May 5 14:36:17 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
10448
10449 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
10450 identifiers.
10451 (pushdecl): Check TREE_MANGLED.
d11ad92e 10452 (xref_tag): Likewise.
8d2733ca
MS
10453 * cp-tree.h (TREE_MANGLED): This identifier is a
10454 DECL_NESTED_TYPENAME (named to allow for future use to denote
10455 mangled function names as well).
10456
10457 Implement inconsistency checking specified in [class.scope0].
10458 * decl.c (lookup_name_real): Don't set ICV here after all.
10459 (finish_enum): Also set the type of the enumerators themselves.
10460 (build_enumerator): Put the CONST_DECL in the list instead of its
10461 initial value.
10462 (pushdecl_class_level): Check inconsistent use of a name in the
10463 class body.
10464 * class.c (finish_struct): Check inconsistent use of a name in the
10465 class body. Don't set DECL_CONTEXT on types here anymore.
10466 * parse.y (qualified_type_name): Note that the identifier has now
10467 been used (as a type) in the class body.
10468 * lex.c (do_identifier): Note that the identifier has now been used
10469 (as a constant) in the class body.
10470 * error.c (dump_decl): Print type and enum decls better.
10471
d11ad92e 10472Thu May 5 09:35:35 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
700f8a87
MS
10473
10474 * typeck.c (build_modify_expr): Warn about assignment to `this'.
10475
d11ad92e 10476Wed May 4 15:55:49 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10477
10478 * init.c (build_delete): Use the global operator delete when
10479 requested.
10480
10481 * decl.c (lookup_name_real): If we find the type we're looking in a
10482 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
10483 the type.
10484
10485 * class.c (finish_struct): Remove a couple of dependencies on
10486 language linkage.
10487
10488 * decl.c (pushtag): Classes do nest in extern "C" blocks.
10489 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
10490 the type.
10491 (pushtag): Remove another dependency on the language linkage.
10492
10493 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
10494 a const-qualified type.
10495
10496 * decl.c (push_overloaded_decl): Throw away built-in decls here.
10497 (duplicate_decls): Instead of here.
10498
d11ad92e 10499Wed May 4 15:27:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
10500
10501 * typeck.c (get_member_function_from_ptrfunc): Do The Right
10502 Thing (I hope) if we're using thunks.
10503
d11ad92e 10504Wed May 4 13:52:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10505
10506 * parse.y (specialization): aggr template_type_name ';'.
10507 (named_class_head_sans_basetype): Use it.
d11ad92e 10508 (explicit_instantiation): Likewise.
700f8a87
MS
10509 (tmpl.2): Revert.
10510
10511 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
10512 rather than convert, to do conversions after the UDC.
10513
10514 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
10515 instances of the class.
10516
10517 * search.c (lookup_field): If the entity found by two routes is the
10518 same, it's not ambiguous.
10519
d11ad92e 10520Wed May 4 12:10:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
10521
10522 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
10523 to prevent the compiler from crashing ...
10524
d11ad92e 10525Wed May 4 11:19:45 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10526
10527 * call.c (build_method_call): If we don't have an object, check
10528 basetype_path to figure out where to look up the function.
10529
10530 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
10531 build_method_call in case exp is NULL_TREE.
10532
d11ad92e 10533Tue May 3 16:02:53 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
10534
10535 Give a vtable entries a unique named type, for the sake of gdb.
10536 * class.c (build_vtable_entry): The addres of a thunk now has
10537 type vtable_entry_type, not ptr_type_node.
10538 * method.c (make_thunk): Fix type of THUNK_DECL.
10539 * class.c (add_virtual_function, override_one_vtable): Use
10540 vfunc_ptr_type_node, instead of ptr_type_node.
10541 * cp-tree.h (vfunc_ptr_type_node): New macro.
10542 * decl.c (init_decl_processing): Make vtable_entry_type
10543 be a unique type of pointer to a unique function type.
10544
d11ad92e 10545Tue May 3 09:20:44 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10546
10547 * parse.y (do_explicit): Sets doing_explicit to 1.
10548 (explicit_instantiation): Use do_explicit rather than TEMPLATE
10549 directly, add "do_explicit error" rule.
10550 (datadef): Set doing_explicit to 0 after an explicit instantiation.
10551 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
10552 explicit instantiation.
10553 (named_class_head_sans_basetype): Remove aggr template_type_name
10554 ';' again.
10555
d11ad92e 10556Mon May 2 23:17:21 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10557
10558 * search.c (lookup_nested_tag): Lose.
10559
10560 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
10561 (lookup_name_nonclass): Lose.
10562
10563 * decl.c (poplevel_class): Add force parameter.
10564 (lookup_name_real): Fix handling of explicit scoping which specifies
10565 a class currently being defined. Add 'nonclass' argument.
10566 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
10567
10568 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
10569 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
10570 called from finish_struct.
10571
d11ad92e 10572Mon May 2 19:06:21 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
10573
10574 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
10575 (It seeems redundant, given build_ptrmemfunc_type.)
10576 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
10577 build_classof): Use vtable_entry_type instead of memptr_type.
10578 * method.c (emit_thunk): Call poplevel with functionbody==0
10579 to prevent DECL_INITIAL being set to a BLOCK.
10580
d11ad92e 10581Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10582
10583 * parse.y (named_class_head_sans_basetype): Add "aggr
10584 template_type_name ';'" rule for forward declaration of
10585 specializations.
10586
d11ad92e 10587Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10588
10589 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
10590
10591 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
10592 stamp-objlist does.
700f8a87 10593
bfef964b
JM
10594 * Makefile.in (../cc1plus): Depend on OBJDEPS.
10595 (OBJDEPS): Dependency version of OBJS.
10596
d11ad92e 10597Mon May 2 12:51:31 1994 Kung Hsu <kung@mexican.cygnus.com>
700f8a87
MS
10598
10599 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
10600 DECL_IGNORED_P.
10601
d11ad92e 10602Fri Apr 29 12:29:56 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10603
10604 * class.c (finish_struct): Clear out memory of local tags. And
10605 typedefs.
10606
10607 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
10608 type.
10609 * search.c (get_matching_virtual): Be more helpful in error message.
10610
10611 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
10612
10613 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
d11ad92e 10614 (default_copy_constructor_body): Likewise.
700f8a87
MS
10615
10616 * class.c (finish_struct): Don't gratuitously create multiple decls
10617 for nested classes.
10618
d11ad92e 10619Thu Apr 28 23:39:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10620
10621 Avoid clobbering the arg types of other functions when reverting
10622 static member functions.
10623 * decl.c (revert_static_member_fn): Rearrange arguments, don't
10624 require values for 'fn' and 'argtypes', add warning to comment
10625 above.
10626 (decls_match): Rearrange arguments in call to rsmf.
10627 (grok_op_properties): Don't pass values for fn and argtypes.
10628 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
10629
d11ad92e 10630Thu Apr 28 16:29:11 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
10631
10632 * Make-lang.in (cc1plus): Depend on stamp-objlist.
10633 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
10634 (OBJS): Cat ../stamp-objlist to get language independent files.
10635 Include ../c-common.o.
15fa00e9
DE
10636 (../cc1plus): Delete reference to BC_OBJS.
10637
d11ad92e 10638Thu Apr 28 02:12:08 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
10639
10640 * search.c (compute_access): No really, deal with static members
10641 properly. Would I lie to you?
10642
10643 Implement lexical hiding of function declarations.
10644 * pt.c (tsubst): Use lookup_name to look for function decls to guide
10645 instantiation.
10646 * method.c (build_opfncall): Use lookup_name_nonclass to look for
10647 non-member functions.
10648 * init.c (do_friend): Use lookup_name_nonclass to look for
10649 functions.
10650 * error.c (ident_fndecl): Use lookup_name to look for functions.
10651 * decl2.c (lookup_name_nonclass): New function, skips over
10652 CLASS_VALUE.
10653 * decl.c (struct binding_level): Lose overloads_shadowed field.
10654 (poplevel): Don't deal with overloads_shadowed.
10655 (push_overloaded_decl): Do lexical hiding for functions.
10656 * class.c (instantiate_type): Don't check non-members if we have
10657 members with the same name.
10658 * call.c (build_method_call): Use lookup_name_nonclass instead of
10659 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
d11ad92e 10660 (build_overload_call_real): Likewise.
700f8a87
MS
10661
10662 * decl.c (duplicate_decls): Check for ambiguous overloads here.
10663 (push_overloaded_decl): Instead of here.
10664
10665 * decl.c (pushdecl): Back out Chip's last change.
10666
10667 * decl.c (grok_op_properties): operators cannot be static members.
10668
10669 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
10670 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
10671 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
10672
10673 * method.c (do_inline_function_hair): Don't put friends of local
10674 classes into global scope, either.
10675
10676 * typeck2.c (build_functional_cast): Don't look for a function call
10677 interpretation.
10678
6060a796 10679Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
10680
10681 * cp-tree.h: disable use of backend EH.
10682
d11ad92e 10683Wed Apr 27 21:01:24 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
10684
10685 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
10686 * Makefile.in (INCLUDES): Move definition to same place as
10687 parent makefile.
10688 (ALLOCA): Define.
10689 (OLDAR_FLAGS): Delete.
10690 (OLDCC): Define.
10691 (DIR): Delete.
10692 (CLIB): Define.
10693 (####site): Delete.
10694 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
10695
d11ad92e 10696Wed Apr 27 19:10:04 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
10697
10698 * decl.c (xref_tag): not to use strstr(), it's not available on
10699 all platforms.
10700
d11ad92e 10701Wed Apr 27 18:10:12 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10702
10703 * class.c (finish_struct): Resolve yet another class/pmf confusion.
10704
10705 * call.c (build_overload_call_real): Don't take the single-function
10706 shortcut if we're dealing with an overloaded operator.
10707
6060a796 10708Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
10709
10710 * search.c (get_base_distance): Search the virtual base class
10711 binfos, incase someone wants to convert to a real virtual base
10712 class.
10713 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
10714 instead of convert_pointer_to, as it now will work.
10715
d11ad92e 10716Wed Apr 27 15:36:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10717
10718 * cvt.c (convert_to_reference): Don't complain about casting away
10719 const and volatile.
10720
10721 * typeck.c (build_unary_op): References are too lvalues.
10722
6060a796 10723Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
10724
10725 * class.c (override_one_vtable): We have to prepare_fresh_vtable
10726 before we modify it, not after, also, we cannot reuse an old vtable,
10727 once we commit to a new vtable. Implement ambiguous overrides in
10728 virtual bases as abstract. Hack until we make the class
10729 ill-formed.
10730
d11ad92e 10731Wed Apr 27 01:17:08 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10732
10733 * parse.y (unary_expr): Expand new_placement[opt] and
10734 new_initializer[opt] inline.
10735
10736 * search.c (lookup_fnfields): Don't throw away the inheritance
10737 information here, either.
10738 (compute_access): Handle static members properly.
10739
10740 * init.c (build_member_call): Always set basetype_path, and pass it
10741 to lookup_fnfields.
10742
10743 * search.c (lookup_field): Deal properly with the case where
10744 xbasetype is a chain of binfos; don't throw away the inheritance
10745 information.
10746 (compute_access): protected_ok always starts out at 0.
10747
10748 * init.c (resolve_offset_ref): Don't cast `this' to the base type
10749 until we've got our basetype_path.
10750
10751 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
10752
10753 * cvt.c (build_up_reference): Use build_pointer_type rather than
10754 TYPE_POINTER_TO.
10755
10756 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
10757 as well.
10758
10759 * cvt.c (type_promotes_to): Retain const and volatile, add
10760 float->double promotion.
10761
10762 * decl.c (grokdeclarator): Don't bash references to arrays into
10763 references to pointers in function parms. Use type_promotes_to.
10764
6060a796 10765Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
10766
10767 Finish off Apr 19th work.
10768
10769 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
10770 might_have_abstract_virtuals.
10771 * class.c (strictly_overrides, override_one_vtable,
10772 merge_overrides): New routines to handle virtual base overrides.
10773 * class.c (finish_struct): Call merge_overrides to handle overrides
10774 in virtual bases.
10775
d11ad92e 10776Tue Apr 26 12:45:53 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10777
10778 * typeck.c (build_function_call): Call build_function_call_real with
10779 LOOKUP_NORMAL.
10780
10781 * *: Don't deal with TYPE_EXPRs.
10782
10783 * tree.c (lvalue_p): If the type of the expression is a reference,
10784 it's an lvalue.
10785
10786 * cvt.c (convert_to_reference): Complain about passing const
10787 lvalues to non-const references.
10788 (convert_from_reference): Don't arbitrarily throw away const and
10789 volatile on the target type.
10790
10791 * parse.y: Simplify and fix rules for `new'.
10792
10793 * decl.c (grok_op_properties): operator void is illegal.
10794
d11ad92e 10795Mon Apr 25 02:36:28 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10796
10797 * parse.y (components): Anonymous bitfields can still have declspecs.
10798
10799 * decl.c (pushdecl): Postpone handling of function templates like we
10800 do C functions.
10801
10802 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
10803 convert_pointer_to fails.
10804
10805 * call.c (compute_conversion_costs_ansi): A user-defined conversion
10806 by itself is better than that UDC followed by standard conversions.
10807 Don't treat integers and reals specially.
10808
10809 * cp-tree.h: Declare flag_ansi.
10810
10811 * typeck.c (c_expand_return): pedwarn on return in void function
10812 even if the expression is of type void.
10813 (build_c_cast): Don't do as much checking for casts to void.
10814 (build_modify_expr): pedwarn about array assignment if this code
10815 wasn't generated by the compiler.
10816
10817 * tree.c (lvalue_p): A comma expression is an lvalue if its second
10818 operand is.
10819
10820 * typeck.c (default_conversion): Move code for promoting enums and
10821 ints from here.
10822 * cvt.c (type_promotes_to): To here.
10823 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
10824 promotion semantics for reals.
10825
d11ad92e 10826Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
10827
10828 * Make-lang.in (c++.install-common): Check for g++-cross.
10829 * Makefile.in: Remove Cygnus cruft.
10830 (config.status): Delete.
10831 (RTL_H): Define.
10832 (TREE_H): Use complete pathname, some native makes have minimal
10833 VPATH support.
10834 (*.o): Use complete pathname to headers in parent dir.
10835 (doc, info, dvi): Delete.
10836
d11ad92e 10837Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
700f8a87
MS
10838
10839 * Make-lang.in (c++.install-common): Check for g++-cross.
10840 * Makefile.in: Remove Cygnus cruft.
10841 (config.status): Delete.
10842 (RTL_H): Define.
10843 (TREE_H): Use complete pathname, some native makes have minimal
10844 VPATH support.
10845 (*.o): Use complete pathname to headers in parent dir.
10846 (doc, info, dvi): Delete.
10847
d11ad92e 10848Sun Apr 24 00:47:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10849
10850 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
10851 with different return type.
10852 (decls_match): Compare return types strictly.
10853
d11ad92e 10854Fri Apr 22 12:55:42 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
10855
10856 * cvt.c (build_type_conversion): Do try to convert through other
10857 pointers. This will fail if the class defines multiple pointer
10858 conversions.
10859
10860 * error.c (dump_type_prefix): Print out pointers to arrays properly.
d11ad92e 10861 (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]')
39211cd5
MS
10862
10863 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
10864 incomplete type.
10865
10866 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
10867 checking for shadowing a builtin. If we're redeclaring a builtin
10868 function, bash the old decl to avoid an ambiguous overload.
10869
10870 * cvt.c (convert_to_reference): Don't force arrays to decay here.
10871
10872 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
10873
10874 * decl.c (duplicate_decls): Don't assume that the decls will have
10875 types.
10876
d11ad92e 10877 Mon Apr 18 11:35:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10878
10879 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
10880 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
10881 in a global scope.
10882
d11ad92e 10883 Fri Apr 22 06:38:56 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10884
10885 * cp/typeck2.c (signature_error): Use cp_error for "%T".
10886
d11ad92e 10887 Mon Apr 18 11:59:59 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10888
10889 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
10890 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
10891 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
10892
d11ad92e 10893 Mon Apr 18 11:55:18 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10894
10895 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
10896 * cp/decl.c (duplicate_decls): Put new type in same obstack as
10897 old ones, or permanent if old ones in different obstacks.
10898
d11ad92e 10899 Mon Apr 18 11:48:49 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10900
10901 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
10902 * cp/parse.y (attrib): Handle string args as expressions,
10903 merging the two rules. `mode' attribute now takes a string arg.
10904 Delete the rule for an identifier as arg.
10905
d11ad92e 10906 Mon Apr 18 11:24:00 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10907
10908 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
10909 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
10910 (pointer_diff): Likewise the division.
10911
d11ad92e 10912 Sun Mar 6 19:43:39 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10913
10914 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
10915 * cp/decl.c (finish_decl): Issue warning for large objects,
10916 if requested.
10917
d11ad92e 10918 Sat Feb 19 22:20:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10919
10920 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
10921 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
10922 * cp/decl.c (duplicate_decls): Merge section name into new decl.
10923
d11ad92e 10924 Tue Feb 8 09:49:17 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10925
10926 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
10927 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 10928 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
10929
10930 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
10931
10932 * cp/decl.c (finish_enum): Start from 0 when determining precision
10933 for short enums.
10934
10935 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
10936
10937 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
10938 casting $$.
10939
d11ad92e 10940 Wed Nov 17 19:22:09 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10941
10942 * cp/typeck.c (build_binary_op_nodefault): Propagate code
10943 from C front-end to optimize unsigned short division.
10944 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
10945
d11ad92e 10946 Wed Nov 17 19:17:18 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10947
10948 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
10949 constant, prefer 'const char &' to 'int'.
10950
d11ad92e 10951 Wed Feb 3 13:11:48 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
10952
10953 * cp/class.c (finish_struct_methods): Handle multiple
10954 constructors in fn_fields list.
10955
d11ad92e 10956Fri Apr 22 12:48:10 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
10957
10958 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
10959 types not to be dumped in stabs, like types in #pragma interface.
10960 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
10961 mark unknown type.
10962
d11ad92e 10963Fri Apr 22 03:27:26 1994 Doug Evans <dje@cygnus.com>
15fa00e9
DE
10964
10965 * Language directory reorganization.
10966 See parent makefile.
10967
d11ad92e 10968Thu Apr 21 18:27:57 1994 Per Bothner <bothner@kalessin.cygnus.com>
39211cd5
MS
10969
10970 * cp-tree.h (THUNK_DELTA): It is normally negative, so
10971 use signed .i variant of frame_size rather than unsigned .u.
10972 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
10973 use "VT" rather than "vt" due to binary incompatibility.
10974 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
10975 rather than sizeof, since it is now an expression.
10976 * class.c (modify_one_vtable): Modify to skip initial element
10977 containing a count of the vtable.
10978
d11ad92e 10979Thu Apr 21 00:09:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
10980
10981 * lex.c (check_newline): Force interface_unknown on main input file.
10982
10983 * pt.c (do_pending_expansions): Always emit functions that have been
10984 explicitly instantiated.
10985 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
10986 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
10987 DECL_EXPLICITLY_INSTANTIATED on all my methods.
10988 * parse.y (explicit_instantiation): Call do_type_instantiation for
10989 types.
10990 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
10991 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
10992 that has been explicitly instantiated.
10993 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
10994 DECL_LANG_FLAG_4.
10995 * class.c: Move import_export_vtable to decl2.c, and comment out all
10996 uses.
10997
d11ad92e 10998Wed Apr 20 16:51:06 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
10999
11000 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
d11ad92e 11001 (do_pending_inlines): Likewise.
7177d104 11002
6060a796 11003Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11004
11005 Reimplement vtable building, and most vtable pointer setting.
11006 Allows for earier maintenance, easier understandability, and most
11007 importantly, correct semantics.
11008
11009 * class.c (build_vtable): Removed unneeded
11010 SET_BINFO_VTABLE_PATH_MARKED.
d11ad92e 11011 * class.c (prepare_fresh_vtable): Likewise. Added argument.
7177d104
MS
11012 * class.c (modify_vtable_entry): General cleanup.
11013 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
11014 modify_vtable_entries): Removed.
11015 * class.c (add_virtual_function): General cleanup.
11016 * class.c (finish_base_struct): Setup BINFO_VTABLE and
11017 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
11018 work.
11019 * class.c (finish_vtbls): New routine, mostly from
11020 unmark_finished_struct.
11021 * class.c (overrides): New routine.
11022 * class.c (modify_one_vtable): New routine, mostly from
11023 modify_other_vtable_entries and modify_vtable_entries.
11024 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
11025 modify_all_vtables): New routines.
11026 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
11027 call. General cleanup on how pending_hard_virtuals are handled.
11028 General cleanup on modifying vtables. Use finish_vtbls, instead of
11029 unmark_finished_struct.
11030 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
11031 get_first_matching_virtual, get_matching_virtual,
11032 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
11033 * cvt.c (convert_pointer_to_real): cleanup error message.
11034 * decl.c (grokfndecl): General cleanup.
11035 * decl.c (finish_function): Change init_vtbl_ptrs call to
11036 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
11037 expand_indirect_vtbls_init.
11038 * init.c (expand_virtual_init): Remove unneeded argument.
11039 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
11040 two arguments to make more general. Made more general. Now can be
11041 used for vtable pointer initialization from virtual bases.
11042 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
11043 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
11044 expand_direct_vtbls_init.
11045 * init.c (expand_virtual_init): General cleanup.
11046 * init.c (expand_default_init): Change expand_vbase_vtables_init
11047 call to expand_indirect_vtbls_init.
11048 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
11049 call to expand_indirect_vtbls_init.
11050 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
11051 call to expand_indirect_vtbls_init.
11052 * search.c (get_first_matching_virtual): Rename to
11053 get_matching_virtual. General cleanup and remove setting of
11054 DECL_CONTEXT. That is now done in a cleaner way in
11055 modify_vtable_entry and add_virtual_function.
11056 * search.c (expand_vbase_vtables_init): Rename to
11057 expand_indirect_vtbls_init. General cleanup. Use
11058 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
11059 pointers from virtual bases are set up.
11060 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
11061 Removed.
11062
11063 * *.[chy]: Remove support for VTABLE_USES_MASK.
11064
d11ad92e 11065Tue Apr 19 12:51:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11066
11067 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
11068 reference and pointer types instead of bashing the types directly.
11069
11070 * call.c (build_overload_call_real): Use the TREE_CODE to determine
11071 whether the function is overloaded or not, rather than
11072 TREE_OVERLOADED.
11073 * *: Remove all uses of TREE_OVERLOADED.
11074
11075 * decl.c (grokdeclarator): Only complain about initializing const
11076 fields when -ansi or -pedantic.
11077
d11ad92e 11078Tue Apr 19 12:42:42 1994 Doug Evans <dje@canuck.cygnus.com>
7177d104
MS
11079
11080 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
11081
d11ad92e 11082Mon Apr 18 00:17:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11083
11084 Do overloading on a block-by-block basis, not function-by-function.
11085 * decl.c: Lose overloads_to_forget.
11086 (struct binding_level): Add overloads_shadowed field.
11087 (poplevel): Restore overloads_shadowed.
11088 (push_overloaded_decl): Use overloads_shadowed instead of
11089 overloads_to_forget.
11090 (finish_function): Don't look at overloads_to_forget.
11091
11092 Copy enum_overflow logic from c-decl.c.
11093 * decl.c (start_enum): Initialize enum_overflow.
11094 (build_enumerator): Use enum_overflow. Also use current_scope().
11095
11096 * search.c (current_scope): Move Brendan's comment from
11097 build_enumerator here.
11098
11099 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
11100 discarding const/volatile.
11101
d11ad92e 11102Sat Apr 16 01:18:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11103
11104 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
d11ad92e 11105 (comp_target_types): Likewise.
7177d104
MS
11106
11107 * decl.c (lookup_name): Don't unset got_scope here.
11108
11109 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
11110 got_scope != NULL_TREE.
11111
d11ad92e 11112Fri Apr 15 16:36:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11113
11114 Horrible kludge to prevent templates from being instantiated by
11115 their base classes.
11116 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
11117 before we get to left_curly.
11118 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
11119
11120 * error.c (dump_decl): If it's a typedef, print out the name of the
11121 decl, not just the underlying type.
11122
11123 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
11124 update the IDENTIFIER_TYPE_VALUE of its name.
11125
11126 * decl2.c (finish_file): When processing the initializer for a
11127 static member, pretend that the dummy function is a member of the
11128 same class.
11129
d11ad92e 11130Fri Apr 15 15:56:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104 11131
63718c49
GB
11132 * class.c (build_vtable_entry): revert Apr 4 change.
11133 * decl2.c (mark_vtable_entries): replace pure virtual function
11134 decl with abort's.
7177d104 11135
d11ad92e 11136Fri Apr 15 13:49:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11137
11138 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
11139 mismatch, and don't pedwarn on 0/function pointer mismatch.
11140
11141 * typeck2.c (digest_init): Lose code for special handling of unions.
11142 (process_init_constructor): Since they're handled just fine here.
11143 Pedwarn on excess elements.
11144
11145 * decl2.c (grokfield): Complain about local class method declaration
11146 without definition.
11147
d11ad92e 11148Fri Apr 15 13:19:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11149
11150 * method.c (emit_thunk): Add extern declaration for
11151 current_call_is_indirect (needed for hppa).
11152
d11ad92e 11153Thu Apr 14 16:12:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11154
11155 Improve local class support; allow classes in different blocks to
11156 have the same name.
11157 * decl.c (pushtag): Support local classes better.
11158 (pushdecl_nonclass_level): New function for pushing mangled decls of
11159 nested types into the appropriate scope.
11160 (xref_defn_tag): Use pushdecl_nonclass_level instead of
11161 pushdecl_top_level.
11162 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
11163 class methods.
d11ad92e 11164 * method.c (do_inline_function_hair): Likewise.
7177d104
MS
11165
11166 * class.c (finish_struct): It is legal for a class with no
11167 constructors to have nonstatic const and reference members.
11168
d11ad92e 11169Thu Apr 14 07:15:11 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
11170
11171 * decl.c (push_overloaded_decl): Avoid giving errors about
11172 built-ins, since duplicate_decls will have given warnings/errors
11173 for them.
11174
d11ad92e 11175Thu Apr 14 03:45:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11176
11177 * cvt.c (convert_to_reference): Warn about casting pointer type to
11178 reference type when this is probably not what they wanted.
11179
d11ad92e 11180Wed Apr 13 13:12:35 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11181
11182 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
11183 static consts any more (toplev.c has now been modified to
11184 not emit warnings if they are unused).
11185
d11ad92e 11186Wed Apr 13 00:22:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11187
11188 * decl.c (grok_op_properties): If op new/delete get here with
11189 METHOD_TYPEs, do a revert_static_member_fn.
11190
11191 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
11192 * init.c (is_aggr_typedef): Don't look at
11193 IDENTIFIER_CLASS_TYPE_VALUE.
d11ad92e
MS
11194 (get_aggr_from_typedef): Likewise.
11195 (get_type_value): Likewise.
7177d104
MS
11196 * call.c (build_scoped_method_call): Don't rely on overloaded
11197 template names having IDENTIFIER_CLASS_VALUE set.
11198
11199 * parse.y (component_decl_1, fn.def2): Revert rules for
11200 constructors.
11201 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
11202 clobbered.
11203
11204 * decl.c (start_function): Only warn about `void main()' if pedantic
11205 || warn_return_type.
11206
d11ad92e 11207Tue Apr 12 02:14:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11208
11209 Clean up overloading of the template name.
11210 * class.c (pushclass): overload the template name whenever pushing
11211 into the scope of a template class, not just if it is
11212 uninstantiated.
11213 (popclass): Correspondingly.
11214 * search.c (push_class_decls): Don't overload_template_name.
11215 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
11216 DECL_CONTEXT on things.
11217 * parse.y (left_curly): Don't overload_template_name.
11218 * class.c (finish_struct): Don't undo_template_name_overload.
11219
11220 * method.c (build_opfncall): Only pass one argument to global op
11221 delete.
11222
11223 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
11224 decide how many arguments to use for vec delete.
11225
11226 * decl.c (grok_op_properties): Be consistent in modifying
11227 current_class_type.
11228 (grokdeclarator): Only complain about function decls with no return
11229 type if we're being pedantic.
11230
d11ad92e 11231Mon Apr 11 00:10:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11232
11233 Add support for operator new [] and operator delete [].
11234
11235 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
11236 * ptree.c (print_lang_type): Indicate vec new/delete.
11237 * parse.y: Support vec new/delete.
11238 * method.c (build_decl_overload): Deal with vec new/delete.
d11ad92e 11239 (build_opfncall): Likewise.
7177d104
MS
11240 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
11241 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
11242 * init.c (init_init_processing): Set up BIVN and BIVD.
11243 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
11244 since it doesn't happen any more.
11245 (build_new): Support vec new. Always call something.
11246 (build_x_delete): Support vec delete.
11247 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
11248 and pass it to build_x_delete.
11249 * decl2.c (delete_sanity): Don't change behavior by whether or not
11250 the type has a destructor. Pass use_global_delete to
11251 build_vec_delete.
11252 (coerce_delete_type): Make sure that the type returned has a first
11253 argument of ptr_type_node.
11254 * decl.c (init_decl_processing): Also declare the global vec
11255 new/delete.
11256 (grokdeclarator): Also force vec new/delete to be static.
11257 (grok_op_properties): Note presence of vec new/delete, and play with
11258 their args. If vec delete takes the optional size_t argument, set
11259 TYPE_VEC_DELETE_TAKES_SIZE.
11260 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
11261 checking for one delete or the other.
11262 (lang_type): gets_new and gets_delete are now two bits long. The
11263 low bit is for the non-array version. Lose gets_placed_new.
11264 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
11265 delete defined by this class wants to know how much space it is
11266 deleting.
11267 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
11268 add a header containing the number of elements in the vector; i.e.
11269 when the elements need to be destroyed or vec delete wants to know
11270 the size.
11271 * class.c (finish_struct_methods): Also check for overloading vec
11272 delete.
11273 * call.c (build_method_call): Also delete second argument for vec
11274 delete.
11275
11276 * decl.c (grokdeclarator): Correct complaints again.
11277 (grokdeclarator): Fix segfault on null declarator.
11278 (decls_match): Also accept redeclaration with no arguments if both
11279 declarations were in C context. Bash TREE_TYPE (newdecl) here.
11280 (duplicate_decls): Instead of here.
11281
11282 * parse.y (nested_name_specifier_1): Lose rules for dealing with
11283 syntax errors nicely, since they break parsing of 'const i;'.
11284
11285 * decl.c (lookup_name): if (got_scope == current_class_type)
11286 val = IDENTIFIER_CLASS_VALUE (name).
11287
11288 * search.c (lookup_nested_tag): Look in enclosing classes, too.
11289
11290 * spew.c (yylex): Only look one character ahead when checking for a
11291 SCOPE.
11292
11293 * lex.c (check_newline): Read first nonwhite char before
11294 incrementing lineno.
11295
11296 * decl.c (grokdeclarator): Don't claim that typedefs are variables
11297 in warning.
11298
11299 * parse.y: Divide up uses of unqualified_id into
11300 notype_unqualified_id and unqualified_id, so that TYPENAME can be
11301 used as an identifier after an object.
11302
11303 * class.c (push_nested_class): Don't push into non-class scope.
11304
11305 * decl.c (grokdeclarator): If an identifier could be a type
11306 conversion operator, but has no associated type, it's not a type
11307 conversion operator.
11308
11309 * pt.c (unify): Check for equality of constants better.
11310
11311 * decl.c (grokdeclarator): Don't complain about access decls.
11312
d11ad92e 11313Sun Apr 10 02:39:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11314
11315 * decl.c (grokdeclarator): pedwarn about data definitions without
11316 types here.
11317
11318 * parse.y (datadef): Don't pedwarn about decls without types here,
11319 since that is valid for functions.
11320 (fn.def2, component_decl): Support constructors with declmods again.
11321 (nomods_initdecls): For decls without any mods, so that we don't try
11322 to get declspecs from some arbitrary $0.
11323
11324 * search.c (lookup_field): Use cp_error.
11325
11326 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
11327 here; it breaks destructors for non-aggr types.
11328
11329 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
11330 a type being defined, like the comment says.
11331 If got_scope is not an aggregate, just return NULL_TREE.
11332
11333 * pt.c (create_nested_upt): Kung's code for creating types nested
11334 within uninstantiated templates now lives here (it used to live in
11335 hack_more_ids). It needs to be expanded.
11336
11337 * parse.y: Stop calling see_typename so much.
11338
11339 * decl.c (lookup_name): Deal with TTPs and UPTs.
11340
11341 * lex.c (real_yylex): Don't set looking_for_typename just because we
11342 saw a 'new'.
11343 (dont_see_typename): #if 0 out.
11344
11345 * spew.c (yylex): Increment looking_for_typename if the next
11346 character is SCOPE, rather than setting it to 1; this way, the value
11347 from seeing an aggr specifier will not be lost. This kinda relies
11348 on looking_for_typename never being < 0, which is now true.
11349
11350 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
11351 too.
11352 (named_class_head_sans_basetype): Accept template types, too. Oops.
11353
d11ad92e 11354Fri Apr 8 16:39:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11355
11356 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
11357
11358 * parse.y: Lose START_DECLARATOR.
11359
11360 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
11361 for a class.
11362
11363 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
11364 A::foo' syntax. Catch invalid scopes better.
11365
11366 * parse.y, lex.c: lose TYPENAME_COLON.
11367
11368 * decl2.c (groktypefield): #if 0 out.
11369
11370 * decl.c (lookup_name): If the type denoted by got_scope is
11371 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
11372
11373 * class.c (push_nested_class): Don't try to push into
11374 error_mark_node.
11375
d11ad92e 11376Fri Apr 8 07:26:36 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
11377
11378 * Makefile.in (stamp-parse): Update count of conflicts to 33.
11379
d11ad92e 11380Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11381
11382 A saner implementation of nested types that treats template types
11383 no differently from non-template types. There are still some
11384 shortcomings of our system; most notably, it is difficult to look
11385 for a nested type that is hidden by another name, because of the way
11386 we keep track of hidden types. But this shouldn't be a problem for
11387 just about anyone. Perhaps lookup_field should be fixed up a bit.
11388
11389 * spew.c: Moved handling of nested types/scoping from the lexer
11390 into the parser. Removed variable template_type_seen_before_scope.
11391 Removed functions frob_identifier, hack_more_ids, and various cruft
11392 that was #if 0'd out in the past, reducing the size of the file from
11393 1146 lines to 450 lines. We can't quite do away with spew.c yet,
11394 though; we still need it for do_aggr () and checking for SCOPE after
11395 the current identifier. And setting lastiddecl.
11396
11397 * parse.y: Moved handling of nested types/scoping from the lexer
11398 into the parser, using a new global variable `got_scope'. Reduced
11399 the number of states by 53. Implemented all uses of explicit global
11400 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
11401 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
11402 scoped_typename. Added nonterminals nested_type,
11403 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
11404 nested_name_specifier, global_scope, overqualified_id, type_name.
11405 Changed many others. Added 9 new reduce/reduce conflicts, which are
11406 nested type parallels of 9 that were already in the grammar for
11407 non-nested types. Eight of the now 33 conflicts should be removed
11408 in the process of resolving the late binding between variable and
11409 function decls.
11410
11411 * gxxint.texi (Parser): Update.
11412
11413 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
11414
11415 * lex.h: Add decl for got_scope.
11416
11417 * lex.c (see_typename): Claim to be the lexer when calling
11418 lookup_name.
11419
11420 * decl.c (lookup_name): When called from the lexer, look at
11421 got_scope and looking_at_typename; otherwise don't.
11422
6060a796 11423Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11424
11425 31th Cygnus<->FSF merge.
11426
d11ad92e 11427Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11428
11429 * decl2.c (mark_vtable_entries): Call this to mark all the
11430 entries in the vtable addressable.
11431 (finish_decl_parsing): Handle SCOPE_REFs.
11432
11433 * decl.c (decls_match): Always call compparms with strict == 1.
11434 Handle the special case of C function redecl here.
11435 (duplicate_decls): Only keep the old type if the new decl takes no
11436 arguments.
11437
11438 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
11439
6060a796 11440Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11441
11442 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
11443 17:48:41.
11444
d11ad92e 11445Wed Apr 6 16:05:10 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11446
11447 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
11448 ch-tree.h: Every place these functions were called, the result was
11449 immediately passed to expand_expr_stmt. Reduce redundancy by
11450 calling expand_expr_init *inside* these functions. These
11451 makes for a simpler interface, and we don't have to build
11452 compound expressions. Hence, rename these function to:
11453 expand_virtual_init and expand_vbase_vtables_init respectively.
11454 * init.c, decl.c: Change callers of these functions.
11455 * init.c, cp-tree.h (expand_virtual_init): Make static.
11456
11457 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
11458 rather than DECL_SAVED_INSNS before emitting inlines.
11459
d11ad92e 11460Wed Apr 6 13:06:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11461
11462 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
11463
11464 * decl.c (duplicate_decls): If this is a new declaration of an
11465 extern "C" function, keep the type (for the argtypes).
11466 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
11467 (decls_match): Call compparms with a value of strict dependent on
11468 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
11469
11470 * typeck.c (compparms): ... is only equivalent to non-promoting
11471 parms if we're not being strict.
11472
11473 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
11474
11475 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
11476 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
11477
11478 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
11479 virtuals.
11480
d11ad92e 11481Tue Apr 5 17:48:41 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11482
11483 Support for implementing vtables with thunks.
11484 * tree.def (THUNK_DECL): New TREE_CODE.
11485 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
11486 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
11487 * cp-tree.h (memptr_type): New variable.
11488 * class.c (build_vtable_entry): Build thunk if necessary.
11489 * class.c (build_vfn_ref): If using thunks, don't need
11490 to add delta field from vtable (there is none!).
11491 * decl.c: Add memptr_type as well as vtable_entry_type.
11492 If using thunks, the latter is just ptr_type_node.
11493 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
11494 * decl2.c (finish_vtable_vardecl): Handle thunks.
11495 * expr.c (cplus_expand_expr): Support THUNK_DECL.
11496
11497 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
11498 * decl.c (start_function): Set current_extern_inline based on
11499 DECL_THIS_EXTERN, not TREE_PUBLIC.
11500 * decl.c (finish_function): Call mark_inline_for_output if needed,
11501
11502 Improve intelligence about when to emit inlines.
11503 * cp-tree.h (lang_decl_flags): New field saved_inline.
11504 * cp-tree.h (DECL_SAVED_INLINE): New macro.
11505 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
11506 * decl.h, decl.c (pending_addressable_inlines): Removed.
11507 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
11508 * decl2.c (mark_inline_for_output): Do nothing if
11509 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
11510 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
11511 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
11512 * decl2.c (finish_file): Writing out inlines later, so we can
11513 also handle the ones needed for vtbales.
11514 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
11515
11516 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
11517 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
11518 instead. (The rationale is that these optimizations both break binary
11519 compatibility, but should become the default in a future release.)
11520
6060a796 11521Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11522
11523 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
11524 of a fndecl, as we might not be from that vfield.
11525
d11ad92e 11526Tue Apr 5 17:43:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
11527
11528 * class.c (add_virtual_function): fix bug for pure virtual, so
11529 that DECL_VINDEX of the dummy decl copied won't be error.
11530 (see also Apr 4 change)
11531
d11ad92e 11532Tue Apr 5 17:23:45 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11533
11534 * typeck.c (c_expand_return): Before checking that we're not
11535 returning the address of a local, make sure it's a VAR_DECL.
11536 (And don't worry about it being a TREE_LIST.)
11537
d11ad92e 11538Tue Apr 5 13:26:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11539
11540 * parse.y (YYDEBUG): Always define.
d11ad92e 11541 * lex.c (YYDEBUG): Likewise.
7177d104 11542
d11ad92e 11543Mon Apr 4 11:28:17 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
11544
11545 * class.c (finish_struct): backup out the change below, put the
11546 new change for the same purpose. The change below breaks code.
11547
11548 * class.c (finish_struct): if pure virtual, copy node and make
11549 RTL point to abort, then put in virtual table.
11550 * decl2.c (grok_function_iit): reinstate Mar 31 change.
11551
d11ad92e 11552Sat Apr 2 03:12:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11553
11554 * init.c (build_new): pedwarn about newing const and volatile
11555 types.
11556
11557 * tree.c (get_identifier_list): Only do the special handling
11558 thing if we're dealing with the main variant of the record type.
11559
11560 * cvt.c (convert_to_reference): When converting between
11561 compatible reference types, use the pointer conversion machinery.
11562 Don't just blindly overwrite the old type.
11563
d11ad92e 11564Fri Apr 1 17:14:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11565
11566 * call.c (build_method_call): When looking at global functions,
11567 be sure to use instance_ptr for the first argument, not some version
11568 of it that has been cast to a base class. Also do this before
11569 comparing candidates.
11570
d11ad92e 11571Thu Mar 31 19:50:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11572
11573 * call.c (build_method_call): Constructors can be called for
11574 const objects.
11575
d11ad92e 11576Thu Mar 31 16:20:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
11577
11578 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
11579 fucntions. They can be defined somewhere else.
11580
11581Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
11582
11583 * decl.c (init_decl_processing): Declare __builtin_return_address
11584 and __builtin_frame_address for C++ as well.
11585
6060a796 11586Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11587
11588 * typeck2.c (store_init_value): Integral constant variables are
11589 always constant, even when doing -fpic.
11590
11591Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
11592
11593 * decl.c (redeclaration_error_message): Pass the types to
11594 comptypes.
11595
6060a796 11596Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11597
11598 Cures incorrect errors about pure virtuals in a class, when they
11599 have been overridden in a derived class.
11600
11601 * search.c (get_abstract_virtuals): Reimplement.
11602 * search.c (get_abstract_virtuals_1): New routine.
11603
d11ad92e 11604Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11605
11606 * pt.c (push_template_decls): Make the pushed level pseudo
11607 global.
11608
11609 * parse.y (extdefs): Don't pop everything if the current binding
11610 level is pseudo_global.
11611
11612 * decl.c (pop_everything): Stop on reaching a pseudo-global
11613 binding level.
11614
11615 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
11616
11617 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
11618 the old decl actually had an initializer.
11619
11620 * {various}: Clean up gcc -W complaints.
11621
11622 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
11623 (DECL_CONTEXT (NODE) != NULL_TREE).
11624
11625 * parse.y (lang_extdef): Call pop_everything if necessary.
11626
11627 * decl.c (pop_everything): New function for popping binding
11628 levels left over after a syntax error.
11629 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
11630 a function is a member.
11631
6060a796 11632Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11633
11634 Cures calling a more base base class function, when a more derived
11635 base class member should be called in some MI situations.
11636
11637 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
11638 binfos from the binfo given as the second argument to make_binfo,
11639 instead of the unspecialized ones from the TYPE_BINFO.
d11ad92e
MS
11640 * class.c (finish_base_struct): Likewise, update callers.
11641 * search.c (dfs_get_vbase_types): Likewise.
11642 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
7177d104 11643 * decl.c (xref_tag): Use NULL_TREE instead of 0.
d11ad92e 11644 * lex.c (make_lang_type): Likewise.
7177d104 11645
d11ad92e 11646Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11647
11648 * decl.c (pushdecl): If pushing a C-linkage function, only do a
11649 push_overloaded_decl.
11650 (duplicate_decls): Standard overloading does not shadow built-ins.
11651
d11ad92e 11652Tue Mar 29 00:54:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11653
11654 * pt.c (end_template_decl): Don't call push_overloaded_decl.
11655
11656 * init.c (do_friend): Don't call push_overloaded_decl.
11657
11658 * decl.c (pushdecl): Call push_overloaded_decl for functions and
11659 function templates.
11660 (duplicate_decls): functions and function templates are not
11661 duplicates, but don't complain about calling this function to
11662 compare them.
11663 (push_overloaded_decl): Don't deal with linkage. Call
11664 duplicate_decls.
11665 (redeclaration_error_message): Deal with linkage.
11666
11667 * decl.c (start_function): If push_overloaded_decl returns an
11668 older version of the function, deal with it.
11669
11670 * decl.c (start_function): Be sure only to push_overloaded_decl
11671 for non-members.
11672
11673 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
11674 methods.
11675 (start_function): Lose broken and redundant code for checking old
11676 decl.
11677
11678 * init.c (add_friend): Give line numbers of both friend decls
11679 when warning about re-friending.
11680
11681 * pt.c (tsubst): Use comptypes rather than == to compare the
11682 types of the method as declared and as defined, since default
11683 parameters may be different.
11684
11685 * call.c (build_method_call): Use brendan's candidate printing
11686 routine.
11687
11688 * decl.c (start_method): Methods defined in the class body are
11689 inline whether or not it's a template class.
11690
d11ad92e 11691Mon Mar 28 16:39:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11692
11693 * parse.y (initdcl0): Add "extern" to current_declspecs if
11694 have_extern_spec && ! used_extern_spcec.
11695
11696 * tree.c (really_overloaded_fn): A fn with more than one
11697 overload.
11698
11699 * pt.c (end_template_decl): Use really_overloaded_fn.
11700
11701 * decl.c (duplicate_decls): When smashing a decl into a previous
11702 definition, keep the old file and line.
11703 Don't deal with overloaded functions.
11704 Lose old code for checking arg types of functions.
11705 Check for overloaded C functions.
11706 (pushdecl): Deal with overloaded functions.
11707 (start_decl): Expect pushdecl to return an appropriate function decl.
d11ad92e 11708 (start_function): Likewise.
7177d104
MS
11709 (push_overloaded_decl): Don't check for overloaded C functions.
11710
11711 * *.c: Stop using DECL_OVERLOADED, it being archaic.
11712 TREE_OVERLOADED should probably go, too.
11713
d11ad92e 11714Mon Mar 28 14:00:45 1994 Ron Guilmette <rfg@netcom.com>
7177d104
MS
11715
11716 * typeck.c (comp_target_types): Call comp_target_parms with
11717 strict == 1.
11718
d11ad92e 11719Sun Mar 27 00:07:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11720
11721 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
11722 sections if we're compiling with -ansi or -pedantic.
11723
11724 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
11725
11726 * decl2.c (grokfield): Don't pedwarn twice about initializing
11727 field.
11728
11729 * decl.c (push_overloaded_decl): Warn about shadowing
11730 constructor.
11731 (redeclaration_error_message): Don't allow 'int a; int a;'
11732
11733 * cvt.c (build_up_reference): Only check for valid upcast if
11734 LOOKUP_PROTECT is set, not just any flag.
11735
d11ad92e 11736Fri Mar 25 01:22:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11737
11738 * lex.c (check_newline): When we see a #pragma implementation,
11739 also set it for the main input file.
11740
11741 * init.c (build_new): Convert array size argument to size_t.
11742
11743 * parse.y (primary): If we're doing a parenthesized type-id, call
11744 groktypename before passing it to build_new.
11745
11746 * call.c (build_method_call): Deal properly with const and
11747 volatile for instances of reference type.
11748
11749 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
11750 (pedantic) pedwarn'.
11751
11752 * decl.c (grokdeclarator): Don't complain about putting `static'
11753 and `inline' on template function decls.
11754
d11ad92e 11755Thu Mar 24 23:18:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11756
11757 * call.c (build_method_call): Preserve const & volatile on
11758 `this'.
11759
6060a796 11760Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11761
11762 * init.c (build_new, build_vec_delete): Use global new and delete
11763 for arrays.
d11ad92e 11764 * decl2.c (delete_sanity): Likewise.
7177d104 11765
d11ad92e 11766Thu Mar 24 02:10:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11767
11768 * cvt.c (convert_to_reference): If i is an lvalue,
11769 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
11770 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
11771
d11ad92e 11772Wed Mar 23 17:45:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11773
11774 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
11775 and DECL_TEMPLATE_INSTANTIATIONS.
11776
11777 * init.c (build_new): Handle array typedefs properly.
11778
6060a796 11779Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11780
11781 30th Cygnus<->FSF merge.
11782
6060a796 11783Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11784
11785 * class.c (modify_vtable_entries): Avoid running off the end of the
11786 virtuals list when processing a virtual destructor.
d11ad92e 11787 * class.c (get_vtable_entry): Likewise.
7177d104 11788
d11ad92e 11789Wed Mar 23 00:23:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11790
11791 * decl.c (duplicate_decls): If two template decls don't match,
11792 just return 0.
11793
d11ad92e 11794Tue Mar 22 23:49:41 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11795
11796 * typeck.c (convert_for_assignment): Don't pedwarn about
11797 converting function pointer to void *.
11798
6060a796 11799Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11800
11801 Major revamp of pointer to member functions. Cures major
11802 nonfunctionality when used in casts, and MI situations.
11803
11804 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
d11ad92e
MS
11805 * typeck.c (convert_for_assignment): Likewise.
11806 * typeck2.c (digest_init): Likewise.
7177d104
MS
11807 * typeck2.c (process_init_constructor): Simplify by moving code into
11808 digest_init.
11809 * typeck2.c (digest_init): Do default_conversions on init value, if
11810 we are processing pointer to member functions.
11811 * class.c (get_vfield_offset): Now non-static. Convert bit offset
11812 into byte offset.
d11ad92e 11813 * cp-tree.h (get_vfield_offset): Likewise.
7177d104
MS
11814 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
11815 instance, before fetching vtable pointer.
11816 * typeck.c (get_delta_difference): New routine.
11817 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
11818 get vtable pointer out of right subobject.
11819
6060a796 11820Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11821
11822 * search.c (get_binfo): Return NULL instead of aborting, when
11823 passed a UNION_TYPE.
11824
d11ad92e 11825Tue Mar 22 12:44:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11826
11827 These patches implement handling of redefinition/redeclaration of
11828 templates.
11829
11830 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
11831 considered compatible.
11832
11833 * parse.y (template_def): Pass defn argument to end_template_decl.
11834
11835 * pt.c (end_template_decl): Add defn argument. Check for
11836 redefinition. Simplify.
11837
11838 * error.c (OB_UNPUT): New macro, to remove mistakes.
11839 (aggr_variety): Subroutine of dump_aggr_type.
11840
11841 * decl.c (decls_match): Support templates.
11842 (duplicate_decls): No longer static. Don't try to lay out template
11843 decls.
11844 (pushdecl): Simplify.
11845
11846 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
11847 DECL_INITIAL.
11848
d11ad92e 11849Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11850
11851 * error.c (dump_decl): Support class template decls.
11852 (dump_type): Don't adorn template type parms.
11853
11854 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
11855 if it was a definition.
11856 (redeclaration_error_message): Do the cp_error thang, and reject
11857 redefinition of templates.
11858
d11ad92e 11859Mon Mar 21 19:36:06 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11860
11861 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
11862 in FIELD context, when appropriate. Also,
11863 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
11864 Also, simplify check for bogus return specifiers.
11865
d11ad92e 11866Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11867
11868 * parse.y (after_type_declarator1): Expand type_quals.
d11ad92e
MS
11869 (notype_declarator1): Likewise.
11870 (absdcl1): Likewise.
7177d104 11871
d11ad92e 11872Sat Mar 19 01:05:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11873
11874 * decl.c (grokdeclarator): Treat class-local typedefs like static
11875 members; i.e. 'typedef int f();' means that f is a function type,
11876 not a method type.
11877
11878 * parse.y (decl): Change direct_* back to *.
11879 (type_id): Change direct_abstract_declarator to absdcl.
11880 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
11881
d11ad92e 11882Fri Mar 18 12:47:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11883
11884 These two patches fix crashes on instantiating a template inside a
11885 function with C linkage or containing labels.
11886
11887 * class.c (current_lang_stacksize): No longer static.
11888
11889 * decl.c (struct saved_scope): Add lang_base, lang_stack,
11890 lang_name, lang_stacksize, and named_labels.
11891 (push_to_top_level): Save them.
11892 (pop_from_top_level): Restore them.
11893
11894 * gxxint.texi (Parser): Update.
11895
11896 These two patches finish moving the task of expr/declarator
11897 ambiguity resolution from the lexer to the parser, and add one more
11898 r/r conflict. START_DECLARATOR can now be nuked.
11899
11900 * parse.y (decl): Add "direct_" in typespec X rules.
11901 (direct_declarator): New nonterminal for
11902 direct_after_type_declarator and direct_notype_declarator.
11903 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
11904 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
11905 (named_parm): Add typespec direct_declarator rule.
11906
11907 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
11908
11909 These two patches disable some excessive cleverness on the part of
11910 g++; a non-class declaration always hides a class declaration in the
11911 same scope, and g++ was trying to unhide it depending on the
11912 enclosing expression.
11913
11914 * spew.c (arbitrate_lookup): #if 0 out.
11915
11916 * decl.c (lookup_name): Never call arbitrate_lookup.
11917
11918 * parse.y (complex_notype_declarator1): Add '*'
11919 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
11920
11921 * parse.y (complex_direct_notype_declarator): Restore id_scope
11922 see_typename TYPENAME rule, remove all other rules beginning with
11923 those tokens.
11924 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
11925
d11ad92e 11926Thu Mar 17 17:30:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11927
11928 These changes fix the compiler's handling of the functional cast/
11929 object declaration ambiguities in section 6.8 of the ARM. They also
11930 add 11 reduce/reduce conflicts. Sigh.
11931
11932 * parse.y: Add precedence decls for OPERATOR and '~'.
11933 (notype_unqualified_id): New nonterminal, encompasses all of the
11934 ANSI unqualified-id nonterminal except TYPENAMEs.
11935 (expr_or_declarator): New nonterminal to delay parsing of code like
11936 `int (*a)'.
11937 (primary): Use notype_unqualified_id.
11938 (decl): Add typespec initdecls ';' and typespec declarator ';'
11939 rules.
11940 (initdcl0): Deal with the above.
11941 (complex_notype_declarator1): A notype_declarator that is not also
11942 an expr_or_declarator.
11943 (complex_direct_notype_declarator): A direct_notype_declarator that
11944 doesn't conflict with expr_or_declarator. Use
11945 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
11946 (functional_cast): New nonterminal, for the three functional cast
11947 rules. So that they can be moved after
11948 complex_direct_notype_declarator.
11949 (see_typename): Don't accept type_quals any more.
11950
11951 * decl2.c (reparse_decl_as_expr): New function to deal with parse
11952 nodes for code like `int (*a)++;'.
11953 (reparse_decl_as_expr1): Recursive subroutine of the above.
11954 (finish_decl_parsing): New function to deal with parse nodes for
11955 code like `int (*a);'. See the difference?
11956
6060a796 11957Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11958
11959 These changes break binary compatibility in code with classes
11960 that use virtual bases.
11961
11962 * search.c (dfs_get_vbase_types): Simplify and correct to make
11963 sure virtual bases are initialized in dfs ordering.
11964 * search.c (get_vbase_types): Simplify and make readable.
11965
d11ad92e 11966Thu Mar 17 12:01:10 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11967
11968 * parse.y: s/ typename / type_id /g
11969
d11ad92e 11970Wed Mar 16 17:42:52 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
11971
11972 * parse.y (typespec): add SCOPE TYPENAME for global scoped
11973 type. e.g. ::B x.
11974
11975 * decl.c (complete_array_type): fix a bug that in -pendantic
11976 mode even there's no initializer, it will continue to build
11977 default index.
11978
d11ad92e 11979Wed Mar 16 17:43:07 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11980
11981 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
11982 all of the scoped PTYPENAME rules.
11983
6060a796 11984Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11985
11986 * init.c (build_offset_ref): The value of A::typedef_name is
11987 always the TYPE_DECL, and never an error.
11988
d11ad92e 11989Tue Mar 15 20:02:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11990
11991 * search.c (get_base_distance_recursive): Two binfos can only
11992 represent the same object if they are both via_virtual.
11993
11994 * class.c (finish_base_struct): Check vbases for ambiguity, too.
11995
11996 * search.c (get_vbase_types): Accept binfo argument, too.
11997
d11ad92e 11998Tue Mar 15 19:22:05 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
11999
12000 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
12001 initializer also, because back-end requires it.
12002
d11ad92e 12003Tue Mar 15 15:33:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12004
12005 * error.c (dump_expr): Support member functions (which show up as
12006 OFFSET_REFs).
12007
6060a796 12008Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12009
12010 * init.c (build_new): Set the return type of multidimensional
12011 news correctly.
12012
d11ad92e 12013Fri Mar 11 15:35:39 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12014
12015 * call.c (build_method_call): if basetype not equal to type
12016 of the instance, use the type of the instance in building
12017 destructor.
12018
d11ad92e 12019Thu Mar 10 17:07:10 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12020
12021 * parse.y (direct_notype_declarator): add push_nested_type for
12022 'template_type SCOPED_NAME' rule.
12023
d11ad92e 12024Tue Mar 8 00:19:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12025
12026 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
12027
d11ad92e 12028Sat Mar 5 04:47:48 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12029
12030 * parse.y (regcast_or_absdcl): New nonterminal to implement late
12031 reduction of constructs like `int ((int)(int)(int))'.
12032 (cast_expr): Use it.
12033 (sub_cast_expr): Everything that can come after a cast.
12034 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
12035 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
12036 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
12037 '(' complex_parmlist ')' and regcast_or_absdcl.
12038 (parmlist): Split
12039 (complex_parmlist): Parmlists that are not also typenames.
12040 (parms_comma): Enabler.
12041 (named_parm): A parm that is not also a typename. Use declarator
12042 rather than dont_see_typename abs_or_notype_decl. Expand
12043 typed_declspecs inline.
12044 (abs_or_notype_decl): Lose.
12045 (dont_see_typename): Comment out.
12046 (bad_parm): Break out abs_or_notype_decl into two rules.
12047
d11ad92e 12048Fri Mar 4 18:22:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12049
12050 * decl2.c (reparse_decl_as_casts): New function to change parse
12051 nodes for `(int)(int)(int)' from "function taking int and returning
12052 function taking int and returning function taking int" to "... cast
12053 to int, cast to int, cast to int".
12054
12055 * decl2.c (reparse_decl_as_expr): Recursive function to change
12056 parse nodes for `A()()' from "function returning function returning
12057 A" to "A().operator()".
12058
12059 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
12060 `typespec fcast_or_absdcl' rule.
12061 (fcast_or_absdcl): New nonterminal to implement late reduction of
12062 constructs like `A()()()()'.
12063 (typename): Replace `typespec absdcl1' rule with
12064 `typespec direct_abstract_declarator' rule.
12065 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
12066 with `fcast_or_absdcl type_quals' rule.
12067
6060a796 12068Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12069
12070 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
12071 matches Section 5.5.
12072
d11ad92e 12073Fri Mar 4 14:01:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12074
12075 * error.c (dump_type_prefix): Don't print basetype twice for
12076 pmfs.
12077
6060a796 12078Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12079
12080 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
12081 so that it is like setHandler(&A::handlerFn). Cures an `invalid
12082 lvalue in unary `&''.
12083
d11ad92e 12084Fri Mar 4 11:15:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12085
12086 * gxxint.texi (Copying Objects): New section discussing default
12087 op= problems with virtual inheritance.
12088
12089 * decl2.c (grokoptypename): Just does grokdeclarator and
12090 build_typename_overload, since the parser can't call grokdeclarator
12091 directly.
12092
12093 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
12094 and TREE_TYPE on generated identifiers.
12095
12096 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
12097
12098 * parse.y (parm): Convert `const char *' to `__opPCc' here.
12099
12100 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
12101 if we can't figure out what to do.
d11ad92e 12102 (dump_type*): Likewise.
7177d104
MS
12103
12104 * typeck2.c (build_m_component_ref): 'component' is an expr, not
12105 a decl. Also move the IS_AGGR_TYPE check after the stripping of
12106 REFERENCE_TYPE.
12107
6060a796 12108Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12109
12110 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
12111 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
12112 lvalue in unary `&''.
12113
d11ad92e 12114Thu Mar 3 12:38:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12115
12116 * parse.y: Add precedence specification for START_DECLARATOR.
12117 (type_quals): Move before primary.
12118 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
12119
12120 * decl2.c (grokoptypename): Lose.
12121
12122 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
12123 rather than waiting until later.
12124
d11ad92e 12125Wed Mar 2 14:12:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12126
12127 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
12128 than expanding it inline.
12129 (typename): Expand empty option of (former) absdcl inline.
d11ad92e 12130 (abs_or_notype_decl): Likewise.
7177d104
MS
12131 (absdcl): Lose empty rule.
12132 (conversion_declarator): New nonterminal for 'typename' of 'operator
12133 typename'.
12134 (operator_name): Use it instead of absdcl.
12135
12136 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
12137 TYPEOF, and SIGOF.
12138 (typed_declspecs): Accept typed_typespecs, rather than typespec
12139 directly. Add rules with reserved_typespecquals.
12140 (reserved_declspecs): Don't accept typespecqual_reserved at the
12141 beginning of the list. The typed_declspecs rule will deal with this
12142 omission.
12143 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
12144 directly.
12145
12146 * parse.y (direct_notype_declarator,
12147 direct_after_type_declarator, direct_abstract_declarator): Split up
12148 the declarator1 nonterminals to match the draft standard and avoid
12149 ambiguities.
12150 (new_type_id, new_declarator, direct_new_declarator,
12151 new_member_declarator): New nonterminals to implement the subset of
12152 'typename' allowed in new expressions.
12153 (unary_expr): Use new_type_id instead of typename.
12154 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
12155 (abs_member_declarator, after_type_member_declarator): Lose.
12156
12157 * parse.y (absdcl1): Don't require parens around
12158 abs_member_declarator.
12159 (abs_member_declarator): Lose see_typename from rules.
d11ad92e 12160 (after_type_member_declarator): Likewise.
7177d104
MS
12161
12162 * tree.c (get_identifier_list): New function, containing code
12163 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
12164 (get_decl_list): Use it.
d11ad92e 12165 (list_hash_lookup_or_cons): Likewise.
7177d104
MS
12166
12167 * parse.y (typed_declspecs, declmods): It's not necessary to hash
12168 the declspecs on class_obstack, so don't. This way typed_typespecs
12169 can reduce to typed_declspecs.
12170
d11ad92e 12171Wed Mar 2 14:29:18 1994 Jason Merrill <jason@cygnus.com>
7177d104
MS
12172
12173 * cvt.c (build_up_reference): If we aren't checking visibility,
12174 also allow base->derived conversions.
12175
d11ad92e 12176Mon Feb 28 15:14:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12177
12178 * typeck.c (build_c_cast): Remove bogus hack when converting
12179 to a reference type.
12180
12181 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
12182 Removed, not used.
12183 (lang_stype::methods, lang_decl::next_method): New fields.
12184 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
12185 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
12186
12187 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
12188 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
12189 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
12190 a non-inline virtual function to control emitting of vtables.
12191 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
12192 * search.c (build_vbase_vtables_init): Don't assemble_external
12193 (yet) if flag_vtable_hack.
d11ad92e 12194 * class.c (build_vfn_ref): Likewise.
7177d104 12195
d11ad92e 12196Mon Feb 28 14:54:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12197
12198 * parse.y (component_decl): Don't include "typed_declspecs
12199 declarator ';'" speedup, since it breaks enums.
12200
d11ad92e 12201Fri Feb 25 15:43:44 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12202
12203 * class.c (finish_struct): Minor optimization for building
12204 fn_fields list.
12205
d11ad92e 12206Fri Feb 25 15:23:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12207
12208 * decl.c (start_function): Fix detection of function overloading.
12209
6060a796 12210Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12211
12212 * lex.c (check_newline): #pragma interface can take a string
12213 argument, just like #pragma implementation. #pragma implementation
12214 checks for garbage on the line, line #pragma interface does. Main
12215 input files do not auto implement like named files, #pragma
12216 implementation must be used explicitly.
12217
d11ad92e 12218Thu Feb 24 17:09:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12219
12220 * parse.y (components): Handle list of one again.
d11ad92e 12221 (notype_components): Likewise.
7177d104
MS
12222 (after_type_declarator1): Take maybe_raises out again.
12223
12224 * gxxint.texi (Parser): Document additional r/r conflict.
12225
d11ad92e 12226Wed Feb 23 14:42:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12227
12228 * gxxint.texi (Parser): Add node.
12229
12230 * Makefile.in (stamp-parse): Update expected conflict count.
12231
12232 * parse.y (various): Replace "declmods declarator" with "declmods
12233 notype_declarator". The comment saying that "declmods declarator ';'"
12234 corresponds to "int i;" was wrong; it corresponds to "const i;".
12235 (component_decl): Add "typed_declspecs declarator ';'" rule; this
12236 *does* correspond to "int i;". Change "declmods components" to
12237 "declmods notype_components".
12238 (components): Don't deal with a list of one anymore.
12239 (notype_components): New nonterminal, corresponds to notype_declarator.
12240 ({after_,no}type_component_decl{,0}): More new nonterminals.
12241 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
12242 Eliminates four reduce/reduce conflicts.
12243
12244 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
12245 (nontrivial_exprlist): New nonterminal: A list of at least two
12246 expr_no_commas's.
12247 (nonnull_exprlist): Depend on nontrival_exprlist.
12248 Eliminates four reduce/reduce conflicts.
12249
12250 (named_class_head): Move intermediate code block into separate
12251 nonterminal so that we can stick %prec EMPTY on it.
12252
12253 Add more %prec EMPTY's to eliminate remaining shift/reduce
12254 conflicts.
12255
12256 (after_type_declarator): Add maybe_raises to fndecl rules.
12257 (after_type_declarator_no_typename): Remove.
12258 For correctness.
12259
12260 Document remaining reduce/reduce conflicts.
12261
d11ad92e 12262Tue Feb 22 12:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12263
12264 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
12265 (TYPE_BINFO (type)) if we care about the path.
12266
12267 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
12268 options are.
12269
6060a796 12270Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12271
12272 * Makefile.in (mostlyclean): lex.c is a source file, don't
12273 remove.
12274
d11ad92e 12275Sat Feb 19 01:27:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12276
12277 * parse.y: Eliminate 20 shift/reduce conflicts.
12278
d11ad92e 12279Fri Feb 18 11:49:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12280
12281 * pt.c (type_unification): Add subr argument; if set, it means
12282 that we are calling ourselves recursively, so a partial match is OK.
12283 (unify): Support pointers to methods and functions.
12284 (tsubst): Support method pointers.
12285 * decl.c (build_ptrmemfunc_type): No longer static, so that
12286 tsubst can get at it.
12287
12288 * init.c (is_aggr_typedef): Pretend template type parms are
12289 aggregates.
12290 * decl2.c (build_push_scope): If cname refers to a template type
12291 parm, just grin and nod.
12292
12293 * call.c (build_overload_call_real): Pass subr argument to
12294 type_unification.
d11ad92e
MS
12295 * pt.c (do_function_instantiation): Likewise.
12296 * class.c (instantiate_type): Likewise.
7177d104
MS
12297
12298 * search.c (get_base_distance): If BINFO is a binfo, use it and
12299 don't mess with its BINFO_INHERITANCE_CHAIN.
12300
12301 * cvt.c (convert_to_reference): Fix temporary generation.
12302 If ambiguous, return error_mark_node.
12303
12304 * init.c (build_new): Put back some necessary code.
12305
d11ad92e 12306Thu Feb 17 15:39:47 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12307
12308 * init.c (build_new): Deal with array types properly.
12309
12310 * search.c (get_binfo): Become a shell for get_base_distance.
12311 (get_binfo_recursive): Lose.
12312 (get_base_distance_recursive): Find the path to the via_virtual base
12313 that provides the most access.
d11ad92e 12314 (get_base_distance): Likewise.
7177d104
MS
12315
12316 * parse.y (explicit_instantiation): Syntax is 'template class
12317 A<int>', not 'template A<int>'.
12318
12319 * typeck.c (convert_for_initialization): Remove bogus warning.
12320
12321 * parse.y (datadef): Revert patch of Oct 27.
12322
d11ad92e 12323Thu Feb 17 15:12:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12324
12325 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
12326 rather than integer_type_node. Does wonders for the Alpha.
12327
d11ad92e 12328Thu Feb 17 13:36:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12329
12330 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
12331 goes onto the same obstack as its target type.
12332
d11ad92e 12333Wed Feb 16 00:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12334
12335 * cvt.c (convert_to_reference): If converting via constructor
12336 on local level, go back to build_cplus_new approach.
12337
12338 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
12339 to error_mark_node to prevent expand_expr from building a cleanup
12340 for this variable.
12341
12342 * lex.c (default_assign_ref_body): Return *this from the memcpy
12343 version, too.
12344
12345 * decl.c (grok_reference_init): Just return if called with
12346 error_mark_node, don't worry about initializing non-const reference
12347 with temporary.
12348
12349 * cvt.c (convert_to_reference): Do the right thing for
12350 non-aggregate reference conversions, pedwarn when generating a
12351 non-const reference to a temporary.
12352
12353 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
12354 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
12355 again.
12356
d11ad92e 12357Tue Feb 15 19:47:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12358
12359 * decl.c (grok_reference_init): Pawn off a lot of the work on
12360 convert_to_reference. Generally do the right thing.
12361
12362 * cvt.c (convert_to_reference): Conform to the initial comment;
12363 i.e. don't create temps if decl != error_mark_node. Handle
12364 cleanups better for temps that do get created. Don't pretend
12365 that we can use an 'A' to initialize a 'const double &' just by
12366 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
12367
12368 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
12369 constructor calls.
12370
d11ad92e 12371Mon Feb 14 14:50:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12372
12373 * decl.c (grok_reference_init): Make a temporary for initializing
12374 const reference from constant expression.
12375
d11ad92e 12376Mon Feb 14 11:31:31 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12377
12378 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
12379 * decl.c (pushdecl): Define decl in correct binding_level
12380 (which isn't always the inner_binding_level).
12381
12382 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
12383 It's ugly, and I don't think it's the right thing to do.
12384
12385 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
12386 Remove NEW_CLASS_SCOPING, assuming it is always 1.
12387 * decl.c (pop_decl_level): Removed; manually inlined.
12388
d11ad92e 12389Sun Feb 13 19:04:56 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12390
12391 * class.h (candidate): Add basetypes field.
12392
12393 * call.c (build_method_call): Do access checking after choosing a
12394 function, not before.
12395
12396 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
12397 (mostlyclean): Remove ../cc1plus.
12398
d11ad92e 12399Fri Feb 11 11:52:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12400
12401 * class.c (finish_struct): Don't allow adjusting access to a field
12402 of a base class if a local field has the same name.
12403
12404 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
12405
d11ad92e 12406hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
7177d104 12407
63718c49 12408 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
12409 with destructor names when either NO_DOLLAR_IN_LABEL or
12410 NO_DOT_IN_LABEL are not defined.
12411
12412 Now `template <class T, T f(T&), const T*> class A {...}' works.
12413
12414 * pt.c (grok_template_type): substitute template parm types
12415 with actual types in complex type as well.
12416 (coerce_template_parms): update the grok_template_type ()
12417 function call.
12418
12419 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
12420
12421 * decl.c (grok_op_properties): Allow operator++/-- to have
12422 default arguments.
12423
12424 * typeck2.c (store_init_value): Don't abort when called to
12425 initialize a type that needs constructing with a CONSTRUCTOR.
12426
12427 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
12428 store_init_value fails, build and expand an INIT_EXPR. If
12429 store_init_value succeeds, call expand_decl_init.
12430
6060a796 12431Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12432
12433 * class.c (build_vbase_path): Use complete_type_p instead of
12434 resolves_to_fixed_type_p to determine if the virtual bases are in
12435 their right place for the type of expr. Cures problem of thinking a
12436 virtual base class is one place, when it is in fact someplace else.
12437
6060a796 12438Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12439
12440 * init.c (resolve_offset_ref): Make sure we first convert to
12441 intermediate type, if given, when dealing with members off `this'.
12442 Solves an incorrrect `type `foo' is not a base type for type
12443 `multiple'' when it is infact, a base type.
12444
6060a796 12445Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12446
12447 * class.c (modify_other_vtable_entries): Use get_binfo, instead
12448 of binfo_value. Solves problem with compiler giving a `base class
12449 `B' ambiguous in binfo_value (compiler error)' on complex MI
12450 herarchies, when a virtual function is first defied in a virtual
12451 base class.
12452
6060a796 12453Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12454
12455 * class.c (build_vbase_path): Don't complain about ambiguous
12456 intermediate conversion when converting down to a virtual base
12457 class, even if they might seem to be ambiguous.
12458
d11ad92e 12459Thu Feb 10 12:18:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12460
12461 * typeck2.c (build_functional_cast): #if 0 out constructor
12462 inheritance code, improve error messages.
12463
12464 * class.c (finish_base_struct): Complain about base with only
12465 non-default constructors in derived class with no constructors.
12466
12467 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
12468
6060a796 12469Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12470
12471 * search.c (build_mi_virtuals, add_mi_virtuals,
12472 report_ambiguous_mi_virtuals): Removed unneeded code.
d11ad92e 12473 * class.c (finish_struct_bits): Likewise.
7177d104 12474
d11ad92e 12475Wed Feb 9 11:27:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12476
12477 * pt.c (end_template_instantiation): Push decl before
12478 pop_from_top_level.
12479
12480 * typeck2.c (build_m_component_ref): Make sure datum is of
12481 aggregate type.
12482
12483 * init.c (get_type_value): New function, returns
12484 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
12485
12486 * call.c (build_method_call): Don't die on call to destructor for
12487 non-type.
12488
12489 * decl.c (grokdeclarator): Complain about virtual op new and op
12490 delete, make static virtuals unvirtual instead of unstatic.
12491
12492 * typeck.c (build_c_cast): Also call default_conversion on
12493 methods.
12494
12495 * decl.c (grokdeclarator): Don't complain about anonymous
12496 bitfields.
12497
12498 * parse.y (simple_stmt, for loops): Move the continue point after
12499 the cleanups.
12500
12501 * class.c (finish_struct): Fix setting of
12502 TYPE_HAS_COMPLEX_INIT_REF.
12503
d11ad92e 12504Tue Feb 8 13:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12505
12506 * init.c (build_new): Deal with `new double (1)'.
12507
12508 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
12509 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
12510 TYPE_NEEDS_CONSTRUCTING.
12511
12512 * decl.c (duplicate_decls): Propagate access decls.
12513
12514 * typeck2.c (process_init_constructor): Accept empty_init_node
12515 for initializing unions.
12516
12517 * class.c, lex.c, cp-tree.h: Use
12518 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
12519 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
12520 some places.
12521
12522 * decl.c (finish_decl): Don't complain about uninitialized const
12523 if it was initialized before.
12524
d11ad92e 12525Mon Feb 7 18:12:34 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12526
12527 * lex.c (default_assign_ref_body): Don't deal with vbases for
12528 now.
12529
12530 * decl.c (finish_decl): Fix reversed logic for objects and other
12531 things that need to be constructed but have no initializer.
12532
12533 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
12534 set by grok_op_properties or finish_decl.
12535
12536 * decl.c: Don't warn about extern redeclared inline unless
12537 -Wextern-inline is given.
d11ad92e
MS
12538 * decl2.c (lang_decode_option): Likewise.
12539 * cp-tree.h: Likewise.
7177d104 12540
d11ad92e 12541Mon Feb 7 17:29:24 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12542
12543 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
12544 declaration.
12545
12546 * decl.c (pushdecl_with_scope): New function.
12547 * decl.c (pushdecl_top_level): Use new function.
12548 * decl.c (pushtag): Initialize newdecl.
12549 * decl.c (pushtag): Push new type decl into correct scope.
12550
d11ad92e 12551Mon Feb 7 14:42:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12552
12553 * call.c, cvt.c, init.c, search.c, cp-tree.h:
12554 Eradicate LOOKUP_PROTECTED_OK.
12555
d11ad92e 12556Mon Feb 7 13:57:19 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12557
12558 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
12559 'globalize' to signify implicit declarations.
12560 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
12561 * decl.c (set_identifier_type_value_with_scope): New function.
12562 * decl.c (set_identifier_local_value): Simplify.
12563 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
12564 forward declaration (followed by ';' and not preceded by 'friend').
12565 * class.c, decl.c, except.c, init.c, parse.y,
12566 pt.c, search.c: Add new argument to calls to xref_tag and
12567 pushtag.
12568
d11ad92e 12569Mon Feb 7 00:22:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12570
12571 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
12572 ACCESSIBLY_DERIVED_FROM_P meant before.
12573 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
12574
12575 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
12576
12577 * search.c (get_base_distance_recursive): Members and friends of
12578 a class X can implicitly convert an X* to a pointer to a private or
12579 protected immediate base class of X.
d11ad92e 12580 (get_binfo_recursive): Likewise.
7177d104
MS
12581 (get_base_distance): Ignore ambiguity if PROTECT < 0.
12582 (get_binfo): Lose multiple values of PROTECT.
12583 (compute_access): Protected is OK if the start of the
12584 search is an accessible base class of current_class_type.
12585
12586 * method.c (build_opfncall): Do check access on operator new here.
12587
12588 * decl.c (finish_function): Don't check access on operator new
12589 here.
12590
d11ad92e 12591Sun Feb 6 14:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12592
12593 * decl.c (xref_tag): The base of a derived struct is NOT always
12594 public. Duh.
12595
12596 * pt.c (do_explicit_instantiation): New function, called from
12597 parser to do explicit function instantiation.
12598 (type_unification): Allow the args list to be terminated with
12599 void_list_node.
12600 (do_pending_expansions): Look at i->interface for non-member
12601 templates.
12602
12603 * parse.y (datadef): Move explicit_instantiation here.
12604 (structsp): From here.
12605 (datadef): Complain about `int;'.
12606
d11ad92e 12607Sun Feb 6 12:33:18 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12608
12609 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
12610 second parameter, and simplify first from a TREE_LIST where
12611 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
12612 * pt.c (instantiate_member_templates): Simplify argument list
12613 from a TREE_LIST to just an IDENTIFIER.
12614 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
12615 * parse.y (template_instantiate_once): Simplify accordingly.
12616 * decl.c (inner_binding_level): New. Use various places to
12617 simplify.
12618
d11ad92e 12619Sun Feb 6 02:49:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12620
12621 * typeck2.c (build_functional_cast): int() -> int(0).
12622
d11ad92e 12623Sat Feb 5 00:53:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12624
12625 * class.c (finish_struct): Don't do a bitwise copy for op= if the
12626 class has a virtual function table.
12627
12628 * typeck.c (convert_for_initialization): Restore warnings about
12629 not using defined op=. Should really be my_friendly_aborts, I
12630 s'pose.
12631
d11ad92e 12632Fri Feb 4 14:21:00 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12633
12634 * class.c (finish_struct): Tidy up conditions for doing bitwise
12635 copies of objects.
12636
12637 * decl.c (build_default_constructor): #if 0 out.
12638
12639 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
12640 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
12641
12642 * decl.c (grokdeclarator): Don't return void_type_node for
12643 friends being defined here.
12644
12645 * init.c (perform_member_init): Only do the init if it's useful.
12646
12647 * lex.c (default_copy_constructor_body): If we don't need to do
12648 memberwise init, just call __builtin_memcpy.
d11ad92e 12649 (default_assign_ref_body): Likewise.
7177d104
MS
12650
12651 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
12652
6060a796 12653Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12654
12655 * lex.c (reinit_parse_for_method, cons_up_default_function):
12656 Don't give warn_if_unknown_interface warning when it came from a
12657 system header file.
d11ad92e
MS
12658 * pt.c (end_template_decl, instantiate_template): Likewise.
12659 * decl.c (start_decl): Likewise.
7177d104 12660
d11ad92e 12661Fri Feb 4 00:41:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12662
12663 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
12664 enums.
12665
12666 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
12667 IS_AGGR_TYPE, since we don't know it's a type.
12668
d11ad92e 12669Thu Feb 3 11:36:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12670
12671 * decl.c (grokdeclarator): Don't complain about anonymous unions.
12672
12673 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
12674 anonymous, but had a name given to it by a typedef.
12675
12676 * decl.c (grokdeclarator): When renaming an anonymous struct, set
12677 TYPE_WAS_ANONYMOUS.
12678
12679 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
12680
12681 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
12682
12683 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
12684 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
12685
12686 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
12687 anonymous structs that get typedef'd.
12688
12689 * decl.c (grokdeclarator): Always return void_type_node for
12690 friends.
12691
12692 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
12693 friends.
12694 (dump_function_decl): Don't print out default args for
12695 a function used in an expression.
12696
12697 * decl.c (grokdeclarator): Give error on abstract declarator used
12698 in an invalid context (i.e. `void (*)();').
12699
12700 * error.c (cp_line_of): Support _TYPE nodes.
d11ad92e 12701 (cp_file_of): Likewise.
7177d104
MS
12702
12703 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
12704 it can happen for the RHS of an assignment stmt where the LHS is
12705 a COND_EXPR.
12706
12707 * init.c (expand_aggr_init_1): Deal with bracketed initializer
12708 lists properly.
12709
12710 * class.c (finish_struct): Deal with enumerators and typedefs
12711 again.
12712
d11ad92e 12713Wed Feb 2 11:30:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12714
12715 * class.c (finish_struct): Tidy up loop over fields.
12716
12717 * errfn.c (cp_thing): Don't advance twice after a format.
12718
12719 * class.c (finish_struct): Complain about needing a constructor
12720 if a member has only non-default constructors, and don't try to
12721 generate a default constructor.
12722
12723 * decl.c (finish_decl): Also do the constructor thing if
12724 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
12725
12726 * search.c (unuse_fields): New function: mark all fields in this
12727 type unused.
12728 (dfs_unuse_fields): Helper function.
12729
12730 * class.c (pushclass): If the new class is the same as the old
12731 class, still unuse the fields.
12732 (unuse_fields): Move to search.c.
12733
12734 * decl.c (grok_op_properties): Add friendp argument.
12735 (grokfndecl): Pass it.
d11ad92e 12736 (start_method): Likewise.
7177d104
MS
12737
12738 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
12739 ::delete calls.
12740
12741 * parse.y (unary_expr): Pass new parameter to delete_sanity.
12742
12743 * lex.c (default_copy_constructor_body): Don't choke if the union
12744 has no fields.
d11ad92e 12745 (default_assign_ref_body): Likewise.
7177d104
MS
12746
12747 * call.c (compute_conversion_costs_ansi): Do the right thing for
12748 ellipsis matches.
12749
12750 * decl.c (push_to_top_level): Optimize.
12751
12752 * decl.c (start_function): Look for the lexical scope of a friend
12753 in DECL_CLASS_CONTEXT.
12754
12755 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
12756
d11ad92e 12757Tue Feb 1 15:59:24 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12758
12759 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
12760
12761 * init.c (init_init_processing): Don't assign BIN/BID to the
12762 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
12763 (build_new): Check TREE_GETS_PLACED_NEW.
12764
12765 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
12766 op new with placement, set TREE_GETS_PLACED_NEW.
12767
12768 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
12769
12770 * class.c (finish_struct): Don't treat anonymous unions like
12771 other aggregate members. Do synthesize methods for unions without
12772 a name, since they may or may not be "anonymous unions".
12773
12774 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
12775 in anonymous unions.
12776
12777 * lex.c (default_copy_constructor_body): Support unions.
d11ad92e 12778 (default_assign_ref_body): Likewise.
7177d104 12779
d11ad92e 12780Mon Jan 31 12:07:30 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12781
12782 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
12783
12784 * error.c (args_as_string): New function (%A), like type_as_string
12785 except NULL_TREE -> "..."
12786
12787 * call.c (build_overload_call_real): Fix for new overloading.
12788
12789 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
12790 here.
12791
12792 * parse.y (operator_name): Instead of here.
12793
12794 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
12795 of functions.
12796
12797 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
12798
12799 * method.c (build_opfncall): Don't need to massage return value
12800 any more, call build_overload_call with all flags.
12801
12802 * typeck.c (build_x_binary_op): Put back speculative call to
12803 build_opfncall.
d11ad92e
MS
12804 (build_x_unary_op): Likewise.
12805 (build_x_conditional_expr): Likewise.
7177d104 12806
6060a796 12807Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12808
12809 * cvt.c (build_type_conversion_1): Change call to pedwarn into
12810 warning, and conditionalize upon warn_cast_qual.
12811
d11ad92e 12812Fri Jan 28 11:48:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12813
12814 * search.c (lookup_field): If xbasetype is a binfo, copy it to
12815 avoid clobbering its inheritance info.
12816
12817 * call.c (build_method_call): Don't overwrite basetype_path with
12818 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
12819
12820 * search.c (compute_access): Fix handling of protected inheritance
12821 and friendship with the enclosing class.
12822
12823 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
12824 initialization of arbitrary variable.
12825
12826 * typeck2.c (build_functional_cast): Only try calling a method if
12827 one exists.
12828
12829 * decl.c (grokdeclarator): Move handling of constructor syntax
12830 initialization into first loop for generality.
12831 (parmlist_is_random): Lose.
12832
12833 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
12834 to default function.
12835
d11ad92e 12836Thu Jan 27 19:26:51 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12837
12838 * decl.c (grokparms): Abort if we get called with something we don't
12839 expect.
12840
6060a796 12841Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12842
12843 * call.c (build_overload_call_real): Change argument complain to
12844 flags to match style of rest of code. Pass it down to
12845 build_function_call_real as necessary.
12846 * call.c (build_overload_call, build_overload_call_maybe): Change
12847 argument complain to flags to match style of rest of code.
12848 * cp-tree.h (build_function_call_real): Added fourth flags
12849 argument.
12850 * cvt.c (convert_to_reference): Only give warning messages, if
12851 LOOKUP_COMPLAIN is set.
12852 * typeck.c (build_x_function_call): Change simple complain
12853 argument to build_overload_call_maybe and build_overload_call, to
12854 LOOKUP_COMPLAIN to match style of rest of code.
d11ad92e 12855 * typeck2.c (build_functional_cast): Likewise.
7177d104
MS
12856 * typeck.c (build_function_call_real): Add flags, so that we can
12857 not complain, if we don't want to complain. Complain about
12858 arguments, if we are complaining, otherwise don't.
12859 * typeck.c (build_function_call, build_function_call_maybe):
12860 Stick in flags argument.
12861 * typeck.c (build_x_binary_op, build_x_unary_op,
12862 build_x_conditional_expr, build_x_compound_expr): Follow style of
12863 build_x_indirect_ref, as it is more correct and more common.
12864
d11ad92e 12865Thu Jan 27 14:36:20 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12866
12867 * call.c (build_method_call): Don't check for being called with
12868 a pointer.
12869
12870 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
12871 static initializer function.
12872
12873 * init.c (build_member_call): Use convert_force here, too.
12874
12875 * search.c (compute_access): Only treat static members specially
12876 if they are referenced directly.
12877
d11ad92e 12878Wed Jan 26 18:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12879
12880 * gxxint.texi (Access Control): New node.
12881
12882 * search.c (current_scope): New function; returns whichever of
12883 current_class_type and current_function_decl is the most nested.
12884 (compute_access): Total overhaul to make it clearer and more
12885 correct. Don't use the cache for now; in the only situation where
12886 it was used before, it gained nothing. This frees up three of the
12887 DECL_LANG_FLAGs for possible other use!
12888
12889 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
12890
12891 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
12892
12893 * call.c (build_method_call): Use convert_force to cast `this' --
12894 rely on the access checking for the method itself.
12895
12896 * init.c (is_friend): Do the nesting thing, handle types. I am
12897 my own friend.
12898 (is_friend_type): Become a shell for is_friend.
12899 (add_friend): Never stick in ctype.
12900 Why are the friendship functions in init.c, anyway?
12901
6060a796 12902Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12903
12904 * cvt.c (build_type_conversion_1): Don't conditionalize call to
12905 pedwarn upon pedantic.
12906
6060a796 12907Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12908
12909 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
12910 gets a warning if one tries to initialize a non-const & from a
12911 non-lvalue.
12912 * cvt.c (convert_to_reference): Use %P format for argument
12913 numbers in warnings.
12914
6060a796 12915Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12916
12917 * init.c (build_delete): Follow style in call.c to construct the
12918 virtual call to the desctructor, as that code is right. Fixes a
12919 problem of the compiler saying a pointer conversion is ambiguous.
12920
d11ad92e 12921Wed Jan 26 11:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12922
12923 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
12924 VTABLE_NAME_FORMAT to VTABLE_NAME.
12925
12926 * *: s/visibility/access/g
12927
d11ad92e 12928Tue Jan 25 18:39:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12929
12930 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
12931
6060a796 12932Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12933
12934 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
12935 they break libg++.
12936
d11ad92e 12937Tue Jan 25 13:11:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12938
12939 * decl.c (duplicate_decls): Fix pointer arithmetic.
12940
d11ad92e 12941Mon Jan 24 15:50:06 1994 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
12942
12943 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
12944 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
12945 clauses on a declaration.
12946
d11ad92e 12947Mon Jan 24 17:06:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12948
12949 * class.c (finish_struct): Do synthesize methods for anon
12950 structs, just not unions.
12951
d11ad92e 12952Mon Jan 24 13:50:13 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12953
12954 * decl.c (xref_tag): handle anonymous nested type.
12955 * decl.c (globalize_nested_type): add no globalize bit check.
12956 * spew.c (hack_more_ids) : templated nested decl not push top
12957 level.
12958
12959 * parse.y : get rid of 'goto do_components'. It is much better
12960 for debugging.
12961
12962 * decl.c (is_anon_name): get rid of the function and use the
12963 macro ANON_AGGRNAME_P.
12964 * pt.c : ditto.
12965
d11ad92e 12966Fri Jan 21 14:06:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12967
12968 * class.c (finish_struct): Don't synthesize any methods for
12969 anonymous structs/unions.
12970
12971 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
12972
d11ad92e 12973Thu Jan 20 18:56:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12974
12975 * method.c (build_opfncall): Call build_indirect_ref on
12976 synthesized instance for operator delete.
12977
12978 * pt.c (type_unification): Don't abort if called with a list of
12979 types in ARGS.
12980
12981 * class.c (instantiate_type): Deal with function templates.
12982
d11ad92e 12983Thu Jan 20 16:55:35 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
12984
12985 * Makefile.in (CC): Default to cc not gcc.
12986
d11ad92e 12987Thu Jan 20 13:47:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12988
12989 * typeck.c (build_modify_expr): Call constructor if appropriate.
12990
12991 * decl.c (push_to_top_level): Clear out class-level bindings cache.
12992
d11ad92e 12993Wed Jan 19 13:51:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12994
12995 * call.c (resolve_scope_to_name): Work recursively (previously only
12996 looked down one level).
12997
12998 * lex.c (do_pending_inlines): If we're still dealing with the last
12999 batch of inlines, don't start working on a new one.
13000
13001 * Makefile.in (stamp-parse): Update conflict count.
13002 (TAGS): Fix.
13003
13004 * parse.y (explicit_instantiation): New rule; implements
13005 'template A<int>' syntax (though not 'template foo(int)' yet).
13006 (structsp): Add explicit_instantiation.
13007
d11ad92e 13008Tue Jan 18 13:53:05 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13009
13010 * class.c (finish_struct, etc.): Simplify decision to synthesize
13011 a destructor.
13012
13013 * call.c, class.c, cp-tree.h, decl.c, init.c,
13014 ptree.c, search.c, typeck.c, typeck2.c: Nuke
13015 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
13016 * init.c (expand_aggr_init_1): Don't try non-constructor methods
13017 of initializing objects.
13018 (build_new): Don't try other methods if the constructor lookup fails.
13019
13020 * class.c (finish_base_struct): Set cant_have_default_ctor and
13021 cant_synth_copy_ctor properly.
d11ad92e 13022 (finish_struct): Likewise.
7177d104 13023
d11ad92e 13024Mon Jan 17 13:58:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13025
13026 * typeck.c (build_modify_expr_1): #if 0 out again.
13027 (build_modify_expr): #if 0 out memberwise init code again.
13028
13029 * lex.c (default_copy_constructor_body): Be const-correct.
d11ad92e 13030 (default_assign_ref_body): Likewise.
7177d104
MS
13031
13032 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
13033 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
13034 (expand_aggr_init): Disable silent conversion from initializer list
13035 to list of args for a constructor.
13036
13037 * class.c (base_info): Lose needs_default_ctor.
d11ad92e
MS
13038 (finish_base_struct): Likewise.
13039 (finish_struct): Likewise.
7177d104
MS
13040
13041 * decl.c (init_decl_processing): Don't turn off flag_default_inline
13042 just because flag_no_inline is on.
13043 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
13044 constructor.
13045
13046 * class.c (finish_struct): Synthesize default ctor whenever
13047 allowed.
13048
13049 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
13050
6060a796 13051Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13052
13053 * Makefile.in, configure: Handle the C++ front-end in a
13054 subdirectory.
13055 * cp-*: Move C++ front-end to cp/*.
13056
d11ad92e 13057Fri Jan 14 14:09:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13058
13059 * cp-typeck.c (build_function_call_real): Modify to match other
13060 instances of taking the address of the function.
13061
13062 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
13063 there are non-synthesized constructors.
13064 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
13065 Always generate copy constructor if possible.
13066
13067 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
13068 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
13069
13070 * cp-lex.c (default_copy_constructor_body): Use init syntax
13071 for all bases.
13072
13073 * cp-type2.c (store_init_value): Only give error for initializer list
13074 if TYPE_HAS_REAL_CONSTRUCTOR.
13075
d11ad92e 13076Thu Jan 13 15:38:29 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13077
13078 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
13079 (lang_decl): Add synthesized bitfield to decl_flags.
13080
13081 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
13082 artificial methods, rather than a line # of 0.
13083
d11ad92e 13084Fri Jan 14 18:25:29 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13085
13086 * cp-decl (xref_tag): fix a bug in conflict type.
13087 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
13088 type reference.
13089 * cp-spew.c (yylex) : generated SCOPED_NAME token.
13090 * cp-lex.c (yyprint): handle SCOPED_NAME.
13091
6060a796 13092Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13093
13094 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
13095 not right.
13096
d11ad92e 13097Thu Jan 13 14:00:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13098
13099 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
13100 have type_flags.
13101
6060a796 13102Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13103
13104 Ensure that all vtable pointers are initialized with all the right
13105 values.
13106
13107 * cp-class.c (is_normal): Changed to reflect new meaning of
13108 CLASSTYPE_VFIELD_PARENT.
13109 * cp-class.c (maybe_fixup_vptrs): Use of
13110 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
13111 BINFO_MODIFIED instead.
13112 * cp-class.c (finish_struct): Changed to reflect new meaning of
13113 CLASSTYPE_VFIELD_PARENT.
13114 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
13115 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
13116 coding it here.
13117 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
13118 re-implement.
13119 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
13120 * cp-tree.h (vfield_parent): Changed to integer.
13121 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
13122 meaning.
13123 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
13124
d11ad92e 13125Wed Jan 12 18:24:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13126
13127 * cp-decl.c (xref_tag): re-implement globalize nested type.
13128 * cp-decl2.c (grok_x_components): ditto.
13129 * cp-parse.y: ditto.
13130 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
13131
d11ad92e 13132Wed Jan 12 14:08:09 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13133
13134 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
13135 decls with a definition attached.
13136
13137 * cp-typeck.c (build_modify_expr): Undo previous change in the case
13138 of INIT_EXPRs.
13139
d11ad92e 13140Tue Jan 11 19:33:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13141
13142 * cp-typeck.c (build_modify_expr): Replace code for generating
13143 assignment semantics for classes with an error.
13144 (build_modify_expr_1): #if 0 out.
13145
13146 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
13147 behavior for overloaded functions (it doesn't push anything).
13148
13149 * cp-class.c (finish_struct): When generating default op=,
13150 set TYPE_HAS_ASSIGNMENT.
13151
6060a796 13152Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13153
13154 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
13155 invalid.
13156 * cp-typeck.c (convert_for_assignment): Simplify.
13157 * cp-decl2.c (warn_enum_clash): Removed.
13158 * invoke.texi (-Wenum-clash): Removed.
13159 * toplev.c (-Wenum-clash): Removed.
13160
d11ad92e 13161Mon Jan 10 17:48:37 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13162
13163 * cp-decl.c (finish_decl): fix incorrect popclass call.
13164
13165 * cp-decl.c (is_anon_name): new function, check whether the name
13166 is anonymous name generated by compiler.
13167 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
13168 * cp-spew.c (hack_more_ids): handle nested type in template.
13169 * cp-parse.y : handle nested type reference in uninstantiated
13170 template.
13171 * cp-call.c (build_method_call): handle uninstantiated template
13172 case.
13173 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
13174 type in template.
13175 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
13176 type by name.
13177 * cp-pt.c (tsubst): handle nested type search by name.
13178
d11ad92e 13179Mon Jan 10 14:32:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13180
13181 * cp-init.c (build_member_call): Propagate qualifiers to new type.
13182
13183 * cp-call.c (build_method_call): Count functions the new way.
13184
d11ad92e 13185Fri Jan 7 19:03:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13186
13187 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
13188 too.
13189
d11ad92e 13190Tue Jan 4 16:45:51 1994 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13191
13192 * cp-parse.y: change to handle whether to globalize nested class.
d11ad92e 13193 * cp-decl.c(xref_tag, maybe_globalize_type): Likewise.
7177d104 13194
d11ad92e 13195Mon Jan 3 22:22:32 1994 Gerald Baumgartner <gb@cygnus.com>
7177d104
MS
13196
13197 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
13198 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
13199 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
13200 gplus.gperf toplev.c: Incorporated C++ signature extension.
13201 * cp-sig.c: New file, contains most of signature processing.
13202 * cp-hash.h: Regenerated from gplus.gperf.
13203
13204 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
13205 and `-fno-handle-signatures' command line flags.
13206
13207 * gcc.texi: Changed the last-modification date.
13208 * invoke.texi: Added `-fhandle-signatures' in the list of
13209 C++ language options. Added explanation for this option.
13210
6060a796 13211Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13212
13213 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
13214 harsh here.
13215
6060a796 13216Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13217
13218 * cp-pt.c (do_pending_expansions): Decide to expand a template
13219 member function, based upon it's class type, not the class type of
13220 the first place it was declared.
13221
6060a796 13222Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13223
13224 * cp-class.c (is_normal): New routine, use to determine when the
13225 given binfo is the normal one. (The one that should have the simple
13226 vtable name.)
13227 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
13228 to check if two fndecls are `the same'. Sometimes this routine can
13229 modify the main vtable, and normal should be 1, in that case, so use
13230 is_normal() to determine if this is the main vtable for the class.
13231 Don't recurse down virtual bases, as they are shared, and we take
13232 care of them elsewhere.
13233 * cp-class.c (modify_vtable_entries): If we have already updated the
13234 vtable with the new virtual, don't do it again.
13235 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
13236 appropriate. Do virtual function overriding in virtual bases, after
13237 normal overriding, so that the base function list in DECL_VINDEX is
13238 not overridden, before we have a chance to run through the list.
13239 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
13240 Make sure we pass the right address into modify_vtable_entries.
13241 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
13242 binfo is the one that has the vtable that we based our vtable on.
13243
d11ad92e 13244Fri Dec 24 09:40:52 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
13245
13246 * cp-typeck.c (c_expand_start_case): Use default_conversion to
13247 convert expression from reference type if necessary.
13248
d11ad92e 13249Wed Dec 22 17:58:43 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13250
13251 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
13252 trying to read its TREE_VALUE.
13253
13254 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
13255 (finish_struct): Instead of here.
13256
d11ad92e 13257Tue Dec 21 14:34:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13258
13259 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
13260 have TYPE_PTRMEMFUNC_P set before we try to build its
13261 CLASSTYPE_ID_AS_LIST.
13262 (get_decl_list): Likewise, when trying to read it.
13263
13264 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
13265 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
13266
d11ad92e 13267Mon Dec 20 13:35:03 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13268
13269 * cp-typeck.c (rationalize_conditional_expr): New function.
13270 (unary_complex_lvalue): Use it.
13271 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
13272 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
13273 SAVE_EXPR either.
13274
13275 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
13276 (lang_decode_option): Set warn_return_type, not explicit_*, for
13277 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
13278 decide if it should go into jump_optimize or not.
13279 * cp-tree.h (explicit_warn_return_type): Deleted.
13280 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
13281 (finish_function): Also complain about no return in a non-void fn if
13282 we're being pedantic (don't rely on use of -Wreturn-type).
13283
d11ad92e 13284Fri Dec 17 15:45:46 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13285
13286 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
13287 static if it's being done inside another function.
13288
13289 * cp-search.c (compute_visibility): Check for friendship both ways.
13290
d11ad92e 13291Fri Dec 17 14:28:25 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13292
13293 * cp-cvt.c (build_default_binary_type_conversion): Make error
13294 messages more helpful.
13295
13296 * cp-error.c (op_as_string): New function, returns "operator =="
13297 given EQ_EXPR or suchlike.
13298
d11ad92e 13299Fri Dec 17 13:28:11 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13300
13301 * cp-call.c (print_n_candidates): New function.
13302 (build_overload_call_real): Use it when we complain about a call
13303 being ambiguous.
13304
d11ad92e 13305Fri Dec 17 12:41:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13306
13307 * cp-call.c (build_method_call): Fix checking for static call
13308 context.
13309
13310 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
13311 to operator new.
13312
13313 * cp-init.c (build_new): Don't mess with rval when building
13314 indirect ref.
13315
d11ad92e 13316Thu Dec 16 16:48:05 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13317
13318 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
13319 NAME(type) may not be exist. It's not a problem for old compiler.
13320
d11ad92e 13321Thu Dec 16 14:46:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13322
13323 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
13324 never used for anything.
13325 (struct lang_type, member type_flags): Delete field
13326 `alters_visibility', and up `dummy' by 1.
13327 * cp-class.c (finish_base_struct): Delete code that copies the
13328 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
13329 (finish_struct): Delete code that sets it.
13330
d11ad92e 13331Thu Dec 16 14:44:39 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13332
13333 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
13334 build_method_call that I messed up before.
13335
13336 * cp-search.c (get_base_distance): If protect > 1, allow immediate
13337 private base.
13338
13339 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
d11ad92e 13340 (finish_struct): Likewise. Well, nigh-correctly; it won't deal
7177d104
MS
13341 properly with the case where a class contains an object of an
13342 ambiguous base class which has a protected op=. Should be fixed
13343 when the access control code gets overhauled.
13344 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
13345
d11ad92e 13346Thu Dec 16 12:17:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13347
13348 * cp-lex.c (real_yylex): Turn the code back on that deals with
13349 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
13350 avoid the ambiguity problems that led to it being turned off in the
13351 first place.
13352
13353 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
13354 to see if something is a method.
13355
6060a796 13356Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13357
13358 * cp-typeck.c (build_modify_expr): Avoid error messages on small
13359 enum bit fields.
13360 * cp-typeck.c (convert_for_assignment): Add missing argument to
13361 cp_warning and cp_pedwarn calls.
13362
d11ad92e 13363Wed Dec 15 18:25:32 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13364
13365 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
13366 initializers; it's just anachronistic.
13367
13368 * cp-decl.c (finish_decl): Don't require external-linkage arrays
13369 to have a complete type at declaration time when pedantic.
13370
d11ad92e 13371Tue Dec 14 11:37:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13372
13373 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
13374
13375 * cp-call.c (build_method_call): Don't dereference pointer given
13376 as instance.
13377
13378 * cp-decl.c (finish_function): Don't pass pointer to
13379 build_method_call.
d11ad92e 13380 (finish_function): Likewise.
7177d104 13381
d11ad92e 13382 * cp-typeck.c (build_x_function_call): Likewise.
7177d104 13383
d11ad92e 13384 * cp-method.c (build_component_type_expr): Likewise.
7177d104 13385
d11ad92e
MS
13386 * cp-init.c (build_member_call): Likewise.
13387 (build_new): Likewise.
7177d104 13388
d11ad92e 13389Mon Dec 13 18:04:33 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13390
13391 * cp-decl.c (xref_tag): fix regression created by changes made
13392 in Dec. 7 1993.
13393 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
13394
d11ad92e 13395Fri Dec 10 12:40:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13396
13397 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
13398 out the final evaluation of the function, so we can see if ELLIPSIS,
13399 USER, and EVIL were set at the end.
13400
13401 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
13402 only go for setting TRIVIAL_CODE if we are dealing with types that
13403 are compatible.
13404
6060a796 13405Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13406
13407 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
d11ad92e
MS
13408 * toplev.c (lang_options): Likewise.
13409 * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise.
7177d104 13410 * cp-decl.c (delta_type_node): New type for delta entries.
d11ad92e 13411 * cp-tree.h (delta_type_node): Likewise.
7177d104
MS
13412 * cp-decl.c (init_decl_processing): Setup delta_type_node.
13413 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
13414 delta_type_node instead of short_integer_type_node.
d11ad92e 13415 * cp-class.c (build_vtable_entry): Likewise.
7177d104 13416
d11ad92e 13417Thu Dec 9 16:19:05 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13418
13419 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
13420 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
13421 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
13422
6060a796 13423Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13424
13425 * cp-decl.c (finish_decl): Make sure things that can go into
13426 "common", do go into common, if -fcommon is given.
13427
d11ad92e 13428Wed Dec 8 13:01:54 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104 13429
63718c49
GB
13430 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
13431 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
13432 argument matching diagnostics to make instantly clear what the
13433 compiler is doing.
7177d104
MS
13434
13435 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
13436 then check to see if the penalty was increased due to
13437 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
13438
d11ad92e 13439Tue Dec 7 18:29:14 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13440
13441 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
13442 problem.
13443
d11ad92e 13444Tue Dec 7 16:09:34 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13445
13446 * cp-class.c (finish_struct): Before synthesizing methods, if no
13447 methods have yet been declared then set nonprivate_method. Don't
13448 set non_private method after synthesizing a method.
13449
13450 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
13451 is set, tie emitted code to the location of template instantiation,
13452 rather than definition.
13453
13454 * cp-tree.h: Declare flag_alt_external_templates.
13455
13456 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
13457
d11ad92e 13458 * toplev.c (lang_options): Likewise.
7177d104 13459
d11ad92e 13460Mon Oct 4 12:50:02 1993 Chip Salzenberg <chip@fin.uucp>
7177d104 13461
63718c49
GB
13462 [changes propagated from 930810 snapshot]
13463 * cp-decl.c (init_decl_processing): Make long long available for use
13464 as SIZE_TYPE and PTRDIFF_TYPE.
13465 (finish_decl): Allow file-scope static incomplete array.
13466 (grokdeclarator): Don't pass on const and volatile fron function
13467 value type to function type.
13468 Warn here for volatile fn returning non-void type.
13469 * cp-parse.y (attrib): Accept attributes `volatile' with alias
13470 `noreturn', and `const'.
13471 * cp-typeck.c (default_conversion): Don't lose const and volatile.
13472 (build_binary_op_nodefault): Generate pedantic warning for comparison
13473 of complete pointer type with incomplete pointer type.
13474 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104 13475
d11ad92e 13476Tue Dec 7 10:46:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13477
13478 * cp-init.c (expand_vec_init): When creating a temporary for copying
13479 arrays, use the type of the source, not the target.
13480
13481 * cp-cvt.c (convert): Pass an argument for errtype to
13482 convert_to_reference.
13483
13484 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
13485 methods, -> and `this'.
13486
d11ad92e 13487Mon Dec 6 17:12:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13488
13489 * cp-error.c (parm_as_string): New function; returns `this' or arg
13490 number. Corresponds to %P.
13491 (dump_expr): Deal with method calls.
13492
13493 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
d11ad92e 13494 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104
MS
13495 (warn_for_assignment): Lose.
13496
d11ad92e 13497Mon Dec 6 11:33:35 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13498
13499 * cp-call.c (ideal_candidate_ansi): Delete code that was never
13500 doing anything useful. Instead, sort once, and DO NOT wipe
13501 out any codes with EVIL_CODE, since that's what we use as a
13502 marker for the end of the list of candidates.
13503
13504 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
13505
d11ad92e 13506Mon Dec 6 12:49:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13507
13508 * cp-init.c (get_aggr_from_typedef): New function, like
13509 is_aggr_typedef but returns the _TYPE.
13510
13511 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
13512
d11ad92e 13513Sun Dec 5 18:12:48 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13514
13515 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
13516
d11ad92e 13517Thu Nov 25 23:50:19 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13518
13519 Delay language context change until beginning of next decl.
13520
13521 * cp-lex.h (c_header_level): Removed.
13522 (pending_lang_change): Declared.
13523 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
13524 (pending_lang_change): Defined.
13525 (check_newline): Rework code that recognizes line number and
13526 filename changes. Instead of pushing and popping lang context,
13527 increment and decrement pending_lang_change.
13528 (do_pending_lang_change): Push and pop lang context according
13529 to value of pending_lang_change.
13530 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
13531 (extdef): Same as extdef, but call do_pending_lang_change() first.
13532
d11ad92e 13533Mon Nov 15 15:39:15 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13534
13535 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
13536 compare of ptr with 0 only if pedantic in both cases.
13537
d11ad92e 13538Thu Nov 25 13:31:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13539
13540 Reinstate the below patch, which got lost in the Cygnus merge:
13541 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
13542 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
13543
d11ad92e 13544Wed Nov 17 19:03:30 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13545
13546 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
13547
d11ad92e 13548Fri Oct 22 20:43:37 1993 Paul Eggert <eggert@twinsun.com>
7177d104
MS
13549
13550 * cp-lex.c (real_yylex): Diagnose floating point constants
13551 that are too large.
13552
d11ad92e 13553Wed Nov 17 19:10:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13554
13555 * cp-type2.c (build_functional_cast): ARM page 16: When a class
13556 and an object, function or enumerator are declared in the same
13557 scope with the same name, the class name is hidden.
13558
d11ad92e 13559Wed Nov 17 19:07:18 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13560
13561 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
13562 and long double from each other when overloading.
13563 (compute_conversion_costs_{ansi,old}, build_method_call,
13564 build_overlay_call_real, convert_to_aggr): Always set and
13565 always use H_LEN member of candidate structure.
13566
d11ad92e 13567Mon Oct 11 23:10:53 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13568
13569 * cp-decl.c (duplicate_decls): Note redeclarations of library
13570 functions, and generate distinct warnings for them.
13571
d11ad92e 13572Mon Oct 4 12:26:49 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13573
13574 Support format warnings in G++.
13575
13576 * cp-tree.h: Protect against multiple inclusion.
13577 Declare all public functions in c-common.c (copy from c-tree.h).
13578 (STDIO_PROTO): Define.
13579 (warn_format): Declare.
13580 (record_format_info): Remove declaration.
13581 * cp-decl.c (init_decl_processing): Call init_function_format_info.
13582 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
13583 * cp-typeck.c (build_function_call_real): Call check_function_format.
13584 (record_format_info): Remove -- obsolete stub.
13585
d11ad92e 13586Sat Jul 24 12:04:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13587
13588 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
13589 following an extern one (for -Wredundant-decls).
13590 * cp-parse.y (primary): In statement expression case, if compstmt
13591 returns something other than a BLOCK, return it unchanged.
13592
d11ad92e 13593Thu Dec 2 20:44:58 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13594
13595 * cp-decl.c (warn_extern_redeclared_static): New function made
13596 from code extracted from pushdecl.
13597 (duplicate_decls, pushdecl): Call new function.
13598 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
13599 to be a TREE_LIST when function is declared in 'extern "C" {}'.
13600
d11ad92e 13601Fri Dec 3 16:01:10 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13602
13603 * cp-class.c (duplicate_tag_error): Use cp_error.
13604 (finish_base_struct): Check for ambiguity with direct base, and don't
13605 generate op= or copy ctor if it exists.
13606
d11ad92e 13607Fri Dec 3 15:32:34 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13608
13609 * cp-init.c (expand_member_init): when initializer name is null,
13610 don't try to build it now because emit_base_init will handle it.
13611
d11ad92e 13612Fri Dec 3 12:28:59 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13613
13614 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
13615 code such as ExceptionHandler::operator=.
13616
d11ad92e 13617Fri Dec 3 10:32:08 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13618
13619 * cp-decl.c (grokdeclarator): Don't try to print out dname when
13620 complaining about arrays of references if decl_context==TYPENAME,
13621 since it will be null.
13622
13623 * cp-decl2.c: Default to flag_ansi_overloading.
13624
d11ad92e 13625Thu Dec 2 18:05:56 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13626
13627 * cp-call.c (build_method_call): use binfo from instance if it's
13628 different from binfo (basetype_path) passed from above.
13629
d11ad92e 13630Wed Nov 17 19:14:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13631
13632 cp-error.c (dump_expr): Use unsigned chars to output a
13633 TREE_REAL_CST in hex.
13634
d11ad92e 13635Thu Dec 2 11:05:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13636
13637 * cp-class.c (finish_struct): Fix typo in setting
13638 cant_synth_asn_ref.
13639
13640 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
13641 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
13642
13643 * cp-lex.c (default_copy_constructor_body): Change
13644 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
d11ad92e 13645 (default_assign_ref_body): Likewise.
7177d104
MS
13646 (default_copy_constructor_body): Call operator= explicitly for
13647 base classes that have no constructor.
13648
d11ad92e 13649Thu Dec 2 10:47:15 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
13650
13651 * cp-call.c (build_method_call): If the instance variable is
13652 converted to error_mark_node when we're trying to convert it to the
13653 base type of a method we're looking up, return error_mark_node.
13654
d11ad92e 13655Thu Dec 2 10:41:16 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
13656
13657 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
13658 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
13659
d11ad92e 13660Wed Dec 1 13:33:34 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13661
13662 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
13663 harshness_code, not the size of short, for clearing out the
13664 ansi_harshness.
13665
13666 * cp-call.c (print_candidates): New function.
13667 (build_method_call): When we had some candidates, but didn't get a
13668 usable match, don't report that we got an error with the first
13669 candidate. Instead, say there were no matches, and list the
13670 candidates with print_candidates. In the second pass, make sure we
13671 clear out ever_seen, so we can accurately count the number of
13672 functions that qualified.
13673
d11ad92e 13674Wed Dec 1 09:53:59 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
13675
13676 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
13677 only if op1 is known to be != -1.
13678 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
13679
d11ad92e 13680Tue Nov 30 14:07:26 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13681
13682 * cp-method.c (hack_identifier): If the field itself is private, and
13683 not from a private base class, say so.
13684
d11ad92e 13685Mon Nov 29 03:00:56 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13686
13687 * cp-decl.c (grokdeclarator): Always warn on initialization of
13688 const member.
13689
d11ad92e 13690Wed Nov 24 00:49:35 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13691
13692 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
13693 (finish_base_struct): Set cant_synth_asn_ref properly.
13694
13695 * cp-lex.c (cons_up_default_function): Add section for operator=.
13696 (default_assign_ref_body): New function, mostly cribbed from
13697 default_copy_constructor_body.
13698
13699 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
13700 cant_synth_asn_ref, no_const_asn_ref.
13701 (finish_base_struct): Update no_const_asn_ref, note that you should
13702 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
13703 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
13704 initialize them properly. Set no_const_asn_ref properly. Set
13705 cant_synth_* in some of the situations where they should be set.
13706 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
13707 to cons_up_default_function for operator=.
13708
6060a796 13709Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13710
13711 * cp-cvt.c (convert_force): Add code to perform casting of pointer
13712 to member function types.
13713 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
13714 when the conversion should be done, regardless.
d11ad92e
MS
13715 * cp-tree.h (build_ptrmemfunc): Likewise.
13716 * cp-type2.c (digest_init): Likewise.
13717 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104 13718
d11ad92e 13719Tue Nov 23 18:06:58 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13720
13721 * cp-error.c (dump_expr): Do the right thing for variables of
13722 reference type.
13723
13724 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
13725 and its kin properly.
13726 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
13727
6060a796 13728Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13729
13730 * cp-method.c (build_opfncall): Don't count pointer to member
13731 functions as aggregates here, as we don't want to look up methods in
13732 them. The compiler would core dump if we did, as they don't have
13733 normal names.
13734 * cp-typeck.c (build_indirect_ref): Improve wording on error
13735 message.
13736
d11ad92e 13737Mon Nov 22 14:22:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13738
13739 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
13740 (since it's supported in other compiler bits).
13741
13742 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
13743 argument.
13744
13745 * cp-error.c (dump_function_decl): Don't print return type for
13746 constructors and destructors.
13747
13748 * cp-cvt.c (cp_convert_to_pointer): Import code from
13749 convert_to_pointer so we can return error_mark_node in the case of an
13750 error, and to allow more meaningful error messages.
13751 (build_type_conversion): Don't go through void* when trying
13752 to convert to a pointer type.
13753
13754 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
13755 after grokclassfn so that it's dealing with the right decl.
63718c49 13756 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
13757
13758 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
13759 no uses of it in the compiler).
13760
13761 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
13762 types.
d11ad92e 13763 (build_method_call): Likewise.
7177d104 13764
d11ad92e 13765Fri Nov 19 12:59:38 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13766
13767 * cp-tree.c (count_functions): Abstraction function.
13768
13769 * cp-call.c (build_overload_call_real): Deal with new overloading
13770 properly, remove dead code.
13771
13772 * gcc.c (default_compilers): Generate and use .ii files in the
13773 intermediate stage of compiling C++ source.
13774
d11ad92e 13775Fri Nov 19 11:26:09 1993 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
13776
13777 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
13778 address before using it, so it can be later safely compared.
13779
d11ad92e 13780Fri Nov 12 15:30:27 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13781
13782 * cp-pt.c (tsubst): Deal with new overloading.
13783
13784 * cp-typeck.c (fntype_p): is the arg function type?
13785 (comp_target_parms): pedwarn on conversion from (anything) to (...).
13786 (build_x_function_call): Deal with new overloading.
13787
13788 * cp-tree.c (decl_list_length): Deal with new overloading.
13789 (decl_value_member): Like value_member, but for DECL_CHAINs.
13790
13791 * cp-decl.c (duplicate_decls): Deal with new overloading.
d11ad92e 13792 (start_decl): Likewise.
7177d104
MS
13793
13794 * cp-class.c (instantiate_type): Deal with new overloading.
13795
13796 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
13797 (convert_harshness_old): Deal with new overloading.
d11ad92e 13798 (build_overload_call_real): Likewise.
7177d104 13799
d11ad92e 13800Mon Nov 8 13:50:49 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13801
13802 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
13803 if unambiguous, NULL_TREE otherwise.
13804 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
13805 (is_overloaded_fn): Returns whether or not the passed tree is
13806 a function or list of functions.
13807
13808 * cp-init.c (init_init_processing): use `get_first_fn' to find
13809 the FUNCTION_DEFN for new and delete.
13810
13811 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
13812 code size in half (I spit on special cases).
13813
d11ad92e 13814Tue Sep 7 20:03:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13815
13816 * cp-decl.c: Allow references and template type parameters as well
This page took 1.42214 seconds and 5 git commands to generate.