1 Sun Jan 13 17:48:13 1991 Michael Tiemann (tiemann at cygint.cygnus.com)
3 * version.c: Bump version number to 1.38.0. Lots of work has been
4 done on GNU C++ between August and January--but that work has been
5 done to version 2.0, not to version 1.
7 Thu Aug 23 10:30:10 1990 Michael Tiemann (tiemann at cygnus.com)
9 * cplus-tree.h (CLASSTYPE_CID): Key off of TYPE_MAIN_VARIANT.
11 Sun Aug 19 09:58:16 1990 Michael Tiemann (tiemann at cygnus.com)
13 * stmt.c: Fixes from 2.0 for fixup_goto incorporated here.
15 * cplus-decl2.c (write_vtable_entries): Don't test TREE_EXTERNAL
16 of DECL_CONTEXT (FN). TREE_EXTERNAL is not meaningful for types.
18 Wed Aug 15 15:50:36 1990 Michael Tiemann (tiemann at cygnus.com)
20 * dbxout.c (dbxout_type): Skip past const and volatile qualifiers
21 that might appear in method names.
23 Mon Aug 13 10:14:37 1990 Michael Tiemann (tiemann at cygnus.com)
25 * cplus-decl2.c (flag_minimal_debug): Now is default is
28 * cplus-tree.c (virtual_member): Return the assoc of a non-virtual
29 basetype that comes from a virtual baseclass. Changed callers
30 which used to call `value_member' to call virtual_member instead.
32 Mon Aug 6 06:44:07 1990 Michael Tiemann (tiemann at cygnus.com)
34 * dbxout.c (dbxout_symbol): Send out tags before sending out
35 types. Also, handle getting rtl from inline functions.
36 * dbxout.c (dbxout_parms): Get rtl from inline functions.
37 * dbxout.c (dbxout_reg_parms): Ditto.
39 Sun Aug 5 00:04:08 1990 Michael Tiemann (tiemann at cygnus.com)
41 * Merged `g++field.tar.Z' from Brown. Thanks to Steve
42 Reiss (spr@cs.brown.edu) for these changes.
44 * Merged `g++-for-pmax.diffs' from foobar.colorado.edu.
45 Thanks to Dirk Grunwald (grunwald@foobar.colorado.edu)
46 for making G++ work on the PMAX.
48 * cplus-decl2.c (grokfield): It is no longer legal to specify
49 the initializer for a static const member in the class
50 declaration. Dealing with default initializers is basically
53 * cplus-init.c (build_delete): Don't wrap `addr' in a SAVE_EXPR
54 until it is in fact an address. This allows us to call
55 destructors on the return values of function calls.
57 * cplus-typeck.c (commontype): Fixed bug in OFFSET_TYPE case which
58 led to infinite recursion (since we did not reduce the types
61 * cplus-lex.c (check_newline): Make `#pragma implementation' more
64 * cplus-init.c (expand_aggr_init): Changed Jan 20th change so that
65 we test whether TYPE has a constructor defined, and we do not test
66 at all whether INIT was from a GNU constructor expression or not.
68 * cplus-typeck.c (build_modify_expr_1): Don't return
69 `error_mark_node' unless there really was an error. If there is
70 no work to do, return `integer_zero_node'.
72 * cplus-class.c (propagate_basetype_offsets): Count the space
73 between baseclasses, not just the space they occupy.
75 * cplus-typeck.c (commontype): Don't drop the exceptions that are
76 raised by functions and methods.
78 * cplus-cvt.c (convert_to_real): Fix if/else level problem in
79 case where EXPR is of aggregate type.
81 * cplus-decl.c (finish_decl): Give users a chance to set a
82 breakpoint before the initialization of an object takes place.
84 * cplus-class.c (build_method_call): If the function we get is not
85 directly from the object we have, call `convert_pointer_to' if the
86 object uses multiple inheritance or virtual baseclasses.
88 * cplus-typeck.c (build_binary_op_nodefault): Don't call
89 `convert_to_pointer' with an argument that might be
92 * cplus-method.c (hack_identifier): Look for DECL_REFERENCE_SLOT
93 in RESULT_DECLs as well.
95 * cplus-init.c (build_vec_delete): Don't forget to deallocate the
96 container if requested. Really use AUTO_DELETE and
97 AUTO_DELETE_VEC with the same interpretation as `build_delete'
98 gives to its AUTO_DELETE parameter.
100 Sat Aug 4 21:24:04 1990 Michael Tiemann (tiemann at cygnus.com)
102 * varasm.c (assemble_variable): Hack our way around the problem
103 that static class members look like initialized variables for the
104 purposes of establishing FIRST_GLOBAL_OBJECT_NAME.
106 * cplus-lex.c (reinit_parse_for_method): Give error message for
107 common mistake of forgetting the function body.
109 * cplus-typeck.c (build_component_ref): Make better error message
110 when field is not found.
112 * cplus-class.c (finish_struct): TYPE_GETS_*_INIT_REF comes from
115 * cplus-typeck.c (c_expand_return): Give warning about returning
116 non-lvalues that come from functional casts.
118 * cplus-search.c (get_base_distance): Changed to follow leftmost
119 path only when PARENT == TYPE_MAIN_VARIANT (PARENT).
121 * cplus-class.c (modify_vtable_entries): Call get_base_distance
122 with 0 path_ptr, since we do not appear to use the path computed.
124 Sun Jul 22 12:04:43 1990 Michael Tiemann (tiemann at cygnus.com)
126 * cplus-except.c (cplus_expand_end_except): If the user gives a
127 default handler, the exception is considered caught in that
129 * cplus-parse.y (except_stmts): Rest of fix went here, in DEFAULT
132 * cplus-decl.c (finish_decl): Don't emit cleanups twice.
134 * cplus-class.c (finish_struct_bits): Don't call
135 `fixup_vbase_offsets'.
136 * cplus-tree.c (fixup_vbase_offsets): #if 0 this function.
138 * expr.c (expand_expr): Bug fix from Stephen Pope in LOOP_STMT
139 handling of local variables.
141 * cplus-cvt.c (build_default_binary_type_conversion): Handle
142 arguments which are REFERENCE_TYPE.
144 * cplus-method.c (prepare_inline): Set DECL_CONTEXT of this
145 function's parameters.
147 * cplus-decl.c (grokfndecl): When adding a new virtual function
148 entry, RAISES may change a second time.
150 Thu Jul 5 10:44:39 1990 Michael Tiemann (tiemann at masham)
152 * cplus-decl2.c (grokfield): Static consts need not be initialized
153 in the class definition.
155 Mon Jul 2 06:12:49 1990 Michael Tiemann (tiemann at masham)
157 * cplus-init.c (resolve_offset_ref): If BASETYPE is not a base
158 type for the current class, give error and return.
160 Sun Jul 1 00:18:47 1990 Michael Tiemann (tiemann at masham)
162 * cplus-decl.c (finish_function): Throw away more code if we have
163 an inline function from the interface.
165 * dbxout.c (dbxout_tags): Further reduce the amount of debugging
166 information written out for class types.
168 * cplus-class.c (add_virtual_function): Set DECL_VINDEX from the
169 virtual function which comes from the vtable shared by
170 CURRENT_CLASS_TYPE, if possibe.
172 * cplus-typeck.c (build_binary_op): Call `default_conversion'
173 after doing type instantiation.
175 * cplus-init.c (build_new): New 2.0 interpretation: `new int (10)'
176 means allocate an int, and initialize it with 10.
178 * cplus-init.c (emit_base_init): Completion of fix for virtual
179 function table initialization. @@ BTW, this may now cause extra
180 virtual function table initializations. They will all be correct,
181 but they may also be redundant. GCC's optimizer doesn't know how
182 to remove even the simplest such redundancy.
184 Sat Jun 30 13:54:30 1990 Michael Tiemann (tiemann at masham)
186 * cplus-class.c (finish_base_struct): Store BASETYPE in the
187 VFIELDS chain (in its TREE_TYPE).
189 Fri Jun 29 09:26:17 1990 Michael Tiemann (tiemann at masham)
191 * cplus-class.c (build_vtable,prepare_fresh_vtable): Stash the
192 type that caused this vtable to be defined in DECL_CONTEXT
193 * cplus-search.c (bfs_unmark_finished_struct): Work around
194 DECL_CONTEXT conflict for vtables. @@ NOT A SOLUTION.
196 * cplus-lex.c: Extend meaning of `#pragma implementation'
197 to allow files to `implement' types from general headers.
199 Thu Jun 28 17:35:04 1990 Michael Tiemann (tiemann at teacake)
201 * cplus-typeck.c (build_vbase_vtables_init): Fixed typo in code
202 that bashes LHS references.
204 Wed Jun 27 00:12:24 1990 Michael Tiemann (tiemann at masham)
206 * cplus-decl.c (pushdecl): To warn about parameter shadowing, must
207 look two levels up, not one.
209 * cplus-search.c (build_vbase_vtables_init): Add new parameter
210 CTOR_P which says whether we can use computed offsets to store
211 vtables into virtual sub-objects, or whether we should use
212 existing vbase pointers.
214 [Wrong fix: * cplus-cvt.c (convert_from_reference): Don't convert
215 from a reference to an incomplete type.]
216 * cplus-typeck.c (build_modify_expr): Give error if using a
217 reference to an incomplete type.
219 * cplus-class.c (pushclass): Eliminate fencepost error. Also,
220 realloc allocation unit is byte, not whatever the type of the
223 Tue Jun 26 04:28:00 1990 Michael Tiemann (tiemann at masham)
225 * expr.c (expand_expr): Mark all {VAR,FUNCTION,CONST}_DECL nodes
226 that go through `expand_expr' as used.
228 * cplus-dem.c (do_type): Handle "long long" (encoded as 'x').
230 Mon Jun 25 01:39:53 1990 Michael Tiemann (tiemann at masham)
232 * dbxout.c (dbxout_type): Fix confusion that was causing
233 debugging information about constructors (for classes which did
234 not have destructors) to be omitted. Also, simplify some code.
236 Sat Jun 23 12:32:38 1990 Michael Tiemann (tiemann at masham)
238 * cplus-lex.c (interface_strcmp): Fix braino.
240 * cplus-decl.c (finish_function): Make all virtual function table
241 pointers point to CURRENT_CLASS_TYPE's virtual function tables.
243 Fri Jun 22 08:28:07 1990 Michael Tiemann (tiemann at masham)
245 * cplus-init.c (build_member_call): Handle case where NAME refers
246 to a member (instead of a member function) and try calling
247 overloaded CALL_EXPR.
249 * cplus-decl.c (maybe_build_cleanup): If a destructor is defined
250 for the type, the destructor will take care of deleting all the
253 * cplus-init.c (emit_base_init,expand_recursive_init_1):
254 Initialize virtual function table pointers of non-leftmost,
255 non-virtual baseclasses.
257 * cplus-class.c (ideal_candidate): Each TREE_VALUE (TTA) must
258 be reset from TREE_PURPOSE (TTA), whether or not that particular
259 TREE_VALUE was the result of a type conversion for the particular
260 candidate we are returning--the TREE_VALUE may have been trashed
261 by a (failed) type conversion for some other candidate.
263 * cplus-typeck.c (c_expand_result): Set TREE_VOLATILE bits of
264 RESULT when initializing a temporary.
266 Thu Jun 21 09:14:06 1990 Michael Tiemann (tiemann at teacake)
268 * cplus-lex.c (check_newline): Handle case where #pragma
269 interface/implementation is given, but no #line precedes it.
271 * cplus-decl.c (start_function): If DECL1 is an inline function
272 belonging to an implemenation (as opposed to an interface), make
275 Tue Jun 19 13:55:13 1990 Michael Tiemann (tiemann at teacake)
277 * version.c: Changed version number to 1.37.2 alpha 2.
279 Fri Jun 15 03:19:50 1990 Michael Tiemann (tiemann at masham)
281 * cplus-search.c: No longer any need for VBASE_CHAR_STAR. Use
282 VBASE_DECL_PTR in its stead.
284 * cplus-search.c (dfs_init_vbase_pointers): Use values computed in
285 CLASSTYPE_SEARCH_SLOT when casting to virtual baseclasses. Only
286 call `convert_pointer_to' in this function when we will *not* be
287 going through a virtual baseclass pointer. The change was needed
288 because we might have a class hierarchy with multiple virtual
289 baseclasses, and in an effort to initialize first the most-base
290 virtual baseclass, the compiler would generate code that would
291 errantly try to get there via a not-yet-initilized intermediate
292 virtual baseclass pointer.
294 * cplus-init.c (build_new): Don't let PENDING_SIZES be expanded
295 immediately during this function. The result of calling this
296 function should only build tree nodes, not emit any insns.
298 * cplus-decl.c (grok_enum_decls): If TYPE is not in scope, give
299 reasonable default behavior (instead of aborting).
301 * cplus-class.c (build_method_call): Fix typo in case vtable is
304 Wed Jun 6 10:13:53 1990 Michael Tiemann (tiemann at teacake)
306 * cplus-typeck.c (build_modify_expr): Stabilize LHS and RHS if
309 * cplus-cvt.c (build_type_conversion): Don't convert to `void *'
310 unless this is a CONVERT_EXPR.
312 Tue Jun 5 07:52:36 1990 Michael Tiemann (tiemann at gzilla)
314 * cplus-class.c (finish_struct): Must set CLASSTYPE_INTERFACE_ONLY
315 and CLASSTYPE_VTABLE_NEEDS_WRITING bits before building the
316 virtual function table.
318 * cplus-lex.c (interface_strcmp): Modified to discard path
319 prefixes before comparing filenames.
321 Mon Jun 4 06:32:59 1990 Michael Tiemann (tiemann at gzilla)
323 * cplus-decl.c (finish_function): Test HAVE_return. Now needs
325 * Makefile: Depend cplus-decl.o on insn-flags.h.
327 * cplus-parse.y (except_stmts): Use gotos and labels to implement
328 default actions instead of wrapping it in an RTL_EXPR and emitting
329 it at the end. This is intended to cause the debugger less grief.
331 Sat Jun 2 13:45:45 1990 Michael Tiemann (tiemann at teacake)
333 * cplus-class.c (build_scoped_method_call): Give error if EXP is
334 not of aggregate type.
336 * cplus-typeck.c (build_x_function_type): Don't be fooled by case
337 where parser thinks we have a method involving `this' (when we
340 * cplus-decl.c (pushdecl): Use `lang_printable_name' on T instead
341 of printing directly from IDENTIFIER_POINTER (NAME).
343 * cplus-init.c (expand_aggr_init_1): Code which is supposed to
344 print error message was not, because FLAGS passed to
345 build_method_call were not in synch with PARMS
346 (LOOKUP_HAS_IN_CHARGE was accidently missing from FLAGS).
348 * cplus-init.c (build_new): Fix obscure bug where a object needing
349 larger than word alignment was getting memory at the wrong
352 * expr.c (expand_expr): In LET_STMT case, expand initializers for
353 VARS, whether or not their RTL has already been defined.
355 * cplus-class.c (instantiate_type): If there's only one function
356 we know about, and its global, return that.
358 * cplus-decl.c (finish_decl): Check more cases for uninitialized
361 * cplus-method.c (fndecl_as_string): Get past the `in_charge' node
362 if a constructor uses virtual baseclasses.
364 * cplus-init.c (build_delete): If we are destroying base part of
365 the object, call with ADDR and the pointer to the base type
366 instead of calling with REF and the base type. This is because
367 REF may not be stable (or seemingly addressable), whereas ADDR is
370 * cplus-decl.c (grokdeclarator): Don't accept friend declarations
371 not in class definitions.
373 * cplus-decl2.c (grokbitfield): Don't die if user tries to declare
376 * cplus-decl.c (add_block_current_level): New function.
377 * cplus-parse.y (except_stmts): In DEFAULT case, if `compstmt' was
378 empty, cons up a block (a LET_STMT) and add it to the current
381 * cplus-parse.y (except_stmts): Set TREE_LANG_FLAG_2 of `compstmt'
382 when in the default section of the catch clauses.
384 * All GNU C++ files: rename functions from expand_cplus_... to
387 * dbxout.c (dbxout_{try,ehdecl,catch,end_catch_clauses}): New
388 functions to write out symbol information for exception handling.
389 (Based on TREE_LANG_FLAGs of blocks).
391 * cplus-except.c: Added code to set TREE_LANG_FLAGs of blocks that
392 are returned from `poplevel'. TREE_LANG_FLAG_1 means a try block;
393 TREE_LANG_FLAG_2 means a catch block; TREE_LANG_FLAG_3 means an
394 except block (which also means the end of the catch blocks).
395 * cplus-parse.y: Ditto.
397 * cplus-typeck.c (build_binary_op): In addition to NE_EXPR
398 comparison against INTEGER_ZERO_NODE, also allow EQ_EXPR for
399 allowable pointer conversions.
401 * cplus-cvt.c (build_type_conversion): Check that a conversion is
402 not ambiguous (error_mark_node) before using it immediately.
404 * cplus-class.c (ideal_candidate): Don't quit immediately if the
405 parameters of the derived conversion to not match the parameters
406 of the base conversion.
408 Tue May 22 06:06:38 1990 Michael Tiemann (tiemann at gzilla)
410 * cplus-cvt.c (convert_from_reference): No longer try to optimize
411 case of pulling known value from reference. We may want to do
412 this later, but it's not worth debugging now.
414 * cplus-decl.c (grok_reference_init): Only build temporary for
415 reference initialization if the reference type is `const'.
416 (New ANSI C++ rules). Also, change interface to return `void',
417 since it was always returning 0. Change caller to set INIT to 0
418 after calling `grok_reference_init'.
420 Fri May 18 14:05:38 1990 Michael Tiemann (tiemann at teacake)
422 * cplus-class.c (build_vbase_path): Avoid crash in case syntax
423 errors got things confused and we can't find our virtual
426 Mon May 14 07:52:22 1990 Michael Tiemann (tiemann at gzilla)
428 * cplus-class.c (build_method_call): Don't use a virtual function
429 table if INSTANCE is manifestly `this' in constructor or
432 * cplus-init.c (build_delete): Major interface change.
433 AUTO_DELETE now has additional possible values. If in the
434 program, (AUTO_DELETE & 1) is non-zero, then call free on our
435 incoming object. If (AUTO_DELETE & 2) is non-zero, then tear down
436 virtual baseclasses as well. All callers changed.
438 Sun May 13 15:57:48 1990 Michael Tiemann (tiemann at gzilla)
440 * cplus-parse.y (delete cast_expr): If the type of object being
441 destroyed has a destructor, then give the destructor full
442 authority to destroy the object. This will include destroying its
443 virtual base classes. If the type does not have a destructor
444 (cannot have multiple or virtual baseclasses in this case), then
445 perform the two-step process of destroying and then deallocating
446 the object. Also add LOOKUP_HAS_IN_CHARGE to the flags we use in
449 * cplus-decl.c (finish_function): Make sure to call the delete
450 operator when finished inside a destructor.
452 * cplus-init.c (build_delete): Don't change the vtables of the
453 object being deleted here.
454 * cplus-decl.c (finish_function): Change them all here (not just
455 virtual baseclasses). Uses CLASSTYPE_VFIELDS to find all the
458 Sat May 12 08:13:44 1990 Michael Tiemann (tiemann at gzilla)
460 * cplus-typeck.c (build_x_compound_expr): New function to be
461 called when syntactic ',' operator is parsed.
462 * cplus-parse.y (expr): Call `build_x_compound_expr' instead of
463 build_compound_expr'.
464 * cplus-lex.c (init_lex): Prepare to handle operator,.
466 * dbxout.c (dbxout_type_fields): Write out anonymous union
469 * cplus-typeck.c (build_modify_expr): Handle case of op= where
470 operands require type conversion to some scalar reference type.
472 * cplus-parse.y (do_components): Give parse error if type
473 declaration in structure is not one of ENUMERAL_TYPE, UNION_TYPE,
476 * cplus-typeck.c (build_modify_expr_1): Effort to save a tree node
477 by copying a subexpression and assigning its type got GNU C++ in
478 trouble. Code now assigns the baseclasses via `get_base_ref'.
479 (get_base_ref): New function.
481 * cplus-lex.c (interface_strcmp): New function. Handle all files
482 whose prefix matches the initial file's prefix. A prefix in this
483 case is the string of characters up to the first `.'.
485 * cplus-decl.c (grok_reference_init): If the type of the
486 initializer has the same code as the type of the reference,
487 convert the initializer to the reference's target type. This
488 permits people to say things like `short &sr = 10;'.
490 * cplus-cvt.c (convert_to_reference): Don't convert types whose
491 sizes or codes are different (if both are non-aggr type).
493 * cplus-typeck (build_binary_op_nodefault): Call
494 `common_base_type' when comparing pointers with EQ_EXPR or
497 * cplus-typeck.c (build_conditional_expr): if TYPE1 and TYPE2
498 share a common ancestor, then convert to this type instead of
499 giving type mismatch error.
500 (common_base_type): New function.
502 Fri May 4 00:13:44 1990 Michael Tiemann (tiemann at teacake)
504 * cplus-decl2.c (finish_file): TREE_PUBLIC is enough to cause
505 vtable to be written out if WRITE_VIRTUALS > 0.
507 * cplus-class.c (prepare_fresh_vtable): Set TREE_PUBLIC and
508 TREE_EXTERNAL here according to CLASSTYPE_VTABLE_NEEDS_WRITING,
511 * cplus-typeck.c (commonparms): Free space used by common
512 parameter list if there were no changes needed to merge P1 and P2.
514 Thu May 3 22:56:46 1990 Michael Tiemann (tiemann at teacake)
516 * cplus-init.c (expand_member_init): Don't be faked out by names
517 which are both typedef'd and which are class members. In the
518 future, we need to handle the whole namespace problem better, but
519 for now, if it doesn't look like a base type, treat it as a
522 * cplus-typeck.c (commonparms): New function; consists of code
523 split out from `commontype'.
524 * cplus-decl.c (grokfndecl): Call `commonparms' to merge default
525 parameter information from base class into derived class virtual
528 Wed May 2 22:28:51 1990 Michael Tiemann (tiemann at teacake)
530 * dbxout.c (dbxout_type): Don't convert DECL_OFFSET (TYPE_NAME (TYPE))
531 to bits from bytes--it is already in bits.
533 Sun Apr 29 00:01:56 1990 Michael Tiemann (tiemann at teacake)
535 * cplus-decl2.c (finish_file): Continue with substitution of
536 `build' with `build1' where appropriate.
537 * cplus-init.c (various places): Ditto.
539 Sat Apr 28 14:32:42 1990 Michael Tiemann (tiemann at gzilla)
541 * cplus-decl.c (maybe_build_cleanup): Call `build1' instead of
543 * cplus-expr.c (cplus_expand_expr): Ditto.
544 * expr.c (various places): Ditto.
545 * cplus-typeck.c (Ditto): Ditto.
547 * New strategies for saving storage and time:
548 * cplus-tree.c (list_hash_lookup_or_cons): Look into VALUE to see
549 if we have a list of the kind we want. If we don't put the list
550 into HASH_LIST_TABLE.
551 * cplus-tree.c (build_decl_list_1): Same strategy, but cons
552 a temporary node if we don't.
553 * cplus-parse.y: Call `build_decl_list_1' where profitable.
554 * cplus-decl.c (grokdeclarator): Handle missing declarator names
556 * cplus-decl2.c (groktypefield): Handle a RECORD_TYPE in
559 Thu Apr 26 18:25:31 1990 Michael Tiemann (tiemann at teacake)
561 * Merged changes to make #pragma dump and -fundump-... work with
562 #pragma interface and #pragma implementation. Also, use mmap on
563 Sun instead of reading all bits from a dumped file.
565 Wed Apr 25 10:06:44 1990 Michael Tiemann (tiemann at teacake)
567 * toplev.c (rest_of_compilation): Rewire inline logic to avoid
568 most calls to `save_for_inline'.
569 * integrate.c (save_for_outline): New function; saves functions
570 which are normally inline, but may need to be outlined later.
572 * cplus-tree.c (layout_basetypes): Clear CLASSTYPE_VIA_VIRTUAL if
573 BASETYPE is incomplete.
575 * cplus-tree.h: Change respresentation of `type_lang_specific' to
576 keep conversions in array rather than in separate variables.
577 * cplus-tree.h: Use enum conversion_type to index into the
579 * cplus-class.c: Replace random logic with loop that iterates
580 across conversion types.
582 Tue Apr 24 00:36:02 1990 Michael Tiemann (tiemann at teacake)
584 * cplus-decl{2}.c: Finally get #pragma interface and #pragma
585 implemenetation working.
587 * cplus-{decl2,lex,init,method}.c: "__user_new" is gone. It has
588 been replaced uniformly with OPERATOR_NEW_FORMAT.
589 * cplus-init.c (build_new): Parameter USER_PARMS is renamed
592 * cplus-parse.y (primary): Handle case where `operator_name' is an
593 here-to-fore unknown operator.
594 * cplus-class.c (build_instantiated_decl): Pass &EXP instead of
595 &TREE_VALUE (EXP) to `build_operator_fnname'. All other calls to
596 that function pass the address of an OP_IDENTIFIER.
598 * cplus-decl.c (finish_function): Call `convert_pointer_to_vbase'
599 instead of `convert_pointer_to'; this saves an abort when the
600 lattice contains both virtual and non-virtual versions of a
601 baseclass we are looking for.
603 * cplus-decl2.c (setup_vtable_pointer): Cast initializer to
604 CURRENT_VTABLE_DECL in case it is more basic than we want it.
606 * cplus-typeck.c (build_c_cast): Handle casting one reference type
609 * cplus-cvt.c (build_type_conversion): More creativity in ways of
610 finding type conversions.
612 * cplus-typeck.c (build_binary_op): Code simplified.
614 * cplus-class.c (build_vbase_path): Incorprate Vasta's fix which
615 resets CODE to PLUS_EXPR once we have used it. Otherwise, OFFSET
616 might be twice negated.
618 * cplus-typeck.c (build_modify_expr): Since we don't know about
619 potential aliases, unless -felide-constructors is set, treat
620 "x = F(y);" as "t = F(y), x = t" if x's TREE_TYPE is
623 * cplus-decl.c (finish_function): If CLEANUP_LABEL is non-zero,
624 effectively do a jump to RETURN_LABEL in case the user has -Wall
625 turned on. This causes the right things to happen to
626 NOTE_INSN_FUNCTION_END.
628 * cplus-decl.c (grokvardecl): Give error if static member is
629 multiply initialized. `duplicate_decls' will never be called for
630 this case, hence it cannot warn us.
632 * cplus-decl.c (grokdeclarator): CONSTP is meaningless for
635 * cplus-typeck.c (actualparameterlist): Don't make an OFFSET_REF
636 of something that is already an OFFSET_REF.
638 Sun Apr 22 18:38:35 1990 Michael Tiemann (tiemann at teacake)
640 * cplus-method.c (build_opfncall): ARG3 holds the PLACEMENT of a
641 user-defined new operator.
643 * cplus-init.c (build_new): Interface change now takes
644 USE_GLOBAL_NEW as parameter. All callers changed.
646 Wed Apr 18 10:10:09 1990 Michael Tiemann (tiemann at teacake)
648 * cplus-search.c (dfs_record_inheritance): Use TYPE_MAIN_VARIANT
651 * cplus-search.c (report_ambiguous_mi_virtuals): Don't crash if
652 MI_VMATRIX is not fully populated (i.e., there are zero entries in
653 between non-zero ones).
655 Fri Apr 13 09:07:36 1990 Michael Tiemann (tiemann at suntana)
657 * expr.c (expand_call): Don't defer popping if this is a call to
658 setjmp, longjmp (or a related function).
660 Wed Apr 11 09:49:33 1990 Michael Tiemann (tiemann at gzilla)
662 * cplus-typeck.c (build_component_ref): When taking address of
663 bound member function, don't forget to convert DATUM to
664 DECL_VCONTEXT of FIELD.
666 Sat Apr 7 12:49:13 1990 Michael Tiemann (tiemann at teacake)
668 * cplus-search.c (get_first_matching_virtual): Don't crash if
669 redeclaring a virtual function `static'.
671 Thu Apr 5 04:45:13 1990 Michael Tiemann (tiemann at teacake)
673 * cplus-class.c (finish_struct): Remove warning about structures
674 which have no data members.
676 * expr.c (expand_expr): Do not call `use_variable' on a TYPE_DECL
679 Tue Apr 3 07:48:47 1990 Michael Tiemann (tiemann at teacake)
681 * cplus-typeck.c (c_expand_start_case): Make this function handle
682 expressions that can be converted to integer types via type
683 conversion operators.
685 * cplus-decl.c (start_function): If there was a previous `extern "C"'
686 declaration when a function is defined in C++ langauge scope, give
687 error message if argument types line up, but return types do not.
689 Mon Apr 2 13:38:22 1990 Michael Tiemann (tiemann at teacake)
691 * cplus-lex.c (check_newline): Recognize `#pragma interface'.
692 * cplus-tree.c (lang_output_debug_info): Implement action for
694 * cplus-decl{2}.c: Various hacks to make this work.
696 * cplus-class.c (finish_struct): Added new slots for
697 CLASSTYPE_INT_CONVERSION and CLASSTYPE_REAL_CONVERSION to simplify
698 picking up these conversions when narrower or wider conversions
699 (than the default type) are provided.
701 * cplus-cvt.c (build_up_reference): When building `X&' via an
702 `operator X ()', build it into a temporary, and return the
703 COMPOUND_EXPR which first computes the conversion and second has
704 the value of the temporary's address.
706 Sun Apr 1 17:28:35 1990 Michael Tiemann (tiemann at teacake)
708 * cplus-decl.c (build_enumerator): Handle case where VALUE is a
711 Fri Mar 30 02:16:34 1990 Michael Tiemann (tiemann at arkesden)
713 * cplus-class.c (build_{scoped_}method_call): Handle calls to
714 destructor according to anticipated ANSI C++ rules. p->X::~X ()
715 should call destructor (without calling `operator delete').
716 p->~X () should do likewise, but use a virtual lookup (perhaps).
718 * cplus-class.c (compute_conversion_costs): Permit conversion to
719 `X&' when only `operator X' exists.
721 Thu Mar 29 18:14:31 1990 Michael Tiemann (tiemann at rio)
723 * cplus-init.c (finish_base_init): Function changed to...
724 * cplus-init.c (emit_base_init): ...this. Emit the base
725 initializer to BASE_INIT_INSNS, as a sequence.
726 * cplus-init.c (check_base_init): New function: test that member
727 variables are not used before they are initialized.
728 * All callers changed.
730 Wed Mar 28 17:27:37 1990 Michael Tiemann (tiemann at teacake)
732 * cplus-init.c (build_new): If space is allocated for constructor,
733 call `build_method_call' with flags saying that the constructor is
736 Tue Mar 27 22:20:37 1990 Michael Tiemann (tiemann at teacake)
738 * cplus-init.c (build_virtual_init): Convert virtual function
739 table address to type of virtual function table pointer. These
740 may now compare as different, since array sizes between base and
741 derived classes may be different.
743 * cplus-parse.y (init_parse): Make room for ENDFILE, which has the
746 Mon Mar 26 09:00:27 1990 Michael Tiemann (tiemann at teacake)
748 * toplev.c (FLAG_INLINE_DEBUG): New flag to control whether
749 inlines get debugging information or not.
750 * cplus-decl2.c (LANG_F_OPTIONS): Implemented.
751 * integerate.c (expand_inline_functions): Implemented.
752 * cplus-except.c (init_exception_processing): Make it possible for
753 user to declare `exceptionHandlerStack' her/himself.
755 Sun Mar 25 05:04:06 1990 Michael Tiemann (tiemann at teacake)
757 * cplus-init.c (build_delete): Remove assertion that
758 CLASSTYPE_OFFSET of BASETYPE must be non-zero for baseclasses 2
759 through N. The first non-virtual baseclass need not be the first
760 baseclass, and it will be the one with a zero offset.
762 * cplus-except.c (call_to_unhandled_exception): Adjust length
763 argument to `build_string'.
765 * cplus-dem.c: Apply James Clark's patches.
767 * cplus-decl.c (start_decl): If DECL is static and non-permanent,
768 and DECL needs destroying, make DECL permanent. If there are
769 components of DECL's type which need to be made permanent, make
770 them permanent as well.
772 * cplus-decl.c (grokdeclarator): Fix bugoid in SCOPE_REF case.
774 * cplus-decl.c (finish_decl): Wait to build CLEANUP from DECL
775 until after completing its array type.
777 * cplus-typeck.c (build_unary_op): If ARG is an OFFSET_REF,
778 resolve it before trying to increment (or decrement) it.
780 * cplus-class.c (finish_struct_bits): When looking for type
781 conversion operators, test METHOD_VEC against NULL_TREE (in case
782 there is a conversion from a base class, and the derived class
785 * cplus-cvt.c (build_up_reference): Don't try to build up a
786 reference to an aggregate type which is not derived from another.
788 * cplus-type2.c (build_functional_cast): Fixed typo.
790 * cplus-typeck.c (comptypes): Break out code for ARRAY_TYPE case.
791 * cplus-typeck.c (comp_array_types): Function for that code.
792 * cplus-typeck.c (comptypes,comp_target_types): Call
793 `comp_array_types' for ARRAY_TYPE case.
795 * cplus-class.c (build_method_call): Don't give error if
796 LOOKUP_COMPLAIN is not in FLAGS.
798 * cplus-init.c (expand_aggr_init_1): When looking for
799 constructors, if XXREF_INIT_POSSIBLE is LOOKUP_SPECULATIVELY,
800 clear out LOOKUP_COMPLAIN, since failure of a particular
801 constructor can be managed by performing X(X&) initialization. If
802 that fails, the caller of that attempted initialization will give
805 * cplus-decl2.c (coerce_delete_type): Simplify code, and make it
806 work in the presence of delete type with TYPE_ARG_TYPES (type) ==
809 * tree.c (array_type_nelts): Give error if this function is called
810 with incomplete type.
812 Sat Mar 24 19:23:19 1990 Michael Tiemann (tiemann at teacake)
814 * stmt.c (expand_function_start): Emit note that parms are in
817 * cplus-typeck.c (build_unary_op): Function types can have unary
820 * stmt.c (expand_expr_stmt): Don't warn about unused expressions
821 that are explicitly cast to void.
823 Sat Mar 10 05:23:36 1990 Michael Tiemann (tiemann at teacake)
825 * cplus-lex.c (reinit_parse_for_method): Try to give user some
826 clue as to where the problem is if method declaration looks wrong.
828 * Makefile: Better handling of cadillac vs non-cadillac
830 * cplus-cadillac.c: Updates for latest protocol.
832 * cplus-cvt.c (build_type_conversion): Don't crash if EXPR is
835 * cplus-class.c (build_method_call): Check for return of
836 `error_mark_node' from call to `build_new'.
838 Fri Mar 9 11:29:04 1990 Michael Tiemann (tiemann at teacake)
840 * cplus-typeck.c (build_modify_expr): Check TREE_READONLY bit if
843 Mon Mar 5 14:54:12 1990 Michael Tiemann (tiemann at teacake)
845 * integrate.c (expand_inline_function): Forget about register
846 constancy if somebody clobbers a part of the register via a
847 STRICT_LOW_PART, SUBREG, SIGN_EXTRACT or ZERO_EXTRACT operation.
849 * integrate.c (output_inline_function): LAST was unitialized due
850 to #if 0. Moved #if 0 inside of loop.
852 Sun Mar 4 04:12:53 1990 Michael Tiemann (tiemann at teacake)
854 * cplus-init.c (build_new): Unless eliding constructors, we must
855 go through constructors if they are defined.
857 * cplus-decl.c (start_function): Protect binding level of parms by
858 calling `pushlevel' in here...
859 * cplus-decl.c (finish_function): ...instead of here. Make sure
860 we call corresponding `poplevel' on both constructor paths.
862 * cplus-init.c (finish_base_init): If handling exceptions for
863 Spring, must always have IN_CHARGE_IDENTIFIER doing its thing for
866 * cplus-except.c (finish_exception_decl): Don't pretend that CTOR
867 is not a constructor.
869 * cplus-decl.c (start_function): Force constructors to `return'
872 * cplus-decl.c (init_decl_processing): If handling exceptions for
873 Spring, set FLAG_THIS_IS_VARIABLE to 2.
875 * cplus-init.c (finish_base_init): Handle exceptions for Spring.
877 * cplus-decl.c (in_parm_level_p): Function deleted.
878 * cplus-decl.c (have_exceptions_p): New function.
880 * Integrate changes for cadillac.
882 Sat Mar 3 11:52:13 1990 Michael Tiemann (tiemann at teacake)
884 * cplus-parse.y (stmt): Implement `reraise ep;'.
885 * cplus-except.c (expand_cplus_reraise): Handle case where
886 EXCEPTIONS is an exception object to be reraised.
888 * integrate.c (copy_decl_tree): Try latest fixes for GCC 2.0 to
889 improve GNU C++'s handing of inline functions.
891 * cplus-init.c (expand_aggr_vbase_init): Delete this function
894 * cplus-tree.h (TREE_ANON_UNION_ELEM): Use TREE_REGDECL instead of
896 * cplus-tree.h (DECL_ANON_UNION_ELEM): Ditto.
897 * cplus-tree.h (TREE_PARMLIST): Use `unsigned_attr' instead of
899 * cplus-tree.h (TREE_VIA_PUBLIC): Use `used_attr' instead of
901 * cplus-tree.h (TREE_VIA_PROTECTED): Use `literal_attr' instead of
903 * cplus-tree.h (TREE_VIA_VIRTUAL): Ditto.
905 Thu Mar 1 19:32:03 1990 Michael Tiemann (tiemann at teacake)
907 * version.c: version 1.37.1 released.
909 * integrate.c (expand_inline_function): Round up size of parm_map.
911 * g++.texinfo: Updated to version 1.37.1, including the addition
912 of a new chapter on exception handling.
914 * ld.c: Fixed #ifdef problems introduced by Mark Ullman.
916 * cplus-parse.y (print_parse_statistics): Modified to work in case
917 YYDEBUG is not defined.
919 Wed Feb 28 09:45:09 1990 Michael Tiemann (tiemann at teacake)
921 * version.c: version 1.37.0 released.
923 * HINTS: Hacked to look like an RMAIL file.
925 * cplus-typeck.c (build_modify_expr_1): Copy virtual baseclasses
928 Mon Feb 26 06:36:50 1990 Michael Tiemann (tiemann at teacake)
930 * cplus-class.c (finish_base_struct): When building B->VFIELDS,
931 use precisely the right baseclass in the TREE_PURPOSE slot.
932 * cplus-class.c (modify_vtable_entries): Add additional test of
933 normalcy, which is that TREE_PURPOSE (VSLOTS) agree with the
934 basetype that TREE_VALUE (VSLOTS) is.
936 * cplus-decl.c (finish_decl): If ASMSPEC_TREE is non-zero, then
937 zero out DECL_RTL (DECL). Otherwise, it won't take.
939 Sun Feb 25 03:50:08 1990 Michael Tiemann (tiemann at teacake)
941 * cplus-typeck.c (build_modify_expr): Fix off-by-one bug in array
944 * cplus-init.c (cplus_expand_expr_stmt): Move function from here...
945 * cplus-decl.c (cplus_expand_expr_stmt): ...to here. Now we can
946 handle binding-level semantics at `exprstmt' boundaries.
948 * cplus-decl.c (lang_decode_option): Moved function from here...
949 * cplus-decl2.c (lang_decode_option): ...to here. Also moved
950 flags around, as neccessary.
952 * cplus-method.c (various places): Call `dump_readonly_or_volatile'
953 in many more places (saving 624 bytes object code).
955 * tree.h (struct tree_common): Add `raises_attr' and define
957 * tree.c (build{,1}): Set TREE_RAISES bit.
958 * cplus-class.c (build_method_call): Set TREE_RAISES bit.
959 * cplus-cvt.c (convert_to_aggr): Ditto.
960 * cplus-typeck.c (build_function_call,actualparameterlist): Ditto.
961 * cplus-init.c (expand_aggr_init_1): Don't know what to do about
962 TREE_RAISES, so #if 0'd out code to set it.
964 * cplus-decl.c (struct binding_level): Add new fields
965 `more_exceptions_ok' and `have_exceptions'.
967 Sat Feb 24 14:05:01 1990 Michael Tiemann (tiemann at arkesden)
969 * cplus-decl.c (finish_function): Move code up that handles named
970 return values that got kicked out of registers (hard or pseudo).
972 * stmt.c (expand_function_start): Failed to set TREE_REGDECL in
973 the case that PARMS_HAVE_CLEANUPS was nonzero.
975 * stmt.c (expand_goto_internal,fixup_cleanups): After running
976 cleanups, fixup the stack.
978 Fri Feb 23 07:40:17 1990 Michael Tiemann (tiemann at arkesden)
980 * cplus-cvt.c (build_type_conversion): There is only one void
981 type, so don't try looking "default" void to see if different.
983 * cplus-except.c (expand_cplus_end_catch): Call `expand_end_catch'
984 instead of `expand_escape_except'.
986 * cplus-except.c (expand_cplus_{end_except,reraise}): In case of
987 unhandled exceptions, have the program call
988 `__unhandled_exception' instead of `abort'.
990 * cplus-class.c (ideal_candidate): If the best candidate requires
991 a strict subset of the user-defined type conversions of all the
992 other candidates, pick it as the best.
994 * cplus-type2.c (build_functional_cast): If both attempts to cast
995 the argument failed, see why with LOOKUP_NORMAL, not
998 Thu Feb 22 03:52:00 1990 Michael Tiemann (tiemann at arkesden)
1000 * clpus-decl.c ({push,pop}_decl_level): Now #includes "stack.h"
1001 and uses `{push,pop}_stack_level'.
1003 * cplus-decl.c (hack_incomplete_structures): Now also completes
1004 arrays of incomplete structs.
1006 * cplus-lex.c (build_operator_fnname): Don't get faked out by
1007 ERROR_MARK as the TREE_CODE.
1009 * stor-layout.c (layout_{record,union}): For loops over fields,
1010 skip if TREE_CODE (field) != FIELD_DECL, instead of testing if ==
1011 CONST_DECL or VAR_DECL or TYPE_DECL etc.
1013 * cplus-decl.c (pushtag): Do gratuitous C++ typedefing even when
1014 in C language scope. Sigh.
1016 * cplus-decl.c (xref_tag): Don't assume CODE == TREE_CODE (REF).
1017 It's not when the user redeclares REF as the wrong kind of tag.
1019 * cplus-search.c (dfs_init_vbase_pointers): Use TREE_PURPOSE of
1020 VBASE_INIT_RESULT to hold the type of the virtual baseclass that
1022 * cplus-init.c (expand_aggr_vbase_init): Walk through RESULT and
1023 INIT_LIST in the order of CLASSTYPE_VBASECLASSES.
1024 * cplus-init.c (expand_aggr_vbase_init_1): New function.
1026 * cplus-decl.c (finish_function): Test CLASSTYPE_VSIZE before
1027 calling `build_virtual_init'.
1029 to do: fix protected squeaking through with -fsave-memoized
1030 to do: unify code in expand_vec_init, expand_vec_delete
1031 to do: for-local objects with destructors do not land in the right
1033 to do: fix complicated multiple inheritance bugs that strike when
1034 baseclasses are not virtual, and appear at multiple sites within
1036 to do: integrate.c vs GCC.
1037 to do: virtual functions for Convex and Choices
1038 to do: real pointers to members
1040 Mon Feb 19 13:48:30 1990 Michael Tiemann (tiemann at arkesden)
1042 * cplus-decl.c (grokdeclarator): Fix up ENUMERAL_TYPEs which are
1045 * cplus-cvt.c (convert): If we know a type conversion applies,
1046 don't try for fancy constructors.
1048 * cplus-decl.c (build_enumerator): TREE_TYPE (VALUE) must always
1049 be INTEGER_TYPE_NODE before calling `build_binary_op_nodefault'.
1051 * cplus-decl.c (complete_array_type): Merged GCC 1.37 code.
1052 * integrate.c (copy_for_inline): Ditto.
1053 * cplus-decl.c (grokdeclarator): Ditto.
1054 * stor-layout.c (layout_type): Ditto.
1056 Sat Feb 17 08:49:21 1990 Michael Tiemann (tiemann at arkesden)
1058 * cplus-typeck.c (require_instantiated_type): Make non-static.
1059 * cplus-typeck.c (type_unknown_p): New function, returns
1060 truthvalue of whether the TREE_TYPE of its argument is known.
1061 * cplus-class.c (various places): Changed to call these functions.
1063 Fri Feb 16 15:17:54 1990 Michael Tiemann (tiemann at arkesden)
1065 * cplus-class.c (finish_struct): Cons up default destructors when
1066 T uses virtual baseclasses or multiple inheritance, in addition to
1069 * integrate.c (copy_rtx_and_substitute): If we were needing an
1070 inline target (for example, a USE of the function return result),
1071 and we don't have one, just cons one up.
1073 * cplus-init.c (expand_vec_init): Comparison of HOST_I against
1074 zero should have been >=, not >.
1076 * cplus-dem.c: Fix #defines to use bcopy, bcmp instead of the str
1079 * cplus-cvt.c (convert): If converting to void type, check for
1080 possible operator void.
1082 * stmt.c (fixup_cleanups): If cleanups expand to nothing, don't
1083 call `reorder_insns'.
1085 * cplus-search.c ({push,pop}_stack_level): New functions.
1086 Abstracts functionality of pushing/popping objects to/from
1088 * cplus-search.c ({push,pop}_search_level): Use new *_stack_level
1090 * cplus-search.c ({push,pop}_type_level): Ditto.
1092 Tue Feb 13 11:32:12 1990 Michael Tiemann (tiemann at teacake)
1094 * cplus-init.c (build_delete): This function can get visibilities
1095 wrong if default destructors are not built (currently the case).
1096 As a temporary fix, pass FLAGS with LOOKUP_PROTECTED_OK for base
1097 destructor calls, and test LOOKUP_PROTECTED_OK when thinking about
1100 Sun Feb 11 11:47:37 1990 Michael Tiemann (tiemann at arkesden)
1102 * cplus-decl.c (finish_function): Don't call `build_virtual_init'
1103 for types which don't have virtual functions. Similarly, don't
1104 call `build_delete' if it doesn't need a destructor.
1106 * cplus-init.c (finish_base_init,build_delete): When building up
1107 and tearing down objects' bases, build pointers to base objects
1108 directly rather than by calling through `convert_pointer_to',
1109 since ambiguity in the lattice causes it trouble.
1111 * cplus-typeck.c (build_modify_expr): Removed unneeded casts when
1112 building sum of base address + offset.
1113 * cplus-class.c (build_vbase_path): Ditto.
1114 * cplus-class.c (build_vfn_ref): Ditto.
1115 * cplus-init.c (resolve_offset_ref): Ditto.
1116 * cplus-init.c (build_delete): Ditto.
1118 * cplus-typeck.c (build_modify_expr): Fix parenthesis error for
1119 deciding whether to recurse through aggregates or not
1120 (TYPE_USES_VIRTUAL_BASECLASSES is not enough).
1122 * cplus-parse.y (try): Change type from TTYPE to ITYPE.
1123 * cplus-parse.y (stmt): Call `cplus_expand_end_try' with result of
1124 `try' stmt. Now, if we wanted to, we could pass additional
1125 information about whether this try block is followed by an except
1126 stmt or a reraise clause.
1127 * cplus-parse.y (stmt): When processing a reraise clause, use
1128 ERROR_MARK_NODE as the default handler, to indicate that we
1129 actually have one, rather than NULL_TREE, which claims that we
1131 * cplus-except.c (cplus_expand_end_except): Always try next
1132 handler before ending the block.
1134 Sat Feb 10 13:57:28 1990 Michael Tiemann (tiemann at teacake)
1136 * cplus-init.c (build_delete): Use `convert_pointer_to' when ADDR
1139 * cplus-class.c (build_vfn_ref): Save intermediate result in
1140 SAVE_EXPR so we don't have to compute each component of virtual
1141 function pointer twice. But only do this when BUILDING_CLEANUP
1143 * cplus-decl.c (maybe_build_cleanup): New global variable
1144 BUILD_CLEANUP is controlled by this function.
1146 * cplus-expr.c (cplus_expand_expr): Use separate CALL_TARGET and
1147 RETURN_TARGET, in case call to `expand_expr' returns something
1148 different than CALL_TARGET in NEW_EXPR case.
1150 Fri Feb 9 04:00:42 1990 Michael Tiemann (tiemann at teacake)
1152 * cplus-lex.c (getch): New function. Encapsulates call to `getc'
1153 macro within function to save space.
1154 * cplus-lex.c (check_newline): Call `getch' instead of `getc' to
1157 Mon Feb 5 13:55:33 1990 Michael Tiemann (tiemann at arkesden)
1159 * cplus-decl.c (grokdeclarator): Don't gripe if static member has
1162 Sun Feb 4 19:51:52 1990 Michael Tiemann (tiemann at arkesden)
1164 * cplus-class.c (modify_vtable_entries): Fix failure to use
1165 proper initial value for OFFSET.
1167 * cplus-tree.c (layout_vbasetypes): Gross error was accidently
1168 causing storage to be exponentially counted! Fixed...
1170 * cplus-decl.c (duplicate_decls): Catch case where OLDDECLS are
1171 some overloaded functions and NEWDECL is not a FUNCTION_DECL.
1173 * cplus-init.c (finish_base_init): If there are several members
1174 with the same name (from different baseclasses), get the topmost
1177 * cplus-tree.c (lang_simple_cst_equal): New function. Callback
1178 for `simple_cst_equal'.
1179 * tree.c (simple_cst_equal): Needs new treatment for handling
1180 NEW_EXPR and CPLUS_NEW_EXPR. Use call-back for latter.
1181 * tree.c (simple_cst_list_equal): Now non-static.
1183 * integrate.c (expand_inline_function): Use `convert_move' instead
1184 of `emit_move_insn' when we need to copy INLINE_TARGET back to
1187 Sat Feb 3 09:45:47 1990 Michael Tiemann (tiemann at teacake)
1189 * ld.c: integrate changes from Mark Ullman which make linker
1190 suitable for cross linking.
1192 Thu Feb 1 16:27:03 1990 Michael Tiemann (tiemann at teacake)
1194 * cplus-expr.c (cplus_expand_expr): If TARGET is 0, generate a new
1195 temporary, unless MODE is BLKmode, in which case we abort.
1197 Tue Jan 30 02:55:20 1990 Michael Tiemann (tiemann at arkesden)
1199 * version.c: version 1.36.4 released.
1201 * cplus-decl.c (build_enumerator): Make it impossible to lose if
1202 ENUM_NEXT_VALUE is something like INTEGER_ONE_NODE.
1204 * tree.c (build_int_2): Don't need to set TREE_LITERAL here, it is
1206 * tree.c (make_node): Increment `TREE_NODE_KINDS[C_KIND]' for
1209 * cplus-init.c (expand_aggr_init_1): NEW_EXPR now encapsulates new
1210 information (due to compiler merging); lossage fixed.
1212 * case.c (various places): Replace calls to `build_int_2 (x, 0)'
1213 (where x == 0 or x == 1) with INTEGER_{ZERO,ONE}_NODE as
1216 * cplus-typeck.c (build_component_addr): Break out code to build
1217 the ADDR_EXPR of a COMPONENT_REF from `build_unary_op'.
1218 * cplus-cvt.c (build_up_reference): Call `build_component_addr' in
1219 case of COMPONENT_REF.
1221 Sun Jan 28 04:39:54 1990 Michael Tiemann (tiemann at arkesden)
1223 * cplus-init.c (build_vec_delete): Set TREE_VOLATILE on BLOCK,
1224 LOOP, and IF_STMT, to avoid spurious warning messages about
1225 statements not being useful.
1226 * stmt.c (warn_if_unused_value): Don's warn for LOOP_STMT,
1227 IF_STMT, or LET_STMT.
1229 * cplus-decl.c (build_enumerator): Prepare for fact that `fold'
1230 might put NOP_EXPRs around everything that is not an lvalue.
1232 * cplus-method.c (build_opfncall): New parameter FLAGS.
1233 Don't lose unless FLAGS include LOOKUP_COMPLAIN; there's always a
1234 chance that a type conversion will work, after all.
1235 * All callers changed.
1237 * cplus-cvt.c (build_type_conversion): Permit `operator int' to
1238 convert when `unsigned' is wanted (provided no `operator unsigned'
1239 exists). Same for `long' and `unsigned long'.
1241 * cplus-expr.c: New file. Contains definition of new function
1242 `cplus_expand_expr'.
1244 * cplus-lex.c (init_lex): Initialize LANG_EXPAND_EXPR.
1246 * toplev.c (LANG_EXPAND_EXPR): New variable is pointer-to-function
1247 which expands language-specific tree codes. Its default is
1249 * cplus-tree.def (CPLUS_NEW_EXPR): New tree code.
1251 Sat Jan 27 09:30:13 1990 Michael Tiemann (tiemann at arkesden)
1253 * tree.c (decl_type_context): Handle LET_STMT.
1255 * stmt.c (expand_catch): Renaming of function
1256 `expand_start_catch'. This function no longer takes EXITFLAG or
1257 ESCAPEFLAG as parameters (which is just as well, since it never
1259 * cplus-except.c (expand_cplus_start_catch): Caller changed.
1260 * cplus-parse.y: Removed vestigial call to `expand_end_catch'.
1262 * cplus-decl.c (duplicate_decls): Use FUNCTION_SIZE as measure of
1263 size of FUNCTION_DECL.
1265 * cplus-class.c (finish_base_struct): Get a fresh assoc list for
1266 BASETYPE before calling `propagate_basetype_offsets'. Also, copy
1267 the language-specific parts of BASETYPE.
1268 * cplus-class.c (propagate_basetype_offsets): FOR_TYPE now owns
1269 its assoc list for sure.
1271 * cplus-class.c (build_vbase_path): Convert EXPR at each stage of
1272 the lowering so that we don't get multiple calls to
1273 `build_vbase_path' when we try to build the vbase pointer.
1274 @@ This could probably be solved more cleanly.
1276 @@ Note that COMPONENT_REFs used as instance variables in method
1277 calls lose the fact that they were of fixed type.
1279 * cplus-decl.c (LANG_F_OPTIONS): Add FLAG_NO_INLINE for
1281 * cplus-decl.c (grokdeclarator): Implement FLAG_NO_INLINE.
1283 * cplus-decl.c (pushdecl): Only record an incomplete variable if
1284 it is RECORD_TYPE or UNION_TYPE. ARRAY_TYPE does not count.
1286 * cplus-init.c ({value,purpose}_member): Moved to tree.c.
1287 * cplus-decl2.c (FIRST_GLOBAL_OBJECT_NAME): Moved to varasm.c.
1289 * cplus-init.c (build_delete): Fixed code to avoid going through
1290 virtual function tables when some baseclasses are virtual.
1291 Accomplished by changing parameter PROTECT to FLAGS.
1292 * All callers changed.
1294 Fri Jan 26 03:44:15 1990 Michael Tiemann (tiemann at teacake)
1296 * cplus-decl.c (xref_tag): For jjg: make typedefs and struct defs
1299 * cplus-decl.c (xref_tag): Derived unions are invalid.
1301 * cplus-decl.c (finish_function): For destructors, remember to run
1302 base destructors for virtual baseclasses.
1304 * cplus-search.c (get_base_distance): Track leftmost path in chain
1305 whether or not PATH_PTR is non-NULL.
1307 * cplus-init.c (expand_vec_delete): Deleted. Callers now expand
1308 result from `build_vec_delete'.
1309 * Reinstall Jan 23 changes marked `@'.
1311 Thu Jan 25 21:35:27 1990 Michael Tiemann (tiemann at teacake)
1313 * expr.c (expand_expr): Handle expansion of LOOP_STMT and IF_STMT.
1315 * tree.c (build_loop): Bring this function out of its #ifdef.
1317 * stmt.c (expand_decl): Remove CLEANUP argument.
1318 * stmt.c (expand_decl_cleanup): New function, called when cleanup
1320 * cplus-decl.c (finish_decl): Use `expand_decl_cleanup'.
1322 Wed Jan 24 07:34:40 1990 Michael Tiemann (tiemann at arkesden)
1324 * cplus-decl.c (maybe_build_cleanup): Never build cleanups on the
1327 * stmt.c: Merged to 1.36.93.
1328 * expr.c: Merged to 1.36.93.
1330 Tue Jan 23 02:40:42 1990 Michael Tiemann (tiemann at teacake)
1332 * cplus-typeck.c (build_binary_op_nodefault): Use
1333 `conver_pointer_to' to convert arguments before comparing
1336 * cplus-class.c (build_vbase_path): Optimize path to virtual bases
1337 through objects with fixed type.
1339 * cplus-typeck.c (build_component_ref_2): Deleted.
1340 * cplus-typeck.c (build_component_ref): When FIELD comes from a
1341 non-"normal" baseclass, go through `convert_to_pointer' to convert
1342 DATUM to the right address.
1344 * cplus-typeck.c (build_unary_op): Handle case where FIELD is
1345 really a TYPE_DECL (which is used just for its DECL_OFFSET).
1347 The following changes are for merged GCC/G++. Changes marked
1348 with `@' had to be backed out.
1349 @ cplus-init.c (expand_delete): Deleted.
1350 @ cplus-decl.c (maybe_build_cleanup): Return tree nodes built by
1351 `build_delete' rather than building up structure with DELETE_EXPR.
1352 * cplus-decl2.c (finish_function): Expand expression returned from
1353 `build_delete' rather than calling `expand_delete'.
1354 * cplus-init.c (expand_vec_delete): Ditto.
1355 @ expr.c (expand_expr): No longer any need to handle
1357 @ tree.def (DELETE_EXPR): Move this to cplus-tree.def.
1359 Mon Jan 22 00:21:41 1990 Michael Tiemann (tiemann at teacake)
1361 * expr.c (expand_call): Don't reused pending stack space more than
1362 once in a given nest of calls.
1364 * cplus-init.c (build_delete): Don't build COND_EXPRs when we know
1367 * cplus-decl.c (finish_function): At end of destructor, no need to
1368 cast down the virtual function table if there is no virtual
1369 function table below (i.e., EXPRSTMT is a NOP_EXPR of
1372 * cplus-init.c (finish_base_init): Move code which sets
1373 CLASSTYPE_MARKED6 of each vbase type to 1 into
1374 `expand_aggr_vbase_init'.
1375 * cplus-init.c (expand_aggr_vbase_init): Now static in this file.
1376 Always set CLASSTYPE_MARKED6 of each vbase type before running the
1377 initialization, since all virtual baseclasses exposed to this
1378 function must be initialized.
1380 * cplus-search.c (build_type_pathname): Fix broken use of
1383 * cplus-typeck.c (c_expand_return): Don't try to call
1384 `expand_return' when DECL_RESULT is of void type.
1386 * cplus-lex.c (build_opid): Rename C++-specific
1387 `build_op_identifier' to `build_opid'.
1388 @@ Suggest changing `build_op_identifier' in tree.o to interface
1390 * All callers changed.
1392 Sun Jan 21 06:00:03 1990 Michael Tiemann (tiemann at teacake)
1394 * dbxout.c (dbxout_function): Put out debug info for a named
1396 * dbxout.c (dbxout_symbol): Treat a named RESULT_DECL like a
1399 * cplus-decl.c (store_return_init): If named return value comes in
1400 a register, put it in a pseudo.
1401 * cplus-typeck.c (mark_addressable): Simplify handling of
1402 RESULT_DECL--no need for anything fancy.
1403 * cplus-cvt.c (convert_to_reference): Ditto.
1405 * cplus-method.c (build_opfncall): Test FLAGS&LOOKUP_COMPLAIN to
1406 decide whether call to `build_overload_call' should complain.
1408 * cplus-decl.c (FLAG_INT_ENUM_EQUIVALENCE): New variable, controls
1409 how ints and enums should interconvert.
1410 * cplus-class.c (convert_harshness): Implement behavior based on
1413 * cplus-class.c (build_method_call): alloca `harshness' field of
1414 CP before calling `build_overload_call'.
1415 * cplus-class.c (build_overload_call): Don't alloca `harshness' of
1416 FINAL_CP, since caller does this. Also, use `oballoc' for
1417 `harshness' arrays of CP array when running the list of functions
1420 * cplus-method.c (hack_identifier): Use `error', not
1421 `error_with_decl' to report visibility violation for static
1422 members. Also, compute visibility with `compute_visibility'.
1424 Sat Jan 20 04:18:40 1990 Michael Tiemann (tiemann at teacake)
1426 * cplus-decl.c (finish_decl [#if MERGED]): Don't build DECL's
1427 cleanups until after it has been laid out.
1429 * cplus-decl.c (maybe_build_cleanup [#if MERGED]): Return an
1430 RTL_EXPR instead of a DELETE_EXPR.
1432 * cplus-class.c (prepare_fresh_vtable): Copy the list of virtual
1433 functions fom ASSOC, not from BASE_ASSOC (whose list is too
1435 @@ Is DECL_VPARENT right at all?
1437 * cplus-class.c (modify_vtable_entries): Handle case where virtual
1438 function comes from baseclass of virtual baseclass.
1440 * cplus-search.c (get_base_distance): Always follow the leftmost
1443 * cplus-class.c (finish_struct): When inheriting a base class's
1444 VFIELD, set its DECL_OFFSET to the correct value, for the cases
1445 when we use CLASSTYPE_VFIELD instead of `lookup_field' to get to
1448 * expr.c (expand_expr): Use language-idependent techniques for
1451 * cplus-init.c (expand_aggr_init): When initializing from a
1452 CONSTRUCTOR, it does not matter whether TYPE has a constructor
1453 defined or not: just strip out the elements as though they were
1454 args to a constructor and proceed.
1456 * cplus-class.c (build_method_call): If we need the address of a
1457 CONSTRUCTOR, initialize a fresh temporary, as in the NOP_EXPR
1460 * cplus-decl2.c (grok_method_quals): When building type variants,
1461 build the pointer types to the varaints.
1462 * cplus-decl.c (grokdeclarator): Ditto.
1464 * cplus-class.c (build_method_call): Error message was backwards
1465 when DECL_CONTEXT (FUNCTION) was not a basetype for
1468 * cplus-decl.c (grokdeclarator): If QUALS is non-NULL, don't abort
1469 if TYPE is not METHOD_TYPE. The correct error message will be
1472 * cplus-method.c (hack_identifier): Check visibility of VAR_DECL
1473 and CONST_DECL nodes.
1475 * cplus-class.c (instantiate_type): Don't smash the operand of an
1476 ADDR_EXPR if the type instantiation fails. Also, only give an
1477 error message in that case if COMPLAIN is nonzero.
1479 Fri Jan 19 15:12:27 1990 Michael Tiemann (tiemann at teacake)
1481 * cplus-decl2.c (grok_method_quals): Don't drop list of exceptions
1484 Thu Jan 18 00:20:29 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1486 * cplus-lex.c (init_lex): Allocate OPNAME_TAB and ASSIGNOP_TAB.
1488 Wed Jan 17 07:26:05 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1490 * cplus-lex.c (get_time_identifier): Added cast for `alloca'.
1491 * cplus-tree.c (layout_basetypes): Ditto.
1493 * stmt.c (expand_raise): Return nonzero if in exception nesting.
1495 * cplus-lex.c (init_lex): If C compiler doesn't understand the
1496 construct `sizeof ("string")', then fill in initializer for
1499 * cplus-init.c: Move declarations of extern struct rtx_def things
1500 to top of file to keep /bin/cc happy.
1502 * cplus-lex.c (init_lex): Set DECL_PRINTABLE_NAME.
1504 * varasm.c (record_constant_rtx): Save DESC on `current_obstack'
1505 instead of `saveable_obstack'.
1507 * tree.c (set_identifier_size): SIZE is size in bytes.
1508 * cplus-lex.c (init_lex): Call `set_identifier_size' with number
1509 of bytes, not number of slots.
1511 * toplev.c (compile_file): If `bison.simple' is out of date,
1512 consider that an error.
1514 * cplus-cvt.c (convert): Better error message if type conversion
1515 via constructor fails.
1517 * cplus-typeck.c (build_modify_expr): Spurious `else' appeared
1518 when LHSTYPE was aggr type. Deleted.
1520 * cplus-decl2.c (finish_file): Make the dummy variable at the end
1521 of the virtual function table chain look defined and used (soas
1522 not to generate spurious warnings).
1524 Tue Jan 16 15:42:30 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1526 * varasm.c (output_constant): Merged latest GCC changes.
1527 * toplev.c: Merged latest GCC changes.
1529 * cplus-decl.c (init_lex): Must call
1530 `set_identifier_size' before allocating any identifiers.
1532 * All files: Changed MEMBER_REF to OFFSET_REF.
1533 * cplus-init.c (build_offset_ref): Rename function
1534 `build_member_ref' to this.
1535 * cplus-init.c (resolve_offset_ref): Rename function
1536 `resolve_member_ref' to this.
1538 * cplus-lex.c (init_lex): Handle language-specific tree codes.
1540 * tree.def (IDENTIFIER_NODE): Default length is 2.
1541 * tree.def ({SCOPE,MEMBER}_REF): Moved definition to
1543 * tree.def (TYPE_EXPR): Ditto.
1545 * tree.c: Merge language-specific tree code support from GCC
1547 * tree.c (tree_cons,build_tree_list): Simplify these back to using
1548 `make_node' instead of inline-expansion.
1549 * tree.c (build_parse_node): renamed function `build_nt0' to this.
1550 All callers changed.
1552 * Makefile glitch for collect2 fixed.
1554 Tue Jan 16 00:38:39 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1556 * version.c: Version 1.36.3 released.
1558 * Makefile: Fixed makefile for collect2 (for Convexen) as per
1559 suggesions of <ngo%tammy@harvard.harvard.edu>.
1562 Mon Jan 15 10:57:43 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1564 * cplus-class.c (build_vbase_path): If path is erroneous (i.e., up
1565 from a virtual baseclass), then set *BASEP = NULL_TREE.
1566 * cplus-cvt.c (convert_to_pointer_force): Test BASETYPE before
1567 testing the DECL_OFFSET of its TYPE_NAME.
1569 * expr.c (store_one_arg): Handle non-PARM_BOUNDARY BLKmode
1570 parameters in a way that is symmetric with `assign_parms'.
1572 * cplus-init.c (expand_vec_init): Allow assignment semantics if
1574 * cplus-typeck.c (build_modify_expr): Call `expand_vec_init' with
1575 in this fashion if an array assignment must be performed.
1577 * expr.c (fixed_type_p): New function says whether the compiler
1578 guarantees that it knows the true type of an object.
1579 * expr.c (expand_expr): Call that function for INIT_EXPR and
1580 MODIFY_EXPR. Also, for MODIFY_EXPR, check both RHS and LHS.
1582 * cplus-typeck.c (build_unary_op): When building an ADDR_EXPR of a
1583 COMPONENT_REF, must convert the base to the pointer type of the
1584 DECL_CONTEXT of FIELD, not simply ARGTYPE. Bug triggered when
1585 FIELD has same type as a virtual or non-leftmost baseclass of
1588 Sun Jan 14 07:50:28 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1590 * cplus-typeck.c (actualparameterlist): Convert FUNCTION_DECLs for
1591 virtual functions to their proper representation if they were
1594 * cplus-typeck.c (instantiate_type_1): New function, factors out
1595 common code in calling `instantiate_type'.
1596 * cplus-class.c (instantiate_type): Now permitted to call this
1597 function with OP_IDENTIFIER. (Previously would abort).
1599 * Makefile: Use $(INCLUDES) instead of various random -I options
1600 scattered throughout front-end.
1602 * varasm.c (assemble_variable): Fix bug where NAME has a '*'
1605 Sat Jan 13 00:17:25 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1607 * cplus-class.c (compute_conversion_costs): Fixed comments and
1608 rearranged code that handled type instantiation. Also handled
1609 case where type instantiation leaves a parameter ERROR_MARK_NODE
1610 (consequently making ACTUAL_TYPE ERROR_MARK_NODE).
1611 * cplus-method.c (report_type_mismatch): Give better error message
1612 when type instatiation fails and clobbers the argument type.
1614 * cplus-type2.c (basetype_or_else): Code factorization.
1615 * All places with code of the form
1617 if (t1 == t2 || get_base_type (t1, t2, 0))
1622 now calls this function.
1624 * cplus-search.c (get_base_type): For jjg@sun.com: let friend
1625 classes TYPE have access to immediate baseclasses of TYPE.
1626 * cplus-search.c (get_base_distance): Same change.
1628 * cplus-method.c (build_opfncall): Give error messages on all
1629 overloaded functions which non-trivially fail except ADDR_EXPR and
1631 * cplus-class.c (build_method_call): Improved error message for
1632 non-const member function called with const object.
1634 * cplus-class.c (build_vbase_path): New function. Multi-level
1635 version of `build_vbase_pointer'. Code was moved from
1636 `convert_to_pointer'.
1637 * cplus-cvt.c (convert_to_pointer): Call `build_vbase_path'.
1638 * cplus-cvt.c (convert_pointer_to): Ditto.
1639 * cplus-cvt.c (convert_to_pointer_force): Remove duplicated code
1640 and call `build_vbase_path'.
1642 * cplus-decl.c (original_result_rtx): New variable. If named
1643 return value starts in register, but needs to be addressable, then
1644 we put the original RESULT_DECL's rtl in here.
1645 * cplus-typeck.c (c_expand_return): Implement this.
1646 * cplus-decl.c (finish_function): At end of function, if
1647 ORIGINAL_RESULT_RTX is non-zero, move DECL_RESULT (FNDECL) there.
1648 * cplus-typeck.c (mark_addressable): Allow this new feature.
1649 * cplus-cvt.c (convert_to_reference): Ditto.
1651 Fri Jan 12 00:20:06 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1653 * cplus-tree.h (TREE_CALLS_NEW): New meaning for TREE_LANG_FLAG_2:
1654 for any kind of _EXPR or _REF node, it means that underneath is a
1655 call to the storage allocator. If we later find out what was
1656 wanting initialization, we can pitch the call to `new', and the
1657 subsequent copy, winning big on things like "return String (foo);".
1658 * cplus-init.c (build_new): Set this bit.
1659 * cplus-class.c (build_method_call): Ditto.
1660 * cplus-method.c (build_opfncall): Ditto.
1661 * cplus-init.c (expand_aggr_init_1): Optimize calls to
1664 * cplus-cvt.c (convert_to_reference): If DECL is ERROR_MARK_NODE,
1665 then consider this an implicit conversion; if DECL is NULL_TREE,
1667 * cplus-typeck.c (convert_for_initialization): Be explicit that
1668 this is an implicit conversion.
1670 * cplus-cvt.c (convert_from_reference): Don't special-case
1671 converting REFERENCE_EXPRs from references.
1673 * cplus-cvt.c (convert_to_*): Factor out checks that EXPR is a
1674 REFERENCE_TYPE object.
1675 * cplus-cvt.c (convert{_force}): Factor it to here.
1677 * cplus-cvt.c (convert_pointer_to): New function. Previously
1678 `convert_to_nonzero_pointer', but now takes converts to pointer-to
1679 TYPE, rather than to TYPE.
1680 * cplus-cvt.c (convert_to_nonzero_pointer): Deleted.
1681 * All callers changed.
1683 * cplus-cvt.c (build_up_reference): If LOOKUP_PROTECTED_OK is set,
1684 let `get_base_type' return an immediate private baseclass without
1686 * cplus-cvt.c (convert_to_reference): Don't need to check whether
1687 conversion violates visibilities, since FLAGS is passed to
1688 `convert_to_reference'.
1689 * cplus-search.c (get_base_type): Implement that (if PROTECT == 3).
1691 * stmt.c (*except*): Use ESCAPE_LABEL instead of EXIT_LABEL as
1692 primary means of control over exception handling nestings.
1693 Where EXITFLAG was passed, also pass ESCAPEFLAG.
1694 * All callers changed. ESCAPEFLAG now controls behavior, not
1697 * stmt.c (expand_exit_nonexcept): Delete this function.
1698 * cplus-parse.y (stmt): Back out change which called
1699 `expand_exit_nonexcept' instead of `expand_exit_something'.
1701 * cplus-init.c (expand_recursive_init): Don't forget to initialize
1702 the vbase pointers if FOR_TYPE uses virtual baseclasses.
1704 * cplus-class.c (rank_for_overload): const/non-const disagreement
1705 is between checking EVIL and checking USER.
1706 * cplus-class.c (build_method_call): Don't hastily choose a method
1707 which has const/non-const disagreement.
1709 * cplus-decl.c (build_function_decl): Unify `builtin_function' and
1710 `auto_function'; also make it optional to push the function into
1711 the binding contour.
1712 * cplus-decl.c (init_decl_processing): Build ABORT_FNDECL.
1713 * cplus-decl2.c (grok_function_init): Use ABORT_FNDECL.
1714 * cplus-except.c (init_exception_processing): Ditto.
1716 Thu Jan 11 10:39:31 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1718 * cplus-decl2.c (finish_file): Merge changes from Raeburn
1719 (raeburn@athena.mit.edu) which name file-level initializers
1720 using global names declared instead of the filename containing
1721 the objects needing file-level initialization.
1722 * varasm.c (assemble_{variable,function}): Rest of changes merged.
1724 * cplus-cvt.c (convert_from_reference): When converting a
1725 REFERENCE_EXPR, wrap TREE_OPERAND (VAL, 0) in the NOP_EXPR
1726 instead of VAL--to save work later in `expand_expr'.
1728 * cplus-tree.h (LOOKUP_NO_CONVERSION): New flag which inhibits
1729 looking for user-defined type conversions.
1730 * cplus-type2.c (build_functional_cast): Use LOOKUP_NO_CONVERSION
1731 when calling constructor since if a type conversion applied, we
1732 don't want "two-level" conversions to take place.
1733 * cplus-class.c (build_method_call): Test this flag when PASS == 2
1734 and cp->user is non-zero.
1736 * cplus-decl.c (grokdeclarator): Don't set TYPE_HAS_DESTRUCTOR
1738 * cplus-decl2.c (grokclassfn): Set it here instead.
1740 Wed Jan 10 07:42:39 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1742 * cplus-class.c (build_method_call): -fall-virtual implies that
1743 2nd argument to operator->() is an int, not a T (C::*X)(...).
1745 * cplus-decl.c (finish_function): Keep named return values from
1746 catching warnings from jump.c about functions which appear to not
1749 * cplus-type2.c (process_init_constructor): Test INIT before
1750 copying TREE_HAS_CONSTRUCTOR flag to RESULT.
1752 * cplus-decl.c (pushdecl): If we had ANON_AGGRNAME_P in "C"
1753 language scope, and if we get a better name, fix that up as well.
1754 (Was only doing fixup for "C++" language scope).
1756 * cplus-method.c (dump_init): Handle CONSTRUCTOR as
1758 * cplus-typeck.c (actualparameterlist): Here, too.
1760 * cplus-decl.c (grokdeclarator): Move test of friend functions
1761 with method qualifiers to `grokfndecl'.
1762 * cplus-decl.c (grokfndecl): If QUALS is non-zero, then the
1763 TREE_CODE of TYPE must be METHOD_TYPE.
1765 * integrate.c (expand_inline_function): Code using
1766 THIS_STRUCT_VALUE_RTX was (blatantly) incorrect in case where
1767 STRUCT_VALUE_INCOMING_RTX was MEM. Code that looked right was
1768 #if 0'd out, but don't know why. Changed back to original code.
1770 Tue Jan 9 22:56:22 1990 Michael Tiemann (tiemann at apple-gunkies.ai.mit.edu)
1772 * cplus-parse.y (stmt): Exception contour is transparent to BREAK
1773 statement. Call `expand_exit_nonexcept' instead of
1774 `expand_exit_something'.
1775 * stmt.c (expand_exit_nonexcept): New function.
1777 * cplus-decl.c (build_enumerator): Accidently shared INTEGER_CST
1778 nodes which should not have been shared.
1780 Sun Jan 7 00:13:39 1990 Michael Tiemann (tiemann at g.oswego.edu)
1782 * cplus-init.c (expand_aggr_init_1): Use CONST0_RTX as TARGET for
1783 call to `expand_expr' in case of COND_EXPR.
1784 Similar changes made elsewhere in compiler where `expand_expr' was
1787 * cplus-typeck.c (build_modify_expr_1): When CODE is INIT_EXPR,
1788 and we call a constructor, remember to dereference the result we
1791 * cplus-init.c (expand_vec_init): Goto of init_by_default was
1792 accidently circumventing initialization of variable BASE2.
1793 Also fixed to handle initialization by default in more cases.
1795 * cplus-typeck.c (build_modify_expr_1): Typo. Use "<" instead of
1796 "<=" for CLASSTYPE_N_BASECLASS loop.
1797 * cplus-search.c (get_base_type_1): Same typo (but this function
1800 Sat Jan 6 21:55:31 1990 Michael Tiemann (tiemann at g.oswego.edu)
1802 * cplus-tree.h (TREE_HAS_CONSTRUCTOR): For CONSTRUCTOR, means that
1803 it was a GNU C constructor expression.
1804 * cplus-parse.y (cast_expr): Set that bit.
1805 * cplus-type2.c (process_init_constructor): Propagate this bit.
1806 * cplus-init.c (expand_aggr_init_1): Test that bit and call
1807 `store_init_value' if set.
1809 * cplus-lex.c: Handle strrchr/rindex problem in one place instead
1812 * cplus-init.c (expand_aggr_init_1): Convert INIT to type for EXP
1813 treating INIT as compound expr.
1815 * cplus-decl.c (grokparms): Can't use `error_with_decl' on a
1816 PARM_DECL here because DECL_CONTEXT is not set up yet. Fixed in 2
1819 * cplus-init.c (resolve_member_ref): Check that member is
1820 FIELD_DECL before bothering about use of non-static member in
1821 static function context.
1823 * cplus-init.c (embrace_waiting_friends): If TYPE_NAME (TYPE) is
1824 not a TYPE_DECL, it has no friends waiting.
1826 * cplus-dem.c (optable): Filled in ommissions found by Ron
1829 * cplus-decl2.c (grokopexpr): If IS_DECL tells us we have a static
1830 member function, but TYPE is a METHOD_TYPE, we must send the right
1831 argument list to build_operator_fnname.
1833 * Makefile: Explicitly link all the gen*.o and insn-*.? files.
1834 Otherwise, we get symbolic links to "gen*.o", etc.
1836 * make-links.g++: Added symout.c to BORROWED_FILES.
1838 Tue Jan 2 00:39:40 1990 (tiemann at calvin)
1840 * cplus-except.c (cplus_expand_end_except): New parameter EXITFLAG
1841 says whether to exit current exception contour and try the next
1843 * cplus-parse.y: Callers changed.
1845 * cplus-decl.c (pushdecl): Clear TREE_PUBLIC only if VAR_DECL is
1846 TREE_READONLY and not DECL_EXTERNAL. DECL_EXTERNAL is meaningless
1847 for other than VAR_DECLs.
1848 * cplus-decl.c (duplicate_decls): Same change.
1849 @@ Maybe we can eliminate some duplicated code here!
1851 * cplus-tree.c (copy_to_permanent): If T is NULL_TREE, return it.
1853 * cplus-cvt.c (convert_to_aggr): Deal with "in charge" parameter
1854 if BASETYPE uses virtual baseclasses.
1856 * cplus-class.c (build_overload_call): Change name of DECL to
1857 OVERLOAD_NAME. Also, append VOID_LIST_NODE to end of PARMTYPES,
1858 to build more accurate overload name.
1860 Mon Jan 1 13:36:07 1990 (tiemann at calvin)
1862 * cplus-decl.c (store_parm_decls): No need for PRESERVE flag, so
1863 deleted. All callers changed.
1865 * cplus-parse.y (member_init): De-implement keeping virtual
1866 baseclass initializers on the permanent obstack. Now handled by
1867 "in charge" parameter to constructor.
1869 * cplus-cvt.c (convert_to_reference): Convert EXPR from reference
1870 if it came in as a reference and its conversion to TYPE& may
1871 change its value (i.e., if it uses MI or VB).
1873 * cplus-class.c (build_method_call): Use DECL_CONTEXT, not
1874 DECL_VCONTEXT of FUNCTION when LOOKUP_NONVIRTUAL is in effect.
1875 Factored out duplicated code in the process.
1877 * cplus-class.c (build_method_call): Constructors called when
1878 `this' is logically zero must perform any virtual baseclass
1879 initialization. Other constructors (which are used for
1880 initialization of sub-ojbects), never perform virtual baseclass