1 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
7 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9 * cp-tree.h (ptr_reasonably_similar): Add decl.
11 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
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.
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.
23 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
24 not an error_mark_node.
26 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
28 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
29 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
31 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
33 * decl.c (grokdeclarator): When giving an anonymous struct a name,
34 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
37 * typeck2.c (build_m_component_ref): If component is a pointer
38 to data member, resolve the OFFSET_REF now.
40 * call.c (convert_like): Don't go into infinite recursion.
42 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
44 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
45 * tree.c (layout_basetypes): And on the vbase ptr.
47 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
52 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
54 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
56 * decl2.c (grok_x_components): Remove synthesized methods from
57 TYPE_METHODS of an anonymous union, complain about member
59 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
61 (finish_function): Just clear the DECL_RTL of our arguments.
63 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
65 * decl2.c (finish_file): Emit DWARF debugging info for static data
68 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
70 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
72 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
75 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
77 * Make-lang.in (g++-cross$(exeext)): Fix typo.
79 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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
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.
91 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
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.
96 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
98 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
99 that make -j3 bootstrap works better.
101 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
103 * decl.c (pushtag): Do pushdecl for anon tags.
105 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
107 * typeck.c (c_expand_return): Fix logic.
108 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
110 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
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
117 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
119 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
121 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
123 * init.c (resolve_offset_ref): Handle obj.vfn better.
124 * typeck.c (build_component_ref): Set TREE_TYPE on result from
127 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
129 * typeck.c (convert_for_assignment): Also handle anachronistic
130 implicit conversions from (::*)() to cv void*.
131 * cvt.c (cp_convert_to_pointer): Likewise.
133 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
135 * lex.c (handle_cp_pragma): Fix bogus warning.
137 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
139 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
140 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
142 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
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
151 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
153 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
156 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
158 * class.c (finish_struct_1): A class has a non-trivial copy
159 constructor if it has virtual functions.
161 * cvt.c (cp_convert): Always call a constructor.
163 * call.c (reference_binding): Still tack on a REF_BIND
165 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
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.
173 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
175 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
176 of GCC be path-relative.
178 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
180 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
181 it does need choose-temp.o and pexecute.o.
183 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
189 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
191 * init.c (expand_default_init): Avoid calling constructors to
192 initialize reference temps.
194 * cvt.c (convert_to_reference): Fix.
196 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
206 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
208 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
210 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
212 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
214 * init.c (expand_aggr_init_1): Don't crash on non-constructor
217 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
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.
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.
249 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
256 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
258 * pt.c (current_template_args): New fn.
259 (push_template_decl): Use it.
260 * decl.c (grokdeclarator): Use it.
262 * decl2.c (build_expr_from_tree): Dereference ref vars.
264 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
265 the decl-specifier-seq.
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.
271 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
274 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
276 * typeck.c (get_delta_difference): Remove previous bogusness.
277 Don't give errors if force is set.
279 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
281 * decl2.c (finish_file): Don't emit debug info.
282 * decl.c (pushdecl): Lose obsolete code.
283 (grokdeclarator): Still do the long long thing after complaining.
284 * search.c (note_debug_info_needed): Don't do anything if we're in a
286 * method.c (synthesize_method): For non-local classes,
287 push_to_top_level first.
289 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
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.
296 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
298 * error.c (dump_expr): Improve the wording on error messages that
299 involve pointer to member functions.
301 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
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.
307 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
314 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
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.
328 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
330 * typeck.c (c_expand_return): Fix for returning overloaded fn.
332 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
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
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.
342 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
348 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
350 * typeck.c (signed_or_unsigned_type): If the given type already
351 as the correct signedness, then just return it.
353 * typeck.c ({un,}signed_type): If can't do anything, call
354 signed_or_unsigned_type.
356 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
358 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
359 current_class_type is NULL.
361 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
363 * class.c (finish_struct_1): Avoid empty structs by adding a field
364 so layout_type gets the mode right.
366 * typeck.c (c_expand_return): Drastically simplify.
368 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
370 * typeck.c (decay_conversion): Handle overloaded methods.
372 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
374 * call.c (build_over_call): A TARGET_EXPR has side-effects.
376 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
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
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.
389 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
391 * Make-lang.in (cplib2.ready): Fix logic.
393 * decl.c (shadow_tag): Only complain about non-artificial function
396 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
398 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
400 * expr.c (cplus_expand_expr): Pre-tweak call_target like
401 expand_inline_function would.
403 * pt.c (mark_decl_instantiated): If extern_p, call
404 mark_inline_for_output.
406 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
408 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
411 * typeck.c (get_delta_difference): Fix wording, as we can be used
412 for pointer to data members.
414 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
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.
420 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
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
426 * decl2.c (finish_file): Emit DWARF debugging info for static data
429 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
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.
434 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
441 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
443 * input.c (sub_getch): Handle 8-bit characters in string literals.
445 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
447 * tree.c (mapcar): Handle CONSTRUCTORs.
448 (copy_to_permanent): Handle expression_obstack properly.
450 * Make-lang.in (cplib2.txt): Also depend on the headers.
452 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
454 (expand_class_desc): Use USItype for offset field.
455 * tinfo.h (struct __class_type_info): Likewise.
457 * method.c (build_overload_int): TYPE_PRECISION should be applied
460 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
462 * call.c (build_new_op): A COND_EXPR involving void must be a
465 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
473 * decl.c (start_decl): variable-sized arrays cannot be initialized.
474 * error.c (dump_type_suffix): Handle variable arrays.
476 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
478 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
480 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
482 * decl.c (lookup_name_real): Don't try to look up anything in a
485 * tinfo2.cc (__throw_type_match_rtti): Oops.
487 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
489 * Make-lang.in (exception.o): Use -fno-PIC for now.
491 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
493 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
495 (get_tinfo_fn_dynamic): Extracted from build_typeid.
496 * tinfo2.cc (__dynamic_cast): Adjust.
498 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
499 (build_x_typeid): Likewise.
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.
509 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
511 * call.c (convert_like): Pull out constant values.
513 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
515 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
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.
521 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
523 * Make-lang.in (exception.o): Turn off pic.
525 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
526 type, multi-level ptr conversions.
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.
533 (synthesize_tinfo_fn): Handle functions and arrays before checking
536 * Remove .h from standard C++ headers, add new.h, move into inc
539 * exception*: Remove pointer from object, constructors. Add
540 default exception::what that uses type_info::name. Add
543 * init.c (build_new): Don't add a cookie to new (void *) T[2].
545 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
547 * Make-lang.in: Building C++ code depends on cc1plus.
549 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
551 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
552 a HOST_WIDE_INT, not a tree.
554 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
556 * exception.cc: Don't include <stdlib.h>.
558 * Make-lang.in (c++.clean): Remove cplib2.*.
560 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
562 * parse.y (component_decl_1, component_costructor_declarator case):
563 Pass attributes/prefix_attributes in tree list.
565 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
567 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
569 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
571 * lex.c (do_identifier): Don't do deferred lookup in a template
574 * typeck2.c (store_init_value): Oops.
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.
584 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
586 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
588 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
589 * typeck2.c (store_init_value): Check for initializing pmf with { }
591 (process_init_constructor): Not here.
593 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
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.
608 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
610 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
612 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
614 * method.c (make_thunk): Call comdat_linkage before setting the
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
622 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
624 * decl2.c (grokfield): Tighten checking for access decls.
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
632 (grokdeclarator): Resolve 'typename's in the type specifier that
633 refer to members of the current scope.
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.
641 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
643 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
645 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
647 * call.c (build_method_call): When calling a signature
648 default implementation, as in other cases, let instance_ptr simply
651 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
653 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
655 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
657 * except.c (expand_start_catch_block): Add a pushlevel so that -g
658 works on hppa and SPARC.
660 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
662 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
664 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
666 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
667 before testing whether it's a signature.
669 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
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,
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.
685 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
687 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
690 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
692 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
694 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
696 * except.c (expand_start_try_stmts): Move to except.c in the backend.
697 (expand_end_try_stmts): Remove.
699 * init.c (perform_member_init): Use add_partial_entry () instead
700 of directly manipulating lists.
701 (emit_base_init): Ditto.
703 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
705 * except.c (expand_exception_blocks): Always make sure USE and
706 CLOBBER insns that came at the end still do, the backend relies
709 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
711 * call.c (build_over_call): We can only use a TARGET_EXPR of the
714 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
716 * cvt.c (convert_to_reference): Revert last change, don't complain
717 about temp without target decl.
719 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
721 * decl.c (grokdeclarator): Don't core dump when void() is given.
723 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
725 * decl.c (copy_args_p): Don't crash.
727 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
729 * pt.c (tsubst): And support template args inside the exception
732 * pt.c (tsubst): Add support for exception specifications in
735 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
737 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
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
749 (groktypename): Likewise.
750 (start_decl): Eliminate the throw spec parameter. Eliminate the
751 throw spec parameter to grokdeclarator. Eliminate the throw spec
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
770 (expand_start_catch_block): Eliminate the throw spec parameter to
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
781 * pt.c (process_template_parm): Eliminate the throw spec parameter
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
788 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
790 * parse.y (datadef): Remove non-winning optimization.
792 (fndef): Remove ambiguous error productions uncovered by grammer
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.
801 (condition): Likewise.
802 (initdcl0): 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.
812 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
814 * call.c (build_over_call): Also use an INIT_EXPR when
815 initializing anything from an rvalue.
817 * call.c (build_over_call): Call stabilize_reference when building
818 an INIT_EXPR instead of calling the copy ctor.
820 * call.c (joust): Extend the previous change to all comparisons.
822 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
823 NO_LINKAGE_HEURISTICS.
825 * decl2.c (finish_file): Emit any statics that weren't already.
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
834 (build_up_reference): Handle TARGET_EXPRs.
835 * call.c (build_over_call): Elide unnecessary temps.
836 (can_convert*): Use new overloading code.
838 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
840 * call.c: Move TYPE_PTR*_MACROS ...
841 * cp-tree.h: To here.
842 * typeck.c (build_reinterpret_cast): Implement.
844 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
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.
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.
854 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
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.
860 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
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.
870 * pt.c (tsubst): Likewise.
872 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
874 * decl2.c (groktypefield): Remove unused code.
876 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
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.
884 * lex.c (make_pointer_declarator): Change type_quals into
886 (make_reference_declarator): Likewise.
888 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
890 * decl.c (start_function): Only check interface_* for templates
891 with flag_alt_external_templates.
893 * call.c (build_new_op): Check for comparison of different enum types.
894 (build_over_call): Fix arg # output.
896 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
898 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
900 * call.c (build_new_op): Check for erroneous args.
902 * call.c (build_new_method_call): Add missing args to cp_error.
904 * tree.c (error_type): Dont print reference-to-array.
906 * typeck.c (convert_for_assignment): Don't say contravariance for
909 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
911 * call.c (build_over_call): Diagnose bad convs for `this'.
913 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
916 * call.c (convert_like): Handle bad convs.
917 (build_over_call): Handle bad convs better.
919 * decl2.c: -fansi-overloading is now the default.
921 * call.c (build_new_method_call): Check for erroneous args.
923 * pt.c (instantiate_class_template): Propagate
924 TYPE_USES_MULTIPLE_INHERITANCE.
926 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
928 * call.c (enforce_access): Add static to routine.
930 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
932 * call.c (build_user_type_conversion_1): Fix bad handling.
933 (compare_ics): Likewise.
935 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
937 * call.c (standard_conversion): Oops.
939 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
941 * g++.c: Update test for win32 (&& ! cygwin32).
943 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
956 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
958 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
959 integer_type_node when computing pointer offsets.
961 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
970 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
972 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
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.
979 * call.c (null_ptr_cst_p): Adjust.
981 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
983 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
986 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
988 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
989 fns of classes without virtual functions.
991 * call.c (add_function_candidate): Handle `this' specially.
992 (compare_ics): Likewise.
994 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
996 * typeck.c (build_conditional_expr): Fix handling of __null.
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.
1003 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1005 * pt.c (end_template_decl): If we don't actually have parms, return.
1006 * parse.y (template_header): Accept 'template <>'.
1008 * errfn.c: Allow 5 args.
1010 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1012 * tree.c (make_temp_vec): New fn.
1013 * pt.c (push_template_decl): Handle partial specs.
1014 (instantiate_class_template): Likewise.
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.
1022 * parse.y: Likewise.
1023 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
1024 DECL_TEMPLATE_MEMBERS.
1025 * call.c (print_z_candidates): Reduce duplication.
1027 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1029 * decl2.c (lang_decode_option): Allow -fansi-overloading.
1031 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1033 * pt.c (get_bindings): New fn.
1034 (most_specialized): Likewise.
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.
1039 (build_new_function_call): Likewise.
1040 * decl2.c (finish_file): Likewise.
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
1049 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1051 * decl2.c (import_export_vtable): Delete code that disabled vtable
1052 heuristic on systems with ASM_OUTPUT_EXTERNAL.
1054 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1056 * typeck.c (build_x_function_call): Handle static call context
1059 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
1060 the function, not its outer block.
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.
1066 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
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
1072 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
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...
1080 * decl.c (grokparms): Don't check default args in templates.
1082 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1084 * cvt.c (build_new_op): Fix args to build_unary_op.
1085 (add_builtin_candidates): Don't call type_promotes_to on float.
1087 * decl.c (grokparms): Check the type of the default arg.
1089 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
1090 returning NULL_TREE.
1092 * typeck.c (build_x_binary_op): Avoid doing extra work.
1093 (build_x_unary_op): Likewise.
1094 (build_x_conditional_expr): Likewise.
1095 * cvt.c (build_over_call): Return.
1096 (add_builtin_candidate): Fix MEMBER_REF.
1097 (build_new_op): Likewise.
1099 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
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.
1105 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1107 * cvt.c (convert_like): Don't call build_cplus_new twice.
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.
1112 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1114 * cvt.c (build_over_call): Call build_cplus_new.
1115 * call.c (build_method_call): Likewise.
1116 * typeck.c (build_function_call_real): Likewise.
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.
1120 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
1122 * typeck.c (complete_type): Propagate
1123 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
1125 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1127 * cvt.c (joust): More ?: kludging. Sigh.
1128 (build_over_call): Don't try to synthesize global fns.
1130 * search.c (lookup_conversions): Use binfo marking.
1132 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
1134 * search.c (build_mi_matrix): Use the correct value of cid
1135 when determining the new mi_size.
1137 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1143 (implicit_conversion): Likewise.
1144 (add_builtin_candidates): Be careful about arrays.
1145 (build_new_method_call): Handle vtable optimization.
1147 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1154 * cvt.c (build_new_function_call): Check for error args.
1156 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
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
1163 * decl.c (init_decl_processing): Still set its type here.
1164 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
1165 (convert_to_pointer_force): Likewise.
1166 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
1168 * call.c (convert_harshness): Use null_ptr_cst_p.
1169 * typeck.c (convert_for_assignment): Likewise. Don't produce
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.
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.
1185 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1199 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
1201 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
1204 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
1206 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
1207 instead of just maybe_build_cleanup so that we deallocate the
1210 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1212 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
1213 * cp-tree.h (finish_prevtable_vardecl): Add decl.
1215 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
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.
1221 * error.c (dump_decl): Don't explode (or explode more gracefully
1222 as appropriate) if the object being dumped has a null type.
1223 (dump_expr): Likewise.
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
1228 (lookup_fnfields): Fix comment.
1229 (breadth_first_search): Fix comment.
1231 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1233 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
1235 * class.c (finish_struct): Call cplus_decl_attributes here.
1236 (finish_struct_1): Not here.
1237 * cp-tree.h: Adjust.
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.
1243 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1253 * decl.c (start_function): Statics are static even in a #pragma
1256 * decl2.c (import_export_vtable): Disable vtable heuristic on
1257 systems with ASM_OUTPUT_EXTERNAL.
1259 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
1260 (standard_conversion): No std conv to enum type.
1262 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
1265 * cvt.c (reference_binding): Bind directly to a base subobject of
1268 * cvt.c (build_new_op): Enforce access control.
1270 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
1272 * typeck2.c (process_init_constructor): When scanning the
1273 union for a named field, skip things that aren't FIELD_DECLs.
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
1279 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1281 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
1284 * cvt.c (build_user_type_conversion_1): Handle overloaded
1287 * cvt.c (add_builtin_candidates): Don't consider type conversion
1288 operators for the first parameter of operator=.
1290 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
1292 * typeck.c (complete_type): Only call layout_type if we're not
1293 expanding a template.
1295 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1297 * cvt.c (compare_ics): Oops.
1299 * cvt.c (op_error): Oops.
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.
1311 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
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.
1317 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1327 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
1329 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
1331 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1333 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
1335 * cvt.c (build_builtin_candidate): Oops.
1336 (build_new_op): Oops.
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.
1346 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1348 * typeck.c (complete_type): Call layout_type rather than building
1351 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
1354 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1361 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1363 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
1364 (add_builtin_candidate): Likewise.
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
1375 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
1376 Fall back on preincrement handling. Use op_error.
1378 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
1380 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
1383 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
1385 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
1387 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
1389 * typeck.c (build_component_ref_1): Use build_component_ref
1390 instead of open coding it here.
1392 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1394 * g++.c (main): Don't link with -lg++.
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.
1416 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1418 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
1419 invalid second argument to dump_expr_list.
1421 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
1423 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
1425 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
1427 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
1430 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
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.
1437 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
1439 * typeck.c (build_ptrmemfunc1): New function to hide details of
1440 pointer to member functions better.
1442 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
1444 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
1445 methods into the actual method, as we know the implied object is
1448 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1450 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
1451 inside a system header.
1453 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
1455 * call.c (build_method_call): Call complete_type on the
1458 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
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
1464 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
1466 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
1467 around things. Also improve maintainability.
1469 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
1471 * decl.c (grokdeclarator): Check for overflow when evaluating an
1474 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
1476 * cvt.c (cp_convert): Don't check for ambiguity with constructor
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.
1503 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
1505 * decl.c (lookup_name_real): If we find mem in obj when parsing
1506 `obj->mem', make sure we return the right value.
1508 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
1510 * search.c (get_base_distance): Call complete_type.
1512 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
1514 * decl.c (store_bindings): Make static.
1516 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1518 * init.c (expand_aggr_init_1): Don't check type conversions if
1521 * cvt.c (z_candidate): Put back template field.
1522 (add_function_candidate): Set it.
1523 (add_template_candidate): Likewise.
1525 (compare_qual): Handle references and pointers to members.
1526 (compare_ics): Handle reference bindings.
1528 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
1530 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
1532 * call.c (compute_conversion_costs): Call complete_type.
1534 * tree.c (vec_binfo_member): Use comptypes instead of comparing
1535 pointers, so we can handle template parameters.
1537 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
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
1543 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1557 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
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.
1564 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1566 Stop doing this damn index==strchr variable name confusion.
1567 * class.c (add_virtual_function): Change local var INDEX to be
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.
1583 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1595 * init.c (expand_vec_init): Don't crash if decl is NULL.
1597 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
1599 * mpw-config.in: New file, configury for Mac MPW.
1600 * mpw-make.sed: New file, makefile editing for MPW.
1602 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1604 * pt.c (instantiate_class_template): Call repo_template_used.
1606 * search.c (lookup_conversions): Only lookup conversions in
1609 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1611 * cp-tree.def: Renamed from tree.def, to avoid confusion with
1613 * cp-tree.h, lex.c: Include cp-tree.def.
1614 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
1616 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
1618 * init.c (build_vec_delete_1): Call complete_type.
1620 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
1622 * except.c (start_anon_func): Make sure anonymous functions are
1625 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1627 * decl.c (finish_function): If function_depth > 1, set nested.
1629 * decl2.c (grokbitfield): Revert Bob's change.
1630 * class.c (finish_struct_1): Fix handling of named bitfield widths.
1632 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1639 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
1641 * decl2.c (grokbitfield): Handle constant decls appropriately.
1642 Give an appropriate error message now instead of spewing core
1645 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1647 * decl2.c: Don't turn on thunks by default for now.
1649 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
1651 * typeck.c (complete_type): Handle error_mark_node.
1652 (common_type, OFFSET_TYPE): Handle template_type_parms.
1654 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1656 * pt.c (instantiate_decl): If at_eof, call import_export_decl
1657 regardless of DECL_INLINE.
1659 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
1661 * class.c (finish_struct_bits): Copy TYPE_SIZE.
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.
1668 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
1676 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1678 * decl2.c (finish_vtable_vardecl): Don't trust
1679 TREE_SYMBOL_REFERENCED for vtables of local classes.
1681 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1683 * pt.c (tsubst_copy): Handle operator T.
1685 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
1690 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
1692 * typeck.c (build_conditional_expr): Don't assume that
1693 the arguments to ?: are always pointers or records.
1695 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1697 * decl2.c (import_export_decl): Still emit static/weak/comdat
1698 copies of inline template functions with -fno-implicit-templates.
1700 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
1702 * init.c (build_delete): Determine the complete basetype
1703 path to the destructor we're calling.
1705 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
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
1710 (start_enum): Don't copy integer_zero_node because
1711 build_enumerator will do it.
1713 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1715 * decl.c (finish_function): Do access control on base destructors.
1717 * pt.c (tsubst, case FUNCTION_DECL): Set up
1718 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
1721 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
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.
1728 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
1730 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
1731 LOOKUP_ONLYCONVERTING at all for now.
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.
1739 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
1741 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
1744 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
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.
1749 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
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.
1754 * init.c (expand_aggr_init_1): Likewise.
1755 (build_new): Likewise.
1756 * typeck.c (expand_target_expr): Likewise.
1758 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1760 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
1763 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
1765 * cvt.c (build_up_reference): Redo how and when temporaries are
1767 * decl.c (grok_reference_init): Don't try and be smart about
1770 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
1772 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
1773 (TARGET_EXPR...), now that it has 4 arguments.
1774 * tree.c (build_cplus_new): Likewise.
1776 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1778 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
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.
1787 * method.c (do_build_assign_ref): Remove obsolete check of
1788 TYPE_HAS_ASSIGN_REF (basetype).
1790 * decl.c (grokfndecl): Diagnose user definition of
1791 implicitly-declared methods.
1793 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
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.
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.
1808 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
1810 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
1811 determining types for constant values.
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.
1816 (poplevel): Likewise.
1817 (lookup_label): Likewise.
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
1821 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
1823 (finish_function): Likewise.
1825 (start_decl): Complain about defining a static data member
1826 in a different type from which it was declared.
1828 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1830 * cvt.c (build_expr_type_conversion): Adjust.
1832 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1834 * call.c (build_method_call): Always convert 'this' to the
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.
1842 * method.c (emit_thunk): Call temporary_allocation and
1843 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
1845 * tree.c (build_cplus_array_type): Handle tweaking of
1846 TYPE_MAIN_VARIANT here.
1847 * typeck.c (common_type): Not here.
1849 * typeck.c (complete_type): Only try to complete an array type if
1852 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1854 * decl.c (grokvardecl): Call complete_type.
1855 (grokdeclarator): Call complete_type for PARM_DECLs.
1857 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1859 * pt.c (instantiate_class_template): Re-set
1860 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
1862 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
1864 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
1865 smart enough to do it right.
1866 * tree.c (cp_expand_decl_cleanup): Likewise.
1867 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
1868 cp_expand_decl_cleanup.
1869 (store_parm_decls): Likewise.
1870 (hack_incomplete_structures): Likewise.
1871 * except.c (push_eh_cleanup): Likewise.
1873 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
1875 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
1876 frontend to the backend where it belongs.
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.
1883 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
1885 * init.c (emit_base_init): Make sure the partial EH cleanups live
1886 on the function_obstack.
1888 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
1890 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
1891 when checking for pointer types.
1893 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1895 * pt.c (instantiate_class_template): Remove obsolete check for
1896 access declarations.
1898 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
1900 * call.c (build_overload_call): Simplify calls to
1901 build_overload_call by removing last parameter.
1902 (build_method_call): Likewise.
1903 * cp-tree.h: Likewise.
1904 * method.c (build_opfncall): Likewise.
1905 * typeck.c (build_x_function_call): Likewise.
1907 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
1909 * call.c (default_parm_conversions): Factor out common code.
1910 (build_method_call): Use it.
1911 (build_overload_call_real): Use it.
1913 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
1915 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
1916 but pedwarn as the code is bogus.
1917 * typeck.c (decay_conversion): Likewise.
1918 (build_function_call_real): Use build_addr_func instead of
1919 default_conversion. Don't allow pointer-to-method functions down
1921 (build_unary_op): Use real pointer-to-member functions instead of
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
1929 (build_expr_from_tree): Pass current_class_ref to
1930 build_x_function_call instead of current_class_ptr.
1931 * init.c (build_member_call): Likewise.
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.
1938 * typeck.c (get_delta_difference): Handle virtual bases better.
1940 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
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'
1947 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
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.
1954 * cvt.c (convert_to_aggr): Likewise.
1955 * typeck.c (build_function_call_real): Likewise.
1956 * sig.c (build_signature_table_constructor): Use build_addr_func.
1957 * cp-tree.h (build_call, build_addr_func): Declare them.
1959 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
1961 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
1962 * parse.y: Remove uses of LOOKUP_AGGR.
1964 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
1966 * *.[chy]: Rename current_class_decl to current_class_ptr, and
1967 C_C_D to current_class_ref.
1969 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1971 * call.c (convert_harshness): Tighten up pointer conversions.
1973 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
1975 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
1976 (finish_file): Likewise.
1978 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1980 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
1982 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
1985 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1987 * decl2.c: Turn on thunks by default where supported.
1989 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
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.
1994 (build_overload_call): Likewise.
1995 * typeck.c (build_x_function_call): Use build_overload_call_real
1996 instead of build_overload_call_maybe.
1998 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2000 * decl2.c (finish_file): Don't try to emit functions that haven't
2003 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2005 * decl2.c (finish_vtable_vardecl): Oops.
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.
2011 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2018 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
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.
2024 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
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.
2031 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
2033 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
2036 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
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
2042 * lex.c (handle_cp_pragma): Disable #pragma
2043 interface/implementation if SUPPORTS_ONE_ONLY > 1.
2045 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2047 * method.c (emit_thunk): Wrap default case in
2048 temporary/permanent_allocation.
2050 * method.c (make_thunk): Use DECL_ONE_ONLY.
2051 (emit_thunk): Call assemble_end_function.
2053 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2055 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
2056 (import_export_decl): Likewise.
2057 (finish_prevtable_vardecl): Disable vtable hack if
2058 SUPPORTS_ONE_ONLY > 1.
2060 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
2062 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
2063 PREDECREMENT_EXPRs take two arguments, not one.
2065 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
2067 * class.c (build_vtable_entry): Don't build thunks for abstract
2070 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
2073 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2075 * class.c (set_rtti_entry): Use size_zero_node.
2076 (build_vtable): Likewise.
2078 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
2080 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
2081 (prepare_fresh_vtable): Likewise.
2083 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
2085 * method.c (emit_thunk): Call mark_used on the target function.
2087 * call.c (build_method_call): Don't warn about pending templates.
2089 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2091 * decl2.c (finish_file): Fix list walking logic.
2093 * typeck2.c (check_for_new_type): Only warn if -pedantic.
2095 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
2097 * class.c (finish_struct_1): Remove old code for
2098 dont_allow_type_definitions.
2099 * cp-tree.h: Likewise.
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.
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().
2111 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2113 * decl2.c (finish_file): Only use a sentry if the decl is public.
2115 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
2116 don't pass LOOKUP_ONLYCONVERTING.
2118 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
2120 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
2121 properly keeps track of const and volatile type modifiers.
2123 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2125 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
2126 * pt.c (comp_template_args): Use it.
2128 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
2129 assemble_external for artificial function decls.
2131 * decl.c (cp_finish_decl): Oops.
2133 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2147 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
2149 * parse.y (empty_parms): Make sure we use C++-style prototypes
2150 when we're declaring member functions.
2152 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2154 * Makefile.in (CONFLICTS): 16 s/r conflicts.
2155 * parse.y (self_template_type): New nonterminal.
2157 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2159 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
2161 * parse.y (base_class.1): Allow 'typename foo::bar'.
2163 * lex.c (check_newline): Remove #pragma code that plays with the
2164 input stream, since we now deal with tokens. Clear nextchar when
2166 (handle_cp_pragma): Use real_yylex.
2167 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
2170 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
2172 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
2174 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2176 * parse.y: New token SELFNAME for potential constructor.
2177 * spew.c (yylex): Handle it.
2178 * lex.c (identifier_type): Produce it.
2180 * parse.y (complete_type_name): In :: case, don't push class binding.
2181 (complex_type_name): Likewise.
2183 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
2185 * typeck.c (build_reinterpret_cast): Handle pointer to member
2188 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2190 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
2192 (check_newline): Put the vtable/unit/implementation/interface pragma
2193 code into handle_cp_pragma, replacing it with a call.
2194 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
2195 args. Get the next token after handling the pragma token.
2197 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2199 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
2200 (convert_to_pointer_force): Likewise.
2202 * init.c (build_new): Fix array new without -fcheck-new.
2204 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2206 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
2207 tree.c: Lose TYPE_NESTED_NAME.
2209 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
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.
2217 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2219 * method.c (make_thunk): Thunks are static.
2220 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
2222 * decl2.c (mark_vtable_entries): Emit thunks as needed.
2223 (finish_file): Don't emit them here.
2225 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2227 * rtti.c (build_dynamic_cast): Handle null pointers.
2228 (ifnonnull): New function.
2230 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
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.
2237 * search.c (expand_upcast_fixups): Mark the new fixup as
2240 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2242 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
2244 * class.c (set_rtti_entry): Fix for thunks.
2246 * decl2.c (import_export_decl): Still emit typeinfo fns for
2247 cv-variants of builtin types.
2249 * rtti.c (expand_class_desc): Set up base_info_type_node here.
2250 (init_rtti_processing): Instead of here.
2252 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2254 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
2255 (build_typeid): Only complain about taking dynamic typeid without
2258 * decl2.c: flag_rtti defaults to 1.
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
2264 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
2266 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
2268 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
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.
2276 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2282 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
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.
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
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
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.
2309 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2311 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
2312 other X subobjects in the most derived type. Ack.
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.
2318 (expand_*_desc): Likewise.
2319 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
2321 (init_decl_processing): Lose builtin_type_tdescs lossage.
2322 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
2324 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
2326 * pt.c (tsubst): When calling set_nested_typename, use
2327 TYPE_NESTED_NAME (current_class_type) instead of
2330 * decl.c (pushdecl): Likewise.
2331 (pushdecl_class_level): Likewise.
2332 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
2333 set_nested_typename.
2335 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2337 * rtti.c (synthesize_tinfo_fn): Handle arrays.
2339 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
2341 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2347 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
2349 * decl2.c (finish_file): Don't synthesize artificial functions
2350 that are external and not inline.
2352 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
2354 * decl2.c (finish_file): Handle having new inlines added to
2355 saved_inlines by synthesis.
2357 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
2359 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2361 RTTI rewrite to initialize nodes as needed, not require that
2362 users #include <typeinfo>, complete functionality and reduce wasted
2364 * rtti.c (init_rtti_processing): New fn.
2365 (build_typeid): The vtable entry is now a function.
2366 (get_tinfo_var): New fn.
2367 (get_tinfo_fn): Likewise.
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
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.
2381 (finish_file): Likewise.
2382 * typeck.c (inline_conversion): New fn.
2383 (build_function_call_real): Use it.
2384 * cp-tree.h: Add decls.
2386 * method.c (hack_identifier): Also convert component_refs from
2389 * lex.c (cons_up_default_function): Use the type, not the name, in
2392 * decl2.c (import_export_vtable): Fix weak vtables.
2394 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
2396 * search.c (get_base_distance_recursive): Fix access checks for
2399 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2401 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
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.
2423 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
2430 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
2432 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
2433 cast to pointer types for type searching.
2435 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2437 * typeck.c (get_delta_difference): Use cp_error, not error, in the
2438 case where BINFO == 0.
2440 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
2442 * call.c (build_method_call): Fix wording of error messages so
2443 constructors come out right.
2445 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
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.
2451 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
2453 * class.c (finish_struct_1): Propagate the TYPE_PACKED
2454 flag for the type to the type's fields.
2456 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2458 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
2460 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
2462 * class.c (base_info, finish_base_struct): Replace
2463 needs_virtual_dtor with base_has_virtual.
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.
2469 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2471 * pt.c (push_template_decl): Complain about template decl with
2472 inappropriate declaration.
2474 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
2476 * typeck.c (build_x_unary_op): Remove bogus check for taking
2477 the address of a member function.
2479 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2481 * parse.y (constructor_declarator): Only push the class if
2482 we are not already in the class.
2484 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
2486 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
2487 Add additional argument to INIT_CUMULATIVE_ARGS.
2489 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2491 * decl.c (shadow_tag): Fix error about anon union with methods.
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.
2497 * parse.y (component_decl_1): Use constructor_declarator.
2498 (fn.def2): Likewise.
2499 (notype_component_declarator0): Likewise.
2501 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
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
2507 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2509 * pt.c (process_template_parm): Allow template type parms to be
2510 used as types for template const parms.
2512 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
2514 * init.c (expand_vec_init): Ensure the eh cleanups are on the
2517 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2524 * parse.y (constructor_declarator): New nonterminal.
2526 (explicit_instantiation): Likewise.
2528 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
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
2538 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
2539 * cp-tree.h: Adjust.
2541 * pt.c (do_function_instantiation): Separate handling of member
2542 functions and non-member functions properly.
2544 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2546 * pt.c (process_template_parm): Improve error for 'volatile class K'.
2548 * class.c (finish_struct_1): Check the right slot for destructors.
2550 * decl.c (start_enum): Complain about enum templates.
2552 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
2554 * init.c (resolve_offset_ref): Offset pointers to member data by one.
2555 * typeck.c (unary_complex_lvalue): Likewise.
2557 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
2559 * typeck.c (c_expand_return): Check for a returned local
2560 array name, similar to the check for an ADDR_EXPR.
2562 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2564 * decl.c (cp_finish_decl): Don't build cleanups for static
2567 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
2569 * typeck.c (build_modify_expr): Fix error messages to be more
2571 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
2572 assignment operators.
2573 * error.c (assop_as_string): Likewise. Add support for `%Q' for
2574 assignment operators.
2576 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2582 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
2584 * typeck.c (require_complete_type): Be sure to instantiate the
2585 MAIN_VARIANT of the type.
2587 * decl2.c (finish_file): Instantiate pending templates before
2588 processing static constructors and destructors.
2590 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
2593 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
2595 * decl2.c (delete_sanity): If error_mark_node is passed
2596 in as an expression, quit while we're ahead.
2598 * decl.c (grokdeclarator): Give an error message if `friend'
2599 is combined with any storage class specifiers.
2601 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
2603 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
2604 definition of nonexistent nested type.
2606 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
2607 not to say 'typedef'.
2609 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
2616 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2618 * except.c (build_throw): Support minimal parse.
2619 * pt.c (tsubst_copy): Support THROW_EXPR.
2620 * decl2.c (build_expr_from_tree): Likewise.
2622 * pt.c (mangle_class_name_for_template): Always allocate
2625 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
2627 * cvt.c (cp_convert_to_pointer): Give an appropriate error
2628 when trying to cast from an incomplete type.
2630 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2632 * pt.c (instantiate_class_template): Don't bother setting up
2633 CLASSTYPE_TAGS explicitly, as the nested types will add
2636 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
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.
2643 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2645 * lex.c (do_identifier): Only do name consistency check if we're
2648 * pt.c (push_template_decl): Don't crash if we get a member defn
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.
2657 * typeck2.c (build_functional_cast): Pull out a single parm before
2658 passing it to build_c_cast.
2660 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
2662 * expr.c (do_case): Give an error message if a pointer is
2663 given as a case value.
2665 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2667 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
2670 * lex.c (cons_up_default_function): Really, now, interface hackery
2671 does not apply to synthesized methods.
2673 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
2675 * call.c (build_method_call): Ctors and dtors now have special names
2676 with respect to lookups.
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.
2710 * decl.c (ctor_identifier): New.
2711 (dtor_identifier): New.
2712 (init_decl_processing): Set them.
2714 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
2716 * typeck.c (build_component_ref): Don't get confused by fields whose
2717 context has no type name, like pointer to member functions.
2719 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2721 * decl.c (grokdeclarator): Handle typedef without declarator.
2723 * pt.c (tsubst): Handle SCOPE_REF in declarator.
2725 * parse.y (bad_parm): Catch another case of missing `typename'.
2727 * lex.c (yyprint): Handle TYPE_DECLs.
2729 * decl.c (start_function): Don't try to be clever.
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.
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.
2739 * cp-tree.h: Update.
2741 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
2744 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
2746 * method.c (build_opfncall): When deleting a pointer to an
2747 array, build a new pointer to the tree past any ARRAY_TYPE
2750 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2752 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
2754 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2756 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
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.
2762 (pending_inlines): Likewise.
2764 * decl2.c (build_expr_from_tree): If a unary op already has a
2765 type, just return it.
2767 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
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.
2772 (finish_vtable_vardecl): Likewise.
2773 (prune_vtable_vardecl): Likewise.
2774 * lex.c (set_vardecl_interface_info): Likewise.
2775 * cp-tree.h: Adjust return types.
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.
2782 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2784 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
2786 * decl.c (grokdeclarator): Lose special handling of class-level
2787 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
2788 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
2790 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
2792 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
2794 * search.c (compute_access): Fix handling of anonymous union
2796 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
2797 from anonymous unions to their members.
2799 * typeck.c (build_x_function_call): For static member functions,
2800 hand off to build_member_call.
2802 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2804 * typeck.c (build_component_ref): Handle OFFSET_REFs.
2806 * init.c (expand_vec_init): Fix init == 0 case.
2808 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2810 * init.c (build_new): Pedwarn about init and array new.
2811 (expand_vec_init): Handle lists, use convert_for_initialization
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.
2817 * typeck.c (build_conditional_expr): Handle user-defined
2818 conversions to slightly different types.
2820 * decl.c (grokdeclarator): Force an array type in a parm to be
2823 * decl2.c (do_using_directive): Sorry.
2824 (do_namespace_alias): Likewise.
2825 * lex.c (real_yylex): Warn about using the `namespace' keyword.
2827 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2829 * parse.y (datadef): Move call to note_list_got_semicolon up.
2831 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
2833 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
2835 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
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.
2842 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
2844 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
2846 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2848 * tree.def: Add RETURN_INIT.
2849 * pt.c (instantiate_decl): Handle RETURN_INIT.
2850 * decl.c (store_return_init): Handle minimal_parse_mode.
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
2855 * typeck.c (comptypes): Handle TYPENAME_TYPE.
2857 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
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.
2862 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2864 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
2865 referring to addresses of variables and functions.
2867 * error.c (dump_expr): Support SIZEOF_EXPR.
2869 * init.c (do_friend): Use the return value of check_classfn.
2871 * typeck.c (convert_arguments): Call complete_type.
2873 * method.c (hack_identifier): After giving an error, set value to
2876 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
2886 (finish_function): Likewise.
2887 * method.c (synthesize_method): Likewise.
2888 * lex.c (process_next_inline): Likewise.
2889 (do_pending_inlines): Likewise.
2890 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
2893 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
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.
2899 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
2901 * method.c (hack_identifier): Requiring a static chain is now a
2903 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
2906 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2908 * init.c (build_offset_ref): Call complete_type.
2910 * decl.c (pop_from_top_level): Always pop previous_class_type.
2912 * parse.y: Handle multiple decls in a for-init-statement.
2913 * pt.c (tsubst_expr): Likewise.
2915 * pt.c (tsubst): Use tsubst_expr for the second operand of an
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.
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.
2927 * decl2.c (finish_file): Push the dummy each time we walk the list
2930 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
2931 something for CAST_EXPR.
2933 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2935 * cvt.c (cp_convert): Warn about implicit conversion of the
2936 address of a function to bool, as it is always true.
2938 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2940 * typeck.c (c_expand_return): Fix warning for local externs returned.
2942 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2944 * tree.c (mapcar): Propagate const and volatile properly.
2946 * typeck.c (complete_type): Be sure to instantiate the
2947 MAIN_VARIANT of the type.
2949 * method.c (synthesize_method): Class interface hackery does not
2950 apply to synthesized methods.
2952 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2954 * pt.c (comp_template_args): Use comptypes rather than just
2955 checking for TEMPLATE_TYPE_PARM equivalence.
2957 * typeck.c (build_x_function_call): Call complete_type before
2958 checking TYPE_OVERLOADS_CALL_EXPR.
2960 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
2962 * g++.c (main): Check also for new define ALT_LIBM.
2964 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2966 * pt.c (instantiate_class_template): If we don't have a pattern
2968 (coerce_template_parms): If we see a local class, bail.
2970 * decl.c (grok_reference_init): Make sure there's a type before
2973 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
2974 (push_template_decl): Likewise.
2976 * parse.y (named_class_head): Set
2977 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
2979 * decl.c (xref_tag): Diagnose redeclaration of template
2980 type-parameter name.
2982 * error.c (dump_type): Handle anonymous template type parms.
2984 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
2986 (coerce_template_parms): Likewise.
2988 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
2990 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
2991 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
2993 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
2995 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
2996 before trying to get its STUB_DECL.
2997 (coerce_template_parms): Likewise.
2999 * parse.y (template_type_parm): If they didn't use 'class',
3000 pretend they did after giving an error.
3002 * pt.c (coerce_template_parms): Diagnose use of local class.
3004 * decl.c (grok_reference_init): Use instantiate_type.
3006 * error.c (dump_expr): Handle TEMPLATE_DECLs.
3008 * parse.y (named_class_head): Diagnose mismatching types and tags.
3010 * decl.c (pushdecl): Type decls and class templates clash with
3011 artificial type decls, not hide them.
3013 * decl.c (redeclaration_error_message): Diagnose redefinition of
3015 (duplicate_decls): Diagnose disallowed overloads for template
3018 * decl.c (start_decl): Call complete_type before checking for a
3021 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
3023 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
3025 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3027 * decl.c (grok_op_properties): Don't check for operator++(int) in
3030 * tree.c (perm_manip): Return a copy of variable and function
3031 decls with external linkage.
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.
3038 * decl.c (cp_finish_decl): Call complete_type before deciding
3039 whether or not to lay out the decl.
3041 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
3043 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3045 * typeck2.c (build_x_arrow): Call complete_type.
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.
3053 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3055 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
3056 memoized lookup stuff inside GATHER_STATISTICS.
3058 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3060 * decl.c (start_decl): Complain about array of incomplete type
3062 (grokdeclarator): Not here.
3064 * parse.y (template_parm): Expand full_parm inline so we can set
3065 the rule's precedence.
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.
3072 * decl.c (define_label): Make the min decl go on permanent_obstack.
3074 * pt.c (unify): Don't handle CONST_DECLs.
3075 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
3076 (tsubst_copy): Likewise.
3078 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
3079 CONST_DECL for a template parm.
3081 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
3083 * decl.c (grokdeclarator): Complain about array of incomplete type
3085 (start_decl_1): Not here.
3087 * pt.c (tsubst): Handle pointer-to-function declarators.
3089 * method.c (hack_identifier): If pedantic, diagnose local class
3090 methods that require a static chain.
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.
3097 * parse.y (template_arg): The expr has precedence like '>'.
3099 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3101 * pt.c (coerce_template_parms): Don't coerce an expression using
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
3106 * method.c (build_overload_int): Emit something arbitrary for an
3107 expression using template parms.
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.
3114 * tree.def: Add CAST_EXPR.
3115 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
3116 CONVERT_EXPR for minimal_parse_mode.
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.
3122 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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
3129 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
3130 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
3132 * cp-tree.h (declare_uninstantiated_type_level,
3133 uninstantiated_type_level_p): Delete prototypes.
3135 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3137 * pt.c (tsubst_expr): Add default return.
3139 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3141 * error.c (fndecl_as_string): Delete unused arg CNAME.
3142 * sig.c (build_signature_table_constructor,
3143 build_signature_method_call): Fix calls.
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):
3163 (__tp_desc_type_node): #if 0 var decl.
3164 (fndecl_as_string): Fix prototype.
3166 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3168 * tree.def: Add GOTO_STMT.
3169 * pt.c (tsubst_expr): Support goto and labels.
3170 * decl.c (define_label): Support minimal parsing.
3171 * parse.y (simple_stmt): Likewise.
3173 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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
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.
3183 * tree.c (build_exception_variant): Delete unused vars I, A, T,
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):
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.
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
3206 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3208 * parse.y (pending_inlines): Add function_try_block case.
3210 * pt.c (unify): Fix for template const parms.
3212 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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
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
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.
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.
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.
3248 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
3249 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
3251 * cvt.c (cp_convert): Delete unused local var FORM.
3252 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
3255 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3257 * pt.c (do_poplevel): Oops; really return what we get from
3260 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3262 * cp-tree.h (is_aggr_type): Add prototype.
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.
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
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
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.
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.
3327 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3329 * pt.c (tsubst): Only look for matching decls at file scope for
3330 non-member functions.
3332 * call.c (build_scoped_method_call): Handle scoped destructor
3335 * decl.c (*_top_level): Also save previous_class_values.
3337 * pt.c (tsubst_expr): Support do {} while loops.
3338 * parse.y (simple_stmt): Likewise.
3339 * tree.def: Likewise.
3341 * method.c (build_overload_identifier): For a class nested in a
3342 template class, don't mangle in the template parms from our
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
3353 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
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.
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.
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.
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.
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.
3389 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
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.
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.
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
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.
3424 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
3426 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
3428 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3430 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
3431 (build_min_nt): Likewise.
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.
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
3445 * decl2.c (finish_file): Don't emit statics we can't generate.
3446 * pt.c (instantiate_decl): Don't set interface on instantiations
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.
3453 (instantiate_decl): Likewise.
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.
3458 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
3465 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3467 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
3469 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
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.
3475 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3477 * decl2.c (grokfield): Still call pop_nested_class for access decls.
3479 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3481 * decl.c (lookup_label): Call label_rtx.
3483 * decl.c (make_binding_level): New function.
3484 (pushlevel, pushlevel_class): Call it instead of explicit
3485 duplicate calls to xmalloc.
3487 * decl.c (init_decl_processing): Delete useless build_pointer_type
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.
3496 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
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.
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
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.
3512 * search.c (get_matching_virtual): Use cp_error_at.
3514 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3516 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
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.
3522 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
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.
3528 * typeck.c (convert_sequence): #if 0 unused function.
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.
3536 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
3538 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
3540 * class.c (finish_struct_1): Check for a pure-specifier on a
3541 non-virtual function here.
3543 * decl2.c (grok_function_init): Don't check whether the function
3545 (grokfield): Don't call check_for_override here.
3547 * decl.c (push_to_top_level): Start from inner_binding_level,
3548 check class_shadowed in class levels.
3550 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
3552 * decl.c (resume_level): Ignore things that don't have names, instead
3555 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3557 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
3559 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
3561 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
3564 * parse.y (complete_type_name): Bind global_scope earlier.
3565 (complex_type_name): Likewise.
3566 (qualified_type_name): Remove.
3568 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
3570 * decl.c (grokfndecl): Move code that looks for virtuals in base
3572 * class.c (check_for_override): ... to a new function.
3573 (finish_struct_1): Call it.
3575 * cp-tree.h: Declare warn_sign_compare.
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.
3581 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
3582 implies -Wsign-compare. -Wall doesn't imply -W.
3584 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
3586 * typeck.c (build_component_ref): Fix to handle anon unions in base
3589 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
3604 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3606 Make the C++ front-end pay attention to attributes for structures.
3607 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
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.
3620 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
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.
3627 * lex.c (do_identifier): Use global binding in preference of
3628 dead for local variable.
3630 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
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.
3636 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
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.
3643 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3645 * init.c (is_friend): Make sure there's a context before we see if
3648 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
3650 * init.c (is_friend): Classes are not friendly with nested classes.
3652 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
3654 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
3655 and record its result.
3657 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
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
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.
3670 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
3672 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
3673 code that ensures that copy ctors are used if appropriate.
3675 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3677 * init.c (build_vec_delete): Only give an error if base isn't an
3680 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
3682 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
3683 (yylex): If we see `new', keep slurping.
3685 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
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.
3692 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3694 * decl.c (grokdeclarator): Avoid trying to get an operand off an
3697 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
3699 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
3700 POINTER_SIZE to agree with expr.c.
3702 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
3704 * search.c (lookup_field): Don't report ambiguities if protect is 0,
3705 instead return NULL_TREE.
3707 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
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
3718 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3720 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
3722 * typeck.c (null_ptr_cst_p): Delete unused fn.
3723 (build_function_call_maybe): Delete unused fn.
3725 * expr.c (extract_init): #if 0 the code after unconditional return 0
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.
3755 * lex.c (do_pending_inlines): Delete synthesized method kludge.
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.
3785 * typeck.c (convert_arguments): Delete gc code.
3786 (build_component_addr): Delete -fgc warning.
3787 (build_modify_expr): Delete gc code.
3789 * decl2.c (build_push_scope): Delete fn.
3790 * cp-tree.h (build_push_scope): Delete decl.
3792 * search.c (clear_search_slots): Delete fn.
3793 * cp-tree.h (clear_search_slots): Delete decl.
3795 * search.c (tree_needs_constructor_p): Delete fn.
3796 * cp-tree.h (tree_needs_constructor_p): Delete decl.
3798 * tree.c (id_cmp): Delete fn.
3800 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
3801 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
3803 * tree.c (decl_value_member): Delete fn.
3804 * cp-tree.h (decl_value_member): Delete decl.
3806 * tree.c (list_hash_lookup_or_cons): Delete fn.
3807 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
3809 * method.c (cplus_exception_name): Delete fn.
3810 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
3812 * spew.c (shift_tokens): Delete fn.
3814 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3816 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
3818 * parse.y: Likewise.
3820 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3822 * tree.c (build_cplus_staticfn_type): Delete function definition;
3824 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
3826 * tree.c (virtual_member): Delete function definition; never used.
3827 * cp-tree.h (virtual_member): Delete decl.
3829 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
3831 * typeck.c (build_component_ref): Handle getting vbase pointers
3832 out of complex multiple inheritance better.
3834 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
3836 * typeck.c (build_object_ref): Make sure we use the real type, not
3839 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
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.
3844 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3846 * decl.c (store_bindings): Split out from push_to_top_level.
3847 (push_to_top_level): Call it for b->type_shadowed on class binding
3850 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
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
3858 (fixup_virtual_upcast_offsets): Change to reflect new calling
3859 convention for expand_upcast_fixups.
3861 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3863 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
3864 check that it's usable as the bitfield width.
3866 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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.
3872 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3874 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
3875 (nested_type): Likewise.
3876 (nested_name_specifier): Use lastiddecl.
3878 * decl.c (grokdeclarator): Adjust accordingly.
3879 * init.c (expand_member_init): Likewise.
3880 * parse.y (base_class): Likewise.
3881 * typeck2.c (build_functional_cast): Likewise.
3883 * typeck2.c (build_functional_cast): Fill in name after we've
3884 checked for non-aggr type.
3886 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
3888 * decl2.c (warn_pointer_arith): Default to on.
3890 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3892 * lex.c (is_rid): New function.
3893 * decl.c (grokdeclarator): Diagnose reserved words used as
3896 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
3898 * tree.c (get_decl_list): Don't lose cv-quals.
3900 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
3901 typespecs used as declarator-ids.
3903 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
3905 * decl.c (poplevel): When poping a level, don't give a warning for
3906 any subblocks that already exist.
3908 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3910 * typeck.c (build_object_ref): Finish what I started.
3912 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
3914 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
3916 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
3919 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3921 * decl.c (xref_tag): Handle passing a type in directly.
3923 * parse.y (qualified_type_name): Pull out the type.
3924 (nested_type): Likewise.
3925 Take types directly instead of as identifiers.
3926 * call.c (build_scoped_method_call): Take types directly instead of
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.
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.
3938 * init.c (sort_base_init): Likewise.
3939 (expand_member_init): Likewise.
3940 * init.c (is_aggr_type): New function, like is_aggr_typedef.
3942 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
3944 * tree.c (layout_basetypes): Call build_lang_field_decl instead
3945 of build_lang_decl if first arg is a FIELD_DECL.
3947 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3949 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
3951 * except.c (expand_start_catch_block): Set TREE_USED to avoid
3952 warnings about the catch handler.
3954 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
3956 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
3959 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
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
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',
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):
3983 * method.c (hack_identifier): Likewise.
3984 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
3986 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
3988 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
3989 frontend, and make it more consistent with respect to
3992 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>