1 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
4 that make -j3 bootstrap works better.
6 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
8 * decl.c (pushtag): Do pushdecl for anon tags.
10 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
12 * typeck.c (c_expand_return): Fix logic.
13 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15 * decl.c (grokfndecl): Also note_debug_info_needed on ctype here.
17 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
19 * g++.c (main): Make sure arglist has a final NULL entry. Add
20 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
21 stdin/stdout of the invoked program are redirected to
24 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
26 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
28 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
30 * init.c (resolve_offset_ref): Handle obj.vfn better.
31 * typeck.c (build_component_ref): Set TREE_TYPE on result from
34 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
36 * typeck.c (convert_for_assignment): Also handle anachronistic
37 implicit conversions from (::*)() to cv void*.
38 * cvt.c (cp_convert_to_pointer): Likewise.
40 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
42 * lex.c (handle_cp_pragma): Fix bogus warning.
44 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
46 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
47 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
49 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
51 * class.c (finish_struct_1): Support DWARF2_DEBUG.
52 * search.c (dfs_debug_mark): Likewise.
53 * decl2.c (finish_vtable_vardecl): Likewise.
54 * decl.c (pushtag, finish_enum): Likewise.
55 * lex.c (check_newline): Use debug_* instead of calling *out
58 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
60 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
63 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
65 * class.c (finish_struct_1): A class has a non-trivial copy
66 constructor if it has virtual functions.
68 * cvt.c (cp_convert): Always call a constructor.
70 * call.c (reference_binding): Still tack on a REF_BIND
72 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
74 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
75 (c_expand_return): Likewise.
76 * typeck2.c (digest_init): Likewise for { }.
77 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
78 * cvt.c (cp_convert): Handle failure better.
80 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
82 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
83 of GCC be path-relative.
85 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
87 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
88 it does need choose-temp.o and pexecute.o.
90 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
92 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
94 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
96 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
98 * init.c (expand_default_init): Avoid calling constructors to
99 initialize reference temps.
101 * cvt.c (convert_to_reference): Fix.
103 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
105 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
106 (convert_to_reference): Likewise.
107 * typeck.c (convert_for_initialization): Likewise.
108 * init.c (expand_default_init): Likewise.
109 (expand_aggr_init_1): Likewise.
110 * cp-tree.h (CONV_NONCONVERTING): Lose.
111 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
113 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
115 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
117 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
119 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
121 * init.c (expand_aggr_init_1): Don't crash on non-constructor
124 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
126 * g++.c: Include gansidecl.h.
127 (VPROTO, PVPROTO, VA_START): Delete.
128 (choose_temp_base_try, choose_temp_base, perror_exec,
129 run_dos) [__MSDOS__]: Delete fns.
130 (pfatal_with_name): Delete fn.
131 (temp_filename): Declare like in gcc.c.
132 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
133 (error_count, signal_count): Define.
134 (error): Delete both definitions.
135 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
136 (pfatal_pexecute): Add fn from gcc.c.
137 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
138 code to use the pexecute stuff also used by gcc.c.
139 (MIN_FATAL_STATUS): Define.
140 * Make-lang.in (g++): Add dependency on and linking with
141 choose-temp.o and pexecute.o.
143 * cp-tree.h: Include gansidecl.h.
144 (STDIO_PROTO): Delete #undef/#define.
145 * cvt.c (NULL): Delete #undef/#define.
146 * expr.c (NULL): Likewise.
147 * init.c (NULL): Likewise.
148 * rtti.c (NULL): Likewise.
149 * xref.c (NULL): Likewise.
151 * cp-tree.h (build_user_type_conversion): Add prototype.
152 * call.c (build_user_type_conversion): Delete prototype. Correct
153 decl of FLAGS arg to be an int.
154 * cvt.c (build_user_type_conversion): Likewise.
156 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
158 * cp-tree.def: Add TRY_BLOCK and HANDLER.
159 * except.c (expand_start_catch_block): Support templates.
160 * parse.y (try_block, handler_seq): Likewise.
161 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
163 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
165 * pt.c (current_template_args): New fn.
166 (push_template_decl): Use it.
167 * decl.c (grokdeclarator): Use it.
169 * decl2.c (build_expr_from_tree): Dereference ref vars.
171 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
172 the decl-specifier-seq.
174 * decl.c (grok_op_properties): Don't force the type of a conversion
175 op to be complete. Don't warn about converting to the same type
176 for template instantiations.
178 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
181 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
183 * typeck.c (get_delta_difference): Remove previous bogusness.
184 Don't give errors if force is set.
186 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
188 * decl2.c (finish_file): Don't emit debug info.
189 * decl.c (start_function): Call note_debug_info_needed for context.
190 (start_decl): Likewise.
191 (cp_finish_decl): Not here.
192 (finish_function): Or here.
193 (pushdecl): Lose obsolete code.
194 (grokdeclarator): Still do the long long thing after complaining.
195 (finish_enum): Don't call rest_of_type_compilation
197 * class.c (finish_struct_1): Don't call rest_of_type_compilation
199 * search.c (dfs_debug_mark): For DWARF, just call
200 rest_of_type_compilation.
201 (note_debug_info_needed): Don't do anything if we're in a template.
202 * parse.y (named_complex_class_head_sans_basetype): Likewise.
203 * method.c (synthesize_method): For non-local classes,
204 push_to_top_level first.
206 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
208 * typeck.c (get_delta_difference): Add no_error parameter.
209 (build_ptrmemfunc): Call get_delta_difference with no_error set;
210 we don't want error messages when converting unrelated
211 pointer-to-member functions.
213 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
215 * error.c (dump_expr): Improve the wording on error messages that
216 involve pointer to member functions.
218 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
220 * cvt.c (cp_convert_to_pointer): Move code for conversions from
221 (::*)() to void* or (*)() up a bit, so that we can convert from
222 METHOD_TYPEs as well.
224 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
226 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
227 There are no 'member' types.
228 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
229 (build_x_typeid): Handle errors.
231 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
233 * typeck.c (convert_for_assignment): Handle anachronistic implicit
234 conversions from (::*)() to void* or (*)().
235 * cvt.c (cp_convert_to_pointer): Likewise.
236 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
237 conversions from here.
238 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
239 * lang-options.h: Likewise.
240 * decl2.c (warn_pmf2ptr): Define.
241 * cp-tree.h: Declare it.
242 * typeck2.c (digest_init): Allow pmfs down into
243 convert_for_initialization.
245 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
247 * typeck.c (c_expand_return): Fix for returning overloaded fn.
249 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
251 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
252 * decl.c (grok_reference_init): Pass DIRECT_BIND.
253 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
255 * call.c (convert_like): Don't pass INDIRECT_BIND.
256 * typeck.c (convert_arguments): Likewise.
257 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
259 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
261 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
262 similar code in build_up_ref.
263 * cvt.c (build_up_reference): Drastically simplify.
265 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
267 * typeck.c (signed_or_unsigned_type): If the given type already
268 as the correct signedness, then just return it.
270 * typeck.c ({un,}signed_type): If can't do anything, call
271 signed_or_unsigned_type.
273 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
275 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
276 current_class_type is NULL.
278 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
280 * class.c (finish_struct_1): Avoid empty structs by adding a field
281 so layout_type gets the mode right.
283 * typeck.c (c_expand_return): Drastically simplify.
285 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
287 * typeck.c (decay_conversion): Handle overloaded methods.
289 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
291 * call.c (build_over_call): A TARGET_EXPR has side-effects.
293 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
295 * cvt.c (convert_to_pointer_force): Add code to support pointer to
296 member function to pointer to function conversions.
297 * init.c (resolve_offset_ref): Add code to allow faked up objects,
298 ignoring them if they are not used, and giving an error, if they
300 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
301 code, and so that we can give an error, if we needed an object,
302 and one was not provided.
303 (build_c_cast): Don't call default_conversion when we want to
304 convert to pointer to function from a METHOD_TYPE.
306 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
308 * Make-lang.in (cplib2.ready): Fix logic.
310 * decl.c (shadow_tag): Only complain about non-artificial function
313 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
315 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
317 * expr.c (cplus_expand_expr): Pre-tweak call_target like
318 expand_inline_function would.
320 * pt.c (mark_decl_instantiated): If extern_p, call
321 mark_inline_for_output.
323 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
325 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
328 * typeck.c (get_delta_difference): Fix wording, as we can be used
329 for pointer to data members.
331 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
333 * pt.c (tsubst): If the function decl isn't a member of this
334 template, return a copy of the decl (including copying the
335 lang-specific part) so we don't hose ourselves later.
337 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
339 * class.c (finish_struct): Remove DWARF-specific tag handling.
340 * decl.c (pushtag): Likewise.
341 (finish_function): Always clear DECL_ARGUMENTS on function decls with
343 * decl2.c (finish_file): Emit DWARF debugging info for static data
346 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
348 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
349 isn't the same as the new one before we whack it.
351 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
353 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
354 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
355 warn_traditional and warn_strict_prototypes; remove ancient
356 'overload' code; remove references to flag_traditional.
358 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
360 * input.c (sub_getch): Handle 8-bit characters in string literals.
362 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
364 * tree.c (mapcar): Handle CONSTRUCTORs.
365 (copy_to_permanent): Handle expression_obstack properly.
367 * Make-lang.in (cplib2.txt): Also depend on the headers.
369 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
371 (expand_class_desc): Use USItype for offset field.
372 * tinfo.h (struct __class_type_info): Likewise.
374 * method.c (build_overload_int): TYPE_PRECISION should be applied
377 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
379 * call.c (build_new_op): A COND_EXPR involving void must be a
382 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
384 * typeck.c (build_x_component_ref): New fn.
385 (build_object_ref): Use it.
386 * parse.y (primary): Use it.
387 * decl2.c (build_expr_from_tree): Use it.
388 * cp-tree.h: Declare it.
390 * decl.c (start_decl): variable-sized arrays cannot be initialized.
391 * error.c (dump_type_suffix): Handle variable arrays.
393 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
395 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
397 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
399 * decl.c (lookup_name_real): Don't try to look up anything in a
402 * tinfo2.cc (__throw_type_match_rtti): Oops.
404 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
406 * Make-lang.in (exception.o): Use -fno-PIC for now.
408 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
410 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
412 (get_tinfo_fn_dynamic): Extracted from build_typeid.
413 * tinfo2.cc (__dynamic_cast): Adjust.
415 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
416 (build_x_typeid): Likewise.
418 * parse.y: Call build_x_typeid instead of build_typeid.
419 * cp-tree.def: Add TYPEID_EXPR.
420 * pt.c (tsubst_copy): Handle typeid.
421 * decl2.c (build_expr_from_tree): Likewise.
422 * rtti.c (build_x_typeid): Throw bad_typeid from here.
423 (build_typeid): Not here.
424 * cp-tree.h: Declare build_x_typeid.
426 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
428 * call.c (convert_like): Pull out constant values.
430 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
432 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
434 * decl.c (init_decl_processing): Create short int types before
435 creating size_t in case a machine description needs to use
436 unsigned short for size_t.
438 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
440 * Make-lang.in (exception.o): Turn off pic.
442 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
443 type, multi-level ptr conversions.
445 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
446 (throw_bad_cast): Use it.
447 (throw_bad_typeid): New fn.
448 (build_typeid): Throw bad_typeid as needed.
450 (synthesize_tinfo_fn): Handle functions and arrays before checking
453 * Remove .h from standard C++ headers, add new.h, move into inc
456 * exception*: Remove pointer from object, constructors. Add
457 default exception::what that uses type_info::name. Add
460 * init.c (build_new): Don't add a cookie to new (void *) T[2].
462 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
464 * Make-lang.in: Building C++ code depends on cc1plus.
466 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
468 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
469 a HOST_WIDE_INT, not a tree.
471 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
473 * exception.cc: Don't include <stdlib.h>.
475 * Make-lang.in (c++.clean): Remove cplib2.*.
477 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
479 * parse.y (component_decl_1, component_costructor_declarator case):
480 Pass attributes/prefix_attributes in tree list.
482 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
484 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
486 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
488 * lex.c (do_identifier): Don't do deferred lookup in a template
491 * typeck2.c (store_init_value): Oops.
493 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
494 New files for C++ lang-support library.
495 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
496 (CXX_LIB2FUNCS): Define.
497 And rules for building the C++ lang-support code.
498 * config-lang.in (headers): Define.
501 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
503 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
505 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
506 * typeck2.c (store_init_value): Check for initializing pmf with { }
508 (process_init_constructor): Not here.
510 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
512 * pt.c (begin_template_parm_list): Increment
513 processing_template_decl here.
514 (end_template_parm_list): Not here.
515 (process_template_parm): No need to add 1 to it now.
516 * *.c: Use processing_template_decl instead of current_template_parms
517 to check for being in a template.
519 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
520 (tsubst_copy): Handle CONSTRUCTOR.
521 (instantiate_decl): Set up context properly for variables.
522 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
523 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
525 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
527 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
529 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
531 * method.c (make_thunk): Call comdat_linkage before setting the
534 * decl2.c (comdat_linkage): Use make_decl_one_only.
535 (import_export_decl): Likewise.
536 * decl.c (init_decl_processing): Check supports_one_only instead of
539 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
541 * decl2.c (grokfield): Tighten checking for access decls.
543 * decl.c (make_typename_type): Resolve references to
544 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
545 (lookup_name_real): Types that depend on a template parameter get
546 an implicit 'typename' unless they're in the current scope.
547 (start_decl_1): We don't care about incomplete types that depend
549 (grokdeclarator): Resolve 'typename's in the type specifier that
550 refer to members of the current scope.
552 * call.c (build_over_call): Remove 'inline called before
553 definition' diagnostic.
554 (build_method_call): Likewise.
555 * decl.c (duplicate_decls): Downgrade 'used before declared
556 inline' to a warning, only with -Winline.
558 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
560 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
562 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
564 * call.c (build_method_call): When calling a signature
565 default implementation, as in other cases, let instance_ptr simply
568 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
570 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
572 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
574 * except.c (expand_start_catch_block): Add a pushlevel so that -g
575 works on hppa and SPARC.
577 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
579 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
581 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
583 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
584 before testing whether it's a signature.
586 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
588 * call.c (build_new_method_call): Don't complain about signature
589 pointers and references not being an aggr type.
590 (build_this): If a signature pointer or reference was passed in,
592 (build_new_method_call): If instance is a signature pointer, set
593 basetype to the signature type of instance.
594 * sig.c (build_signature_method_call): Deleted basetype and
595 instance parameters, they can be found as the DECL_CONTEXT of
596 function and as the first argument passed in.
597 * cp-tree.h: Changed declaration of build_signature_method_call.
598 * call.c (build_method_call): Deleted first two arguments in call
599 of build_signature_method_call.
600 (build_over_call): Added call to build_signature_method_call.
602 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
604 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
607 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
609 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
611 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
613 * except.c (expand_start_try_stmts): Move to except.c in the backend.
614 (expand_end_try_stmts): Remove.
616 * init.c (perform_member_init): Use add_partial_entry () instead
617 of directly manipulating lists.
618 (emit_base_init): Ditto.
620 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
622 * except.c (expand_exception_blocks): Always make sure USE and
623 CLOBBER insns that came at the end still do, the backend relies
626 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
628 * call.c (build_over_call): We can only use a TARGET_EXPR of the
631 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
633 * cvt.c (convert_to_reference): Revert last change, don't complain
634 about temp without target decl.
636 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
638 * decl.c (grokdeclarator): Don't core dump when void() is given.
640 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
642 * decl.c (copy_args_p): Don't crash.
644 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
646 * pt.c (tsubst): And support template args inside the exception
649 * pt.c (tsubst): Add support for exception specifications in
652 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
654 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
656 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
657 (start_function): Likewise.
658 (start_method): Likewise.
659 (grokfield): Likewise.
660 (make_call_declarator): Add throw spec parameter.
661 (set_quals_and_spec): Add routine.
662 * lex.c (set_quals_and_spec): Likewise.
663 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
664 * decl.c (shadow_tag): Eliminate the throw spec parameter to
666 (groktypename): Likewise.
667 (start_decl): Eliminate the throw spec parameter. Eliminate the
668 throw spec parameter to grokdeclarator. Eliminate the throw spec
670 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
671 (grokfndecl): Remove useless set of raises.
672 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
673 the throw spec parameter to start_decl. Pull the throw spec out
674 of the call declarator.
675 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
676 (start_function): Eliminate the throw spec parameter. Eliminate
677 the throw spec parameter to grokdeclarator.
678 (start_method): Likewise.
679 * decl2.c (grokfield): Likewise.
680 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
681 (grokoptypename): Likewise.
682 (finish_file): Eliminate the throw spec parameter to
683 start_function. Add throw spec to make_call_declarator.
684 * except.c (init_exception_processing): Add throw spec to
685 make_call_declarator. Eliminate the throw spec parameter to
687 (expand_start_catch_block): Eliminate the throw spec parameter to
689 (expand_builtin_throw): Add throw spec to make_call_declarator.
690 Eliminate the throw spec parameter to start_function.
691 (start_anon_func): Likewise.
692 * lex.c (make_call_declarator): Add throw spec parameter.
693 (set_quals_and_spec): New routine.
694 (cons_up_default_function): Add throw spec to make_call_declarator.
695 Eliminate the throw spec parameter to grokfield.
696 * method.c (synthesize_method): Eliminate the throw spec parameter
698 * pt.c (process_template_parm): Eliminate the throw spec parameter
700 (tsubst): Add throw spec to make_call_declarator.
701 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
702 (do_function_instantiation): Eliminate the throw spec parameter to
703 grokdeclarator. Eliminate the throw spec parameter to
705 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
707 * parse.y (datadef): Remove non-winning optimization.
709 (fndef): Remove ambiguous error productions uncovered by grammer
711 (constructor_declarator): Add exception_specification_opt here.
712 (component_constructor_declarator): Likewise.
713 (direct_after_type_declarator): Likewise.
714 (complex_direct_notype_declarator): Likewise.
715 (direct_abstract_declarator): Likewise.
716 (fn.def1): Remove exception_specification_opt.
718 (condition): Likewise.
719 (initdcl0): Likewise.
721 (notype_initdcl0): Likewise.
722 (nomods_initdcl0): Likewise.
723 (component_decl_1): Likewise.
724 (component_declarator): Likewise.
725 (after_type_component_declarator0): Likewise.
726 (after_type_component_declarator): Likewise.
727 (notype_component_declarator): Likewise.
729 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
731 * call.c (build_over_call): Also use an INIT_EXPR when
732 initializing anything from an rvalue.
734 * call.c (build_over_call): Call stabilize_reference when building
735 an INIT_EXPR instead of calling the copy ctor.
737 * call.c (joust): Extend the previous change to all comparisons.
739 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
740 NO_LINKAGE_HEURISTICS.
742 * decl2.c (finish_file): Emit any statics that weren't already.
744 * typeck.c (build_static_cast): Implement.
745 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
746 * decl.c (grokparms): Use can_convert_arg instead of
747 implicit_conversion directly.
748 (copy_args_p): New fn.
749 * cvt.c (convert_to_reference): Don't complain about temp with
751 (build_up_reference): Handle TARGET_EXPRs.
752 * call.c (build_over_call): Elide unnecessary temps.
753 (can_convert*): Use new overloading code.
755 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
757 * call.c: Move TYPE_PTR*_MACROS ...
758 * cp-tree.h: To here.
759 * typeck.c (build_reinterpret_cast): Implement.
761 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
763 (joust): If we're comparing a function to a builtin and the worst
764 conversion for the builtin is worse than the worst conversion for the
765 function, take the function.
767 * typeck.c (build_const_cast): Implement.
768 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
769 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
771 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
773 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
774 too early. Make sure we explode if exprtype turns out to be a
775 NULL_TREE when it shouldn't be.
777 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
779 * cp-tree.h: New routine make_call_declarator.
780 * lex.c (make_call_declarator): Define it.
781 * except.c (init_exception_processing): Use it.
782 (expand_builtin_throw): Likewise.
783 (start_anon_func): Likewise.
784 * decl2.c (finish_file): Likewise.
785 * lex.c (cons_up_default_function): Likewise.
787 * pt.c (tsubst): Likewise.
789 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
791 * decl2.c (groktypefield): Remove unused code.
793 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
795 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
796 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
797 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
798 nonempty_cv_qualifiers.
801 * lex.c (make_pointer_declarator): Change type_quals into
803 (make_reference_declarator): Likewise.
805 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
807 * decl.c (start_function): Only check interface_* for templates
808 with flag_alt_external_templates.
810 * call.c (build_new_op): Check for comparison of different enum types.
811 (build_over_call): Fix arg # output.
813 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
815 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
817 * call.c (build_new_op): Check for erroneous args.
819 * call.c (build_new_method_call): Add missing args to cp_error.
821 * tree.c (error_type): Dont print reference-to-array.
823 * typeck.c (convert_for_assignment): Don't say contravariance for
826 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
828 * call.c (build_over_call): Diagnose bad convs for `this'.
830 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
833 * call.c (convert_like): Handle bad convs.
834 (build_over_call): Handle bad convs better.
836 * decl2.c: -fansi-overloading is now the default.
838 * call.c (build_new_method_call): Check for erroneous args.
840 * pt.c (instantiate_class_template): Propagate
841 TYPE_USES_MULTIPLE_INHERITANCE.
843 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
845 * call.c (enforce_access): Add static to routine.
847 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
849 * call.c (build_user_type_conversion_1): Fix bad handling.
850 (compare_ics): Likewise.
852 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
854 * call.c (standard_conversion): Oops.
856 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
858 * g++.c: Update test for win32 (&& ! cygwin32).
860 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
862 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
863 (ptr_reasonably_similar): New fn.
864 * call.c (BAD_RANK): New rank.
865 (ICS_BAD_FLAG): New macro.
866 (standard_conversion): Handle almost-right pointer conversions.
867 (reference_binding): Handle bad rvalue bindings.
868 (add_*_candidate): Stuff.
869 (build_over_call): Pass bad conversions to convert_for_initialization.
870 (compare_ics): Handle bad convs.
873 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
875 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
876 integer_type_node when computing pointer offsets.
878 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
880 * tree.c (lvalue_type): New fn.
881 (error_type): New fn.
882 * call.c (op_error): Use error_type.
883 (add_conv_candidate): Use lvalue_type.
884 (add_builtin_candidates): Likewise.
885 * error.c (args_as_string): Use error_type.
887 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
889 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
892 * decl.c (init_decl_processing): With -ansi, __null's type is the
893 signed integral type with the same number of bits as a pointer.
894 Introduce a new variable null_node for it.
896 * call.c (null_ptr_cst_p): Adjust.
898 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
900 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
903 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
905 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
906 fns of classes without virtual functions.
908 * call.c (add_function_candidate): Handle `this' specially.
909 (compare_ics): Likewise.
911 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
913 * typeck.c (build_conditional_expr): Fix handling of __null.
915 * decl2.c (comdat_linkage): New fn.
916 (import_export_vtable): Use it.
917 (import_export_decl): Use it.
918 * method.c (make_thunk): Use it.
920 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
922 * pt.c (end_template_decl): If we don't actually have parms, return.
923 * parse.y (template_header): Accept 'template <>'.
925 * errfn.c: Allow 5 args.
927 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
929 * tree.c (make_temp_vec): New fn.
930 * pt.c (push_template_decl): Handle partial specs.
931 (instantiate_class_template): Likewise.
932 (more_specialized): Use get_bindings.
933 (more_specialized_class): New fn.
934 (get_class_bindings): New fn.
935 (most_specialized_class): New fn.
936 (do_function_instantiation): List candidates for ambiguous case.
937 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
938 (shadow_tag): Call push_template_decl for partial specializations.
940 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
941 DECL_TEMPLATE_MEMBERS.
942 * call.c (print_z_candidates): Reduce duplication.
944 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
946 * decl2.c (lang_decode_option): Allow -fansi-overloading.
948 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
950 * pt.c (get_bindings): New fn.
951 (most_specialized): Likewise.
952 (do_function_instantiation): Use them.
953 (add_maybe_template): New fn.
954 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
955 * call.c (build_new_op): Handle guiding decls.
956 (build_new_function_call): Likewise.
957 * decl2.c (finish_file): Likewise.
959 * decl2.c (mark_used): Do synthesis here.
960 * call.c (build_method_call): Not here.
961 (build_over_call): Or here.
962 * typeck.c (build_function_call_real): Or here.
963 * tree.c (bot_manip): Call mark_used on functions used in default
966 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
968 * decl2.c (import_export_vtable): Delete code that disabled vtable
969 heuristic on systems with ASM_OUTPUT_EXTERNAL.
971 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
973 * typeck.c (build_x_function_call): Handle static call context
976 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
977 the function, not its outer block.
979 * call.c (build_field_call): Pass fields on to build_opfncall
980 regardless of TYPE_OVERLOADS_CALL_EXPR.
981 (build_method_call): Pass on to build_new_method_call sooner.
983 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
985 * class.c (instantiate_type): Don't put a POINTER_TYPE to
986 METHOD_TYPE on an expression. Also make a copy of rhs instead of
989 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
991 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
992 (add_builtin_candidate): Don't take enums for ++.
993 (build_new_method_call): Handle non-aggregates and field calls.
994 Move new overloading code from...
997 * decl.c (grokparms): Don't check default args in templates.
999 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1001 * cvt.c (build_new_op): Fix args to build_unary_op.
1002 (add_builtin_candidates): Don't call type_promotes_to on float.
1004 * decl.c (grokparms): Check the type of the default arg.
1006 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
1007 returning NULL_TREE.
1009 * typeck.c (build_x_binary_op): Avoid doing extra work.
1010 (build_x_unary_op): Likewise.
1011 (build_x_conditional_expr): Likewise.
1012 * cvt.c (build_over_call): Return.
1013 (add_builtin_candidate): Fix MEMBER_REF.
1014 (build_new_op): Likewise.
1016 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
1018 * method.c (build_overload_name): Put bug fix into code but leave
1019 disabled for now so we can be bug compatible with older releases
1020 that do repeats incorrectly. In the future, we can enable it.
1022 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1024 * cvt.c (convert_like): Don't call build_cplus_new twice.
1026 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
1027 Control new overloading code with -fansi-overloading.
1029 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1031 * cvt.c (build_over_call): Call build_cplus_new.
1032 * call.c (build_method_call): Likewise.
1033 * typeck.c (build_function_call_real): Likewise.
1034 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
1035 the COND_EXPR in a TARGET_EXPR so they use the same slot.
1037 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
1039 * typeck.c (complete_type): Propagate
1040 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
1042 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1044 * cvt.c (joust): More ?: kludging. Sigh.
1045 (build_over_call): Don't try to synthesize global fns.
1047 * search.c (lookup_conversions): Use binfo marking.
1049 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
1051 * search.c (build_mi_matrix): Use the correct value of cid
1052 when determining the new mi_size.
1054 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1056 * cvt.c (add_builtin_candidates): Do consider type conversion ops
1057 for the first parms of += et al.
1058 (strip_top_quals): New fn.
1059 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
1060 (implicit_conversion): Likewise.
1061 (add_builtin_candidates): Be careful about arrays.
1062 (build_new_method_call): Handle vtable optimization.
1064 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1066 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
1067 * cvt.c (reference_binding): Use it.
1068 (implicit_conversion): Use it.
1069 (add_builtin_candidate, COND_EXPR): Use it.
1071 * cvt.c (build_new_function_call): Check for error args.
1073 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
1075 * gxx.gperf: Add __null.
1076 * hash.h: Regenerate.
1077 * lex.h: Add RID_NULL.
1078 * lex.c (init_lex): Create null_pointer_node here, stick it in
1080 * decl.c (init_decl_processing): Still set its type here.
1081 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
1082 (convert_to_pointer_force): Likewise.
1083 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
1085 * call.c (convert_harshness): Use null_ptr_cst_p.
1086 * typeck.c (convert_for_assignment): Likewise. Don't produce
1089 * error.c (args_as_string): Handle lists of actual args, too.
1090 * cvt.c (null_ptr_cst): Support (void*)0 for now.
1091 (build_user_type_conversion_1): Improve diagnostics.
1092 (build_new_function_call): Likewise.
1093 (build_object_call): Likewise.
1094 (build_new_method_call): Likewise. Move call before def diagnostic...
1095 (build_over_call): Here.
1097 * cvt.c (build_new_method_call): Don't complain about no match if
1098 LOOKUP_SPECULATIVELY.
1099 (build_over_call): Fix 'this' for virtual fn.
1100 (build_new_method_call): Add diagnostic.
1102 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1104 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
1105 constructors to be passed in.
1106 (build_over_call): Likewise.
1107 (build_user_type_conversion_1): Pass them in.
1108 (convert_like): Likewise.
1109 (build_object_call): Handle overloaded conversions.
1110 (build_over_call): Pass the right args to build_vfn_ref.
1111 (standard_conversion): Fix pmf convs.
1112 (joust): Handle comparing statics and non-statics.
1113 (build_new_method_call): New fn.
1114 * call.c (build_method_call): Call it if NEW_OVER.
1116 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
1118 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
1121 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
1123 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
1124 instead of just maybe_build_cleanup so that we deallocate the
1127 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1129 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
1130 * cp-tree.h (finish_prevtable_vardecl): Add decl.
1132 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
1134 * pt.c (instantiate_class_template): Call complete_type. Also, if
1135 we're at the end of the file and we just instantiated a template
1136 class with a vtable, call finish_prevtable_vardecl.
1138 * error.c (dump_decl): Don't explode (or explode more gracefully
1139 as appropriate) if the object being dumped has a null type.
1140 (dump_expr): Likewise.
1142 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
1143 by counting the number of nodes that we'll need before allocating
1145 (lookup_fnfields): Fix comment.
1146 (breadth_first_search): Fix comment.
1148 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1150 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
1152 * class.c (finish_struct): Call cplus_decl_attributes here.
1153 (finish_struct_1): Not here.
1154 * cp-tree.h: Adjust.
1156 * pt.c (type_unification): New parameter STRICT.
1157 (unify): If STRICT, don't allow cv addition or base deduction.
1158 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
1160 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1162 * search.c (get_template_base{_recursive}): New fns.
1163 * pt.c (more_specialized): New fn.
1164 (do_function_instantiation): Use it.
1165 (unify): Handle base deduction.
1166 * cvt.c (joust): Use more_specialized.
1167 Don't arbitrarily choose between non-builtin candidates.
1168 (build_over_call): Call require_complete_type.
1170 * decl.c (start_function): Statics are static even in a #pragma
1173 * decl2.c (import_export_vtable): Disable vtable heuristic on
1174 systems with ASM_OUTPUT_EXTERNAL.
1176 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
1177 (standard_conversion): No std conv to enum type.
1179 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
1182 * cvt.c (reference_binding): Bind directly to a base subobject of
1185 * cvt.c (build_new_op): Enforce access control.
1187 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
1189 * typeck2.c (process_init_constructor): When scanning the
1190 union for a named field, skip things that aren't FIELD_DECLs.
1192 * method.c (synthesize_method): Don't scan fndecl's rtl if
1193 we're at the end of the file; just assume the function can't
1196 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1198 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
1201 * cvt.c (build_user_type_conversion_1): Handle overloaded
1204 * cvt.c (add_builtin_candidates): Don't consider type conversion
1205 operators for the first parameter of operator=.
1207 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
1209 * typeck.c (complete_type): Only call layout_type if we're not
1210 expanding a template.
1212 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1214 * cvt.c (compare_ics): Oops.
1216 * cvt.c (op_error): Oops.
1218 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
1219 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
1220 (build_conv): Use them.
1221 (implicit_conversion): Use them.
1222 (convert_like): Handle them.
1223 (build_new_op): Handle builtin COND_EXPR again.
1224 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
1225 in lists of types for COND_EXPR.
1226 (add_builtin_candidate): Add enum candidates for COND_EXPR.
1228 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
1230 * typeck.c (build_modify_expr): Always attempt to build a call to
1231 the assignment operator, even if we're using a default one.
1232 (convert_for_initialization): Call complete_type.
1234 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1236 * cvt.c (reference_binding): A REF_BIND gets the reference type.
1237 (implicit_conversion): Likewise.
1238 (convert_like): Likewise.
1239 (compare_ics): Likewise.
1240 (compare_qual): Likewise.
1241 (print_z_candidates): Handle no candidates.
1242 (build_new_op): Don't handle builtin COND_EXPR for now.
1244 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
1246 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
1248 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1250 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
1252 * cvt.c (build_builtin_candidate): Oops.
1253 (build_new_op): Oops.
1255 * method.c (build_opfncall): Pass COND_EXPR on.
1256 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
1257 (add_builtin_candidate{,s}): Likewise.
1258 (add_builtin_candidates): Likewise.
1259 (print_z_candidates, op_error, build_new_op): Likewise.
1260 (type_decays_to): New fn.
1261 * lex.c (init_lex): Just say ?: for COND_EXPR.
1263 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1265 * typeck.c (complete_type): Call layout_type rather than building
1268 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
1271 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1273 * cvt.c: Always compile the new overloading code (but don't use it).
1274 (implicit_conversion): Add a BASE_CONV when converting to
1275 the same class type.
1276 (convert_like): Handle BASE_CONV.
1278 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1280 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
1281 (add_builtin_candidate): Likewise.
1284 * typeck.c (build_x_function_call): Try an operator function
1285 whenever we call an object of class type.
1286 * method.c (build_opfncall): Pass CALL_EXPRs through.
1287 * cvt.c (implicit_conversion): Do const-ref case first.
1288 (add_conv_candidate, build_object_call, op_error): New fns.
1289 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
1290 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
1292 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
1293 Fall back on preincrement handling. Use op_error.
1295 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
1297 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
1300 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
1302 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
1304 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
1306 * typeck.c (build_component_ref_1): Use build_component_ref
1307 instead of open coding it here.
1309 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1311 * g++.c (main): Don't link with -lg++.
1314 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
1315 result of build_type_conversion.
1316 (cp_convert): Only call build_method_call for ctors if
1317 build_type_conversion failed.
1318 (ptr_complete_ob): New function.
1319 (TYPE_PTR{,OB,MEM}_P): New macros.
1320 ({add,build}_builtin_candidate{,s}): New functions.
1321 (print_z_candidates): Handle builtins.
1322 (build_user_type_conversion_1): Don't use conversion fns for
1323 converting to a base type.
1324 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
1325 (build_user_type_conversion): Use convert_from_reference.
1326 (build_new_op): New function.
1327 (build_over_call): Fix handling of methods.
1328 (compare_ics): Handle AMBIG_CONV properly.
1329 * typeck2.c: Increment abort count.
1330 * method.c (build_opfncall): Forward most requests to build_new_op.
1331 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
1333 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1335 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
1336 invalid second argument to dump_expr_list.
1338 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
1340 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
1342 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
1344 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
1347 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
1349 * typeck2.c (process_init_constructor): New pedwarn for using { }
1350 to initialize a pointer to member function.
1351 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
1352 we can avoid the new error.
1354 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
1356 * typeck.c (build_ptrmemfunc1): New function to hide details of
1357 pointer to member functions better.
1359 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
1361 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
1362 methods into the actual method, as we know the implied object is
1365 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1367 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
1368 inside a system header.
1370 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
1372 * call.c (build_method_call): Call complete_type on the
1375 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
1377 * typeck.c (build_component_ref): Always build up an OFFSET_REF
1378 for obj_ptr->func so that we can know which object to use in a
1381 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
1383 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
1384 around things. Also improve maintainability.
1386 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
1388 * decl.c (grokdeclarator): Check for overflow when evaluating an
1391 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
1393 * cvt.c (cp_convert): Don't check for ambiguity with constructor
1396 * typeck.c (build_x_function_call): Pass function overload
1397 questions to new overloading code if NEW_OVER.
1398 * init.c (expand_aggr_init_1): Only check for type conversion ops
1399 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
1400 Don't check for ambiguity with constructor if NEW_OVER.
1401 * cvt.c (convert_to_reference): Dereference the result of a type
1402 conversion operator.
1403 (build_conv): Propagate ICS_USER_FLAG.
1404 (implicit_conversion): Call instantiate_type.
1405 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
1406 (add_function_candidate): Fix cv-quals on argtype.
1407 (print_z_candidates): New function.
1408 (build_new_function_call): Call it.
1409 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
1410 consider non-converting constructors.
1411 Call print_z_candidates.
1412 Return an AMBIG_CONV for an ambiguous conversion.
1413 (build_user_type_conversion): Handle AMBIG_CONV.
1414 (convert_like): Fix test for building TARGET_EXPR.
1415 Call instantiate_type.
1416 Handle AMBIG_CONV and LVALUE_CONV.
1417 (build_over_call): Handle 0 args and ellipsis.
1418 * cp-tree.def: Add AMBIG_CONV.
1420 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
1422 * decl.c (lookup_name_real): If we find mem in obj when parsing
1423 `obj->mem', make sure we return the right value.
1425 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
1427 * search.c (get_base_distance): Call complete_type.
1429 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
1431 * decl.c (store_bindings): Make static.
1433 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1435 * init.c (expand_aggr_init_1): Don't check type conversions if
1438 * cvt.c (z_candidate): Put back template field.
1439 (add_function_candidate): Set it.
1440 (add_template_candidate): Likewise.
1442 (compare_qual): Handle references and pointers to members.
1443 (compare_ics): Handle reference bindings.
1445 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
1447 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
1449 * call.c (compute_conversion_costs): Call complete_type.
1451 * tree.c (vec_binfo_member): Use comptypes instead of comparing
1452 pointers, so we can handle template parameters.
1454 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
1456 * cvt.c (cp_convert_to_pointer): We have to call complete_type
1457 here; let's make it explicit instead of a side effect of an
1460 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1462 * cvt.c (z_candidate): Remove template field.
1463 (reference_binding): Handle binding to temporary.
1464 (implicit_conversion): Likewise.
1465 (add_function_candidate): Handle artificial constructor parms.
1466 Handle functions with too few parms.
1467 (add_template_candidate): New function.
1468 (build_user_type_conversion_1): Handle constructors.
1469 (convert_like): Likewise.
1470 (build_over_call): Likewise.
1471 (build_new_function_call): Support templates.
1472 (compare_ics): Fix reference, inheritance handling.
1474 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
1476 * decl.c: Add signed_size_zero_node.
1477 (init_decl_processing): Build it.
1478 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
1479 when we're trying to make a negative delta.
1481 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1483 Stop doing this damn index==strchr variable name confusion.
1484 * class.c (add_virtual_function): Change local var INDEX to be
1486 (add_method): Likewise.
1487 * lex.c (print_parse_statistics): Likewise.
1488 * search.c (make_memoized_table_entry): Likewise.
1489 (lookup_fnfields_here): Likewise.
1490 (lookup_field): Likewise.
1491 (lookup_fnfields): Likewise.
1492 (get_baselinks): Likewise.
1493 * sig.c (build_signature_table_constructor): Likewise.
1494 (build_signature_method_call): Likewise.
1495 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
1496 (get_member_function_from_ptrfunc): Likewise.
1497 (build_ptrmemfunc): Change local var INDEX to be IDX.
1498 (c_expand_start_case): Likewise.
1500 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1502 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
1503 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
1504 (convert_to_reference): Use build_type_conversion to convert to
1505 the reference type directly.
1506 (standard_conversion): Fix void* case, non-conversions.
1507 (reference_binding): Fix expr == 0 case, non-conversions.
1508 (convert_like): Support REF_BIND.
1509 (compare_qual): Split out from compare_ics.
1510 (compare_ics): Use it, handle icses with only a qual_conv.
1512 * init.c (expand_vec_init): Don't crash if decl is NULL.
1514 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
1516 * mpw-config.in: New file, configury for Mac MPW.
1517 * mpw-make.sed: New file, makefile editing for MPW.
1519 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1521 * pt.c (instantiate_class_template): Call repo_template_used.
1523 * search.c (lookup_conversions): Only lookup conversions in
1526 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1528 * cp-tree.def: Renamed from tree.def, to avoid confusion with
1530 * cp-tree.h, lex.c: Include cp-tree.def.
1531 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
1533 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
1535 * init.c (build_vec_delete_1): Call complete_type.
1537 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
1539 * except.c (start_anon_func): Make sure anonymous functions are
1542 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1544 * decl.c (finish_function): If function_depth > 1, set nested.
1546 * decl2.c (grokbitfield): Revert Bob's change.
1547 * class.c (finish_struct_1): Fix handling of named bitfield widths.
1549 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1551 * pt.c (add_pending_template): Handle types.
1552 (lookup_template_class): With -fexternal-templates, just add the class
1553 to pending_templates instead of instantiating it now.
1554 * decl2.c (finish_file): Handle types in pending_templates.
1556 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
1558 * decl2.c (grokbitfield): Handle constant decls appropriately.
1559 Give an appropriate error message now instead of spewing core
1562 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1564 * decl2.c: Don't turn on thunks by default for now.
1566 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
1568 * typeck.c (complete_type): Handle error_mark_node.
1569 (common_type, OFFSET_TYPE): Handle template_type_parms.
1571 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1573 * pt.c (instantiate_decl): If at_eof, call import_export_decl
1574 regardless of DECL_INLINE.
1576 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
1578 * class.c (finish_struct_bits): Copy TYPE_SIZE.
1580 * rtti.c (build_dynamic_cast): Support templates.
1581 * tree.def: Support DYNAMIC_CAST_EXPR.
1582 * pt.c (tsubst_copy): Likewise.
1583 * decl2.c (build_expr_from_tree): Likewise.
1585 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1587 * typeck.c (build_static_cast): Support templates.
1588 (build_const_cast): Likewise.
1589 * tree.def: Support CONST/STATIC_CAST_EXPR.
1590 * pt.c (tsubst_copy): Likewise.
1591 * decl2.c (build_expr_from_tree): Likewise.
1593 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1595 * decl2.c (finish_vtable_vardecl): Don't trust
1596 TREE_SYMBOL_REFERENCED for vtables of local classes.
1598 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1600 * pt.c (tsubst_copy): Handle operator T.
1602 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1604 * init.c (build_delete): Move creation of PARMS inside test of
1605 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
1607 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
1609 * typeck.c (build_conditional_expr): Don't assume that
1610 the arguments to ?: are always pointers or records.
1612 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1614 * decl2.c (import_export_decl): Still emit static/weak/comdat
1615 copies of inline template functions with -fno-implicit-templates.
1617 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
1619 * init.c (build_delete): Determine the complete basetype
1620 path to the destructor we're calling.
1622 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
1624 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
1625 initialize the enum, because we really and truly don't know where
1627 (start_enum): Don't copy integer_zero_node because
1628 build_enumerator will do it.
1630 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1632 * decl.c (finish_function): Do access control on base destructors.
1634 * pt.c (tsubst, case FUNCTION_DECL): Set up
1635 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
1638 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
1640 * cvt.c (build_up_reference): If we have already extended the
1641 lifetime of the temporary, don't try it again.
1642 * typeck.c (c_expand_return): Don't try and convert the return
1643 value twice when we want a reference, once is enough.
1645 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
1647 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
1648 LOOKUP_ONLYCONVERTING at all for now.
1650 * search.c (add_conversions): Put the conversion function in
1651 TREE_VALUE, the basetype in TREE_PURPOSE.
1652 * cvt.c (build_type_conversion): Adjust.
1653 * cvt.c (build_expr_type_conversion): Adjust.
1654 * call.c (user_harshness): Adjust.
1656 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
1658 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
1661 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
1663 * except.c (expand_start_catch_block): Add a dummy region, if we
1664 get an error, so that we can avoid core dumping later.
1666 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
1668 * cp-tree.h (OFFSET_REF): Remove.
1669 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
1670 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
1671 * init.c (expand_aggr_init_1): Likewise.
1672 (build_new): Likewise.
1673 * typeck.c (expand_target_expr): Likewise.
1675 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1677 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
1680 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
1682 * cvt.c (build_up_reference): Redo how and when temporaries are
1684 * decl.c (grok_reference_init): Don't try and be smart about
1687 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
1689 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
1690 (TARGET_EXPR...), now that it has 4 arguments.
1691 * tree.c (build_cplus_new): Likewise.
1693 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1695 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
1697 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
1698 * decl.c (struct saved_scope): Remove named_labels,
1699 {base,member}_init_list.
1700 (maybe_push_to_top_level): Don't set them. Call
1701 push_cp_function_context if appropriate.
1702 (pop_from_top_level): Likewise.
1704 * method.c (do_build_assign_ref): Remove obsolete check of
1705 TYPE_HAS_ASSIGN_REF (basetype).
1707 * decl.c (grokfndecl): Diagnose user definition of
1708 implicitly-declared methods.
1710 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
1712 * method.c (do_build_copy_constructor): Add code to give
1713 meaningful error messages instead of crashing.
1714 (do_build_assign_ref): Don't synthesize assignment operators for
1715 classes containing reference or const members.
1717 * class.c (struct base_info): Remove cant_synth_copy_ctor
1718 and cant_synth_asn_ref.
1719 (finish_base_struct): Remove the code that tries to conditionalize
1720 synthesis of copy constructors & assignment operators based on
1721 access permissions. Instead, let it fail when it tries to
1722 synthesize the copy constructor. This will give meaningful error
1723 messages instead of silently generating code to perform a bitcopy.
1725 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
1727 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
1728 determining types for constant values.
1730 * decl.c (struct named_label_list): Use instead of stuffing
1731 random items into a TREE_LIST node.
1732 (named_label_uses): Use the new struct.
1733 (poplevel): Likewise.
1734 (lookup_label): Likewise.
1735 (define_label): Add an error message to tell the user the line
1736 where the goto is located in addition to the destination of the
1738 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
1740 (finish_function): Likewise.
1742 (start_decl): Complain about defining a static data member
1743 in a different type from which it was declared.
1745 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1747 * cvt.c (build_expr_type_conversion): Adjust.
1749 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1751 * call.c (build_method_call): Always convert 'this' to the
1754 * search.c (add_conversions): Put the conversion function in
1755 TREE_VALUE, the type in TREE_PURPOSE.
1756 * cvt.c (build_type_conversion): Adjust.
1757 * call.c (user_harshness): Adjust.
1759 * method.c (emit_thunk): Call temporary_allocation and
1760 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
1762 * tree.c (build_cplus_array_type): Handle tweaking of
1763 TYPE_MAIN_VARIANT here.
1764 * typeck.c (common_type): Not here.
1766 * typeck.c (complete_type): Only try to complete an array type if
1769 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1771 * decl.c (grokvardecl): Call complete_type.
1772 (grokdeclarator): Call complete_type for PARM_DECLs.
1774 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1776 * pt.c (instantiate_class_template): Re-set
1777 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
1779 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
1781 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
1782 smart enough to do it right.
1783 * tree.c (cp_expand_decl_cleanup): Likewise.
1784 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
1785 cp_expand_decl_cleanup.
1786 (store_parm_decls): Likewise.
1787 (hack_incomplete_structures): Likewise.
1788 * except.c (push_eh_cleanup): Likewise.
1790 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
1792 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
1793 frontend to the backend where it belongs.
1794 * tree.c (unsave_expr): Likewise.
1795 (unsave_expr_now): Likewise.
1796 * tree.def (UNSAVE_EXPR): Likewise.
1797 * cp-tree.h (unsave_expr): Likewise.
1798 (unsave_expr_now): Likewise.
1800 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
1802 * init.c (emit_base_init): Make sure the partial EH cleanups live
1803 on the function_obstack.
1805 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
1807 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
1808 when checking for pointer types.
1810 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1812 * pt.c (instantiate_class_template): Remove obsolete check for
1813 access declarations.
1815 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
1817 * call.c (build_overload_call): Simplify calls to
1818 build_overload_call by removing last parameter.
1819 (build_method_call): Likewise.
1820 * cp-tree.h: Likewise.
1821 * method.c (build_opfncall): Likewise.
1822 * typeck.c (build_x_function_call): Likewise.
1824 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
1826 * call.c (default_parm_conversions): Factor out common code.
1827 (build_method_call): Use it.
1828 (build_overload_call_real): Use it.
1830 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
1832 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
1833 but pedwarn as the code is bogus.
1834 * typeck.c (decay_conversion): Likewise.
1835 (build_function_call_real): Use build_addr_func instead of
1836 default_conversion. Don't allow pointer-to-method functions down
1838 (build_unary_op): Use real pointer-to-member functions instead of
1840 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
1841 (convert_for_assignment): Removed some obsolete code.
1842 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
1843 build_x_function_call instead of current_class_ptr. Only call
1844 digest_init once on an initializer, we do this just checking
1846 (build_expr_from_tree): Pass current_class_ref to
1847 build_x_function_call instead of current_class_ptr.
1848 * init.c (build_member_call): Likewise.
1850 * error.c (dump_expr): Handle OFFSET_REFs better.
1851 * pt.c (unify): Handle pointer-to-member functions better.
1852 * decl.c (finish_function): Clear out current_class_ref just like
1853 we do for current_class_ptr.
1855 * typeck.c (get_delta_difference): Handle virtual bases better.
1857 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
1859 * sig.c (build_signature_table_constructor): Use the delta for
1860 the original basetype for this virtual function with thunks.
1861 (build_signature_method_call): We still need to adjust 'this'
1864 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
1866 * call.c (build_addr_func): New routine. Used to get the `real'
1867 address of a function or a method. Needed to avoid getting a
1868 pointer-to-member function.
1869 (build_call): New routine to build CALL_EXPRs.
1870 (build_method_call): Use it.
1871 * cvt.c (convert_to_aggr): Likewise.
1872 * typeck.c (build_function_call_real): Likewise.
1873 * sig.c (build_signature_table_constructor): Use build_addr_func.
1874 * cp-tree.h (build_call, build_addr_func): Declare them.
1876 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
1878 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
1879 * parse.y: Remove uses of LOOKUP_AGGR.
1881 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
1883 * *.[chy]: Rename current_class_decl to current_class_ptr, and
1884 C_C_D to current_class_ref.
1886 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1888 * call.c (convert_harshness): Tighten up pointer conversions.
1890 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
1892 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
1893 (finish_file): Likewise.
1895 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1897 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
1899 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
1902 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1904 * decl2.c: Turn on thunks by default where supported.
1906 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
1908 * cp-tree.h (build_overload_call_maybe): Removed.
1909 * call.c (build_overload_call_real): Invert meaning of last arg to
1910 be require_complete.
1911 (build_overload_call): Likewise.
1912 * typeck.c (build_x_function_call): Use build_overload_call_real
1913 instead of build_overload_call_maybe.
1915 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1917 * decl2.c (finish_file): Don't try to emit functions that haven't
1920 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1922 * decl2.c (finish_vtable_vardecl): Oops.
1924 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
1925 Also store the bindings from previous_class_values.
1926 (pop_from_top_level): Restore them.
1928 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1930 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
1931 symbol has been referenced.
1932 (finish_file): Re-join synthesis/vtable loop with inline emission
1933 loop, disable inlining when an inline is output.
1935 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
1937 * except.c (init_exception_processing): Setup saved_in_catch.
1938 (push_eh_cleanup): Reset __eh_in_catch.
1939 (expand_start_catch_block): Set __eh_in_catch.
1941 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
1943 * except.c (push_eh_cleanup): Add tracking for whether or not we
1944 have an active exception object.
1945 (expand_builtin_throw): Use it to make sure a rethrow without an
1946 exception object is caught.
1948 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1950 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
1953 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
1955 * decl2.c (finish_file): Also use sentries for vars with
1956 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
1959 * lex.c (handle_cp_pragma): Disable #pragma
1960 interface/implementation if SUPPORTS_ONE_ONLY > 1.
1962 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1964 * method.c (emit_thunk): Wrap default case in
1965 temporary/permanent_allocation.
1967 * method.c (make_thunk): Use DECL_ONE_ONLY.
1968 (emit_thunk): Call assemble_end_function.
1970 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
1972 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
1973 (import_export_decl): Likewise.
1974 (finish_prevtable_vardecl): Disable vtable hack if
1975 SUPPORTS_ONE_ONLY > 1.
1977 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
1979 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
1980 PREDECREMENT_EXPRs take two arguments, not one.
1982 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
1984 * class.c (build_vtable_entry): Don't build thunks for abstract
1987 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
1990 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
1992 * class.c (set_rtti_entry): Use size_zero_node.
1993 (build_vtable): Likewise.
1995 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
1997 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
1998 (prepare_fresh_vtable): Likewise.
2000 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
2002 * method.c (emit_thunk): Call mark_used on the target function.
2004 * call.c (build_method_call): Don't warn about pending templates.
2006 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2008 * decl2.c (finish_file): Fix list walking logic.
2010 * typeck2.c (check_for_new_type): Only warn if -pedantic.
2012 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
2014 * class.c (finish_struct_1): Remove old code for
2015 dont_allow_type_definitions.
2016 * cp-tree.h: Likewise.
2017 * spew.c: Make sure cp-tree.h is included before parse.h, so the
2018 definition of flagged_type_tree is found before it is used.
2020 * parse.y: Added the ftype member to the type union, and changed a
2021 number of rules to use it instead of ttype. Added calls to
2022 check_for_new_type() as appropriate.
2023 * typeck2.c (check_for_new_type): New function for checking
2024 if a newly defined type appears in the specified tree.
2025 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
2026 for check_for_new_type().
2028 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2030 * decl2.c (finish_file): Only use a sentry if the decl is public.
2032 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
2033 don't pass LOOKUP_ONLYCONVERTING.
2035 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
2037 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
2038 properly keeps track of const and volatile type modifiers.
2040 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2042 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
2043 * pt.c (comp_template_args): Use it.
2045 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
2046 assemble_external for artificial function decls.
2048 * decl.c (cp_finish_decl): Oops.
2050 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2052 * decl2.c (import_export_decl): Put static data member templates
2053 into common storage, or make them weak, depending on whether they
2054 are dynamically or statically initialized.
2055 (get_sentry): New function.
2056 (finish_file): Do import_export_decl for static data members before
2057 building the init/fini functions. Don't init/fini a variable that's
2058 EXTERNAL. Use a sentry for variables in common. Fix mismatching
2059 push/pop_temp_slots.
2060 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
2061 expand_static_init thang.
2062 * method.c (get_id_2): New function.
2064 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
2066 * parse.y (empty_parms): Make sure we use C++-style prototypes
2067 when we're declaring member functions.
2069 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2071 * Makefile.in (CONFLICTS): 16 s/r conflicts.
2072 * parse.y (self_template_type): New nonterminal.
2074 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2076 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
2078 * parse.y (base_class.1): Allow 'typename foo::bar'.
2080 * lex.c (check_newline): Remove #pragma code that plays with the
2081 input stream, since we now deal with tokens. Clear nextchar when
2083 (handle_cp_pragma): Use real_yylex.
2084 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
2087 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
2089 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
2091 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2093 * parse.y: New token SELFNAME for potential constructor.
2094 * spew.c (yylex): Handle it.
2095 * lex.c (identifier_type): Produce it.
2097 * parse.y (complete_type_name): In :: case, don't push class binding.
2098 (complex_type_name): Likewise.
2100 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
2102 * typeck.c (build_reinterpret_cast): Handle pointer to member
2105 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2107 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
2109 (check_newline): Put the vtable/unit/implementation/interface pragma
2110 code into handle_cp_pragma, replacing it with a call.
2111 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
2112 args. Get the next token after handling the pragma token.
2114 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2116 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
2117 (convert_to_pointer_force): Likewise.
2119 * init.c (build_new): Fix array new without -fcheck-new.
2121 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2123 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
2124 tree.c: Lose TYPE_NESTED_NAME.
2126 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
2129 * tree.def: Add VEC_INIT_EXPR.
2130 * expr.c (cplus_expand_expr): Handle it.
2131 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
2132 the extra file-scope symbol nastiness.
2134 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2136 * method.c (make_thunk): Thunks are static.
2137 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
2139 * decl2.c (mark_vtable_entries): Emit thunks as needed.
2140 (finish_file): Don't emit them here.
2142 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2144 * rtti.c (build_dynamic_cast): Handle null pointers.
2145 (ifnonnull): New function.
2147 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
2149 * call.c (build_method_call): Remember the original basetype we
2150 were called with. Give an error message instead of trying
2151 (incorrectly) to call a non-static member function through a
2152 non-inherited class.
2154 * search.c (expand_upcast_fixups): Mark the new fixup as
2157 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2159 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
2161 * class.c (set_rtti_entry): Fix for thunks.
2163 * decl2.c (import_export_decl): Still emit typeinfo fns for
2164 cv-variants of builtin types.
2166 * rtti.c (expand_class_desc): Set up base_info_type_node here.
2167 (init_rtti_processing): Instead of here.
2169 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2171 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
2172 (build_typeid): Only complain about taking dynamic typeid without
2175 * decl2.c: flag_rtti defaults to 1.
2177 * rtti.c (get_tinfo_var): The general class case is now smaller.
2178 (init_rtti_processing): Pack the latter three fields of base_info
2181 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
2183 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
2185 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
2187 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
2188 (push_memoized_context): Split out code to undefer pop_type_level to
2189 (clear_memoized_cache): here.
2190 (pop_memoized_context): We can only handle one layer of deferral of
2191 pop_type_level so clear the cache, if there was a previous level.
2193 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2195 * rtti.c (init_rtti_processing): Build up base_info_type_node.
2196 (expand_class_desc): Use one pointer to an array of base_info
2197 structs, passed using a CONSTRUCTOR.
2199 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
2201 * class.c (build_vbase_path): Remove block extern for
2202 flag_assume_nonnull_objects here.
2203 (build_vfn_ref): Split out functionality into build_vtbl_ref.
2204 (build_vtbl_ref): New routine.
2205 (build_vtable): Set up rtti info here.
2206 (add_virtual_function): Note in CLASSTYPE_RTTI the best
2207 place where we can get the rtti pointers from to avoid having to
2208 search around for a place.
2209 (finish_base_struct): Likewise.
2210 (finish_struct_1): Likewise. Never create totally new vtables
2211 with totally new vtable pointers for rtti. Disable code to layout
2212 vtable pointers better until we want to break binary
2214 * rtti.c (build_headof_sub): New routine to convert down to a
2215 sub-object that has an rtti pointer in the vtable.
2216 (build_headof): Use it. Also, use build_vtbl_ref now to be more
2218 (build_dynamic_cast): Make sure we have saved it, if we need to.
2219 * search.c (dfs_init_vbase_pointers): Disable code that deals with
2220 a more efficient vtable layout, enable later.
2221 * call.c (flag_assume_nonnull_objects): Moved declaration to
2222 * cp-tree.h: here. Declare build_vtbl_ref.
2223 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
2224 function calls that want a tree.
2226 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2228 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
2229 other X subobjects in the most derived type. Ack.
2231 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
2232 get_typeid will do it for us.
2233 (get_typeid_1): Break out call-building for expand_*_desc to use.
2234 (get_typeid): Call it.
2235 (expand_*_desc): Likewise.
2236 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
2238 (init_decl_processing): Lose builtin_type_tdescs lossage.
2239 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
2241 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
2243 * pt.c (tsubst): When calling set_nested_typename, use
2244 TYPE_NESTED_NAME (current_class_type) instead of
2247 * decl.c (pushdecl): Likewise.
2248 (pushdecl_class_level): Likewise.
2249 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
2250 set_nested_typename.
2252 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2254 * rtti.c (synthesize_tinfo_fn): Handle arrays.
2256 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
2258 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2260 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
2261 (init_rtti_processing): Lose bad_cast_type.
2262 (build_dynamic_cast): Use throw_bad_cast.
2264 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
2266 * decl2.c (finish_file): Don't synthesize artificial functions
2267 that are external and not inline.
2269 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
2271 * decl2.c (finish_file): Handle having new inlines added to
2272 saved_inlines by synthesis.
2274 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
2276 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2278 RTTI rewrite to initialize nodes as needed, not require that
2279 users #include <typeinfo>, complete functionality and reduce wasted
2281 * rtti.c (init_rtti_processing): New fn.
2282 (build_typeid): The vtable entry is now a function.
2283 (get_tinfo_var): New fn.
2284 (get_tinfo_fn): Likewise.
2285 (get_typeid): Use it.
2286 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
2287 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
2289 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
2290 (synthesize_tinfo_fn): New fn.
2291 * method.c (build_t_desc_overload): Lose.
2292 (build_overload_with_type): More generic.
2293 * decl.c (init_decl_processing): Call init_rtti_processing.
2294 * class.c (set_rtti_entry): Use get_tinfo_fn.
2295 * decl2.c (mark_vtable_entries): Mark the rtti function.
2296 (finish_prevtable_vardecl): Don't build_t_desc.
2297 (import_export_decl): Handle tinfo functions.
2298 (finish_file): Likewise.
2299 * typeck.c (inline_conversion): New fn.
2300 (build_function_call_real): Use it.
2301 * cp-tree.h: Add decls.
2303 * method.c (hack_identifier): Also convert component_refs from
2306 * lex.c (cons_up_default_function): Use the type, not the name, in
2309 * decl2.c (import_export_vtable): Fix weak vtables.
2311 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
2313 * search.c (get_base_distance_recursive): Fix access checks for
2316 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2318 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
2320 (convert_harshness): Add prototypes wrapped by PROTO.
2321 * decl2.c (grok_function_init): Likewise.
2322 (do_toplevel_using_decl): Change to void return type.
2323 * class.c (build_vtable_entry): Remove decl of make_thunk.
2324 (merge_overrides): Fix order of arg definitions.
2325 (finish_vtbls): Likewise.
2326 (fixup_vtable_deltas): Likewise.
2327 (modify_all_direct_vtables): Likewise.
2328 (modify_all_indirect_vtables): Likewise.
2329 * search.c (get_base_distance_recursive): Likewise.
2330 (get_abstract_virtuals_1): Likewise.
2331 (fixup_virtual_upcast_offsets): Likewise.
2332 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
2333 * init.c (perform_member_init): Fix order of arg definitions.
2334 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
2335 * cp-tree.h (make_thunk): Add decl.
2336 (overload_template_name, push_template_decl): Add decls.
2337 (do_toplevel_using_decl): Change to void return type.
2338 (vec_binfo_member): Add decl.
2340 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2342 * typeck.c (mark_addressable, convert_for_assignment,
2343 convert_for_initialization, pointer_int_sum, pointer_diff,
2344 unary_complex_lvalue): Add prototypes wrapped by PROTO.
2345 (convert_sequence): #if 0 fn decl, since definition also is.
2347 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
2349 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
2350 cast to pointer types for type searching.
2352 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2354 * typeck.c (get_delta_difference): Use cp_error, not error, in the
2355 case where BINFO == 0.
2357 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
2359 * call.c (build_method_call): Fix wording of error messages so
2360 constructors come out right.
2362 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
2364 * decl.c (push_overloaded_decl): Don't warn about hidden
2365 constructors when both the type and the function are declared
2366 in a system header file.
2368 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
2370 * class.c (finish_struct_1): Propagate the TYPE_PACKED
2371 flag for the type to the type's fields.
2373 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2375 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
2377 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
2379 * class.c (base_info, finish_base_struct): Replace
2380 needs_virtual_dtor with base_has_virtual.
2382 (finish_struct_1): Remove the old code that tried to make default
2383 destructors virtual. Use base_has_virtual when checking if we need
2384 to add a vtable entry for the rtti code.
2386 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2388 * pt.c (push_template_decl): Complain about template decl with
2389 inappropriate declaration.
2391 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
2393 * typeck.c (build_x_unary_op): Remove bogus check for taking
2394 the address of a member function.
2396 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2398 * parse.y (constructor_declarator): Only push the class if
2399 we are not already in the class.
2401 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
2403 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
2404 Add additional argument to INIT_CUMULATIVE_ARGS.
2406 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2408 * decl.c (shadow_tag): Fix error about anon union with methods.
2410 * parse.y (self_reference): Only generate a self-reference if this
2411 is a non-template class.
2412 (opt.component_decl_list): Only use it if it was generated.
2414 * parse.y (component_decl_1): Use constructor_declarator.
2415 (fn.def2): Likewise.
2416 (notype_component_declarator0): Likewise.
2418 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
2420 * typeck.c (build_x_unary_op): Add checks for taking the address
2421 of a TARGET_EXPR or of a member function, and give appropriate
2424 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2426 * pt.c (process_template_parm): Allow template type parms to be
2427 used as types for template const parms.
2429 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
2431 * init.c (expand_vec_init): Ensure the eh cleanups are on the
2434 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2436 * decl.c (lookup_name_real): Be even more picky about the
2437 ambiguous lookup warning.
2438 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
2439 * parse.y (constructor_declarator): Rather than here.
2441 * parse.y (constructor_declarator): New nonterminal.
2443 (explicit_instantiation): Likewise.
2445 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2447 Add implicit declaration of class name at class scope.
2448 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
2449 * parse.y (self_reference): New nonterminal.
2450 (opt.component_decl_list): Use it.
2451 (fn.def1): Add nested_name_specifier type_name cases.
2452 * class.c (build_self_reference): New function.
2453 (finish_struct): Handle access_default later, move self-reference
2455 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
2456 * cp-tree.h: Adjust.
2458 * pt.c (do_function_instantiation): Separate handling of member
2459 functions and non-member functions properly.
2461 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2463 * pt.c (process_template_parm): Improve error for 'volatile class K'.
2465 * class.c (finish_struct_1): Check the right slot for destructors.
2467 * decl.c (start_enum): Complain about enum templates.
2469 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
2471 * init.c (resolve_offset_ref): Offset pointers to member data by one.
2472 * typeck.c (unary_complex_lvalue): Likewise.
2474 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
2476 * typeck.c (c_expand_return): Check for a returned local
2477 array name, similar to the check for an ADDR_EXPR.
2479 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2481 * decl.c (cp_finish_decl): Don't build cleanups for static
2484 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
2486 * typeck.c (build_modify_expr): Fix error messages to be more
2488 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
2489 assignment operators.
2490 * error.c (assop_as_string): Likewise. Add support for `%Q' for
2491 assignment operators.
2493 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2495 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
2496 give an error if initialized. Pedwarn about nested type with the
2497 same name as its enclosing class.
2499 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
2501 * typeck.c (require_complete_type): Be sure to instantiate the
2502 MAIN_VARIANT of the type.
2504 * decl2.c (finish_file): Instantiate pending templates before
2505 processing static constructors and destructors.
2507 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
2510 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
2512 * decl2.c (delete_sanity): If error_mark_node is passed
2513 in as an expression, quit while we're ahead.
2515 * decl.c (grokdeclarator): Give an error message if `friend'
2516 is combined with any storage class specifiers.
2518 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
2520 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
2521 definition of nonexistent nested type.
2523 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
2524 not to say 'typedef'.
2526 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2528 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
2529 * search.c (dfs_walk, dfs_init_vbase_pointers,
2530 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
2531 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
2533 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2535 * except.c (build_throw): Support minimal parse.
2536 * pt.c (tsubst_copy): Support THROW_EXPR.
2537 * decl2.c (build_expr_from_tree): Likewise.
2539 * pt.c (mangle_class_name_for_template): Always allocate
2542 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
2544 * cvt.c (cp_convert_to_pointer): Give an appropriate error
2545 when trying to cast from an incomplete type.
2547 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2549 * pt.c (instantiate_class_template): Don't bother setting up
2550 CLASSTYPE_TAGS explicitly, as the nested types will add
2553 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
2555 * decl.c (shadow_tag): Remove old error check for usage of
2556 an enum without a previous declaration.
2557 (xref_tag): Add error message about usage of enums without a
2558 previous declaration.
2560 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2562 * lex.c (do_identifier): Only do name consistency check if we're
2565 * pt.c (push_template_decl): Don't crash if we get a member defn
2568 * decl.c (xref_tag_from_type): New function to do an xref without
2569 always having to figure out code_type_node.
2570 * cp-tree.h: Declare it.
2571 * pt.c (instantiate_class_template): Use it for friend classes.
2572 (lookup_template_class): Use it.
2574 * typeck2.c (build_functional_cast): Pull out a single parm before
2575 passing it to build_c_cast.
2577 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
2579 * expr.c (do_case): Give an error message if a pointer is
2580 given as a case value.
2582 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2584 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
2587 * lex.c (cons_up_default_function): Really, now, interface hackery
2588 does not apply to synthesized methods.
2590 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
2592 * call.c (build_method_call): Ctors and dtors now have special names
2593 with respect to lookups.
2594 * class.c (add_method): Likewise.
2595 (grow_method): Likewise.
2596 (finish_struct_methods): Likewise.
2597 (warn_hidden): Likewise.
2598 (finish_struct_1): Likewise.
2599 * cvt.c (convert_to_reference): Likewise.
2600 (convert_to_aggr): Likewise.
2601 (cp_convert): Likewise.
2602 * decl2.c (check_classfn): Likewise.
2603 * init.c (expand_member_init): Likewise.
2604 (expand_default_init): Likewise.
2605 (expand_aggr_init_1): Likewise.
2606 (build_offset_ref): Likewise.
2607 (build_new): Likewise.
2608 (build_delete): Likewise.
2609 * lex.c (do_inline_function_hair): Likewise.
2610 * search.c (lookup_field_1): Likewise.
2611 (lookup_fnfields_here): Likewise.
2612 (lookup_field): Likewise.
2613 (lookup_fnfields): Likewise.
2614 (get_virtual_destructor): Likewise.
2615 (dfs_debug_mark): Likewise.
2616 (dfs_pushdecls): Likewise.
2617 (dfs_compress_decls): Likewise.
2618 * tree.c (layout_basetypes): Likewise.
2619 * typeck.c (build_component_ref): Likewise.
2620 (build_x_function_call): Likewise.
2621 (build_modify_expr): Likewise.
2622 (convert_for_initialization): Likewise.
2623 (build_functional_cast): Likewise.
2624 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
2627 * decl.c (ctor_identifier): New.
2628 (dtor_identifier): New.
2629 (init_decl_processing): Set them.
2631 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
2633 * typeck.c (build_component_ref): Don't get confused by fields whose
2634 context has no type name, like pointer to member functions.
2636 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
2638 * decl.c (grokdeclarator): Handle typedef without declarator.
2640 * pt.c (tsubst): Handle SCOPE_REF in declarator.
2642 * parse.y (bad_parm): Catch another case of missing `typename'.
2644 * lex.c (yyprint): Handle TYPE_DECLs.
2646 * decl.c (start_function): Don't try to be clever.
2648 * lex.c: Lose compiler_error_with_decl.
2649 * typeck2.c: Lose error_with_aggr_type.
2650 (incomplete_type_error): Use cp_* instead of old functions.
2651 (readonly_error): Likewise.
2652 * typeck.c (convert_arguments): Likewise.
2653 * search.c (lookup_nested_field): Likewise.
2654 * method.c (make_thunk): Likewise.
2655 * decl.c (grokparms): Likewise.
2656 * cp-tree.h: Update.
2658 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
2661 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
2663 * method.c (build_opfncall): When deleting a pointer to an
2664 array, build a new pointer to the tree past any ARRAY_TYPE
2667 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2669 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
2671 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2673 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
2676 * decl.c (finish_function): Don't set nested based on
2677 hack_decl_function_context.
2678 * parse.y (function_try_block): Check for nested function.
2679 (pending_inlines): Likewise.
2681 * decl2.c (build_expr_from_tree): If a unary op already has a
2682 type, just return it.
2684 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
2686 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
2687 (finish_file): Check the return value of walk_vtables.
2688 (finish_prevtable_vardecl): Return int.
2689 (finish_vtable_vardecl): Likewise.
2690 (prune_vtable_vardecl): Likewise.
2691 * lex.c (set_vardecl_interface_info): Likewise.
2692 * cp-tree.h: Adjust return types.
2694 * class.c (delete_duplicate_fields_1): Don't complain about
2695 duplicate nested types if they're the same type.
2696 (finish_struct): Remove check for duplicate.
2697 * decl2.c (grokfield): Don't check for typedef of anonymous type.
2699 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2701 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
2703 * decl.c (grokdeclarator): Lose special handling of class-level
2704 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
2705 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
2707 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
2709 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
2711 * search.c (compute_access): Fix handling of anonymous union
2713 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
2714 from anonymous unions to their members.
2716 * typeck.c (build_x_function_call): For static member functions,
2717 hand off to build_member_call.
2719 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2721 * typeck.c (build_component_ref): Handle OFFSET_REFs.
2723 * init.c (expand_vec_init): Fix init == 0 case.
2725 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
2727 * init.c (build_new): Pedwarn about init and array new.
2728 (expand_vec_init): Handle lists, use convert_for_initialization
2730 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
2731 when converting to an aggregate type.
2732 * cvt.c (cp_convert): Pass it through.
2734 * typeck.c (build_conditional_expr): Handle user-defined
2735 conversions to slightly different types.
2737 * decl.c (grokdeclarator): Force an array type in a parm to be
2740 * decl2.c (do_using_directive): Sorry.
2741 (do_namespace_alias): Likewise.
2742 * lex.c (real_yylex): Warn about using the `namespace' keyword.
2744 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2746 * parse.y (datadef): Move call to note_list_got_semicolon up.
2748 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
2750 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
2752 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
2754 * decl.c (cp_finish_decl): The exception regions have to be
2755 nested, not overlapping. We start the exception region for a
2756 decl, after it has been fully built, and all temporaries for it
2757 have been cleaned up.
2759 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
2761 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
2763 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2765 * tree.def: Add RETURN_INIT.
2766 * pt.c (instantiate_decl): Handle RETURN_INIT.
2767 * decl.c (store_return_init): Handle minimal_parse_mode.
2769 * tree.c (cp_build_type_variant): Just return an error_mark_node.
2770 * decl.c (make_typename_type): Don't try to get the file and line
2772 * typeck.c (comptypes): Handle TYPENAME_TYPE.
2774 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
2776 * decl.c (poplevel): Make sure we clear out and restore old local
2777 non-VAR_DECL values by default when they go out of scope.
2779 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2781 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
2782 referring to addresses of variables and functions.
2784 * error.c (dump_expr): Support SIZEOF_EXPR.
2786 * init.c (do_friend): Use the return value of check_classfn.
2788 * typeck.c (convert_arguments): Call complete_type.
2790 * method.c (hack_identifier): After giving an error, set value to
2793 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2795 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
2796 lossage for local classes.
2797 * cp-tree.h: Declare it.
2798 * decl.c (lookup_name_real): Evil, painful hack for local classes.
2799 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
2800 Use hack_decl_function_context.
2801 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
2802 (start_function): Use hack_decl_function_context.
2803 (finish_function): Likewise.
2804 * method.c (synthesize_method): Likewise.
2805 * lex.c (process_next_inline): Likewise.
2806 (do_pending_inlines): Likewise.
2807 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
2810 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
2812 * sig.c (build_signature_pointer_or_reference_type): Align
2813 signature pointers/references on 8-byte boundaries so they can be
2814 grabbed 2 words at a time on a Sparc.
2816 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
2818 * method.c (hack_identifier): Requiring a static chain is now a
2820 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
2823 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2825 * init.c (build_offset_ref): Call complete_type.
2827 * decl.c (pop_from_top_level): Always pop previous_class_type.
2829 * parse.y: Handle multiple decls in a for-init-statement.
2830 * pt.c (tsubst_expr): Likewise.
2832 * pt.c (tsubst): Use tsubst_expr for the second operand of an
2835 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
2836 (poplevel_class): Set it here.
2837 (pop_from_top_level): Pop it here if we're returning to class scope.
2838 * class.c (pushclass): Don't set it here.
2840 * decl.c (maybe_push_to_top_level): Save current_template_parms,
2841 and clear it if !pseudo.
2842 (pop_from_top_level): Restore it.
2844 * decl2.c (finish_file): Push the dummy each time we walk the list
2847 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
2848 something for CAST_EXPR.
2850 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2852 * cvt.c (cp_convert): Warn about implicit conversion of the
2853 address of a function to bool, as it is always true.
2855 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2857 * typeck.c (c_expand_return): Fix warning for local externs returned.
2859 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2861 * tree.c (mapcar): Propagate const and volatile properly.
2863 * typeck.c (complete_type): Be sure to instantiate the
2864 MAIN_VARIANT of the type.
2866 * method.c (synthesize_method): Class interface hackery does not
2867 apply to synthesized methods.
2869 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2871 * pt.c (comp_template_args): Use comptypes rather than just
2872 checking for TEMPLATE_TYPE_PARM equivalence.
2874 * typeck.c (build_x_function_call): Call complete_type before
2875 checking TYPE_OVERLOADS_CALL_EXPR.
2877 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
2879 * g++.c (main): Check also for new define ALT_LIBM.
2881 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2883 * pt.c (instantiate_class_template): If we don't have a pattern
2885 (coerce_template_parms): If we see a local class, bail.
2887 * decl.c (grok_reference_init): Make sure there's a type before
2890 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
2891 (push_template_decl): Likewise.
2893 * parse.y (named_class_head): Set
2894 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
2896 * decl.c (xref_tag): Diagnose redeclaration of template
2897 type-parameter name.
2899 * error.c (dump_type): Handle anonymous template type parms.
2901 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
2903 (coerce_template_parms): Likewise.
2905 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
2907 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
2908 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
2910 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
2912 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
2913 before trying to get its STUB_DECL.
2914 (coerce_template_parms): Likewise.
2916 * parse.y (template_type_parm): If they didn't use 'class',
2917 pretend they did after giving an error.
2919 * pt.c (coerce_template_parms): Diagnose use of local class.
2921 * decl.c (grok_reference_init): Use instantiate_type.
2923 * error.c (dump_expr): Handle TEMPLATE_DECLs.
2925 * parse.y (named_class_head): Diagnose mismatching types and tags.
2927 * decl.c (pushdecl): Type decls and class templates clash with
2928 artificial type decls, not hide them.
2930 * decl.c (redeclaration_error_message): Diagnose redefinition of
2932 (duplicate_decls): Diagnose disallowed overloads for template
2935 * decl.c (start_decl): Call complete_type before checking for a
2938 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
2940 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
2942 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2944 * decl.c (grok_op_properties): Don't check for operator++(int) in
2947 * tree.c (perm_manip): Return a copy of variable and function
2948 decls with external linkage.
2950 * tree.def: Change some of the min tree codes to type "1".
2951 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
2952 * method.c (build_overload_int): Emit something arbitrary for
2953 anything but an INTEGER_CST if we're in a template.
2955 * decl.c (cp_finish_decl): Call complete_type before deciding
2956 whether or not to lay out the decl.
2958 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
2960 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2962 * typeck2.c (build_x_arrow): Call complete_type.
2964 * pt.c (add_pending_template): Broken out.
2965 (lookup_template_class): If -fexternal-templates, call it for all
2966 the methods of implemented types.
2967 (instantiate_class_template): Instead of instantiating them here.
2968 (instantiate_decl): Handle -fexternal-templates earlier.
2970 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2972 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
2973 memoized lookup stuff inside GATHER_STATISTICS.
2975 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2977 * decl.c (start_decl): Complain about array of incomplete type
2979 (grokdeclarator): Not here.
2981 * parse.y (template_parm): Expand full_parm inline so we can set
2982 the rule's precedence.
2984 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
2985 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
2986 * decl2.c (grokbitfield): Don't check for integer constant here.
2987 * class.c (finish_struct_1): Check here.
2989 * decl.c (define_label): Make the min decl go on permanent_obstack.
2991 * pt.c (unify): Don't handle CONST_DECLs.
2992 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
2993 (tsubst_copy): Likewise.
2995 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
2996 CONST_DECL for a template parm.
2998 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
3000 * decl.c (grokdeclarator): Complain about array of incomplete type
3002 (start_decl_1): Not here.
3004 * pt.c (tsubst): Handle pointer-to-function declarators.
3006 * method.c (hack_identifier): If pedantic, diagnose local class
3007 methods that require a static chain.
3009 * decl.c (grok_op_properties): No longer static.
3010 * cp-tree.h: Declare it.
3011 * pt.c (tsubst): Call it for operators.
3012 Use tsubst_copy for TREE_VECs.
3014 * parse.y (template_arg): The expr has precedence like '>'.
3016 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3018 * pt.c (coerce_template_parms): Don't coerce an expression using
3020 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
3021 (tsubst): Don't use build_index_2_type if the max_value uses template
3023 * method.c (build_overload_int): Emit something arbitrary for an
3024 expression using template parms.
3026 * parse.y (template_close_bracket): New non-terminal to catch use
3027 of '>>' instead of '> >' in template class names.
3028 (template_type): Use it.
3029 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
3031 * tree.def: Add CAST_EXPR.
3032 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
3033 CONVERT_EXPR for minimal_parse_mode.
3034 * typeck.c (build_c_cast): Likewise.
3035 * pt.c (tsubst_copy): Likewise.
3036 * decl2.c (build_expr_from_tree): Likewise.
3037 * error.c (dump_expr): Likewise.
3039 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3041 * except.c (SetTerminate, SetUnexpected): Put back global vars.
3042 (init_exception_processing): Put back decl/init of
3043 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
3046 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
3047 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
3049 * cp-tree.h (declare_uninstantiated_type_level,
3050 uninstantiated_type_level_p): Delete prototypes.
3052 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3054 * pt.c (tsubst_expr): Add default return.
3056 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3058 * error.c (fndecl_as_string): Delete unused arg CNAME.
3059 * sig.c (build_signature_table_constructor,
3060 build_signature_method_call): Fix calls.
3062 * class.c (the_null_vtable_entry): Delete var definition.
3063 (init_class_processing): Delete tree the_null_vtable_entry init.
3064 * decl.c (no_print_{functions, builtins}): Declare as static.
3065 (__tp_desc_type_node): #if 0 var definition.
3066 (init_type_desc): #if 0 init of __tp_desc_type_node.
3067 (vb_off_identifier): Move var decl into init_decl_processing.
3068 (current_function_assigns_this): Declare as static.
3069 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
3070 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
3071 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
3072 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
3073 * init.c (BI_header_type, BI_header_size): Declare as static.
3074 * pt.c (template_classes): Delete unused var.
3075 (add_pending_template): Delete decl for non-existent fn.
3076 (lookup_template_class): Delete vars CODE and TAG_CODE.
3077 (instantiate_template): Delete unused var TARGS.
3078 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
3080 (__tp_desc_type_node): #if 0 var decl.
3081 (fndecl_as_string): Fix prototype.
3083 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3085 * tree.def: Add GOTO_STMT.
3086 * pt.c (tsubst_expr): Support goto and labels.
3087 * decl.c (define_label): Support minimal parsing.
3088 * parse.y (simple_stmt): Likewise.
3090 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3092 * xref.c (GNU_xref_member): Only define/set var I if
3093 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
3095 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
3096 (GNU_xref_end): Fix call.
3097 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
3098 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
3100 * tree.c (build_exception_variant): Delete unused vars I, A, T,
3102 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
3103 (mapcar): Delete unused var CODE.
3104 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
3105 (break_out_cleanups): Fix call.
3106 (bot_manip): Likewise.
3107 * call.c (build_method_call): Likewise.
3108 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
3110 * typeck.c (unary_complex_lvalue, build_modify_expr,
3111 convert_for_initialization): Likewise.
3112 * typeck2.c (build_functional_cast): Likewise.
3113 * cp-tree.h (build_cplus_new): Fix prototype.
3115 * repo.c (open_repo_file): Delete unused var Q.
3116 (repo_compile_flags, repo_template_declared,
3117 repo_template_defined, repo_class_defined, repo_inline_used,
3118 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
3119 (repo_get_id, repo_vtable_used): Declare as static.
3120 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
3123 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3125 * parse.y (pending_inlines): Add function_try_block case.
3127 * pt.c (unify): Fix for template const parms.
3129 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3131 * lex.c (extract_interface_info): Delete forward decl.
3132 (default_copy_constructor_body, default_assign_ref_body): Delete
3133 decls for non-existent functions.
3134 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
3135 (init_lex): Delete setting them.
3136 (cons_up_default_function): Delete unused vars FUNC_BUF,
3137 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
3139 (toplevel, expression_obstack): Delete unused extern decls.
3140 (tree_node_kind): Delete unused enum.
3141 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
3143 (tree_node_kind_names): Delete unused extern decl.
3144 (synth_obstack): Delete unused var.
3145 (init_lex): Don't set it.
3146 (init_parse): Add decl before use.
3147 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
3148 (current_unit_{name, language}): Delete unused vars.
3149 (check_newline): Don't bother setting them, just accept the #pragma.
3150 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
3151 (current_unit_{name, language}): Delete decls.
3153 * search.c: Wrap all of the memoized functions, macros, and
3154 variables inside #ifdef GATHER_STATISTICS.
3155 (lookup_field, lookup_fnfields): Likewise.
3156 (init_search_processing): Likewise.
3157 (reinit_search_statistics): Wrap whole function.
3158 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
3160 * decl.c (finish_function): Only call pop_memoized_context if
3161 GATHER_STATISTICS is defined.
3162 (start_function): Likewise for push_memoized_context.
3163 * class.c (pushclass, popclass): Likewise.
3165 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
3166 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
3168 * cvt.c (cp_convert): Delete unused local var FORM.
3169 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
3172 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3174 * pt.c (do_poplevel): Oops; really return what we get from
3177 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3179 * cp-tree.h (is_aggr_type): Add prototype.
3181 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
3182 * method.c ({push,pop}_cp_function_context): Delete decls.
3183 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
3184 (SetUnexpected, SetTerminate): Delete unused vars.
3185 (init_exception_processing): Don't set SetUnexpected or
3186 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
3187 (output_exception_table_entry): Delete unused array LABEL.
3188 (expand_internal_throw): Delete unused var PARAMS.
3189 (expand_start_catch_block): Delete unused var CLEANUP.
3190 (emit_exception_table): Delete unused var EH_NODE_DECL.
3191 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
3192 GOTO_UNWIND_AND_THROW. Don't set them.
3193 (end_eh_unwinder): Add top decl.
3194 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
3195 (exception_section, push_rtl_perm, do_function_call,
3196 lang_interim_eh, push_eh_cleanup, eh_outer_context,
3197 expand_end_eh_spec, end_eh_unwinder): Declare as static.
3198 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
3199 throw_used): Likewise.
3200 * cp-tree.h (expand_end_eh_spec): Delete prototype.
3202 * search.c (dfs_mark, dfs_mark_vtable_path,
3203 dfs_unmark_vtable_path, dfs_mark_new_vtable,
3204 dfs_unmark_new_vtable, dfs_clear_search_slot,
3205 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
3206 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
3207 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
3209 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
3210 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
3211 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
3212 Only define #ifdef GATHER_STATISTICS.
3213 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
3215 (vbase_decl): Delete var definition.
3216 (init_search): Delete old decl.
3217 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
3218 never actually used.
3219 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
3220 (get_base_distance_recursive): Delete unused fourth arg
3221 BASETYPE_PATH. Fix call .
3222 (get_base_distance): Fix call.
3223 (push_class_decls): Delete unused var ID.
3224 (make_memoized_table_entry): Declare as static.
3225 (breadth_first_search): Declare as static.
3226 (tree_has_any_destructor_p): Declare as static.
3227 (pop_class_decls): Delete unused arg pop_class_decls.
3228 * class.c (popclass): Fix call to pop_class_decls.
3229 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
3230 tree_has_any_destructor_p): Delete prototypes.
3232 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
3233 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
3234 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
3235 (build_user_desc): Delete unused var T.
3236 (build_class_desc): Delete unused vars T and OFF.
3237 (build_t_desc): Delete unused var NAME_STRING.
3238 (build_headof): Make static.
3239 (get_bad_cast_node): Likewise.
3240 (get_def_to_follow): Likewise.
3241 * cp-tree.h (init_type_desc): Add prototype.
3242 (build_headof): Remove prototype.
3244 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3246 * pt.c (tsubst): Only look for matching decls at file scope for
3247 non-member functions.
3249 * call.c (build_scoped_method_call): Handle scoped destructor
3252 * decl.c (*_top_level): Also save previous_class_values.
3254 * pt.c (tsubst_expr): Support do {} while loops.
3255 * parse.y (simple_stmt): Likewise.
3256 * tree.def: Likewise.
3258 * method.c (build_overload_identifier): For a class nested in a
3259 template class, don't mangle in the template parms from our
3262 * lex.c, cp-tree.h: Remove support for template instantiations in
3263 the pending_inlines code.
3264 * pt.c: Remove dead functions and unused arguments.
3265 (uses_template_parms): TYPENAME_TYPEs always use template parms.
3266 * parse.y: Stop passing anything to end_template_decl.
3267 * tree.c (print_lang_statistics): Only print tinst info #ifdef
3270 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3272 * init.c (expand_recursive_init{,_1}): Delete decls.
3273 (sort_member_init): Delete unused var INIT.
3274 (emit_base_init): Delete unused var X.
3275 (build_offset_ref): Delete unused var CNAME.
3276 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
3277 (emit_base_init): Delete unused local var BASE. Delete extern
3278 decl of IN_CHARGE_IDENTIFIER.
3279 (build_delete): Delete unused local var VIRTUAL_SIZE.
3281 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
3282 (build_delete): Fix call.
3283 * decl2.c (delete_sanity): Likewise.
3284 * cp-tree.h (build_vec_delete): Update prototype.
3286 * typeck.c (common_base_type): Delete unused var TMP.
3287 (build_binary_op): Delete local var ARGS_SAVE.
3288 (build_array_ref): Delete unused var ITYPE.
3289 (c_expand_return): Delete unused var USE_TEMP.
3291 * typeck.c (compexcepttypes): Delete unused arg STRICT.
3292 (comptypes): Fix calls.
3293 * decl.c (duplicate_decls): Likewise.
3294 * cp-tree.h (compexcepttypes): Delete extra arg.
3296 * decl2.c (check_classfn): Delete unused second arg CNAME.
3297 * decl.c (start_decl, grokfndecl): Fix calls.
3298 * init.c (do_friend): Likewise.
3299 * cp-tree.h (check_classfn): Update prototype.
3301 * cp-tree.h (signature_error, import_export_vtable,
3302 append_signature_fields, id_in_current_class, mark_used,
3303 copy_assignment_arg_p): Add decls.
3304 * decl2.c (mark_used): Delete decl.
3306 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
3308 * class.c (get_vtable_entry): Diable unused function.
3309 (doing_hard_virtuals): Delete unused static global var.
3310 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
3311 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
3312 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
3313 (modify_one_vtable): Delete unused var OLD_RTTI.
3314 (finish_struct_anon): Delete unused vars OFFSET and X.
3315 (finish_struct_bits): Delete unused var METHOD_VEC.
3316 (get_basefndecls): Delete unused var PURPOSE. Delete unused
3317 for-scope local variable METHODS.
3319 * call.c (user_harshness): Delete unused/unneeded arg PARM.
3320 (ideal_candidate): Delete unused args BASETYPE and PARMS.
3321 (build_method_call): Delete unused args passed into ideal_candidate.
3322 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
3323 * cp-tree.h (synthesize_method): Add decl.
3325 * decl.c (note_level_for_for): Give void return type.
3326 (pushdecl_nonclass_level): Likewise.
3327 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
3328 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
3329 (suspend_binding_level): Delete unused var LEVEL.
3330 (duplicate_decls): Delete unused var CTYPE.
3331 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
3332 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
3334 (grokdeclarator): Delete unused var C.
3335 (grokdeclarator): Delete unused var SIZE_VARIES.
3336 (grokparms): Delete unused var SAW_VOID.
3337 (start_function): Delete unused var OLDDECL.
3338 (cplus_expand_expr_stmt): Delete unused var
3339 REMOVE_IMPLICIT_IMMEDIATELY.
3341 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
3343 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
3345 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3347 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
3348 (build_min_nt): Likewise.
3349 * pt.c (do_pushlevel): Emit line note.
3350 (do_poplevel): Return what we get from poplevel.
3351 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
3352 * parse.y: Use do_pushlevel and do_poplevel.
3353 * cp-tree.h: Declare do_poplevel.
3355 * cp-tree.h: Declare at_eof.
3356 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
3357 * decl2.c (import_export_decl): Renamed from import_export_inline.
3358 (finish_file): Call it to do interface handling for statics.
3359 * pt.c (tsubst_copy): Call mark_used on variables and functions
3362 * decl2.c (finish_file): Don't emit statics we can't generate.
3363 * pt.c (instantiate_decl): Don't set interface on instantiations
3366 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
3367 * tree.c (print_lang_statistics): Print max template depth.
3368 * pt.c (push_tinst_level): Dump entire instantiation context.
3369 (instantiate_class_template): Use it and pop_tinst_level.
3370 (instantiate_decl): Likewise.
3372 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
3373 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
3375 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
3377 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
3378 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
3379 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
3380 the new template implementation.
3382 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3384 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
3386 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
3388 * decl.c (cp_finish_decl): Delay emitting the debug information for
3389 a typedef that has been installed as the canonical typedef, if the
3390 type has not yet been defined.
3392 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3394 * decl2.c (grokfield): Still call pop_nested_class for access decls.
3396 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3398 * decl.c (lookup_label): Call label_rtx.
3400 * decl.c (make_binding_level): New function.
3401 (pushlevel, pushlevel_class): Call it instead of explicit
3402 duplicate calls to xmalloc.
3404 * decl.c (init_decl_processing): Delete useless build_pointer_type
3407 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
3408 (sizet_ftype_string): Delete variable.
3409 (init_decl_processing): Add built-in functions fabsf, fabsl,
3410 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
3411 variable strlen_ftype, used for strlen.
3413 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
3415 * decl.c (push_to_top_level): Start from current_binding_level
3416 again for now; the stl hacks depend on g++ being broken in this
3417 way, and it'll be fixed in the template rewrite.
3419 * tree.def: Add USING_DECL.
3420 * decl2.c (do_class_using_decl): Implement.
3421 (grokfield): Pass access decls off to do_class_using_decl instead of
3423 * error.c (dump_decl): Handle USING_DECLs.
3424 * decl.c (grokdeclarator): Remove code for handling access decls.
3425 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
3426 as access decls for now.
3427 (finish_struct): Don't check USING_DECLs for other uses of the name.
3429 * search.c (get_matching_virtual): Use cp_error_at.
3431 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3433 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
3435 (self_promoting_args_p): Move the check that TYPE is non-nil
3436 before trying to look at its main variant.
3437 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
3439 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
3441 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
3442 (do_friend): Delete call to xref_friend.
3443 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
3445 * typeck.c (convert_sequence): #if 0 unused function.
3447 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
3448 be in decl_in_memory_p.
3449 (decl_in_memory_p): Delete decl.
3450 * expr.c (decl_in_memory_p): Delete fn.
3451 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
3453 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
3455 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
3457 * class.c (finish_struct_1): Check for a pure-specifier on a
3458 non-virtual function here.
3460 * decl2.c (grok_function_init): Don't check whether the function
3462 (grokfield): Don't call check_for_override here.
3464 * decl.c (push_to_top_level): Start from inner_binding_level,
3465 check class_shadowed in class levels.
3467 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
3469 * decl.c (resume_level): Ignore things that don't have names, instead
3472 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3474 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
3476 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
3478 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
3481 * parse.y (complete_type_name): Bind global_scope earlier.
3482 (complex_type_name): Likewise.
3483 (qualified_type_name): Remove.
3485 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
3487 * decl.c (grokfndecl): Move code that looks for virtuals in base
3489 * class.c (check_for_override): ... to a new function.
3490 (finish_struct_1): Call it.
3492 * cp-tree.h: Declare warn_sign_compare.
3494 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
3495 rather than extra_warnings to decide whether to warn about
3496 comparison of signed and unsigned.
3498 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
3499 implies -Wsign-compare. -Wall doesn't imply -W.
3501 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
3503 * typeck.c (build_component_ref): Fix to handle anon unions in base
3506 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3508 * class.c (resolves_to_fixed_type_p): Delete code dealing with
3509 a WITH_CLEANUP_EXPR, since we don't generate them any more.
3510 * cvt.c (build_up_reference): Likewise.
3511 * decl.c (grok_reference_init): Likewise.
3512 (cp_finish_decl): Likewise.
3513 * error.c (dump_expr): Likewise.
3514 * tree.c (real_lvalue_p): Likewise.
3515 (lvalue_p): Likewise.
3516 (build_cplus_new): Likewise.
3517 (unsave_expr_now): Likewise.
3518 * typeck.c (unary_complex_lvalue, build_modify_expr,
3519 c_expand_return): Likewise.
3521 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3523 Make the C++ front-end pay attention to attributes for structures.
3524 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
3526 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
3527 Take out old round_up_size use and setting the DECL_ALIGN possibly
3528 using it. Take out setting of TYPE_ALIGN to round_up_size, which
3529 can override what the attribute set.
3530 * cp-tree.h (finish_struct): Update prototype.
3531 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
3532 attributes to finish_struct.
3533 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
3534 value down into finish_struct.
3535 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
3537 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
3539 * decl.c (poplevel): Re-word dead for local handling.
3540 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
3541 (cp_finish_decl): If is_for_scope, check for duplicates so
3542 we can disable is_for_scope. Otherwise, preserve_temp_slots.
3544 * lex.c (do_identifier): Use global binding in preference of
3545 dead for local variable.
3547 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
3549 * init.c (initializing_context): Handle anon union changes, the
3550 context where fields of anon unions can be initialized now has to be
3551 found by walking up the TYPE_CONTEXT chain.
3553 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
3555 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
3556 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
3557 (obscure_complex_init): If bss is supported, always set
3558 DECL_INITIAL to error_mark_node.
3560 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3562 * init.c (is_friend): Make sure there's a context before we see if
3565 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
3567 * init.c (is_friend): Classes are not friendly with nested classes.
3569 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
3571 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
3572 and record its result.
3574 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
3576 * class.c (finish_struct_anon): Switch around code to not move anon
3577 union elements around, nor mess up their contexts, nor offsets,
3578 instead we now build up the right number of COMPONENT_REFs for all
3579 the anon unions that may be present at build_component_ref time.
3580 * typeck.c (lookup_anon_field): New routine to handle field lookup
3581 on fields without names. We find them, based upon their unique type
3583 * typeck.c (build_component_ref): Allow FIELD_DECL components.
3584 Handle finding components in anonymous unions, and ensure that a
3585 COMPONENT_REF is built for each level as necessary.
3587 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
3589 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
3590 code that ensures that copy ctors are used if appropriate.
3592 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3594 * init.c (build_vec_delete): Only give an error if base isn't an
3597 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
3599 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
3600 (yylex): If we see `new', keep slurping.
3602 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
3604 * class.c (finish_struct_1): Move code for handling anon unions...
3605 (finish_struct_anon): to here. Fixup so that we do the offset
3606 calculations right, and so that the fields are physically moved to
3607 the containers's chain.
3609 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3611 * decl.c (grokdeclarator): Avoid trying to get an operand off an
3614 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
3616 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
3617 POINTER_SIZE to agree with expr.c.
3619 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
3621 * search.c (lookup_field): Don't report ambiguities if protect is 0,
3622 instead return NULL_TREE.
3624 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
3626 * class.c (finish_struct_1): Call warn_hidden if we want warnings
3627 about overloaded virtual functions.
3628 (warn_hidden): New routine to warn of virtual functions that are
3629 hidden by other virtual functions, that are not overridden.
3630 (get_basefndecls): New routine, used by warn_hidden.
3631 (mark_overriders): New routine, used by warn_hidden.
3632 * search.c (get_matching_virtual): Remove old warning that just
3635 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3637 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
3639 * typeck.c (null_ptr_cst_p): Delete unused fn.
3640 (build_function_call_maybe): Delete unused fn.
3642 * expr.c (extract_init): #if 0 the code after unconditional return 0
3645 Delete old cadillac code.
3646 * edsel.c: Remove file.
3647 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
3648 * Makefile.in (CXX_OBJS): Delete edsel.o.
3649 (edsel.o): Delete rule.
3650 * cp-tree.h (flag_cadillac): Delete var decl.
3651 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
3652 * decl2.c (flag_cadillac): Delete var definition.
3653 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
3654 (grokfield): Delete code depending on flag_cadillac.
3655 (finish_anon_union): Likewise.
3656 * class.c (finish_struct_1): Likewise.
3657 (pushclass): Likewise.
3658 (popclass): Likewise.
3659 (push_lang_context): Likewise.
3660 (pop_lang_context): Likewise.
3661 * decl.c (init_decl_processing): Likewise.
3662 (start_decl): Likewise.
3663 (cp_finish_decl): Likewise.
3664 (xref_tag): Likewise.
3665 (finish_enum): Likewise.
3666 (start_function): Likewise.
3667 (finish_function): Likewise.
3668 (finish_stmt): Likewise.
3669 * lex.c (lang_init): Likewise.
3670 (check_newline): Likewise.
3672 * lex.c (do_pending_inlines): Delete synthesized method kludge.
3674 Delete defunct, ancient garbage collection implementation.
3675 * rtti.c: New file with the RTTI stuff from gc.c.
3676 * gc.c: Removed file (moved the remaining stuff into rtti.c).
3677 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
3678 (rtti.o): New rule, replacing gc.o.
3679 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
3680 * cp-tree.h: Delete gc-related fn decls.
3681 (DECL_GC_OFFSET): Delete macro.
3682 (flag_gc): Delete extern decl.
3683 * decl.c (current_function_obstack_index): Delete var decl.
3684 (current_function_obstack_usage): Delete var decl.
3685 (start_function): Delete clearing of current_function_obstack_index
3686 and current_function_obstack_usage.
3687 (init_decl_processing): Delete code relying on -fgc.
3688 Delete call to init_gc_processing.
3689 (cp_finish_decl): Delete calls to build_static_gc_entry and
3690 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
3691 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
3692 and to expand_expr of a __gc_main call.
3693 (maybe_gc_cleanup): Delete var decl.
3694 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
3695 * decl2.c (flag_gc): Delete var decl.
3696 (lang_f_options): Delete offering of -fgc.
3697 (lang_decode_option): Delete -fgc and -fno-gc handling.
3698 (get_temp_regvar): Delete gc code.
3699 * init.c (build_new): Delete gc code.
3700 * lex.c (init_lex): Delete checking of flag_gc.
3702 * typeck.c (convert_arguments): Delete gc code.
3703 (build_component_addr): Delete -fgc warning.
3704 (build_modify_expr): Delete gc code.
3706 * decl2.c (build_push_scope): Delete fn.
3707 * cp-tree.h (build_push_scope): Delete decl.
3709 * search.c (clear_search_slots): Delete fn.
3710 * cp-tree.h (clear_search_slots): Delete decl.
3712 * search.c (tree_needs_constructor_p): Delete fn.
3713 * cp-tree.h (tree_needs_constructor_p): Delete decl.
3715 * tree.c (id_cmp): Delete fn.
3717 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
3718 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
3720 * tree.c (decl_value_member): Delete fn.
3721 * cp-tree.h (decl_value_member): Delete decl.
3723 * tree.c (list_hash_lookup_or_cons): Delete fn.
3724 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
3726 * method.c (cplus_exception_name): Delete fn.
3727 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
3729 * spew.c (shift_tokens): Delete fn.
3731 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3733 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
3735 * parse.y: Likewise.
3737 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3739 * tree.c (build_cplus_staticfn_type): Delete function definition;
3741 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
3743 * tree.c (virtual_member): Delete function definition; never used.
3744 * cp-tree.h (virtual_member): Delete decl.
3746 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
3748 * typeck.c (build_component_ref): Handle getting vbase pointers
3749 out of complex multiple inheritance better.
3751 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
3753 * typeck.c (build_object_ref): Make sure we use the real type, not
3756 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
3758 * tree.c (build_exception_variant): Don't create new types if we
3759 don't have to, also build new types on the right obstack.
3761 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3763 * decl.c (store_bindings): Split out from push_to_top_level.
3764 (push_to_top_level): Call it for b->type_shadowed on class binding
3767 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
3769 * search.c (expand_upcast_fixups): Fix so that offsets stored in
3770 vbase_offsets are always right. Fixes a problem where virtual base
3771 upcasting and downcasting could be wrong during conversions on this
3772 during virtual function dispatch at ctor/dtor time when dynamic
3773 vtable fixups for deltas are needed. This only sounds easier than
3775 (fixup_virtual_upcast_offsets): Change to reflect new calling
3776 convention for expand_upcast_fixups.
3778 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3780 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
3781 check that it's usable as the bitfield width.
3783 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3785 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
3786 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
3787 only ever used for functions in it.
3789 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3791 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
3792 (nested_type): Likewise.
3793 (nested_name_specifier): Use lastiddecl.
3795 * decl.c (grokdeclarator): Adjust accordingly.
3796 * init.c (expand_member_init): Likewise.
3797 * parse.y (base_class): Likewise.
3798 * typeck2.c (build_functional_cast): Likewise.
3800 * typeck2.c (build_functional_cast): Fill in name after we've
3801 checked for non-aggr type.
3803 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
3805 * decl2.c (warn_pointer_arith): Default to on.
3807 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
3809 * lex.c (is_rid): New function.
3810 * decl.c (grokdeclarator): Diagnose reserved words used as
3813 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
3815 * tree.c (get_decl_list): Don't lose cv-quals.
3817 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
3818 typespecs used as declarator-ids.
3820 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
3822 * decl.c (poplevel): When poping a level, don't give a warning for
3823 any subblocks that already exist.
3825 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3827 * typeck.c (build_object_ref): Finish what I started.
3829 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
3831 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
3833 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
3836 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3838 * decl.c (xref_tag): Handle passing a type in directly.
3840 * parse.y (qualified_type_name): Pull out the type.
3841 (nested_type): Likewise.
3842 Take types directly instead of as identifiers.
3843 * call.c (build_scoped_method_call): Take types directly instead of
3845 * decl.c (xref_basetypes): Likewise.
3846 * init.c (expand_member_init): Likewise.
3847 (build_member_call): Likewise.
3848 (build_offset_ref): Likewise.
3849 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
3850 * method.c (do_build_assign_ref): Likewise.
3851 * decl.c (grokdeclarator): Handle a type appearing as the
3852 declarator-id for constructors.
3853 * method.c (do_build_copy_constructor): current_base_init_list now
3854 uses the types directly, not their names.
3855 * init.c (sort_base_init): Likewise.
3856 (expand_member_init): Likewise.
3857 * init.c (is_aggr_type): New function, like is_aggr_typedef.
3859 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
3861 * tree.c (layout_basetypes): Call build_lang_field_decl instead
3862 of build_lang_decl if first arg is a FIELD_DECL.
3864 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3866 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
3868 * except.c (expand_start_catch_block): Set TREE_USED to avoid
3869 warnings about the catch handler.
3871 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
3873 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
3876 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3878 Fix access control to use trees rather than integers.
3879 * class.c (access_{default, public, protected, private,
3880 default_virtual, public_virtual, private_virtual}_node): Add
3882 (init_class_processing): Do creation of those nodes.
3883 * cp-tree.h (access_type): Delete enum decl.
3884 (access_{default, public, protected, private, default_virtual,
3885 public_virtual, private_virtual}_node): Add decls.
3886 (compute_access): Change return type.
3887 * search.c (compute_access): Have tree return type, instead of enum.
3888 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
3889 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
3890 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
3891 * parse.y (VISSPEC): Make ttype rather than itype.
3892 (base_class_access_list): Likewise.
3893 * *.[cy]: Change all refs of `access_public' to `access_public_node',
3895 * call.c (build_method_call): Make ACCESS be a tree.
3896 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
3897 * cvt.c (convert_to_aggr): Likewise.
3898 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
3900 * method.c (hack_identifier): Likewise.
3901 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
3903 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
3905 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
3906 frontend, and make it more consistent with respect to
3909 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3911 * decl.c (pushdecl): Check for duplicate parameter names.
3913 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
3915 * decl.c (expand_static_init): Call assemble_external for atexit.
3917 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
3919 * except.c (do_unwind): Remove some generated dead code.
3920 (eh_outer_context): New routine, factor out some common code from
3921 expand_builtin_throw and end_eh_unwinder. Add code to do return
3922 address masking for the PA.
3923 (expand_builtin_throw): Use eh_outer_context instead of open coding
3925 (end_eh_unwinder): Likewise.
3927 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
3929 * except.c (expand_throw): Call assemble_external for __empty, if we
3932 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
3934 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
3935 NORMAL_RETURN_ADDR_OFFSET.
3936 (end_eh_unwinder): Likewise.
3938 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
3940 * gc.c (build_dynamic_cast): Make sure we don't cast away const
3941 when dealing with references, and make sure we handle dynamic
3942 casting to a cv qualified reference.
3944 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
3946 * except.c (struct eh_context): New structure top hold eh context
3948 (push_eh_context): New routine.
3949 (pop_eh_context): Likewise.
3950 * decl.c (push_cp_function_context): Use them.
3951 (pop_cp_function_context): Likewise.
3953 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
3955 * decl2.c (finish_file): Also prune uninteresting functions in the
3956 inline emission loop.
3958 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
3960 * sig.c (build_signature_table_constructor): Mark functions
3961 in the signature as referenced.
3963 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
3965 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
3966 the inline emission stuff.
3968 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
3970 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
3972 * lang-options.h: Add -f{no-,}weak.
3973 * decl.c (init_decl_processing): If the target does not support weak
3974 symbols, don't use them.
3975 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
3977 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
3979 * init.c (expand_member_init): warning for base init after members.
3981 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
3983 * cvt.c (build_expr_type_conversion): Don't convert to a reference
3986 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
3988 * method.c (report_type_mismatch): Improve wording for volatile
3991 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
3993 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
3994 expand_assignment, as the later doesn't handle things that have
3995 copy constructors well. The compiler would do bitwise copying,
3996 instead of ctor calling in some cases.
3998 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
4000 * g++.c (my_strerror): Return "cannot access" if errno is 0.
4001 (pfatal_with_name, perror_exec): Don't assume that
4002 the returned value from my_strerror contains no '%'s.
4004 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
4006 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
4008 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
4009 TYPE_METHODS/TREE_CHAIN mean what they used to.
4010 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
4011 instead of TYPE_METHODS.
4012 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
4013 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
4014 * cp-tree.h (CLASSTYPE_METHODS): Lose.
4015 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
4017 (struct lang_decl): Lose next_method field.
4018 (DECL_NEXT_METHOD): Lose.
4019 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
4020 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
4022 (finish_struct_methods): Don't mess with the TREE_CHAINs in
4025 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
4028 * call.c (build_method_call): Synthesize here even when not inlining.
4029 * typeck.c (build_function_call_real): Likewise.
4031 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
4033 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
4034 == DBX_DEBUG, call dbxout_start_new_source_file and
4035 dbxout_resume_previous_source_file when appropriate.
4037 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
4039 * except.c (start_anon_func): Push to the top level.
4040 (end_anon_func): Pop from the top level.
4042 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
4044 * cp-tree.h (build_cleanup): New routine to build cleanups.
4045 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
4046 call at ctor time and use atexit to run it later.
4047 * decl2.c (build_cleanup): New routine, taken from finish_file.
4048 (finish_file): Use build_cleanup instead, and don't put function
4049 local statics in global dtor list.
4051 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
4053 * except.c (expand_throw): Ensure that we have cleanups, if we try
4054 and expand cleanups.
4056 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
4058 * except.c (expand_throw): Add logic to manage dynamic cleanups for
4060 (expand_end_catch_block): Use the magic of expand_goto, instead of
4061 emit_jump so that we get the cleanup for any catch clause parameter
4062 and the cleanup for the exception object. Update to reflect label
4064 (push_eh_cleanup): New routine to register a cleanup for an
4066 (empty_fndecl): Used to default cleanup actions to
4068 (init_exception_processing): Setup empty_fndecl. Setup
4070 (expand_start_catch_block): Update to reflect label changes. Call
4071 push_eh_object to register the cleanup for the EH object.
4072 (start_anon_func): New routine to start building lambda expressions
4074 (end_anon_func): New routine to end them.
4075 (struct labelNode): Change so that we can use tree labels, or rtx
4077 (saved_cleanup): Object to check for dynamic cleanups for the
4078 exception handling object.
4079 (push_label_entry): Change so that we can use tree labels, or rtx
4081 (pop_label_entry): Likewise.
4082 (top_label_entry): Likewise.
4083 (expand_start_all_catch): Use tree label instead of rtx label, so
4084 that we can get the magic of expand_goto.
4085 (expand_end_all_catch): Update to reflect label changes.
4087 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
4089 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
4090 building_cleanup logic, as we now use UNSAVE_EXPRs.
4091 * cp-tree.h (unsave_expr): Declare it.
4092 * decl.c (building_cleanup): Remove.
4093 (maybe_build_cleanup): Remove building_cleanup logic, and use
4094 UNSAVE_EXPR instead.
4096 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
4098 * gc.c (build_t_desc): Update error message to say <typeinfo>.
4100 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4102 * decl.c (pushdecl): Only warn about shadowing a local variable if
4103 warn_shadow is true.
4105 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4107 * typeck.c (build_binary_op_nodefault): Added warning about
4108 comparisons between different enum types with -Wall, unless
4109 -fenum-int-equiv set.
4111 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
4113 * class.c (finish_struct_1): Skip down to the inner type in
4114 multidimensional arrays. Ensures ctors will be made for types that
4117 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
4119 * decl.c (last_dtor_insn): New to track the last compiler generated
4121 (store_parm_decls): Set it.
4122 (finish_function): Use it to see if the dtor is empty. Avoid doing
4123 vtable setup all the time, if we can.
4124 (struct cp_function): Add last_dtor_insn.
4125 (push_cp_function_context): Save it.
4126 (pop_cp_function_context): Restore it.
4128 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
4130 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
4133 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
4135 * typeck.c (expand_target_expr): Make sure targets get put into the
4136 current temp_slot_level, so that the free_temp_slots call will reuse
4139 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
4141 * class.c (finish_struct_1): Delay delta fixups for virtual bases
4142 until after we have done the hard virtuals, to avoid a bogus `every
4143 virtual function must have a unique final overrider' for virtual
4144 functions that are only overridden by hard virtuals.
4146 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4148 * pt.c (do_function_instantiation): Don't try to find a file-scope
4149 template for a member function.
4151 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
4153 * g++.c (main): Add handling of -nodefaultlibs.
4155 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
4157 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
4158 distinguish between direct bindings of reference variables, and
4159 indirect bindings of reference variables.
4160 * cvt.c (build_up_reference): Use it.
4161 * typeck.c (convert_arguments): Use it to indicate this is an
4163 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
4165 (expand_static_init): Likewise.
4166 (cplus_expand_expr_stmt): Likewise.
4167 * decl2.c (finish_file): Likewise.
4168 * init.c (perform_member_init): Likewise.
4169 (emit_base_init): Likewise.
4170 (expand_aggr_vbase_init_1): Likewise.
4172 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4174 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
4175 get a DECL_LANG_SPECIFIC node.
4176 * cp-tree.h (lang_decl_flags): Add new member `level'.
4177 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
4178 decl_flags level member.
4180 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4182 * call.c (build_method_call): Make sure instance has a
4183 TYPE_LANG_SPECIFIC node before we dive into it.
4185 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
4187 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
4189 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
4191 * decl.c (duplicate_decls): When smashing decls, smash staticness in
4194 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
4196 * decl.c (poplevel): Handle the merging of subblocks of cleanups
4197 when finishing blocks that have already been created (usually due to
4198 the fixup goto code). Fixes bad debugging information.
4200 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
4202 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
4203 that's not a list of overloaded functions.
4205 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4207 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
4208 before trying to use DECL_ABSTRACT_VIRTUAL_P.
4210 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
4212 * decl2.c (mark_used): New function for hooking into setting of
4214 * call.c (build_method_call): Use it.
4215 * class.c (instantiate_type): Likewise.
4216 * init.c (build_offset_ref): Likewise. Don't call assemble_external
4217 for all like-named functions.
4218 * method.c (hack_identifier): Likewise.
4219 (emit_thunk): Don't call assemble_external.
4220 (make_thunk): Create thunk as a FUNCTION_DECL so that it
4221 gets the right mode and ENCODE_SECTION_INFO works.
4223 * parse.y: Use mark_used. Pass operator names to do_identifier.
4224 * lex.c (do_identifier): Handle operator names.
4226 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
4228 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4230 * errfn.c: Include stdio.h.
4231 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
4233 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
4235 * typeck2.c (digest_init): Always convert initializers to the
4238 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
4240 * init.c (member_init_ok_or_else): Don't allow member initializers
4241 for indirect members, as it is invalid.
4243 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4245 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
4247 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
4249 * parse.y (for.init.statement): Catch compound statements inside for
4250 initializations, if we're being pedantic.
4252 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
4254 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
4257 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
4259 * error.c (dump_expr): Don't core dump when a boolean expression is
4260 used as a default argument.
4262 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4264 * class.c (finish_struct_bits): Check aggregate_value_p instead of
4267 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
4269 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
4270 BLKmode type that would otherwise be returned in registers.
4272 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4274 * g++.c (WITHLIBC): New macro.
4275 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
4276 saw_libc and pass it at the end if it was set.
4278 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4280 * parse.y (fn.def1): Call split_specs_attrs in
4281 declmods notype_declarator case.
4283 Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
4285 * Version 2.7.2 released.
4287 Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
4289 * g++.c (pfatal_with_name): Add missing third argument to concat.
4291 Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
4293 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
4296 Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4298 * Version 2.7.1 released.
4300 Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
4302 * call.c (convert_harshness): Handle references to arrays.
4304 Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
4306 * typeck.c (comp_target_types): Check multi-level pointer
4307 conversions in both directions.
4309 Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
4311 * parse.y (explicit_instantiation): Fix 'extern template' with no
4314 Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
4316 * parse.y (explicit_instantiation): Support automatic instantiation
4318 (named_class_head_*): Support out-of-class definition of nested
4321 Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
4323 * search.c (envelope_add_decl): New routine. Fix so that
4324 methods are hidden in the same way that other members are.
4325 (dfs_pushdecls): Cleanup and move functionality out of line,
4326 into envelope_add_decl.
4328 Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
4330 * typeck.c (mark_addressable): Only call assemble_external if we
4331 have started the output file.
4333 Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4335 * decl.c (start_function): Fix earlier cv-quals change.
4337 Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
4339 * parse.y (complex_direct_notype_declarator): Only push the class if
4340 we are not already in the class.
4342 Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
4344 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
4345 Update olddecl's attributes too.
4346 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
4347 * typeck.c (common_type): Call merge_machine_type_attributes.
4349 Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
4351 * typeck.c (mark_addressable): Add missing call to
4354 Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
4356 * decl.c (store_parm_decls): Make sure the unwinder start comes
4357 before the exception specification start.
4358 * except.c (expand_exception_blocks): Make sure the unwinder end
4359 comes after the terminate protected catch clause region and after
4360 the end of the exception specification region.
4362 Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
4364 * lex.c (real_yylex): Fix identifier case for linemode.
4365 (handle_sysv_pragma): Don't abort when we see a pragma we don't
4368 Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
4370 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
4371 * except.c (init_exception_processing): __throw doesn't take any
4373 (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode
4374 for all pointers. Use expand_builtin_return_addr to unwind the
4375 first level off the stack.
4376 (do_unwind): Always use Pmode, instead of SImode for all pointers.
4377 (expand_exception_blocks): Add a call to end_eh_unwinder.
4378 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
4379 independent stack unwinders for function/method calls.
4381 Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
4383 * tree.c (unsave_expr_now): Make sure we process the argument list
4384 of any called functions. Fixes incorrect code generation for
4387 Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
4389 * typeck.c (get_member_function_from_ptrfunc): Save function if it
4390 needs it. Cures core dump on things like (this->*(f()))().
4392 Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4394 * decl.c (start_function): Conform to gcc cv-quals convention (no
4395 expression has a cv-qualified type) in RESULT_DECLs.
4396 * method.c (make_thunk): Likewise.
4398 Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
4400 * decl.c (pushtag): Add in the namespace name for the tag.
4402 Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
4404 * parse.y (maybe_base_class_list, base_class_list, base_class,
4405 base_class_access_list): Make sure we see the typenames for base
4407 * lex.c (see_typename): Instead of failing to see a typename when
4408 there is no next token, perfer a typename, and get the next token.
4410 Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
4412 * decl.c (init_decl_processing): Add __builtin_expect.
4414 Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
4416 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
4417 or from pointer to member functions, they must all be handled before
4420 Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4422 * init.c (resolve_offset_ref): Fix wording of non-static member
4423 being referenced as a static.
4425 Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4427 * typeck.c (build_indirect_ref): Only bash pointer if we actually
4428 call build_expr_type_conversion.
4430 Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
4432 * cvt.c (build_expr_type_conversion): Handle conversion from
4434 * typeck.c (build_indirect_ref): Avoid infinite recursion.
4436 Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
4438 * decl.c (expand_start_early_try_stmts): New routine to start a try
4439 block at the start of the function, for function-try-blocks.
4440 * cp-tree.h (expand_start_early_try_stmts): Declare it.
4441 * parse.y (function_try_block): Use it, instead of doing it here, as
4442 we don't want to include rtl.h here, as that conflicts with RETURN
4445 Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
4447 * lex.c (reinit_parse_for_block): Support saving inline
4448 function-try-blocks, uses peekyylex.
4449 * parse.y (eat_saved_input): New rule, permit the parser to see that
4450 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
4451 handlers of a function-try-block.
4453 (component_decl): Make sure TRY and RETURN can come after fn.def2.
4454 * spew.c (peekyylex): New routine to peek at what will come next.
4456 Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4458 * typeck.c (comptypes): Tighten up comparisons of template type
4461 * decl.c (duplicate_decls): Turn off whining about virtual functions
4462 redeclared inline for now.
4464 Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
4466 * decl.c (store_in_parms): New routine to put things before we
4468 * cp-tree.h (store_in_parms): Declare it.
4469 * decl.c (store_parm_decls): Use it to makr sure the starting of the
4470 eh spec comes before base inits.
4471 (finish_function): Use sequences instead of the obsolete
4473 * parse.y (fndef): Enhance readability and maintainability. Update
4474 to include function_try_block syntax.
4475 (function_try_block): Add.
4477 Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4479 * call.c (convert_harshness): Use comptypes, not ==, to check if
4480 TYPE and PARMTYPE are equivalent on a function type.
4482 Tue Sep 12 17:31:33 1995 Douglas Rupp <drupp@cs.washington.edu>
4484 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
4486 Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
4488 * except.c (expand_throw): Never allocate storage for thrown pointer
4491 Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
4493 * except.c (expand_start_catch_block): Pointers to objects come
4494 back from catch matching already dereferenced, don't dereference
4497 Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
4499 * except.c (expand_throw): Only decay the throw expression, don't do
4500 any default conversions. This is so that one can throw and catch
4501 characters, and not have them match integers.
4503 Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
4505 * error.c (dump_aggr_type): Deal with anonymous unions that don't
4508 Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4510 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
4512 Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
4514 * except.c (expand_end_eh_spec): Handle empty EH specifications.
4516 Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
4518 * cp-tree.h (expand_start_eh_spec): Declare new routine.
4519 (expand_end_eh_spec): Likewise.
4520 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
4521 exception specifications.
4522 * except.c (expand_leftover_cleanups): Remove unused parameter.
4523 (expand_end_catch_block): Likewise.
4524 (expand_exception_blocks): Likewise.
4525 (expand_start_eh_spec): New routine to mark the start of an
4526 exception specification region.
4527 (expand_end_eh_spec): New routine to mark the end of an exception
4528 specification region.
4529 (expand_exception_blocks): Call expand_end_eh_spec to process
4530 exception specifications.
4532 Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
4534 * lex.c (do_identifier): Use global binding in preference of
4535 dead for local variable.
4537 Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
4539 * cp-tree.h (build_exception_variant): Remove used first argument.
4540 * decl.c (duplicate_decls): Likewise.
4541 (grokfndecl): Likewise.
4542 (revert_static_member_fn): Likewise.
4543 * decl2.c (grok_method_quals): Likewise.
4544 * tree.c (build_exception_variant): Likewise.
4545 * typeck.c (common_type): Likewise.
4546 * decl2.c (grokclassfn): After changing the type, call
4547 build_exception_variant, if necessary.
4549 Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
4551 * except.c (expand_throw): Run cleanups for the throw expression.
4553 Wed Aug 30 15:24:38 1995 Stephen L. Favor <sfavor@tigger.intecom.com>
4555 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
4556 the store_parm_decls call which does initialization in the emit_*
4557 code concerning label numbering.
4559 Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
4561 * except.c (expand_internal_throw): Let the frontend be responsible
4562 for managing all frontend EH parameters, the backend routine only
4563 needs to deal with backend values. type and value are no longer
4565 (init_exception_processing): Likewise.
4566 (expand_start_all_catch): Likewise.
4567 (expand_end_all_catch): Likewise.
4568 (expand_leftover_cleanups): Likewise.
4569 (expand_end_catch_block): Likewise.
4570 (expand_builtin_throw): Likewise.
4571 (expand_throw): Likewise.
4573 Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4575 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
4577 * decl.c (cp_finish_decl): Use it.
4579 Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
4581 * except.c (expand_internal_throw): Oops, almost forgot type and
4582 value are now trees.
4584 Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4586 Fix the attribute handling to make sure they get noted before we
4587 create the function's RTL, in case they can affect that.
4588 * decl.c (grokfndecl): New arg ATTRLIST. Run
4589 cplus_decl_attributes before creating the decl's rtl.
4590 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
4591 (shadow_tag, groktypename, start_decl, start_method): Pass a
4592 NULL_TREE to grokdeclarator's new last arg.
4593 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
4594 (grokbitfield, grokoptypename): Pass a NULL_TREE to
4595 grokdeclarator's new last arg.
4596 * except.c (expand_start_catch_block): Likewise.
4597 * pt.c (process_template_parm, end_template_decl,
4598 do_function_instantiation): Likewise.
4599 * cp-tree.h (grokfield): Add arg.
4600 (grokdeclarator): Move the prototype from here...
4601 * decl.h: ...to here.
4602 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
4604 * parse.y: Create a list for the grokfield arg where appropriate,
4605 and pass it down instead of calling cplus_decl_attributes.
4607 Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
4609 * except.c: Always allow turning on exception handling. Allow cross
4610 compilations to use EH.
4612 Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
4614 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
4615 trees, instead of rtxs, and don't depend on using special machine
4616 dependent registers.
4617 (expand_internal_throw): Likewise.
4618 (init_exception_processing): Likewise.
4619 (expand_start_all_catch): Likewise.
4620 (expand_end_all_catch): Likewise.
4621 (expand_start_catch_block): Likewise.
4622 (expand_leftover_cleanups): Likewise.
4623 (expand_end_catch_block): Likewise.
4624 (expand_builtin_throw): Likewise.
4625 (expand_throw): Likewise.
4627 Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4629 * cvt.c (build_expr_type_conversion): Handle conversions to
4632 Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
4634 * except.c (do_unwind): Work around backend bug with -fpic.
4636 Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
4638 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
4639 for-scoping, but supports (and warns about) old programs.
4640 Make the new mode (with value 1) the default.
4641 (lang_f_options): The on-value for flag_new_for_scope is now 2.
4642 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
4643 (DECL_SHADOWED_FOR_VAR): Likewise.
4644 * decl.c (struct binding_level): New fields dead_vars_from_for
4646 (note_level_for_for): New function.
4647 (poplevel): Special processing if is_for_scope.
4648 (pushdecl): Warn if for-scope variable shadows local.
4649 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
4650 and warn if conflicts.
4651 * parse.y (FOR): Call note_level_for_for.
4653 Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
4655 * decl2.c (import_export_inline): Class interface hackery does not
4656 apply to synthesized methods.
4658 Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
4660 * search.c (virtual_context): Find the right context more often.
4661 Solves a `recoverable compiler error, fixups for virtual function'
4664 Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
4666 * except.c (expand_start_all_catch): Ensure that we always transfer
4667 control to the right EH handler, by rethrowing the end label on the
4668 region, instead of hoping we are nested and falling through.
4669 (expand_leftover_cleanups): Likewise.
4670 (end_protect): Since we now rethrow the end label, put a
4671 nop after it, so that outer regions are recognized.
4672 * init.c (build_vec_delete_1): New routine to handle most of vector
4673 deleting, all code moved here from build_vec_delete.
4674 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
4676 (expand_vec_init): If the array needs partial destructing, setup an
4677 EH region to handle it.
4678 (build_vec_delete): Move lots of code to build_vec_delete_1, use
4679 build_vec_delete_1 to do the grunt work.
4681 Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4683 Handle decl attributes properly for function definitions without
4684 previous attribute-loaded declarations.
4685 * decl.c (start_function): New arg ATTRS. Add a call to
4686 cplus_decl_attributes with it before we create the RTL.
4687 * cp-tree.h (start_function): Update prototype.
4688 * parse.y (fn.def1): Pass ATTRS into start_function instead of
4689 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
4691 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
4693 * method.c (synthesize_method): Likewise.
4694 * except.c (expand_builtin_throw): Likewise for start on __throw.
4696 Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
4698 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
4699 This changes -fvtable-thunks vtable layout, so a recompile will be
4700 necessary, if you use -fvtable-thunks.
4701 (get_vtable_entry): Use n, instead of i to be consistent with the
4702 rest of the compiler.
4703 (get_vtable_entry_n): Likewise.
4704 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
4706 (finish_struct_1): Likewise.
4707 (skip_rtti_stuff): New routine to collapse similar code from many
4708 different parts of the compiler. I think I got them all.
4709 (modify_one_vtable): Use it.
4710 (fixup_vtable_deltas1): Likewise.
4711 (override_one_vtable): Likewise.
4712 * decl2.c (mark_vtable_entries): Likewise.
4713 * tree.c (debug_binfo): Likewise.
4714 * search.c (expand_upcast_fixups): Likewise.
4715 (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to
4716 consistent with the rest of the compiler.
4717 (get_abstract_virtuals): Likewise.
4718 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
4719 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
4720 (build_typeid): Likewise.
4721 (build_classof): Remove old style way of doing rtti. Remove support
4722 for `classof' and `headof'.
4723 * gxx.gperf: Likewise.
4725 * parse.y: Likewise.
4727 Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
4729 * decl.c (start_function): Clear ctor_label and dtor_label.
4731 * class.c (finish_struct_1): Fix handling of access decls.
4733 Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4735 * class.c (finish_struct): Only do minimal processing here, so it
4736 can be used for class template definitions, as well.
4737 (finish_struct_1): New function with the rest of the code.
4739 Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
4741 * class.c (prepare_fresh_vtable): On second though, always build the
4742 offset (see Aug 10 change), unless -fvtable-thunks is given. It
4743 does this by calling the new routine set_rtti_entry.
4744 (finish_struct): Likewise.
4745 (set_rtti_entry): New routine to update the rtti information at the
4746 start of the vtable.
4748 Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4750 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
4751 if it's declared in the C++ language spec.
4752 (dump_function_decl): Likewise.
4753 (dump_function_name): Likewise.
4754 (ident_fndecl): Make sure we got something back from lookup_name.
4755 * decl.c (start_function): Likewise.
4757 Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4759 * call.c (build_method_call): Don't call build_new when calling a
4760 constructor without an instance.
4762 Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
4764 * class.c (prepare_fresh_vtable): Always build the offset to the
4765 complete object, as it doesn't cost much. This allows dynamic_cast
4766 to void * to work when -frtti isn't given.
4767 (finish_struct): Likewise.
4769 Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
4771 * except.c (build_eh_type): Split out some functionality to new
4772 routine named build_eh_type_type.
4773 (build_eh_type_type): New routine.
4774 (expand_start_catch_block): Use build_eh_type_type, as we never want
4775 the dynamic type of the catch parameter, just the static type.
4776 Fixes core dumps when -frtti is used and one catchs pointers to
4779 Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
4781 * except.c (expand_builtin_throw): Since we now use normal calling
4782 conventions for __throw, we have to remove the first layer off the
4783 stack, so that the next context we search for handlers is the outer
4784 context instead of the context that had the call to __throw, if we
4785 don't immediately find the desired context.
4787 Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4789 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
4790 * cp-tree.h: Update.
4792 * parse.y (template_type_parm): Add support for `typename'.
4794 Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
4796 * except.c (expand_internal_throw): New internal routine to throw a
4798 (expand_end_all_catch, expand_leftover_cleanups): All throwers
4799 changed to use `expand_internal_throw' instead of jumping to throw
4801 (expand_end_catch_block, expand_throw): Likewise.
4802 (throw_label): Removed.
4803 (expand_builtin_throw): Changed so that EH parameters are passed by
4804 normal function call conventions. Completes Aug 4th work.
4806 Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
4808 * cp-tree.h (expand_builtin_throw): Declare it.
4809 * decl2.c (finish_file): Call expand_builtin_throw.
4810 * except.c (make_first_label): Remove.
4811 (init_exception_processing): Don't use a LABEL_REF for throw_label,
4812 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
4813 other functions that don't really appear in those functions. This
4814 solves a problem where cc1plus consumed exponential amounts of
4815 memory when -Wall was used.
4816 (expand_end_all_catch, expand_leftover_cleanups,
4817 expand_end_catch_block, expand_throw): Change all uses of
4818 throw_label to match new style.
4819 (do_unwind): Rename parameter to inner_throw_label, as it is now
4820 different from throw_label. Also, assume that our caller will wrap
4821 the passed label with a LABEL_REF, if needed.
4822 (expand_builtin_throw): Make external, change so that the generated
4823 throw is now a real function.
4824 (expand_exception_blocks): Never generate throw code inside another
4827 Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
4829 * decl.c (grokdeclarator): Move checking of mutable const objects
4830 and mutable static objects down, as we might decide during parsing
4831 to unset staticp or constp (for example, when const is part of the
4832 object being pointed to).
4834 Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
4836 * except.c (output_exception_table_entry): Enhance portability to
4838 (emit_exception_table): Likewise.
4840 Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
4842 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
4843 non-virtual member functions.
4845 Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
4847 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
4848 and const T all match.
4850 Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
4852 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
4853 T&, T and const T all match.
4855 Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
4857 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
4858 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
4859 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
4860 InsnSave. Also, numerous speed improvements, and correctness
4861 improvements. Double faulting in all situations should now be
4863 (expand_start_all_catch): Instead of having many terminate protected
4864 regions, just have one.
4865 (expand_start_catch_block): No longer have to protect
4866 false_label_rtx, as it isn't used for EH region marking.
4867 (expand_end_catch_block): Expand out EH cleanups here by using
4868 expand_leftover_cleanups.
4869 (expand_end_all_catch): Use sequences instead of playing with insn
4871 (expand_exception_blocks): Likewise. Also protect all catch clauses
4872 with one terminate region.
4874 Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4876 * method.c (report_type_mismatch): Don't talk about an object
4877 parameter for non-methods.
4879 Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4881 * class.c (finish_struct): Catch private and protected members of
4882 anonymous unions here.
4883 * decl2.c (finish_anon_union): And here.
4884 * parse.y: Instead of here.
4886 * errfn.c (ARGSLIST): Support passing four args.
4887 * error.c (cv_as_string): New function.
4888 (cp_printers): Add it.
4889 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
4891 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
4893 * init.c (expand_aggr_init): Handle volatile objects, too.
4895 Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4897 * decl.c (struct binding_level): Keep list of incomplete decls.
4898 (print_binding_level): Use list_length to count them.
4899 (pushdecl): Build up the list.
4900 (hack_incomplete_structures): Walk it and prune completed decls.
4902 Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4904 * typeck.c (comp_target_types): Don't check const and volatile for
4906 (comp_ptr_ttypes_real): Likewise.
4908 Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4910 * typeck.c (comp_target_types): Fix.
4912 Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
4914 * cp-tree.h (unsave_expr_now, build_unsave_expr,
4915 cp_expand_decl_cleanup): Declare new routines.
4916 * decl.c (cp_finish_decl, store_parm_decls,
4917 hack_incomplete_structures): Change all cals from
4918 expand_decl_cleanup to cp_expand_decl_cleanup.
4919 * gc.c (protect_value_from_gc): Likewise.
4920 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
4921 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
4922 (unsave_expr_now): Backend routine used by tree expander.
4923 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
4924 work around a limitation in the backend. The backend uses the
4925 cleanups multiple times, on disjoint control flows, so we cannot
4926 pass unsaved SAVE_EXPRs to the backend.
4927 * tree.def (UNSAVE_EXPR): New tree code.
4928 * typeck.c (c_expand_return): Move goto/return code up inside
4929 conditional, as we don't always want to do this, we only want to do
4930 this when we don't otherwise finish with this control flow.
4932 Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4934 * parse.y (typespec): Only complain about typeof if we're not
4935 getting it from a system header.
4937 Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
4939 Clean up prefix attribute handling.
4940 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
4941 (declmods): Likewise.
4942 (all rules that reference typed_declspecs and declmods): Call
4943 split_specs_attrs or strip_attrs to separate declspecs and attrs.
4944 (lang_extdef): Delete resetting of prefix_attributes.
4945 (template_def, notype_declarator rule): Use NULL_TREE for
4947 (condition): Use NULL_TREE for prefix_attributes.
4948 (setattrs): Deleted.
4949 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
4950 (component_decl): Delete resetting of prefix_attributes.
4951 (component_decl_1, notype_components rule): Use NULL_TREE for
4953 (simple_stmt): Delete resetting of prefix_attributes.
4955 Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4957 * call.c (convert_harshness): Deal with reference conversions before
4958 others. Actually do array->pointer decay. Call comp_target_types
4959 with pointer types rather than their targets.
4961 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
4963 Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4965 * pt.c (to_be_restored): Move decl to global scope.
4967 Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4969 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
4971 Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4973 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
4976 * pt.c (instantiate_template): Also avoid instantiation if the
4977 function has already been declared to be a specialization.
4979 * decl2.c (check_classfn): Ignore cname argument, and return the
4982 * decl.c (start_decl): Handle declarations of member functions
4983 outside of the class (i.e. specialization declarations).
4985 Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4987 * class.c (finish_struct): Don't mess with the type of bitfields.
4989 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
4991 Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
4993 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
4994 is not a parameter list (TREE_LIST).
4995 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
4996 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
4997 but don't set it otherwise.
4999 Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
5001 * init.c (expand_default_init): Don't allow two-level conversions
5002 during construction.
5004 Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
5006 * gc.c (build_headof): The type of dyncasting to a pointer to cv
5007 void, should be pointer to cv void.
5009 Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
5011 * gc.c (build_dynamic_cast): Allow casting in const.
5013 Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
5015 * typeck.c (build_const_cast): If we are passed error_mark_node,
5018 Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5020 * class.c (push_nested_class): Make sure TYPE is non-nil.
5022 * cvt.c (type_promotes_to): Watch for error_mark_node on the
5025 Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
5027 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
5028 (SIGTABLE_VB_OFF_NAME): New macro.
5029 (vt_off_identifier): Renamed from offset_identifier.
5030 (vb_off_identifier): Added extern declaration.
5032 * decl.c (vt_off_identifier): Renamed from offset identifier.
5033 (vb_off_identifier): New variable to hold the identifier for the
5034 sigtable field vb_off.
5035 (init_decl_processing): Initialize vb_off_identifier.
5036 Renamed vt_off_identifier from offset_identifier.
5037 * sig.c (build_signature_method_call): Renamed offset_identifier and
5038 local variable offset to vt_off_identifer and vt_off, respecitively.
5039 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
5041 * decl.c (init_decl_processing): Add vb_off field to
5042 sigtable_entry_type. Reorder fields so that pfn gets properly
5043 aligned at a 64 bit boundary on the Alpha.
5044 * sig.c (build_signature_table_constructor): Build the constructor
5045 according to the new layout. Set the vb_off field to -1 for now.
5047 * decl.c (init_decl_processing): Align sigtable_entry_type on word
5048 boundaries instead of double word boundaries to save space.
5050 Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
5052 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
5054 Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5056 * parse.y (opt.component_decl_list): Only forbid private/protected
5057 in anonymous unions. We need to make this know when the type is
5058 defined for an object, to not give the error.
5060 Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5062 * parse.y (opt.component_decl_list): Don't allow access control
5063 as private or protected for union members.
5065 Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
5067 * lex.c (check_newline): For 'p' case, move goto skipline line to
5068 before end brace for 'pragma'.
5070 Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
5072 * g++.1: Tiny updates.
5074 Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
5076 * decl.c (cp_finish_decl): Only destruct local static variables if
5077 they are constructed, and only construct the first time control
5078 passes completely through its declaration (if not initialized with a
5079 constant-expression).
5080 (expand_static_init): Likewise.
5082 Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5084 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
5085 is a TEMPLATE_TYPE_PARM, give a match.
5087 Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
5089 * method.c (build_overload_value): Handle encoding of null pointer
5090 constants (or any pointer with a constant numeric value) for
5093 Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5095 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
5096 const vs non-const for void conversions.
5098 Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
5100 * except.c (expand_start_all_catch): Fix problem with finding an
5101 outer nested try block when there is no code to separate it from an
5104 Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
5106 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
5107 memory please when virtual bases are used.
5109 Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
5111 * class.c (build_vbase_path): Avoid testing things that cannot be
5112 null to see if they are null.
5113 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
5114 * decl.c (finish_function): Pass a type into the new
5115 convert_pointer_to_vbase instead of a binfo.
5116 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
5117 and convert_pointer_to_real.
5118 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
5119 of the more cryptic call to get_vbase.
5121 Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
5123 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
5125 Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5127 * pt.c (instantiate_template): Don't strip 'this' twice.
5129 * pt.c (coerce_template_parms): Allow null pointer constants.
5131 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
5134 Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5136 * decl.c (revert_static_member_fn): Also remove 'this' from
5138 * decl2.c (check_classfn): Don't revert this function until we get a
5141 Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5143 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
5145 Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
5147 * decl2.c (finish_file): Handle global vector news.
5148 * init.c (build_new): Encode vector news so that later we will know
5149 how many elements there are.
5151 Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5153 * expr.c (cplus_expand_expr): Don't mess with temp slots.
5155 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
5158 * decl2.c (check_classfn): Use revert_static_member_fn.
5159 * decl.c (revert_static_member_fn): Diagnose static member functions
5160 declared const or volatile.
5162 * decl2.c (grokfield): Check for missing default args here, too.
5163 (check_default_args): Function to do the checking.
5164 * decl.c (pushdecl): Use it.
5166 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
5167 if there is no `this'.
5169 Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5171 * call.c (build_method_call): Downgrade 'called before definition'
5172 to a warning, as it ought to go away after Monterey.
5174 Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5176 * pt.c (coerce_template_parms): Don't do extra checking on pointer
5177 to member arguments.
5179 * class.c (finish_struct): const and reference members don't prevent
5180 a class from being an aggregate.
5182 * class.c (finish_struct): Signatures are always aggregates.
5184 Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5186 * decl2.c (check_classfn): Improve error message.
5188 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
5190 Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5192 * typeck.c (comptypes): Don't ignore method quals.
5194 * class.c (finish_struct): Non-abstract virtuals are always USED.
5196 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
5197 IS_AGGR_TYPE, either.
5198 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
5199 * cp-tree.h: Likewise.
5201 * cp-tree.h (lang_type): Add aggregate.
5202 (CLASSTYPE_AGGREGATE): New macro.
5203 (TYPE_NON_AGGREGATE_CLASS): Likewise.
5204 * class.c (finish_struct): Determine whether a class is an
5206 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
5207 TYPE_NEEDS_CONSTRUCTING.
5208 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
5211 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
5213 * decl.c (start_function): For pre-parsed functions, layout all of
5214 the parm decls again.
5215 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
5218 * pt.c (coerce_template_parms): Improve checking for invalid
5221 Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5223 * decl.c (grokdeclarator): Forbid declaration of a static member
5224 with the same name as its enclosing class.
5226 Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5228 * decl.c (finish_function): Clear current_class_decl.
5230 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
5231 instead of truthvalue_conversion.
5233 * class.c (finish_struct): A data member with the same name as the
5234 class doesn't suppress constructors.
5236 Fri Jun 16 18:11:39 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
5238 * decl.c (start_function): If current_class_decl is a signature
5239 pointer, don't dereference it but set C_C_D to current_class_decl.
5241 Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5243 * decl.c (duplicate_decls): Complain about virtual functions
5244 redeclared to be inline.
5246 Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
5248 * decl.c (get_unique_name): New routine to name unnamed namespaces.
5249 (push_namespace): Use get_unique_name for naming unnamed namespaces.
5251 Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5253 * parse.y: Call cplus_decl_attributes with prefix_attributes where
5256 Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
5258 * search.c (get_vbase): New routine to switch hierarchies from the
5259 CLASSTYPE_VBASECLASSES to the normal one.
5260 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
5261 want to convert to a vbase pointer.
5263 Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5265 * pt.c (instantiate_class_template): Add the new instantiation to
5267 (do_pending_expansions): Call instantiate_member_templates on all of
5268 the classes in template_classes.
5270 Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
5272 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
5273 TYPE_MAIN_VARIANT if it is not filled in.
5274 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
5275 error instead of core dumping.
5277 Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5279 * call.c (can_convert): Also check for distance > 0.
5280 (can_convert_arg): Likewise.
5281 (user_harshness): Likewise.
5283 Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5285 * g++.c (MATH_LIBRARY): Provide default.
5286 (main): Always link with the math library if we link with libstdc++.
5288 * decl.c (start_function): Complain about redefinition of a function
5289 even when the pending_inline version is compiled after the other
5292 Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5294 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
5297 Wed Jun 7 15:31:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5299 * init.c (build_vec_delete): Resolve an offset ref before we try to
5302 Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5304 * typeck.c (build_modify_expr): If the class lacks a constructor or
5305 assignment operator, return error_mark_node.
5306 (common_type): Use build_cplus_array_type.
5308 Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
5310 * class.c (dont_allow_type_definitions): New variable set when types
5312 (finish_struct): Use it.
5313 * cp-tree.h (dont_allow_type_definitions): Define it.
5314 * parse.y (primary, handler_seq): Set it.
5316 Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
5318 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
5319 results from lookup_fnfields. Always give warning/error on bad
5322 Mon Jun 5 11:39:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5324 * init.c (member_init_ok_or_else): Don't allow initialization of
5325 an ancestor's member from within a constructor.
5327 Mon Jun 5 11:20:34 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
5329 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
5330 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
5331 abstract virtual functions are handled correctly.
5333 * sig.c (build_signature_table_constructor): Store the correct
5334 delta in signature table entries. It does not yet work for
5335 classes with virtual base classes as implementations of signatures.
5336 (build_signature_method_call): Add the delta to the object_ptr
5337 before generating the function call.
5339 * call.c (build_method_call): Make instance_ptr the signature
5340 pointer itself instead of dereferencing the optr.
5341 * sig.c (build_signature_method_call): Dereference the optr for the
5342 direct and virtual calls.
5344 * sig.c (build_signature_table_constructor): Make the tag for
5345 default implementations -1 instead of 2.
5346 (build_signature_method_call): Change the generated conditional
5347 expression correspondingly.
5349 * sig.c (build_signature_pointer_constructor): Deleted the sorry
5350 message that said we can't handle multiple inheritance for
5351 implementations of signatures
5352 (build_signature_method_call): Use the offset from the sigtable
5353 entry instead of the vptr field from the signature pointer for
5354 building a virtual function call.
5356 * class.c (build_vfn_ref): Deleted signature specific code, we don't
5357 call this function anymore from build_signature_method_call.
5359 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
5360 field in the object now instead of in the signature pointer/ref.
5361 (build_vptr_ref): Deleted extern declaration.
5362 * sig.c (build_vptr_ref): Deleted.
5363 (build_signature_pointer_or_reference_type): Deleted construction of
5365 (build_signature_pointer_constructor): Deleted initialization of/
5366 assignment to the vptr field.
5368 * sig.c (build_signature_table_constructor): Convert the signature
5369 table entry fields to their correct types.
5371 * sig.c (build_signature_table_constructor): Don't call digest_init
5372 for the fields of a sigtable entry, it's wasted time.
5374 * sig.c (build_signature_table_constructor): Correctly set the
5375 offset and index fields of a sigtable entry. Build the constructor
5376 the way digest_init does, digest_init can't handle initializing an
5377 anonymous union inside a struct.
5378 (build_signature_method_call): Use the index field instead of the
5379 delta field to get the vtable index.
5381 * decl.c (init_decl_processing): Fix number of fields for building
5382 sigtable_entry_type.
5384 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
5385 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
5386 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
5387 * decl.c (tag_identifier, offset_identifier): New variables to
5388 hold the identifiers for the sigtable fields tag and offset.
5389 (init_decl_processing): Initialize these variables.
5390 (init_decl_processing): Use these variables to build the
5391 sigtable_entry_type structure. Rename the code and offset fields
5392 to tag and delta, respectively; add offset and index fields. Changed
5393 types of fields from short_integer_type_node to delta_type_node.
5394 * sig.c (build_signature_table_constructor): Rename code and offset
5395 to tag and delta, respectively.
5396 (build_signature_method_call): Likewise. Use above variables.
5398 Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5400 * decl.c (lookup_name_real): Don't try to look anything up in an
5403 Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
5405 * method.c (build_overload_int): New routine. Break out
5406 functionality from build_overload_value so we can reuse it.
5407 (build_overload_value): Handle pointer to member functions as value
5408 parameters for templates.
5409 (build_overload_identifier): Since template parameters are shared
5410 among all instantiations, we have to substitute in the real types
5411 in TREE_TYPE (parm).
5412 pt.c (coerce_template_parms): Likewise.
5413 (push_template_decls): Likewise.
5414 (grok_template_type): Deleted as template parameters are shared
5415 among all instantiations.
5417 Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
5419 * decl.c (grokdeclarator): Always give errors on constant overflow
5422 Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5424 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
5425 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
5427 (build_indirect_ref): Fix check for *&.
5429 Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
5431 * Version 2.7.0 released.
5433 Fri Jun 16 15:07:29 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5435 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
5437 Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5439 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
5441 Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
5443 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
5444 * decl.c (finish_decl): New routine to handle call backs from the
5445 mid end (declare_hidden_char_array).
5447 Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5449 * decl.c (start_function): Handle setting C_C_D here.
5450 (set_C_C_D): Removed.
5451 (struct saved_scope): Remove class_decl.
5452 (push_to_top_level): Don't save current_class_decl.
5453 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
5454 (struct cp_function): Add C_C_D.
5455 (push_cp_function_context): Save C_C_D.
5456 (pop_cp_function_context): Restore C_C_D.
5458 Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5460 * decl.c (set_C_C_D): New function. suspend_momentary before
5462 (pop_from_top_level): Call it.
5463 (start_function): Likewise.
5464 (pop_cp_function_context): Likewise.
5466 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
5467 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
5469 * decl.c (push_cp_function_context): Save current_class_decl.
5470 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
5471 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
5472 (start_function): Likewise.
5474 * class.c (popclass): Don't mess with current_class_decl,
5475 current_vtable_decl, or C_C_D.
5477 Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
5479 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
5481 Wed May 24 15:55:18 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5483 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
5484 * decl2.c (finish_anon_union): Likewise.
5485 * method.c (largest_union_member): Likewise.
5487 Wed May 24 14:41:11 1995 H.J. Lu <hjl@nynexst.com>
5489 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
5491 Mon May 22 17:38:48 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5493 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
5494 Use $@ instead of output name so works even if have .exe.
5495 (cxxmain.o): Use cp if ln -s fails.
5496 (c++.install-man): Use $(exeext) in executable names.
5497 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
5498 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
5500 Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
5502 * call.c (build_method_call): parms can be null, duh.
5504 Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
5506 * call.c (build_method_call): If convert_arguments failed, just bail.
5508 Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5510 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
5512 * tree.c (copy_to_permanent): Oops.
5514 Fri May 19 10:01:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5516 * cp-tree.h (break_out_target_exprs): Add decl.
5518 Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5520 * decl.c (start_function): Move *all* interface handling stuff after
5523 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
5524 (perm_manip): Return t if permanent, otherwise 0.
5525 (copy_to_permanent): Use them.
5526 (bot_manip): Helper for break_out_target_exprs.
5527 (break_out_target_exprs): New function. Uses mapcar.
5529 * typeck.c (convert_arguments): Use it.
5531 * method.c (hack_identifier): Use convert_from_reference to
5532 dereference a reference.
5534 Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
5536 * call.c (convert_harshness): Move reference bashing before pointer
5539 Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
5541 * cvt.c (convert_to_reference): Only complain, if complaints are
5543 * typeck.c (build_function_call_real): Likewise. If
5544 LOOKUP_SPECULATIVELY is set and something won't work, return
5546 * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call.
5547 (convert): Pass LOOKUP_NORMAL to cp_convert.
5548 * typeck.c (convert_for_assignment): Likewise.
5549 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
5550 (convert_arguments): Get out early if we get an error_mark_node.
5551 (convert_for_initialization): Use cp_convert instead of convert so
5552 that we can pass flags down.
5553 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
5555 Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5557 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
5560 * class.c (finish_struct): Don't complain about a class with no
5561 user-defined constructors but with a member that has no default
5562 constructor, as this is OK for aggregates.
5564 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
5565 constructor call, mark slot addressable.
5567 Tue May 16 18:37:51 1995 Douglas Rupp <drupp@cs.washington.edu>
5569 * g++.c: Changed WINNT to _WIN32.
5571 Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
5573 * lex.c (handle_sysv_pragma): Don't use token_buffer.
5575 Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
5577 * call.c (resolve_scope_to_name): Add initial semantic support for
5579 * class.c (finish_struct): Likewise.
5580 * cp-tree.h (NAMESPACE_LEVEL): Likewise.
5581 * cvt.c (build_up_reference, convert_to_reference): Likewise.
5582 * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise.
5583 (resume_binding_level, toplevel_bindings_p): Likewise
5584 (namespace_bindings_p, declare_namespace_level): Likewise.
5585 (resume_level, push_namespace, pop_namespace): Likewise.
5586 (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise.
5587 (implicitly_declare, lookup_namespace_name): Likewise.
5588 (lookup_name_real, start_decl, make_temporary_for_reference): Likewise.
5589 (obscure_complex_init, finish_decl, expand_static_init): Likewise.
5590 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise.
5591 (store_parm_decls, hack_incomplete_structures): Likewise.
5592 * decl2.c (get_temp_name, finish_anon_union): Likewise.
5593 (current_namespace, push_namespace, pop_namespace): Likewise.
5594 (do_namespace_alias, do_toplevel_using_decl): Likewise.
5595 (do_class_using_decl): Likewise.
5596 * error.c (dump_decl): Likewise.
5597 * init.c (build_member_call, build_offset_ref): Likewise.
5598 * lex.c (identifier_type): Likewise.
5599 * parse.y (lang_extdef, using_decl, extdef): Likewise.
5600 (component_decl_1, nested_name_specifier_1): Likewise.
5601 * spew.c (yylex): Likewise.
5602 * tree.def (NAMESPACE_DECL): Likewise.
5604 Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5606 * decl.c (push_overloaded_decl): Return the new decl even if it
5609 Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
5611 * typeck.c (decay_conversion): Split out from default_conversion.
5612 (default_conversion): Call it.
5613 (build_binary_op): Likewise.
5614 (build_binary_op_nodefault): Use decay_conversion for truth ops.
5616 Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5618 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
5619 (duplicate_decls): Always use the old decl's linkage info. Don't
5620 play with linkage of consts.
5621 (pushdecl): Don't play with linkage of consts.
5622 (redeclaration_error_message): Don't complain about an old public
5623 decl and a new non-public decl here.
5624 (grokvardecl): Handle linkage of consts here.
5625 (grokdeclarator): An 'extern inline' is public. Pass constp to
5627 (start_function): Wait until after the pushdecl to do some linkage
5630 * decl2.c (import_export_vtable): Make duplicates weak rather than
5631 static if supported.
5632 (import_export_inline): Likewise.
5633 * pt.c (do_pending_expansions): Likewise.
5635 * class.c (build_vbase_path): flag_assume_nonnull_objects only
5636 affects reference conversion.
5638 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
5640 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
5642 Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
5644 * method.c (numeric_output_need_bar): Renamed from misspelling.
5646 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
5648 Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5650 * lang-options.h, lang-specs.h: New files.
5652 Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5654 * typeck.c (default_conversion): Don't check for BLKmode before
5655 pulling out the decl_constant_value.
5657 * decl.c (start_function): Clear named_labels and shadowed_labels.
5659 * typeck.c (build_function_call_real): Also synthesize methods here.
5661 Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5663 * decl2.c (finish_file): Synthesize exported methods before the
5666 * parse.y: Move declaration of flag_new_for_scope to file scope.
5668 Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
5670 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
5671 * parse.y (FOR): Conditionalize the pushing and poping of scope for
5672 the for-init-statement upon the new flag_new_for_scope.
5673 * parse.y (try_block): Simplify and use compstmt.
5675 Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5677 * decl.c (define_function): Mark function decl artificial.
5679 Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5681 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
5683 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
5684 * tree.c (build_cplus_method_type): Likewise.
5686 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
5688 * typeck.c (build_function_call_real): If convert_arguments failed,
5690 (convert_arguments): If one of the arguments is error_mark_node,
5693 Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5695 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
5696 decls that don't include it.
5698 Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5700 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
5701 DECL_NOT_REALLY_EXTERN set aren't extern decls.
5703 * typeck.c (build_indirect_ref): Don't call default_conversion for a
5704 parameter of reference_type.
5705 * cvt.c (convert_from_reference): Just use build_indirect_ref.
5707 * pt.c (do_type_instantiation): Only instantiate member functions
5708 that actually come from templates.
5710 Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
5712 * parse.y: Generalized cleanup of poplevels, and compound statements
5713 and compound statements in try blocks. Rewritten `for' rule so that
5714 the scope of variables declared in the for clause is shortened to
5715 span just to the end of the statement, instead of the whole
5718 Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5720 * call.c (convert_harshness): Handle pointers to members better.
5722 Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5724 * decl2.c (delete_sanity): Do access control here.
5725 * init.c (build_delete): Instead of here.
5727 * Make-lang.in: Build c++filt.
5729 Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5731 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
5732 update our IDENTIFIER_TYPE_VALUE.
5734 Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5736 * lex.c (cons_up_default_function): Fix linkage of #pragma
5737 implemented functions.
5739 Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5741 * method.c (build_overload_name): Simplify and fix repeated type
5744 * decl.c (grokdeclarator): Prohibit pointers to void or reference
5747 Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
5749 * typeck2.c (process_init_constructor): Make sure initializers are
5752 Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
5754 * lex.c (cons_up_default_function): Always defer synthesis.
5756 Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5758 * decl2.c (mark_inline_for_output): Don't play with pending_inline
5761 Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5763 * call.c (user_harshness): New function; like build_type_conversion,
5764 but doesn't actually build anything.
5765 (compute_conversion_costs): Use it instead of build_type_conversion.
5767 Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
5769 * typeck.c (build_function_call_real): Improve error message for
5770 calling a non-function.
5772 * method.c (hack_identifier): Lose check for calling a data member.
5774 Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
5776 * typeck2.c (build_functional_cast): Remove very old cruft.
5777 Seems like good code is generated without it.
5779 Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5781 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
5782 (do_build_copy_constructor): Likewise.
5784 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
5786 * decl.c (push_switch): New function.
5787 (pop_switch): Likewise.
5788 (define_case_label): Check for jumping over initialization.
5790 * call.c (build_method_call): Check for an inline function being
5791 called before its definition has been seen.
5792 * typeck.c (build_function_call_real): Likewise.
5794 * decl.c (duplicate_decls): Check for a function being redeclared
5795 inline after its address has been taken.
5797 * typeck.c (build_conditional_expr): Handle related class lvalues.
5799 Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5801 * pt.c (do_pending_expansions): Don't expand unused templates.
5803 * parse.y (component_decl): Accept a lone semicolon.
5805 Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
5807 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
5808 object parameter anymore.
5810 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
5812 Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5814 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
5815 (lang_extdef): Likewise.
5817 * parse.y (maybe_parmlist): New rule for use in declarators where
5818 this could either be a list of expressions or parameters. Calls
5819 suspend_momentary before deciding which.
5820 (direct_after_type_declarator): Use it.
5821 (complex_direct_notype_declarator): Use it.
5823 * pt.c (tsubst): Propagate attributes const and noreturn.
5825 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
5826 before doing the default thing.
5828 Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
5830 * typeck.c (common_type): Call lookup_attribute instead of
5833 Tue Apr 25 18:07:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5835 * Make-lang.in: Change "realclean" to "maintainer-clean".
5837 Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
5839 * decl2.c (finish_file): Fix broken linked list handling.
5841 Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5843 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
5845 (finish_struct): Likewise.
5847 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
5849 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
5850 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
5852 Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
5854 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
5855 it is of the same type as the return value.
5857 Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5859 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
5862 * typeck.c (convert_for_initialization): Don't call a trivial copy
5865 * typeck2.c (store_init_value): Only abort if the type has a
5866 non-trivial copy constructor.
5868 * typeck.c (c_expand_return): If we're returning in a register and
5869 the return value is a TARGET_EXPR, expand it. Only do
5870 expand_aggr_init if we're returning in memory.
5871 (expand_target_expr): Function to expand a TARGET_EXPR.
5872 (build_modify_expr): Use it.
5874 * tree.c (build_cplus_new): Layout the slot.
5876 * expr.c (cplus_expand_expr): Use expand_call to expand the call
5877 under a NEW_EXPR, so the target is not discarded.
5879 Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
5881 * gc.c (build_dynamic_cast): Tighten error checking.
5883 Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5885 * expr.c (cplus_expand_expr): Only abort if the returned target is
5886 different from what we expected if the type has a non-trivial copy
5889 * decl2.c (cplus_decl_attributes): Attributes applied to a template
5890 really apply to the template's result.
5892 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
5893 to decide whether to consider a CALL_EXPR an lvalue.
5895 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
5896 type has a non-trivial copy constructor.
5898 * decl.c (start_function): If interface_known, unset
5899 DECL_NOT_REALLY_EXTERN on the function.
5901 Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5903 * pt.c (do_function_instantiation): Handle explicit instantiation of
5905 (do_type_instantiation): Handle 'inline template class foo<int>',
5906 meaning just spit out the vtable.
5908 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
5909 the consed functions.
5911 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
5913 Wed Apr 19 16:28:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5915 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
5916 typeck.c: Include output.h.
5918 Wed Apr 19 14:57:21 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
5920 * call.c (build_method_call): Allow a signature member functions to
5921 be called from a default implementation.
5923 Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5925 * repo.c (finish_repo): Remember what directory we are in.
5927 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
5929 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
5930 out the second copy of the symbol name. Don't remember COLLECT_GCC.
5932 Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
5934 * search.c (virtual_context): New function to get the virtual
5935 context of a function.
5936 (expand_upcast_fixups): New function to generate runtime vtables.
5937 (fixup_virtual_upcast_offsets): Likewise.
5938 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
5939 ensure that the this offsets for upcasts from virtual bases into
5940 other virtual bases or non-virtual bases are correct at construction
5941 time and destruction time.
5942 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
5943 vtables in all virtual bases, instead of just one vtable in each
5945 (fixup_vtable_deltas1): Likewise.
5947 Tue Apr 18 03:57:35 1995 Michael Meissner <meissner@cygnus.com>
5949 * Makefile.in (lex.o): Add dependency on c-pragma.h.
5951 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
5952 appropriate, instead of 0.
5954 Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5956 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
5957 comparing local and global decls.
5959 Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5961 * typeck.c (convert_arguments): Only prohibit passing to ... of
5962 types with non-trivial copy constructors.
5964 * repo.c (repo_template_used): Don't try to mess with no id.
5966 Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
5968 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
5970 Thu Apr 13 15:37:42 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5972 * cp-tree.h (current_tinst_level): Delete declaration, since it's
5975 * typeck.c (build_modify_expr): Catch incompatible array assignment.
5977 * parse.y (attribute_list, attrib): Rewrite actions to feed the
5978 right stuff to decl_attributes.
5980 Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5982 * search.c (dfs_debug_mark): Check for magic virtual like
5983 import_export_vtable.
5985 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
5988 Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
5990 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
5993 Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5995 * decl.c (finish_decl): If we're writing out a static data member of
5996 a class, we want the debug info for that class.
5998 * gc.c (build_t_desc): Check linkage of a class properly.
6000 * class.c (finish_struct): Set the 'headof' offset for the main
6002 (prepare_fresh_vtable): Fix typeinfo pointer here.
6003 (modify_one_vtable): Instead of here.
6005 Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6007 * repo.c (repo_get_id): New function to return the interesting
6008 identifier for a repo entity.
6009 (repo_template_used): Use it.
6010 (repo_template_instantiated): Mark the id as chosen.
6011 (init_repo): Record whether or not the id was chosen.
6012 (finish_repo): Note if an id was newly chosen.
6014 * pt.c (do_function_instantiation): Call repo_template_instantiated.
6015 (do_type_instantiation): Likewise. Don't diagnose multiple
6018 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
6019 whether or not to synthesize a method.
6022 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6023 * class.c (modify_all_direct_vtables): ditto.
6024 * init.c (expand_direct_vtbls_init): expand more vtables if
6027 Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
6029 * gc.c (build_headof): Use ptrdiff_type_node instead of
6030 integer_type_node on pointer arithmetic.
6032 Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6034 * typeck.c (build_modify_expr): Undo previous change.
6036 Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6038 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
6040 * repo.c (get_base_filename): Put the .rpo file in the directory
6041 with the object file, not the source.
6043 * typeck.c (build_conditional_expr): Handle pmf's better.
6045 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
6046 the name of the symbol.
6048 Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6050 * repo.c (open_repo_file): Make repo filename DOS-compliant.
6051 (*): Also write a new repo file if some previously-used
6052 templates are no longer used. Only remember the identifier.
6054 * lex.c (cons_up_default_function): If this function belongs to a
6055 template class, call repo_template_used for it.
6057 * repo.c (repo_template_used): Using a class means using its vtable,
6059 (finish_repo): Likewise.
6061 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
6062 if the type has a complex copy constructor.
6064 * decl2.c (lang_decode_option): -frepo implies
6065 -fno-implicit-templates.
6067 * decl.c (start_function): Clear current_{base,member}_init_list.
6069 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
6071 Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6073 * decl.c (struct cp_function): Add {base,member}_init_list.
6074 (push_cp_function_context): Save current_{base,member}_init_list.
6075 (pop_cp_function_context): Restore them.
6077 Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6079 * repo.c (get_base_filename): Take filename parm, fix logic bug.
6081 * typeck.c (build_compound_expr): Do not warn about a compound expr
6082 in which the first expression has no side effects.
6083 (build_x_compound_expr): Warn here instead.
6084 (build_conditional_expr): Don't warn about a conditional expression
6085 between an enum and the type it promotes to.
6087 * init.c (build_new): Handle initialization of arrays of builtins
6090 Mon Apr 3 15:08:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6092 * repo.c: Include config.h to get definitions of bcopy and rindex
6093 on systems that don't have them (e.g., SVR4).
6095 Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
6097 * decl2.c (finish_table): Pass NULL_TREE instead of init to
6098 finish_decl so that it won't try and do error checking on the
6101 Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6103 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
6104 determine whether this compile used -c -o.
6105 (open_repo_file): Use get_base_filename. Remove the extension.
6106 (finish_repo): Spit out the values of main_input_filename,
6107 COLLECT_GCC and COLLECT_GCC_OPTIONS.
6109 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
6111 Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6113 * search.c (compute_access): Don't try to do access control on
6116 Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6118 * repo.c: New file to handle things repo.
6120 * pt.c (instantiate_template): Call repo_template_used if the
6121 definition is accessible.
6122 (mark_function_instantiated): Split out from
6123 do_function_instantiation.
6124 (mark_class_instantiated): Split out from do_type_instantiation.
6126 * parse.y (template_instantiate_once): Call repo_template_used.
6128 * lex.c (lang_init): Call init_repo.
6130 * decl2.c: Handle flag_use_repository.
6131 (finish_file): Call finish_repo.
6133 * decl.c (start_method): Call repo_template_used if this is a
6136 * Makefile.in (CXX_OBJS): Add repo.o.
6137 (repo.o): Add dependencies.
6139 * Make-lang.in (CXX_SRCS): Add repo.c.
6141 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
6142 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
6144 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
6147 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
6149 Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6151 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
6152 and result_type. When checking for comparison between signed
6153 and unsigned, use result_type rather than the (possibly shortened)
6154 type of op0. Also, don't warn about equality comparison of a
6155 signed operand to an unsigned constant that fits in the signed
6158 * method.c (do_build_copy_constructor): Reverse
6159 current_base_init_list after we've built it up.
6161 Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
6163 * except.c (build_throw): Never warn about the value of throw not
6166 Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
6168 * except.c (expand_start_catch_block): Check for bad catch parameter
6171 Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6173 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
6174 DECL_EXTERNAL is not already set.
6176 Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
6178 * method.c (emit_thunk): Let poplevel know that the last level is
6179 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
6181 Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6183 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
6186 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
6188 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
6189 all deferred inlines.
6191 Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6193 * cp-tree.h (DECL_THIS_INLINE): New macro.
6194 (DECL_NOT_REALLY_EXTERN): New macro.
6195 (DECL_THIS_STATIC): New macro.
6197 * decl.c: Lose all references to current_extern_inline. Break
6198 inline semantics into DECL_INLINE for actual inlining and
6199 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
6200 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
6201 emit an inline here. Associated changes.
6204 * typeck.c: Likewise.
6206 * call.c (build_method_call): Don't bother trying to handle inlines
6208 * cvt.c (convert_to_aggr): Likewise.
6210 * pt.c (do_function_instantiation): Handle instantiation of
6211 public inlines, too.
6213 Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
6215 * except.c (init_exception_processing): Change the interface for
6216 __throw_type_match and add decl for new rtti matching routine
6217 __throw_type_match_rtti.
6218 (build_eh_type): New routine to build a run time descriptor for the
6220 (expand_start_catch_block): Update to use new calling convention for
6222 (expand_throw): Update to use build_eh_type.
6224 Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
6226 * g++.c: Removed __NetBSD__ from conditional.
6227 Declare strerror if HAVE_STRERROR is defined; otherwise
6228 declare sys_errlist and sys_nerr.
6229 (my_strerror): New function.
6231 Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6233 * search.c (get_binfo): Don't try to be so clever.
6235 * tree.c (copy_to_permanent): Also suspend_momentary().
6237 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
6238 if the types are the same.
6240 * decl.c (start_function): Handle extern inlines more like C++ says
6243 * init.c (build_member_call): Hand constructor calls off to
6244 build_functional_cast.
6246 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
6247 the name of the type.
6249 Tue Mar 28 13:13:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6251 * decl.c (grokdeclarator): Check for the decl returned by
6252 grokfndecl to be null before using build_decl_attribute_variant.
6254 Mon Mar 27 18:04:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6256 * init.c (build_new): Use build_pointer_type instead of
6259 Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6261 * typeck.c (build_conditional_expr): Handle pmfs.
6262 (convert_for_assignment): Fix pmf support.
6264 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
6265 (cp_convert_to_pointer): Handle pmfs.
6266 (cp_convert): Pass pmfs to cp_convert_to_pointer.
6268 * typeck.c (common_type): Handle inheritance for pmfs.
6270 * typeck2.c (build_m_component_ref): Do access control.
6272 * typeck.c (comp_target_types): Check for conversion to void *
6273 before checking trickier conversions.
6275 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
6277 * pt.c (push_tinst_level): Complain if template instantiation depth
6278 is greater than max_tinst_depth.
6280 * typeck.c (common_type): Assume that we can call common_type to
6281 unify the target type of a pointer.
6283 Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6285 * decl2.c (finish_file): Don't synthesize methods at
6286 finish_vtable_prevardecl time. Do synthesize methods that are not
6287 used, but are public and not external.
6289 * cvt.c (build_type_conversion): Only give an error if for_sure.
6291 * typeck.c (comp_target_types): Only support pointer conversions if
6294 Wed Mar 22 19:30:15 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6296 * init.c (build_new): Catch use of an initializer list where it
6299 Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6301 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
6304 * decl2.c: temp_name_counter is now public.
6306 * decl.c (struct cp_function): Add temp_name_counter field.
6307 (push_cp_function_context): Save it.
6308 (pop_cp_function_context): Restore it.
6310 * typeck.c (common_type): Handle unifying function types, and unify
6311 unmatched things to void* with a compiler_error, rather than
6312 silently like before.
6314 Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
6316 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
6317 Brendan's last change and fix latent problem that causes TD entries
6318 to not come out when the things that need them has yet to be
6321 Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6323 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
6324 and type1, since we might have changed op0 or op1.
6326 Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
6328 * typeck.c (common_type): Don't mess up templates.
6330 Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6332 * typeck.c (common_type): Handle ptms properly. Also handle
6334 (build_binary_op_nodefault): New variable build_type controls what
6335 type is given to the expression when it is created. Set this to
6336 boolean_type_node for comparison ops instead of using result_type.
6337 (comp_target_types): Allow T * -> void *.
6339 * cvt.c (cp_convert_to_pointer): Do access control when converting
6342 Tue Mar 21 17:25:06 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6344 * parse.y (extern_lang_string): Catch use of linkage specs that
6345 aren't all naming the same language.
6347 * class.c (finish_struct): Delete accidental duplicate code.
6349 Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6351 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
6352 comparing functions and incomplete types.
6354 * decl.c (finish_function): Only unset current_function_decl if
6356 (duplicate_decls): Last change went too far; we only want to stop
6357 checking for value/reference ambiguity.
6359 Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
6361 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
6362 out fresh, as the new type may be larger.
6364 Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6366 * expr.c (extract_init): Try to expand the RTL for the
6367 initialization and figure out what it will look like so we can avoid
6368 run-time initialization. Disabled for now.
6369 (extract_scalar_init): Helper for scalar initialization.
6370 (extract_aggr_init): Helper for aggregate initialization.
6372 * decl.c (duplicate_decls): Don't complain about ambiguous
6374 (obscure_complex_init): Now returns a tree. Call extract_init if
6375 we're optimizing and this is a toplevel decl.
6376 (finish_decl): Update accordingly.
6378 * lex.c (check_newline): If we're just changing files (not pushing
6379 or popping), update input_file_stack->name.
6381 Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
6383 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
6384 in the transitive unification code.
6386 Mon Mar 20 16:07:50 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6388 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
6390 (grokdeclarator): Don't allow friends to be defined in local classes.
6392 Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6394 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
6395 rather than DECL_SAVED_INSNS to decide whether or not this method
6396 was declared inline.
6398 * method.c (synthesize_method): Turn off DECL_INLINE if
6399 function_cannot_inline_p thinks we're too large.
6401 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
6403 Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6405 * class.c (instantiate_type): Handle pmfs.
6407 * typeck.c (convert_for_assignment): Check types when assigning one
6410 * decl.c (define_label): Fix logic for printing out the name of the
6411 label in an error message.
6413 * error.c (dump_expr): Support ARRAY_REF.
6415 Fri Mar 17 17:43:02 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6417 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
6418 (finish_prevtable_vardecl): Instead of here.
6420 Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6422 * decl.c (expand_static_init): Also use expand_aggr_init if the
6423 initializer is a TREE_LIST.
6424 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
6426 * pt.c (unify): Fix unification of return type.
6428 * expr.c (fixup_result_decl): Use store_expr, rather than
6429 emit_move_insn, to move the return value into the place where
6430 callers will expect it.
6432 Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6434 * init.c (build_offset_ref): Call assmble_external on functions.
6435 * typeck.c (build_component_ref): Likewise.
6437 Thu Mar 16 20:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6439 * decl.c (struct saved_scope): Add members base_init_list and
6441 (push_to_top_level): Save current_base_init_list and
6442 current_member_init_list to them.
6443 (pop_from_top_level): Put it back.
6445 Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6447 * pt.c (instantiate_template): Call assemble_external.
6449 Thu Mar 16 18:07:54 1995 Brendan Kehoe <brendan@phydeaux.cygnus.com>
6451 * class.c: Include rtl.h, to get NULL_RTX.
6452 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
6453 on hosts with different sizes for each part of the union.
6454 * tree.c: Also include rtl.h.
6455 (layout_basetypes): Same change for DECL_SAVED_INSNS.
6457 Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6459 * pt.c (unify): Fix array domain unification for 64-bit targets.
6461 * decl2.c (finish_file): Push bizarre type decl before walking the
6462 vtables the first time.
6463 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
6464 with TREE_CHAIN (prev).
6466 * init.c (emit_base_init): Use convert_pointer_to_real instead of
6467 convert_pointer_to when converting to a direct base.
6469 Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
6471 * pt.c (type_unification): Handle transitive unification better.
6473 Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6475 * decl2.c (walk_vtables): Always set prev to vars.
6476 (mark_vtable_entries): Call assemble_external on the vtable entries.
6478 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
6479 calling layout_decl, so that it gets updated properly.
6481 Finally re-enable dynamic synthesis. This time it works.
6482 * method.c (synthesize_method): Pass decl_function_context (fndecl)
6483 to {push,pop}_cp_function_context.
6484 * decl.c (push_cp_function_context): Now takes a tree argument.
6485 (pop_cp_function_context): Likewise.
6486 * call.c (build_method_call): Enable synthesis.
6487 * lex.c (cons_up_default_function): Likewise.
6489 Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
6491 * parse.y (setattrs): Chain onto prefix_attributes rather than
6494 Wed Mar 15 13:00:00 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6496 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
6497 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
6499 Mon Mar 13 21:00:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6501 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
6502 and convert the size and integer_one_node to the index type.
6504 Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6506 * typeck.c (get_member_function_from_ptrfunc): Save the instance
6507 argument, and tack it onto the front of the COND_EXPR to make the
6508 semantics come out right. Grab the instance argument from
6509 '*instance_ptrptr', rather than having it passed in separately.
6511 * various: Change various consed-up comparison operations to have
6512 boolean type. Remove the instance argument in calls to
6513 get_member_function_from_ptrfunc.
6515 * error.c (dump_expr): Dump true and false as "true" and "false".
6517 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
6518 global init function.
6520 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
6521 inline function is public.
6523 Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6525 * init.c (is_friend): Be more careful about checking
6526 DECL_CLASS_CONTEXT on non-member functions.
6528 * decl2.c (finish_vtable_vardecl): Don't bother calling
6529 assemble_external here.
6530 (prune_vtable_vardecl): New function that just splices out the
6531 vtable decl from the top-level decls.
6532 (import_export_inline): Unset DECL_EXTERNAL at first.
6533 (finish_file): Don't bother calling assemble_external here. Do
6534 splice out all of the vtables.
6536 Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6538 * decl.c (finish_function): If we're not emitting the function yet,
6539 call assemble_external for it.
6541 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
6543 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
6544 Also don't splice out the current vtable if it is unused.
6545 (finish_file): Move the second walk_vtables and the synthesis check
6546 inside the 'reconsider' loop. Move thunk emission after the
6549 Thu Mar 9 16:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6551 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
6552 was passing bogus values for readonly and volatile from the original
6553 template decl, not the resultant type of the tsubst call.
6555 * class.c (duplicate_tag_error): Use cp_error_at to point out the
6556 previous definition of the tag.
6558 Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6560 * decl.c (start_function): Clear base_init_insns and protect_list.
6561 (struct cp_function): Add base_init_insns field.
6562 (push_cp_function_context): Also save base_init_insns.
6563 (pop_cp_function_context): Also restore base_init_insns.
6565 Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6567 * init.c (member_init_ok_or_else): Check for initializing a static
6569 (emit_base_init): Instead of here.
6571 Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6573 * call.c (build_method_call): Disable synthesis as needed.
6574 * lex.c (cons_up_default_function): Likewise.
6576 Tue Mar 7 10:14:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6578 * parse.y: New rules to allow attributes in a prefix position.
6579 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
6580 (setattr): New rule.
6581 (reserved_declspecs, declmods): Catch attributes here.
6582 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
6583 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
6585 (grokdeclarator): Added code to support machine attributes.
6586 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
6588 Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6590 * call.c (build_method_call): Don't synthesize methods outside of a
6593 Make base initialization more re-entrant so that synthesis on the
6594 fly will work (and, eventually, template instantation on the fly).
6595 * init.c (sort_member_init): Don't bother with members that can't be
6596 initialized. Reorganize a bit. Don't initialize base members here.
6597 (sort_base_init): New function, like sort_member_init, but for base
6598 classes. Steals some code from emit_base_init.
6599 (emit_base_init): Simplify. Call sort_{member,base}_init before
6600 doing any initialization, so we don't have to save
6601 current_{member,base}_init_list in push_cp_function_context.
6602 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
6603 (expand_aggr_vbase_init): Simplify.
6604 * decl.c (struct cp_function): Add protect_list field.
6605 (push_cp_function_context): Also save protect_list.
6606 (pop_cp_function_context): Also restore protect_list.
6607 * call.c (build_method_call): Enable synthesis at point of call.
6608 * lex.c (cons_up_default_function): Likewise.
6610 * parse.y: Turn -ansi checks back into -pedantic checks.
6612 * init.c (build_new): Fix -fcheck-new for array new.
6614 Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
6616 * typeck.c (build_compound_expr): warn if left-hand operand of
6617 comma expression has no side-effects.
6619 Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6621 * parse.y (primary): Change 'object qualified_id *' rules to 'object
6622 overqualified_id *'.
6624 Fri Mar 3 12:48:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6626 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
6627 Make the error look the same as the one we issue in c_sizeof.
6629 * typeck.c (build_binary_op_nodefault): Give an error for trying
6630 to compare a pointer-to-member to `void *'.
6632 Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6634 * typeck.c (build_unary_op): Handle bool increment with smoke and
6635 mirrors here, rather than in expand_increment where it belongs,
6636 because Kenner doesn't agree with me.
6638 Fri Mar 3 00:08:10 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6640 * decl.c (grokparms): Catch a PARM_DECL being used for a default
6643 Thu Mar 2 20:05:54 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6645 * init.c (build_new): Don't allow new on a function type.
6647 * parse.y (primary): Avoid a crash when seeing if the arg is of
6648 the same type as that given for the typespec in an explicit dtor call.
6650 Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6652 * decl.c (finish_function): Change test for calling
6653 mark_inline_for_output.
6655 Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6657 * typeck.c (build_modify_expr): Complain if
6658 build_default_binary_type_conversion fails.
6660 * init.c (expand_default_init): Handle arguments of unknown type
6663 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
6665 * various: Pass 'complain'.
6667 * typeck.c (comptypes): Be more picky about comparing UPTs.
6669 Wed Mar 1 11:03:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6671 * decl.c (grokdeclarator): If declarator is null, say that the
6672 type used has an incomplete type.
6674 Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6676 * pt.c (instantiate_template): Copy the template arguments to the
6677 permanent_obstack. Also use simple_cst_equal to compare them when
6678 looking for a previous instantiation.
6680 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
6681 they are array domain types).
6683 Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6685 * cp-tree.h: Define WANT_* constants for passing to
6686 build_expr_type_conversion.
6687 * cvt.c (build_expr_type_conversion): New function to build
6688 conversion to one of a group of suitable types.
6689 (build_default_binary_type_conversion): Use it.
6690 * decl2.c (grok_array_decl): Likewise.
6691 * typeck.c (build_unary_op): Likewise.
6692 (build_array_ref): Tidy up a bit.
6693 (build_binary_op): Likewise.
6695 Tue Feb 28 19:57:31 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6697 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
6699 Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6701 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
6702 reserved_declspecs' rule.
6704 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
6705 (direct_notype_declarator): Likewise.
6706 (complex_direct_notype_declarator): Add notype_qualified_id rule.
6708 * lex.c (real_yylex): Handle :> digraph properly.
6710 Tue Feb 28 12:26:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6712 * decl.c (grokdeclarator): Check if it's a friend, not if it's
6713 non-virtual, that's being initialized. Move the check up to
6714 before FRIENDP would get cleared. Catch an unnamed var/field
6715 being declared void. Say just `field' instead of `structure field'
6716 in the error message. Only go for the operator name if DECLARATOR
6719 Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6721 * decl.c (start_function): Complain about abstract return type.
6722 (grokdeclarator): Complain about declaring constructors and
6723 destructors to be const or volatile. Complain about declaring
6724 destructors to be static.
6726 * pt.c (uses_template_parms): Handle pmfs.
6728 * decl.c (grokdeclarator): Don't call variable_size for array bounds
6729 that only depend on template constant parameters.
6731 Mon Feb 27 15:38:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6733 * error.c (dump_decl): Only look to see if it's a vtable if we
6734 actually have a name to check out.
6736 Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6738 * cvt.c (convert_to_aggr): Lose misleading shortcut.
6740 Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
6742 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
6745 Sun Feb 26 00:10:18 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6747 * decl.c (grokdeclarator): Don't allow a static member to be
6748 declared `register'.
6750 * init.c (make_friend_class): Move up to a pedwarn for the warning
6751 about a class declaring friends with itself.
6753 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
6754 or `inline friend class foo'. Only try to make a friend out of
6755 TYPE if we didn't already reset it to integer_type_node.
6757 Sat Feb 25 22:32:03 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6759 * decl.c (grokdeclarator): Don't allow initialization of a
6760 non-virtual function.
6762 * decl.c (start_function): Do a pedwarn if we're changing `main'
6763 to have an int return type.
6765 Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6767 * typeck.c (build_modify_expr): Handle simple assignment from
6768 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
6770 Fri Feb 24 18:27:14 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6772 * decl.c (grokdeclarator): Also don't allow virtual outside of a
6773 class decl for a scope method definition performed at global binding.
6775 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
6778 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
6780 * typeck.c (build_binary_op): Return an error_mark_node if either
6781 one of the args turned into an error_mark_node when we tried to
6782 use default_conversion.
6784 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
6786 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
6787 used on `__wchar_t'.
6789 Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
6791 * except.c (end_protect_partials): Do it the right way.
6793 Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6795 * typeck.c (build_binary_op_nodefault): Upgrade warning about
6796 comparing distinct pointer types to pedwarn.
6798 * typeck2.c (digest_init): Cope with extra braces.
6800 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
6801 of INT_CST_LT (..., interger_zero_node).
6803 Wed Feb 22 14:45:52 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6805 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
6806 function for systems that don't have EH.
6808 Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6810 * call.c (can_convert_arg): Like can_convert, but takes an arg as
6813 * pt.c (type_unification): Allow implicit conversions for parameters
6814 that do not depend on template parameters.
6816 Tue Feb 21 18:43:48 1995 Douglas Rupp <drupp@cs.washington.edu>
6818 * Make-lang.in, config-lang.in: ($exeext): New macro.
6819 * Make-lang.in: Try a "cp" if "ln" fails.
6820 * cp-tree.h (decl_attributes): Added argument.
6821 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
6822 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
6823 Modified spawnvp to have to correct number of arguments for OS/2, NT.
6825 Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
6827 * decl.c (finish_function): Add calls to end_protect_partials to end
6828 the exception region that protects constructors so that partially
6829 constructed objects can be partially destructed when the constructor
6830 throws an exception.
6831 * init.c (perform_member_init, sort_member_init, emit_base_init):
6832 Added support for partially constructed objects.
6833 * init.c (build_partial_cleanup_for): New routine to do partial
6834 cleanups of a base class.
6835 * decl2.c (finish_file): Move the emitting of the exception table
6836 down, after we emit all code that might have exception regions in
6838 * except.c (end_protect_partials, might_have_exceptions_p): New
6840 (emit_exception_table): Always output table if called.
6841 * cp-tree.h (protect_list, end_protect_partials,
6842 might_have_exceptions_p, emit_exception_table): Added.
6844 Tue Feb 21 16:05:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6846 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
6847 address of a local variable.
6848 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
6849 were given a non-null PTR_TO_INSTPTR.
6851 Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6853 * decl.c (duplicate_decls): Always lay out the merged decl.
6855 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
6856 (finish_prevtable_vardecl): Likewise.
6858 * method.c (synthesize_method): Set interface_{unknown,only}
6859 according to the settings for our class, not the file where it comes
6862 Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
6864 * except.c: Handle systems that define __i386__ but not __i386.
6866 Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6868 * decl2.c (reparse_decl_as_expr): Support being called without a
6871 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
6874 Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
6876 * parse.y (template_def, fndef, fn.def1, return_init, condition,
6877 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
6878 component_decl_1, after_type_component_declarator0,
6879 notype_component_declarator0, after_type_component_declarator,
6880 notype_component_declarator, after_type_component_declarator,
6881 full_parm, maybe_raises, exception_specification_opt): Fix up,
6882 include exception_specification_opt maybeasm maybe_attribute and
6883 maybe_init if missing. Rename maybe_raises to
6884 exception_specification_opt to match draft wording. Use maybe_init
6887 Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6889 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
6890 built for news of scalar types.
6892 Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6894 * typeck.c (build_binary_op_nodefault): Update code for warning
6895 about signed/unsigned comparisons from C frontend. Realize that the
6896 code in the C frontend is, if anything, even more bogus. Fix it.
6897 (build_binary_op): Undo default_conversion if it wasn't useful.
6899 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
6902 * decl2.c (import_export_vtable): Don't try the vtable hack
6903 if the class doesn't have any real non-inline virtual functions.
6904 (finish_vtable_vardecl): Don't bother trying to find a non-inline
6905 virtual function in a non-polymorphic class.
6906 (finish_prevtable_vardecl): Likewise.
6908 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
6910 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
6912 * init.c (expand_virtual_init): Always call assemble_external.
6914 * class.c (build_vfn_ref): Always call assemble_external.
6915 (build_vtable): Always call import_export_vtable.
6916 (prepare_fresh_vtable): Likewise.
6917 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
6919 Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6921 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
6922 whether an enumerated type fits in a bitfield.
6924 Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6926 * class.c (grow_method): Update method_vec after growing the class
6929 Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
6931 * parse.y (handler_seq): Push a level for the catch parameters.
6933 Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6935 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
6936 bases, in case they've been clobbered.
6938 Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
6940 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
6941 so that one day it will always be valid.
6942 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
6944 * cp-tree.h (copy_binfo): Removed, unused.
6945 * tree.c (copy_binfo): Likewise.
6947 Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6949 * init.c (build_new): Save the allocation before calling
6950 expand_vec_init on it.
6952 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
6953 match the TYPE_PRECISION of the underlying type for constant folding
6956 Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
6958 * except.c (push_eh_entry, expand_start_all_catch,
6959 expand_leftover_cleanups, expand_end_catch_block): Keep track of
6960 the context in which the exception region occurs.
6961 (build_exception_table): If the region was not output, don't output
6962 the entry in the eh table for it.
6964 Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6966 * init.c (expand_default_init): Only use a previous constructor call
6967 if it's a call to our constructor. Does the word "Duh" mean
6970 * decl.c (grokparms): Fine, just don't call
6971 convert_for_initialization at all. OK? Happy now?
6973 Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6975 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
6976 method vector has a second element before returning it.
6978 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
6979 convert_for_initialization.
6981 Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6983 * typeck.c (build_modify_expr): Compare function name to
6984 constructor_name (current_class_type) instead of current_class_name.
6986 * decl.c (grokparms): Don't do anything with the return value of
6987 convert_for_initialization.
6989 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
6991 * decl.c (duplicate_decls): Tweak error message.
6993 * typeck.c (build_const_cast): Implement checking.
6994 (build_reinterpret_cast): Implement some checking.
6996 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
6997 converting to the same aggregate type.
6998 (CONV_STATIC_CAST): Include it.
6999 (CONV_C_CAST): Likewise.
7000 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
7001 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
7003 Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7005 * typeck.c (build_c_cast): Use non_lvalue to tack something on
7008 * decl.c (auto_function): Now a function.
7009 * except.c (init_exception_processing): terminate, unexpected,
7010 set_terminate, and set_unexpected have C++ linkage.
7012 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
7013 truthvalue_conversion for converting to bool, as it handles
7014 user-defined conversions properly.
7015 (condition_conversion): Likewise.
7017 * except.c (expand_throw): Don't call convert_to_reference.
7018 Pass the correct parameters to build_new.
7020 * method.c (do_build_assign_ref): Don't use access control when
7021 converting to a base reference here.
7022 (do_build_copy_constructor): Or here.
7024 * init.c (build_new): Unset TREE_READONLY on the dereferenced
7025 pointer before assigning to it.
7027 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
7029 * decl2.c (delete_sanity): You can now delete pointer to const.
7031 Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
7033 * decl.c (finish_function): Don't rely on actual parameters being
7034 evaluated left-to-right.
7035 * except.c (expand_end_catch_block): Likewise.
7037 Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7039 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
7041 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
7044 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
7046 (convert_to_reference): Fix erroneous text substitution.
7048 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
7049 Add new argument to all callers.
7051 * typeck.c (convert_arguments): Check for error_mark_node before
7052 trying to do anything with the actual parameter.
7054 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
7056 (bool_truthvalue_conversion): Remove. Fix all callers to call
7057 truthvalue_conversion instead.
7058 (various): Fold CLEANUP_POINT_EXPRs.
7060 * parse.y (conditions): Call condition_conversion rather than
7061 building up a CLEANUP_POINT_EXPR.
7063 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
7064 under -falt-external-templates.
7066 Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7068 * init.c (build_new): Complain about new of const type without
7069 initializer. Other cleanup.
7071 * call.c (compute_conversion_costs): Don't call
7072 build_type_conversion with a reference type; convert to the target
7073 type and check its lvaluetude.
7074 * cvt.c (convert_to_reference): Likewise.
7076 * cvt.c (build_type_conversion_1): There will never be any need to
7077 dereference references here now.
7079 Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
7081 * except.c (expand_builtin_throw): Make sure we only `use' the
7082 value of return_val_rtx.
7084 Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7086 * parse.y (structsp): Don't complain about declaring a type being
7087 defined to be a friend.
7089 * decl2.c (warn_if_unknown_interface): Note the template in question
7090 and the point of instantiation, for -falt-external-templates.
7091 * lex.c (reinit_parse_for_method): Pass the decl to
7092 warn_if_unknown_interface.
7093 * pt.c (instantiate_template): Likewise.
7094 (end_template_decl): Likewise.
7096 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
7097 nested name again, to make local classes work a bit better.
7099 * typeck.c (build_function_call_real): Dereference reference after
7100 checking for incomplete type.
7102 * init.c (build_new): Accept new of const and volatile types.
7104 Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
7106 * decl.c (grokdeclarator): Fix error message.
7108 Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7110 * typeck.c (convert_for_initialization): Do bash arrays when
7111 converting to a reference to non-array.
7113 Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7115 * cvt.c (cp_convert): Don't call convert_to_reference, or
7116 automatically dereference references. Do pass reference conversions
7117 to cp_convert_to_pointer.
7118 (cp_convert_to_pointer): Support references.
7120 * call.c (build_method_call): Don't build up a reference to the
7121 parameter here; let build_overload_call handle that.
7123 * typeck.c (build_c_cast): Call convert_to_reference directly if
7124 converting to a reference type.
7125 * method.c (do_build_copy_constructor): Likewise.
7126 * method.c (do_build_copy_constructor): Likewise.
7127 (do_build_assign_ref): Likewise.
7129 * call.c (build_method_call): Dereference a returned reference.
7130 * typeck.c (build_function_call_real): Likewise.
7132 * decl.c (xref_basetypes): Check for unions with basetypes here.
7133 (xref_tag): Instead of here.
7135 * pt.c (process_template_parm): Template type parm decls are
7138 Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7140 * parse.y (typed_declspecs): Add missing semicolon.
7141 (do_xref_defn): Resurrect.
7142 (named_class_head_sans_basetype): Move template specialization
7143 definition cases to named_class_head_sans_basetype_defn.
7145 * decl2.c (grokfield): Call pushdecl_class_level after setting the
7146 TYPE_NAME, not before.
7148 Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7150 * call.c (convert_harshness): Don't call sorry here. Don't allow
7151 conversions between function pointer types if pedantic.
7153 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
7155 * lex.c (cons_up_default_function): Use the full name for the return
7158 * decl.c (set_nested_typename): Don't worry about anonymous types,
7159 as they already have a unique name.
7160 (pushdecl): Remove redundant set_nested_typename
7161 (xref_tag): Split out base handling into xref_basetypes.
7163 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
7164 not considered incomplete even though their definition is unknown.
7166 * decl.c (xref_defn_tag): Lose.
7167 (xref_tag): xref_next_defn = ! globalize.
7168 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
7169 ones that should have it set will have it set by pushtag.
7170 (pushdecl_class_level): Likewise.
7171 (pushtag): Tidy up a bit.
7172 (set_nested_typename): Push a decl for the nested typename from
7173 here, rather than from xref_defn_tag.
7175 * parse.y (do_xref): Lose.
7176 (named_class_head): If we see 'class foo:' we know it's a
7177 definition, so don't worry about base lists for non-definitions.
7179 * pt.c (push_template_decls): Template parm decls are artificial.
7181 * decl.c (duplicate_decls): Restore check for qualifier
7182 disagreement for non-functions.
7183 (decls_match): Remove check for qualifier disagreement.
7185 Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7187 * decl.c (grok_reference_init): Convert initializer from
7189 * typeck.c (convert_for_initialization): Likewise.
7191 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
7193 * cvt.c (cp_convert): Don't convert to the same class type by just
7194 tacking on a NOP_EXPR.
7195 (convert_to_reference): Use comp_target_types instead of comptypes
7196 so that we don't allow conversions two levels down.
7198 Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7200 * class.c (build_vbase_path): Bash types to make the backend happy.
7201 * cvt.c (build_up_reference): Bash the types bashed by
7202 build_vbase_path to be reference types instead of pointer types.
7203 (convert_to_reference): Likewise.
7205 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
7208 * parse.y (structsp): Put back error for 'struct B: public A;'.
7210 Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
7212 * except.c: Add support for mips systems that don't define __mips
7213 but do define mips, like Ultrix.
7215 Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
7217 * except.c: Add support for exception handling on the Alpha.
7219 Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
7221 * decl2.c (finish_file): Fix bug in Jan 31st change.
7223 Tue Jan 31 16:59:15 1995 Gerald Baumgartner <gb@lorenzo.cs.purdue.edu>
7225 * sig.c (build_signature_pointer_or_reference_type): Don't set
7226 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
7227 doesn't expect to find a copy constructor.
7228 * call.c (build_method_call): Treat signature pointers/reference
7229 as if IS_AGGR_TYPE were set.
7231 Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
7233 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
7234 (build_t_desc): Inform the user here if they try and build
7235 with -frtti and don't include <typeinfo.h>.
7237 * decl2.c (finish_prevtable_vardecl): Support rescanning.
7238 (finish_file): Move finish_prevtable_vardecl up to before the global
7239 initializers are done as tdecls are initialized in the global
7240 initializer. Also Pick up any new tdecls or vtables needed by
7241 synthesized methods.
7243 * class.c (finish_struct): Simplify. We have to do rtti scanning at
7244 end, so we might as well do all of it there.
7246 Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7248 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
7251 Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
7253 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
7254 finish_vtable_vardecl. It has the first half functionality from
7256 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
7257 in finish_prevtable_vardecl.
7258 * decl2.c (finish_file): Call finish_prevtable_vardecl.
7259 * gc.c (build_generic_desc): Allow it to be called when not at the
7260 global binding layer, but behave as if we were.
7261 (build_t_desc): Rearrange a bit so that it really works and is
7263 * class.c (finish_struct): Don't decide on tdecls here, as we have
7264 to wait until the end of the file in general to decide whether or
7267 Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7269 * init.c (build_delete): Check access to operator delete before
7270 calling the destructor.
7271 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
7272 return error_mark_node.
7273 * call.c (build_method_call): Use the one-argument op delete even if
7276 * init.c (build_new): Fix -fthis-is-variable support.
7277 * call.c (build_method_call): Likewise.
7279 * call.c (convert_harshness): Make conversion from a pointer to bool
7280 worse than conversion to another pointer.
7282 Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7284 * init.c (build_new): Check new return value if -fcheck-new.
7286 * lex.c (check_newline): Clear end_of_file when we're done, too.
7288 Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
7290 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
7291 vtables whereever they go.
7293 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
7296 Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
7298 * decl2.c (finish_vtable_vardecl): Now set the
7299 interface/implementation of vtables on the first virtual function,
7300 if one exists, otherwise we use the old method. This is a major win
7301 in terms of cutting down the size of objects and executables in
7302 terms of text space and data space. Now most of the savings that
7303 #pragma interface/implementation gives is automatic in a fair number
7306 Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7308 * decl.c (grokdeclarator): Discard the template parameters in a
7309 template constructor declaration so that the function is always
7310 named constructor_name (ctype).
7312 * lex.c (check_newline): Use ungetc to put back the character before
7313 calling HANDLE_PRAGMA.
7315 Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
7317 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
7318 make sure we still match them.
7320 Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7322 * parse.y: Add END_OF_LINE token.
7324 * lex.c (check_newline): Set linemode when we see a # directive, and
7325 unset it when we're done. Turn all 'return's into 'goto skipline'.
7326 Fix all uses of '\n', since we won't see it anymore. Put back the
7327 character we read before checking for a sysv or target pragma.
7328 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
7329 (handle_sysv_pragma): Don't look at the input stream; quit when we
7330 see an END_OF_LINE token.
7332 * input.c (getch): Return EOF if we're in line mode and at the end
7334 (put_back): Don't put back an EOF.
7336 Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
7338 * except.c (expand_throw): Do the newing of the exception object
7339 before we load the type descriptor or the address so that we don't
7340 wipe any of the values out.
7342 Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
7344 * except.c (init_exception_processing): Don't use r12 on the rs6000.
7346 Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7348 * decl.c (grokparms): Don't try to build up a reference at this point.
7350 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
7351 will suffice to convert from integer_zero_node.
7353 Wed Jan 25 15:02:09 1995 David S. Miller <davem@nadzieja.rutgers.edu>
7355 * class.c (instantiate_type): Change error message text.
7356 * typeck2.c (store_init_value): Likewise.
7358 Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
7360 * pt.c (tsubst): When we copy a node, don't forget to copy
7361 TREE_CHAIN, we use it later.
7363 Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7365 * typeck.c (convert_for_assignment): Initialize variable before use.
7367 Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7369 * g++.c (main): Link with both libstdc++ and libg++ if called as
7370 something ending with "g++", otherwise only libstdc++. Move -lm to
7371 the end of the line.
7373 Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7375 * call.c (build_method_call): Don't mess with 'this' before calling
7376 compute_conversion_costs.
7378 Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7380 * search.c (get_matching_virtual): Give line number for previous
7383 * call.c (convert_harshness): Handle conversions to references
7386 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
7388 Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
7390 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
7391 as the TREE_CHAIN for methods will take us to the next differently
7392 named function, DECL_CHAIN won't.
7394 Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7396 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
7398 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
7399 warn_parentheses defaults to 0.
7401 * decl.c (grokparms): Put back call to require_instantiated_type.
7403 Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
7405 * except.c (exception_section): Use the data section on the rs6000.
7406 Change calling convention for named_section.
7408 Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
7410 * cp-tree.h : Make if (x=0) warn with wall
7411 * parse.y : Make if (x=0) warn with wall
7413 Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7415 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
7416 BITS_PER_UNIT otherwise.
7418 * search.c (get_matching_virtual): Don't check the binfo if the
7421 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
7424 Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7426 * various: Use boolean_type_node, boolean_true_node,
7429 * search.c (get_matching_virtual): Allow covariant returns that
7430 don't require pointer adjustment.
7432 * typeck.c (build_conditional_expr): Don't call default_conversion
7435 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
7437 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
7439 Sun Jan 15 22:17:32 1995 David Binderman <dcb@lovat.fmrco.COM>
7441 * pt.c (do_function_instantiation): Free targs once we're done.
7443 Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7445 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
7446 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
7449 Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7451 * decl2.c (finish_file): We need to mess up if there are any
7452 variables in the list, not just if there is one with a constructor.
7454 Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7456 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
7457 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
7458 (finish_function): Trust rest_of_compilation.
7460 * decl2.c (finish_file): Also call functions designated as static
7461 constructors/destructors.
7463 * decl.c (grokdeclarator): Allow access decls of operator functions.
7464 (grokparms): Only do convert_for_initialization if the initializer
7466 (duplicate_decls): Put back push_obstacks_nochange call.
7468 * lex.c (real_yylex): Downgrade complaint about the escape sequence
7469 being too large from pedwarn to warning.
7471 * decl.c (grokdeclarator): Don't complain about long long in system
7474 * lex.c (real_yylex): Handle digraphs.
7476 Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7478 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
7479 affects C linkage declarations now.
7481 * typeck.c (comp_target_types): Grok simple contravariant conversions.
7482 (common_type): t1 and t2 are interchangeable.
7484 * various: Test return value of comp_target_types differently in
7485 different places; it now returns -1 for a contravariant conversion
7486 (which is fine in symmetric cases).
7488 (common_type): Prefer long double to double even when
7489 they have the same precision.
7491 * decl.c (grokparms): Call convert_for_initialization to check
7494 * init.c (build_new): void_type_node has a size (of 0).
7496 * decl.c (decls_match): Also check for agreement of TREE_READONLY
7497 and TREE_THIS_VOLATILE.
7498 (push_class_level_binding): Properly handle shadowing of
7499 nested tags by fields.
7501 * search.c (dfs_pushdecls): Likewise.
7503 * decl2.c (finish_file): Don't second-guess self-initialization.
7505 * cvt.c (convert_to_reference): Work with expr directly, rather than
7508 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
7510 * init.c (add_friend): Downgrade duplicate friend message from
7513 * decl.c (duplicate_decls): Push obstacks before calling common_type.
7515 Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
7517 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
7518 exception table labels.
7519 (expand_start_all_catch): Likewise.
7520 (expand_leftover_cleanups): Likewise.
7521 (expand_end_catch_block): Likewise.
7522 * except.c (make_first_label): new function.
7523 (expand_start_all_catch): add a call to make_first_label() before
7524 using a label as a jump destination.
7525 (expand_end_all_catch): Likewise.
7526 (expand_leftover_cleanups): Likewise.
7527 (expand_end_catch_block): Likewise.
7528 (expand_builtin_throw): Likewise.
7529 (expand_throw): Likewise.
7530 * except.c: Add ARM processor support for exception handling.
7532 Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7534 (complete_array_type): Copy code from C frontend.
7536 * lex.c (real_yylex): Don't multiply the length of a wide string
7537 literal by WCHAR_BYTES.
7539 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
7540 (duplicate_decls): Instead of here.
7541 (define_label): Complain about a label named wchar_t.
7542 (grokdeclarator): Complain about declarations of
7543 operator-function-ids as non-functions.
7545 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
7547 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
7549 * lex.c (real_yylex): Don't skip whitespace when reading the next
7552 Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
7554 * except.c: Allow cc1plus to be built with native compiler on rs6000.
7555 (expand_start_all_catch): Add assemble_external calls for various
7557 (expand_leftover_cleanups): Likewise.
7558 (expand_start_catch_block): Likewise.
7559 (do_unwind): Likewise.
7560 (expand_builtin_throw): Likewise.
7562 Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7564 * decl.c (pushtag): Only look for a previous decl in the current
7565 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
7567 * gxx.gperf: Add __signature__ and __sigof__ keywords.
7569 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
7570 does set flag_no_gnu_keywords and flag_operator_names.
7572 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
7573 Unset extension keywords if -fno-gnu-keywords.
7574 Allow operator names ('bitand') if -foperator-names.
7575 Never unset 'asm'; -fno-asm only affects 'typeof'.
7577 * decl.c (lookup_name_real): The got_object special lookup only
7580 Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7582 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
7584 * parse.y (primary): Unset got_object after all rules that use the
7585 'object' nonterminal.
7586 (object): Set got_object.
7588 * lex.h: Declare got_object.
7590 * decl.c (lookup_name_real): Also lookup names in the context of an
7593 Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
7595 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
7596 for things that have to be added to pointers, not size_type. Cures
7597 problems with pointer to members on Alphas.
7598 (build_binary_op_nodefault): Likewise.
7599 (get_delta_difference_: Likewise.
7600 (build_ptrmemfunc): Likewise.
7602 Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7604 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
7607 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
7608 when dealing with overloaded member functions; just act like
7610 (commonparms): Remove misleading comment.
7612 * decl.c (duplicate_decls): Complain about repeated default
7614 (redeclaration_error_message): Instead of here.
7615 (pushdecl): Complain about missing default arguments here.
7616 (grokparms): Instead of here.
7617 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
7618 (grok_reference_init): Do not complain about missing initializer if
7621 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
7622 function alternative and want_type is not set.
7624 Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7626 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
7627 the decl when the type has no TYPE_NAME.
7628 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
7629 (lookup_name_real): Call lookup_field with want_type =
7632 * search.c (lookup_field): Handle want_type properly in the presence
7633 of fields with the same name.
7635 * decl.c (set_nested_typename): Set nested name for file-scope types
7636 to include leading ::.
7637 (pushdecl): Set the nested typename if the decl doesn't have one,
7638 rather than if the type's canonical decl doesn't have one.
7640 Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7642 * typeck.c (convert_for_assignment): Complain about contravariance
7644 (comp_target_types): Instead of here.
7645 (build_unary_op): resolve_offset_ref before checking for a valid
7648 * spew.c (yylex): Decrement looking_for_typename after we see a
7651 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
7652 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
7654 * typeck.c (convert_for_assignment): Converting pointers to bool
7655 does not need a cast.
7657 Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7659 * class.c (instantiate_type): Initialize nsubsts parm.
7661 * pt.c (do_function_instantiation): Likewise.
7663 Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7665 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
7666 DECL_SAVED_INSNS to determine whether or not we've seen a definition
7668 (instantiate_template): Likewise.
7670 * call.c (convert_harshness): Allow const reference binding when
7671 called from the overloading code, but not when called from
7672 can_convert (since it isn't a conversion).
7673 (convert_harshness): Put back some disabled code.
7675 Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7677 * call.c (convert_harshness): There is no implicit conversion from
7678 void* to other pointer types (unless the parameter is (void*)0).
7679 (convert_harshness): Non-lvalues do not convert to reference types.
7681 * class.c (finish_struct_methods): Still set
7682 TYPE_HAS_{INT,REAL}_CONVERSION.
7684 * call.c (can_convert): Don't use aggregate initialization.
7686 * cp-tree.h: Declare lookup_conversions.
7688 Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
7690 * parse.y (simple_stmt): Fix duplicate case value error messages to
7693 Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7695 * cvt.c (build_type_conversion): Total rewrite to use
7696 convert_harshness instead of reproducing conversion logic here. Now
7699 * call.c (convert_harshness): Support conversions to bool.
7700 (can_convert): Checks whether a conversion is less harsh
7701 than USER_CODE, for build_type_conversion.
7703 * search.c (add_conversions): Function for passing to dfs_walk which
7704 adds all the type conversion operators in the current type to a list.
7705 (lookup_conversions): Calls dfs_walk with add_conversions and return
7707 (dfs_walk): Don't require a qfn.
7709 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
7710 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
7712 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
7713 (grow_method): A separate function for building onto the growing
7715 (finish_struct_methods): Use it. Put all type conversion operators
7716 right after the constructors. Perhaps we should sort the methods
7719 Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7721 * call.c (build_method_call): Lose another misleading shortcut.
7723 Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
7725 * gc.c (build_bltn_desc): Handle bool as a built-in type.
7727 Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
7729 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
7730 on the complete type because of small virtual bases.
7732 Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
7734 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
7736 (pushdecl): Also count decls pushed that are of a type being defined
7737 as incomplete things.
7738 * class.c (finish_struct): Move hack_incomplete_structures up to
7739 just after we set it as not being defined, so that the decls we
7740 build for RTTI don't count as incomplete.
7742 Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
7744 * pt.c (tsubst): Fix problem with defining constructors in templated
7745 classes with virtual bases.
7747 Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
7749 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
7751 * gc.c (build_typeid): Likewise.
7753 Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
7755 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
7756 don't assert on complex AGGR inits.
7758 Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
7760 * method.c (build_overload_value): Handle pointer to members as
7763 Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
7765 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
7766 to do take the address of a data member for a pointer to data
7769 Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
7771 * decl.c (grokdeclarator): Use the typedef name for linkage if the
7772 type doesn't otherwise have a name.
7774 * decl2.c (grokfield): Likewise.
7776 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
7777 DECL_NAME of enums, structs and classes, we have to avoid trying to
7778 put it in the TYPE_FIELDS again.
7780 Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
7782 * decl2.c (check_classfn): Ignore this parameter on static functions
7783 when checking to see if we match.
7785 Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
7787 * typeck.c (unary_complex_lvalue): Handle address of non-left most
7788 pointers to members by calling get_delta_difference.
7790 Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
7792 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
7793 static functions to early.
7795 Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
7797 * method.c (make_thunk): Handle encoding of positive thunk offsets.
7799 Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
7801 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
7803 Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
7805 * decl2.c (check_classfn): Use decls_match to check if this has
7806 already been declared, as the DECL_ASSEMBLER_NAME may have been
7807 changed via asm("new_name").
7808 * decl.c (decls_match): Make public.
7810 Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
7812 * *.[chy] (expand_aggr_init) Add fourth argument to handle
7813 distinction between = init and (init) style of initializations.
7814 * *.[chy] (finish_decl): Add fifth argument to to handle
7815 distinction between = init and (init) style of initializations.
7817 Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
7819 Fix some random `explicit' bugs.
7821 * cvt.c (convert_to_reference): Add third parameter to
7823 (convert_force): Likewise.
7824 * call.c (build_method_call): Likewise.
7825 * decl2.c (setup_vtbl_ptr): Likewise.
7826 * init.c (expand_virtual_init): Likewise.
7827 (build_member_call): Likewise.
7828 (build_delete): Likewise.
7829 (build_vbase_delete): Likewise.
7830 * typeck.c (build_component_addr): Likewise.
7831 (build_c_cast): Likewise.
7832 (build_modify_expr): Likewise.
7833 * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can
7834 distinguish the context in which the conversion appears. Add thrid
7835 argument to build_c_cast.
7836 * cvt.c (cp_convert): Pass whether or not we want to consider
7837 non-converting constructors down to build_method_call.
7838 * decl2.c (reparse_absdcl_as_casts): Add third argument to
7840 * gc.c (build_m_desc): Likewise.
7841 * init.c (build_new): Likewise.
7842 * parse.y (expr_no_commas): Likewise.
7843 (primary): Likewise.
7844 * typeck.c (build_x_function_call): Likewise.
7845 (build_static_cast): Likewise.
7846 (build_reinterpret_cast): Likewise.
7847 (build_const_cast): Likewise.
7848 (build_c_cast): Likewise.
7849 (build_ptrmemfunc): Likewise.
7850 * typeck2.c (build_functional_cast): Likewise.
7851 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
7852 expand_aggr_init_1 as inits are converted to the destination type.
7854 Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7856 * Make-lang.in (cc1plus): Depends on c-pragma.o.
7858 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
7860 * lex.c (check_newline): If the #pragma is not recognized by g++,
7861 try machine-specific ones too.
7862 (handle_sysv_pragma): Copied from c-lex.c.
7864 Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
7866 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
7869 Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7871 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
7872 IS_AGGR_TYPE, since now they will not both be set on the same type.
7874 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
7875 instantiations controlled by -fexternal-templates.
7877 * decl.c (duplicate_decls): Don't complain about different values of
7878 __attribute__ ((const)) and ((noreturn)).
7880 Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
7882 * Makefile.in (BISONFLAGS): Delete --yacc.
7883 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
7884 (PARSE_C): Undo last patch.
7886 Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
7888 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
7891 Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7893 * decl.c (finish_decl): Don't call obscure_complex_init for decls
7894 of indeterminate size.
7896 Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7898 * decl.c (obscure_complex_init): Function to tweak the decl to
7899 prevent expand_decl from tring to initialize it.
7900 (finish_decl): Use it rather than writing the same code in three
7903 * parse.y (bad_parm): Stop trying to support parms without types.
7905 Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
7907 * decl2.c (grokfield): Make asm specs on static member functions
7910 Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
7912 * except.c (expand_throw): Make a copy of the thrown object.
7914 Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7916 * parse.y: : has lower precedence than =.
7918 Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
7920 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
7922 (grokvardecl): Add namespace into variable name.
7924 Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
7926 * decl2.c (current_namespace_id): New routine to transform a simple
7927 name into a name in a namespace.
7928 * decl.c (grokdeclarator): Use it.
7929 * decl2.c (get_namespace_id): Find the name of the current
7931 (push_namespace, pop_namespace): Complete out missing
7934 Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7936 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
7937 not be defined. Fix warning message for enums and restore warning
7940 * decl2.c (push_namespace): Dummy function.
7941 (pop_namespace): Likewise.
7942 (do_namespace_alias): Likewise.
7943 (do_using_decl): Likewise.
7944 (do_using_directive): Likewise.
7946 * parse.y: New token NSNAME for namespace names.
7947 (extdef): Add namespace, using definitions.
7948 (using_decl): New rule for using declarations.
7949 (any_id): New rule for identifiers with any degree of scoping.
7950 (identifier): Add NSNAME.
7951 (notype_identifier): Likewise.
7952 (component_decl): Add using_decl.
7953 (nested_name_specifier): Add NSNAME SCOPE.
7955 * typeck.c (convert_for_assignment): Handle conversions between
7958 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
7961 Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
7963 * class.c (finish_struct): Give an error if one tries to declare a
7964 bit-field's size greater than a long long, as the backend will dump.
7965 It is not an error to declare an enum bit-field greater than its
7966 precision. Warn if an enum bit-field is too small to hold all
7969 Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
7971 * typeck.c (convert_for_assignment): Use cp_convert instead of
7972 convert so that we don't get static casts.
7974 Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
7976 * cvt.c (cp_convert): Don't complain about int->enum conversion if
7977 we are doing static casts.
7979 Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
7981 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
7982 when dumping expressions in error messages.
7984 Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
7986 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
7987 the return type is the right type, and make references work.
7989 Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
7991 * decl.c (poplevel): Don't be confused by function-scope
7992 declarations of non-nested functions.
7993 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
7994 (pushdecl): Use duplicate_decls to copy info from old decl into new
7995 function-scope one rather than doing it here.
7997 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
7998 of this decl, in case this is a function-scope declaration.
8000 * decl.c (finish_enum): Make sure that the type has the right
8001 precision when we call fixup_*_type.
8003 Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8005 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
8006 want to build up references to rvalues if possible.
8007 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
8009 Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
8011 * parse.y (maybe_raises): Handle throw ().
8012 * parse.y (ansi_raise_identifier): grok type-ids in exception
8014 * tree.c (build_exception_variant): Use list compare to check if
8015 two exception specifications match.
8016 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
8018 * call.c (build_method_call): Remove TREE_RAISES.
8019 * cvt.c (convert_to_aggr): Likewise.
8020 * typeck.c (build_function_call_real, convert_arguments): Likewise.
8021 * init.c (expand_aggr_init_1): Likewise.
8023 Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
8025 * except.c: Add support for m68k and mips exception handling
8028 Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
8030 * except.c (expand_end_all_catch): Throw into outer context, if we
8031 fall off end of catch handlers.
8033 Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
8035 * Makefile.in: Make is easier to decide where parse.[ch] will be
8038 Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
8040 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
8041 (GXX_INSTALL_NAME) Likewise.
8042 (CXX_CROSS_NAME) Use program_transform_cross_name.
8043 (GXX_CROSS_NAME) Likewise.
8044 (c++.install-man): Use program_transform_name on g++.1.
8045 (c++.uninstall): Likewise.
8047 Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
8049 * parse.y (THROW): Fix precedence of throw expressions.
8051 Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
8053 * typeck.c (build_unary_op): Allow promotions from bool to int on
8056 Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8058 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
8059 classes when appropriate.
8060 (build_overload_nested_name): When dealing with a function context,
8061 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
8062 avoid conflicts between local classes of the same name.
8064 Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
8066 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
8067 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
8069 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
8070 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
8071 build_method_calls so that non-converting constructors are not used.
8072 * call.c (build_method_call): If we shouldn't use a non-converting
8073 constructor, then don't.
8075 Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8077 * call.c (build_method_call): Don't try to synthesize methods yet.
8079 Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8081 * pt.c (push_template_decls): Create CONST_DECLs for template
8082 constant parameters, not VAR_DECLs.
8084 Sat Nov 19 15:28:31 1994 Jim Wilson <wilson@chestnut.cygnus.com>
8086 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
8087 shift count is less than size in bits of arg0.
8089 Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
8091 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
8092 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
8093 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
8094 to add support for explicit, namespace, typename, and using, support
8095 for the rest is already in.
8097 Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
8099 * gc.c (get_bad_cast_node): New routine to support compile time
8101 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
8104 Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
8106 * except.c: Add hppa support.
8108 Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
8110 * except.c: Add rs6000 support.
8112 Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
8114 * except.c (do_unwind): Add i[34]86 support.
8116 Thu Nov 3 00:10:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8118 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
8121 Wed Nov 2 15:08:24 1994 Kung Hsu <kung@mexican.cygnus.com>
8123 * decl.c (finish_function): Emit types used in method parameters
8126 Wed Nov 2 15:05:47 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8128 * pt.c (process_template_parm): Allow pointer to member function
8129 template parameter types.
8130 (uses_template_parms): Handle pointer to member function
8133 * g++.c (main): Cast first argument of bzero to (char *).
8134 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
8136 Mon Oct 31 14:50:48 1994 Kung Hsu <kung@mexican.cygnus.com>
8138 * gc.c (build_dynamic_cast): rewrite to make it work.
8139 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
8140 * class.c (modify_all_direct_vtables): ditto.
8141 * init.c (expand_direct_vtbls_init): expand more vtables if
8143 * decl.c (init_type_desc): add default return.
8145 Tue Oct 25 17:13:09 1994 Kung Hsu <kung@mexican.cygnus.com>
8147 * tree.c (debug_binfo): get rid of the initial size entry of
8149 * cp-tree.h: change flag_dossier to flag rtti, define type
8150 descriptor type nodes.
8151 * decl.c (init_type_desc): new function to initialize type
8152 descriptor type nodes.
8153 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
8154 * lex.c (init_lex): ditto.
8155 * decl.c : change variable flag_dossier to flag_rtti.
8156 * decl.c (duplicate_decls): get rid initial size entry of vtable.
8157 * decl.c (hack_incomplete_structures): take out assert 164.
8158 * search.c (get_abstract_virtuals_1): ditto.
8159 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
8162 * class.c (prepare_fresh_vtable): for virtual bases, get right
8164 * class.c (add_virtual_function): change flag_dossier to
8166 * class.c (modify_one_vtable): modify the right rtti entry.
8167 * class.c (override_one_vtable): get rid of size entry.
8168 * class.c (finish_struct): change flag_dossier to flag_rtti, and
8169 build extra vtables, build type descriptors for polymorphic
8171 * gc.c (build_headof): make headof() works correctly with new
8173 * gc.c (build_typeid): make this function work with new rtti.
8174 * gc.c (get_typeid): make this function work with new rtti.
8175 * gc.c (build_bltn_desc): new function for new rtti.
8176 * gc.c (build_user_desc): ditto.
8177 * gc.c (build_class_desc): ditto.
8178 * gc.c (build_ptr_desc): ditto.
8179 * gc.c (build_attr_desc): ditto.
8180 * gc.c (build_func_desc): ditto.
8181 * gc.c (build_ptmf_desc): ditto.
8182 * gc.c (build_ptmd_desc): ditto.
8183 * gc.c (build_t_desc): ditto.
8184 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
8186 Tue Oct 25 13:37:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8188 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
8189 after checking for integral conversions.
8191 Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
8193 * Version 2.6.3 released.
8195 Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8197 * typeck2.c (build_m_component_ref): Check the basetype of the
8198 member pointer against the main variant of the object type.
8200 Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8202 * cvt.c (convert_to_reference): Make sure that the original expr
8203 gets its type back when converting a reference.
8205 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
8206 (build_decl_overload): Instead of here.
8208 Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8210 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
8213 * typeck.c (convert_for_initialization): Handle initialization from
8216 Sun Nov 6 01:34:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8218 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
8219 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
8220 TYPE_READONLY and TYPE_VOLATILE from the argument.
8221 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
8222 present in parm from arg.
8223 (type_unification): Strip REFERENCE_TYPE from the argument type.
8224 (unify): Don't strip REFERENCE_TYPE from the argument type.
8226 Sat Nov 5 22:42:15 1994 Greg McGary <gkm@magilla.cichlid.com>
8228 * pt.c (do_type_instantiation): Check to see if there's a
8229 IDENTIFIER_TEMPLATE on a class before calling
8230 instantiate_member_templates().
8232 Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
8234 * Version 2.6.2 released.
8236 Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
8238 * Makefile.in (spew.o, lex.o, pt.o):
8239 Depend on $(srcdir)/parse.h, not parse.h.
8241 Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
8243 * Version 2.6.1 released.
8245 Sun Oct 23 13:19:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8247 * decl2.c: Declare flag_access_control.
8248 (struct lang_f_options): Add access-control.
8249 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
8250 for the call to expand_aggr_init to copy the object out of the
8251 pcc_struct_return slot.
8252 * search.c (compute_access): if (!flag_access_control) return
8255 Fri Oct 21 00:32:54 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8257 * lex.c (cons_up_default_function): Don't try to defer method
8260 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
8261 instead of abort, since the OSF/1 dynamic linker doesn't like to see
8262 relocation entries for abort.
8264 * tree.c (array_type_nelts_total): Use sizetype, not
8266 (array_type_nelts_top): Likewise.
8268 Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
8270 * decl.c (grokdeclarator): Added handling for catch parameters
8272 * except.c (expand_start_catch_block): Use the new CATCHPARM context
8274 * except.c (expand_throw): Don't let convert_to_reference complain
8275 about what we are doing.
8277 Thu Oct 20 12:55:24 1994 Jim Wilson <wilson@cygnus.com>
8279 * method.c (emit_thunk): Call instantiate_virtual_regs.
8281 Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
8283 * except.c (expand_exception_blocks): Make sure throw code doesn't
8284 get put in function that won't be output.
8286 Mon Oct 17 18:03:15 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8288 * decl.c (init_decl_processing): Make alloca a builtin.
8290 Thu Oct 27 21:10:25 1994 Craig Burley <craig@burley>
8292 * g++.c (main): Only decrement "added" and set "library" to
8293 NULL when "library" != NULL (just like 940829 fix).
8295 Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
8297 * except.c (expand_start_catch_block): Make sure the false label
8298 gets onto the permanent obstack, as it is used for the exception
8301 Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
8303 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
8304 be set just below, use current_fndecl instead.
8306 Fri Oct 14 15:12:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8308 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
8309 with LOOKUP_SPECULATIVELY.
8310 (expand_default_init): Abort if build_method_call returns NULL_TREE.
8312 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
8313 the rhs is a TARGET_EXPR.
8315 * parse.y (left_curly): Anonymous types are not affected by #pragma
8316 interface/implementation.
8318 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
8319 default constructor if it isn't needed.
8321 * lex.c (cons_up_default_function): Do synthesize methods for
8322 anonymous types if necessary.
8324 Thu Oct 13 17:44:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8326 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
8328 Wed Oct 12 13:27:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8330 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
8332 * init.c (expand_default_init): Likewise. Also remove some of the
8333 crufty code that assumes methods will not be synthesized properly.
8335 * lex.c (cons_up_default_function): If the containing type has no
8336 name, these functions should never need to be called, so just
8339 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
8340 bitmask for lexing character constants.
8342 * call.c (build_method_call): Disable code that tries to do tricky
8343 stuff with a default parameter that is a constructor call, but
8344 actually does other tricky stuff that breaks things.
8346 Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
8348 * decl.c (finish_enum): Disable code which forces enums to be signed,
8349 since this conflicts with their use as bitfields. type_promotes_to
8350 handles promotion of enums of underlying unsigned types to signed
8353 Wed Oct 12 13:24:03 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8355 * cvt.c (type_promotes_to): Also promote enums to long if
8358 * typeck.c (default_conversion): Don't expect type_promotes_to to
8359 return a main variant.
8361 Wed Oct 12 12:19:45 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8363 * call.c (build_scoped_method_call): Don't lose side effects in the
8364 object expression when calling a non-existent destructor.
8366 Fri Sep 2 19:05:21 1994 Rohan Lenard <rjl@iassf.easams.com.au>
8368 * call.c (build_scoped_method_call): Remove erroneous error message
8369 when destructor call is written as a scoped call.
8371 Tue Oct 11 23:48:31 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8373 * various: Cast pointer arguments to bzero and bcopy to char *.
8375 Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
8377 * class.c (get_derived_offset): Added a type parameter to limit how
8378 far up the CLASSTYPE_VFIELD_PARENT chain we search.
8379 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
8380 offset to put into the vtable for the this parameter, make sure we
8381 don't offset from a parent of the DECL_CONTEXT of the function.
8383 Tue Oct 11 16:10:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8385 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
8386 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
8387 (do_type_instantiation): Likewise.
8389 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
8390 DECL_EXTERNAL and TREE_STATIC as appropriate.
8392 * decl2.c (finish_file): Also synthesize methods that don't have
8393 DECL_EXTERNAL set. Set interface_unknown before doing so.
8395 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
8396 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
8398 Mon Oct 10 00:56:53 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8400 * lex.c (cons_up_default_function): Mark methods in a template class
8401 as template instances. Store the values of interface_unknown and
8402 interface_only for do_pending_inlines.
8403 (do_pending_inlines): Use them.
8405 * decl2.c (finish_file): If we haven't seen a definition of a
8406 function declared static, make the decl non-PUBLIC so compile_file
8409 Sun Oct 9 02:42:29 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8411 * method.c (do_build_copy_constructor): Handle anonymous unions.
8412 (do_build_assign_ref): Likewise.
8413 (largest_union_member): Move from lex.c.
8415 Sat Oct 8 14:59:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8417 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
8418 * pt.c (instantiate_member_templates): Lose redundant
8419 -fexternal-templates handling.
8420 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
8421 TREE_STATIC or DECL_INTERFACE_KNOWN.
8422 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
8423 of DECL_EXTERNAL for explicit instantiations.
8424 (do_function_instantiation): Do the new thing.
8425 (do_type_instantiation): Likewise.
8426 (instantiate_template): Deal with member templates defined in a .cc
8427 file with -fexternal-templates.
8428 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
8429 decide whether to stick builtin_throw here.
8430 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
8431 rather than TREE_PUBLIC. Generally fix rules.
8432 (finish_file): Use DECL_INITIAL to determine whether or not a method
8433 has been synthesized, rather than TREE_ASM_WRITTEN.
8434 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
8436 (pushdecl): Likewise.
8437 (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and
8438 DECL_INTERFACE_KNOWN.
8439 (redeclaration_error_message): Fix checking for conflicting linkage.
8440 (define_function): Set DECL_INTERFACE_KNOWN.
8441 (grokfndecl): Function decls are PUBLIC until we are sure about
8442 their linkage. Set DECL_DECLARED_STATIC as needed.
8443 (start_function): Deal with linkage. Move pushdecl after linkage
8445 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
8446 * cp-tree.h (lang_decl_flags): Add interface_known and
8448 (DECL_INTERFACE_KNOWN): New macro.
8449 (DECL_DECLARED_STATIC): New macro.
8450 (DECL_PUBLIC): New macro.
8452 Clean up bogus use of TREE_PUBLIC.
8453 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
8454 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
8455 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
8457 Wed Oct 5 13:44:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8459 * call.c (build_overload_call_real): Don't immediately do
8460 array->pointer conversion.
8462 * pt.c (type_unification): If not passing to a reference, strip
8463 cv-quals. Also handle array->pointer conversion.
8465 Tue Oct 4 17:45:37 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8467 * decl.c (grokdeclarator): Don't warn about applying const to a
8468 const typedef or template type parameter.
8470 * decl2.c (finish_file): Also synthesize methods after walking the
8471 vtables. Ugly ugly ugly.
8473 Mon Oct 3 15:02:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8475 * various: Remove lingering remnants of old exception handling code.
8477 * decl2.c (finish_file): Synthesize methods before walking the
8478 vtables, so that the vtables get emitted as needed.
8480 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
8481 dealing with exceptions.
8483 Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
8485 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
8487 Mon Oct 3 02:59:28 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8489 * decl2.c (finish_file): Fix inline handling.
8491 Sun Oct 2 00:21:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8493 * decl.c (grokdeclarator): Handle redundant scope even better.
8494 ({push,pop}_cp_function_context): Take toplev parameter.
8496 * method.c (synthesize_method): Pass toplev parameter to
8497 {push,pop}_cp_function_context depending on decl_function_context
8500 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
8503 * method.c (synthesize_method): Don't be confused by __in_chrg
8506 * class.c (popclass): Set C_C_D like start_function does.
8508 * decl.c (grokdeclarator): Handle redundant scope better.
8510 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
8511 (direct_notype_declarator): Likewise.
8512 (complex_direct_notype_declarator): Remove it here.
8514 Sat Oct 1 21:42:18 1994 Jason Merrill <jason@deneb.cygnus.com>
8516 * init.c (resolve_offset_ref): Fix types used in resolving .*
8519 Sat Oct 1 15:18:49 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8521 Beginnings of work to synthesize methods only when needed.
8522 * call.c (build_method_call): Synthesize methods as necessary
8523 (currently never necessary).
8524 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
8525 on the wrong obstack.
8526 * decl.c (push_cp_function_context): Mostly copied from
8527 push_c_function_context.
8528 (pop_cp_function_context): Similarly.
8529 (finish_function): Reverse order of poplevel and pop_nested_class so
8530 that current_class_decl is restored properly.
8531 (start_function): Likewise.
8532 (finish_function): Add parameter 'nested'. Don't call
8533 permanent_allocation if (nested).
8534 * various: Pass extra parameter to finish_function.
8535 * decl2.c (finish_file): Reorganize end-of-file inline handling,
8536 synthesizing methods as necessary.
8537 * lex.c (cons_up_default_function): Call mark_inline_for_output.
8538 Only synthesize methods immediately if #pragma implementation
8539 (currently disabled).
8540 (do_pending_inlines): Call synthesize_method.
8541 * method.c (synthesize_method): New function; all method synthesis
8542 goes through here. Calls do_build_assign_ref and
8543 do_build_copy_constructor.
8544 (build_default_constructor): Remove.
8545 (build_dtor): Likewise.
8546 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
8547 done by synthesize_method.
8548 (build_copy_constructor): Similarly.
8550 Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
8552 * typeck.c (c_expand_return): Use magic so the backend can fixup the
8553 assignment into the return register, so cleanups won't clobber it.
8555 Thu Sep 29 13:08:50 1994 Jason Merrill <jason@deneb.cygnus.com>
8557 * method.c (hack_identifier): Don't call assemble_external for
8560 * decl.c (finish_decl): Also end temporary allocation if the decl in
8561 question has a type of error_mark_node.
8563 Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
8565 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
8566 that if the ?: was a reference type, that the subparts will be also.
8568 Wed Sep 28 16:14:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8570 * except.c (register_exception_table): Use Pmode, not PTRmode.
8572 Fri Sep 23 13:54:27 1994 Jason Merrill <jason@deneb.cygnus.com>
8574 * lex.c (do_pending_inlines): Do method synthesis after the
8575 pending_inlines have been reversed.
8577 Thu Sep 22 12:53:03 1994 Per Bothner <bothner@kalessin.cygnus.com>
8579 * decl2.c (finish_file): Fix Brendan's fix: Only call
8580 register_exception_table if there is a non-empty exception table.
8582 Thu Sep 22 12:03:46 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8584 * decl2.c (finish_file): Only do register_exception_table if
8585 -fhandle-exceptions is being used.
8587 Wed Sep 21 19:01:51 1994 Per Bothner <bothner@kalessin.cygnus.com>
8589 * except.c (output_exception_table_entry): Simplify
8590 by using assemble_integer.
8591 (build_exception_table): Change to return a count.
8592 Cleanup to use standard macros, instead of hard-wired
8593 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
8594 (register_exception_table): New function. Generate call to builtin.
8595 * decl2.c (finish_file): Call register_exception_table.
8596 * cp-tree.h (build_exception_table): Fix prototype.
8598 Wed Sep 21 13:20:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8600 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
8602 * decl2.c (delete_sanity): Give an error at trying to delete a
8605 Wed Sep 21 11:47:10 1994 Jason Merrill <jason@deneb.cygnus.com>
8607 * lex.c (cons_up_default_function): Mark synthesized destructors
8610 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
8611 something other than __wchar_t, complaining if -pedantic and not in
8614 Tue Sep 20 09:43:28 1994 Jason Merrill <jason@deneb.cygnus.com>
8616 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
8619 * typeck.c (build_modify_expr): Require complete type after checking
8620 for error_mark_node.
8622 * call.c (build_method_call): Print parmtypes when complaining of
8625 * typeck.c (build_modify_expr): Handle assignment to array from
8628 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
8630 * call.c (build_method_call): Don't bother with the exact match.
8632 Mon Sep 19 00:51:39 1994 Jason Merrill <jason@deneb.cygnus.com>
8634 * init.c (expand_aggr_init): If we munge the type of the variable,
8635 also munge the type of the initializer.
8637 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
8638 (init_decl_processing): Push artificial declaration of wchar_t so
8639 people don't have to declare it before they can use it.
8641 * error.c (cp_line_of): return lineno in lieu of 0.
8643 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
8645 (build_component_ref): Fold the COMPONENT_REF in case it can be
8648 * typeck2.c (store_init_value): Don't pedwarn about non-constant
8649 bracketed initializers for automatic variables.
8651 Sun Sep 18 10:12:12 1994 Jason Merrill <jason@deneb.cygnus.com>
8653 * error.c (dump_decl): Don't say `typedef enum foo foo'.
8655 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
8656 because they're affected by #pragma i/i. We'll deal with that when
8657 they get instantiated.
8659 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
8661 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
8662 ADDR_EXPRs if appropriate.
8664 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
8666 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
8667 initializer properly.
8668 * typeck2.c (digest_init): Likewise.
8670 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
8671 it uses build_cplus_array_type.
8672 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
8674 * pt.c (do_type_instantiation): Don't try to instantiate nested
8677 Tue Sep 13 10:56:58 1994 Jason Merrill <jason@deneb.cygnus.com>
8679 * cvt.c (build_up_reference): Handle preincrement and predecrement
8682 Tue Sep 13 09:51:59 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8684 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
8687 Mon Sep 12 14:40:30 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8689 * decl.c (finish_decl): Lay out the rtl for DECL before doing
8690 grok_reference_init, in case it's static.
8692 Mon Sep 12 12:45:38 1994 Jason Merrill <jason@deneb.cygnus.com>
8694 * class.c (finish_struct): Don't synthesize constructors if the
8695 class has a field with the same name as the class. Don't die on
8696 classes with no constructors or destructors. Don't die if the head
8697 and tail of the class are in different files.
8699 * decl.c (grokdeclarator): Don't treat a function pointer field
8700 with the same name as the class as a constructor.
8702 Fri Sep 9 13:17:00 1994 Jason Merrill <jason@deneb.cygnus.com>
8704 * typeck.c (build_c_cast): Pull constant values out of their
8707 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
8708 FUNCTION_DECLs and TEMPLATE_DECLs.
8710 Thu Sep 8 10:07:48 1994 Jason Merrill <jason@deneb.cygnus.com>
8712 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
8715 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
8716 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
8717 TREE_PUBLIC unless -fexternal-templates.
8719 Wed Sep 7 13:17:10 1994 Jason Merrill <jason@deneb.cygnus.com>
8721 * pt.c (do_type_instantiation): Call instantiate_member_templates.
8722 Deal with specializations.
8723 (tsubst): Don't stick the mangled name in DECL_NAME for function
8724 instantiations. Don't push them, either.
8726 * decl2.c (grokfield): Move code for generating the
8727 DECL_ASSEMBLER_NAME for static members from here.
8728 * method.c (build_static_name): To here.
8729 * decl.c (grokvardecl): Call build_static_name.
8730 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
8732 Mon Sep 5 12:49:18 1994 Jason Merrill <jason@deneb.cygnus.com>
8734 * call.c (build_method_call): if -Wsynth, warn when selecting
8735 synthesized op= over user-supplied one cfront would select.
8736 * decl2.c (lang_decode_option): Handle -Wsynth.
8738 Fri Sep 2 15:11:59 1994 Jason Merrill <jason@deneb.cygnus.com>
8740 * decl.c (finish_enum): Overhaul to fix several bugs.
8741 (start_enum): Disable useless code.
8743 Thu Sep 1 16:04:54 1994 Jason Merrill <jason@deneb.cygnus.com>
8745 * typeck.c (c_expand_return): Warn about returning a reference to a
8747 (convert_arguments): Increment argument counter when using default
8750 Wed Aug 31 14:29:22 1994 Jason Merrill <jason@deneb.cygnus.com>
8752 * decl.c (finish_decl): If the type of decl is error_mark_node,
8753 don't bother trying to do anything.
8755 * typeck.c (convert_for_initialization): If the rhs contains a
8756 constructor call, pretend the lhs type needs to be constructed.
8758 * init.c (expand_default_init): If we stick the object inside the
8759 initializer, mark the initializer used.
8761 Tue Aug 30 13:50:18 1994 Jason Merrill <jason@deneb.cygnus.com>
8763 * method.c (build_assign_ref): return *this;
8764 (build_assign_ref): Fix base assignment order.
8765 (build_copy_constructor): Fix member init order.
8767 Mon Aug 29 13:54:39 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8769 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
8772 Sat Aug 27 09:36:03 1994 Jason Merrill <jason@deneb.cygnus.com>
8774 * method.c (build_copy_constructor): Also copy virtual bases.
8776 Fri Aug 26 17:05:15 1994 Jason Merrill <jason@deneb.cygnus.com>
8778 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
8779 any synthesis. Also first set deja_vu on all pending_inlines.
8781 * method.c (build_assign_ref): Use build_member_call to invoke base
8782 operator=, rather than build_modify_expr. And use
8783 build_reference_type instead of TYPE_REFERENCE_TO.
8784 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
8787 * decl2.c (grokfield): Don't complain about undefined local class
8790 * class.c (finish_struct): Don't try to synthesize methods here.
8791 * lex.c (do_pending_inlines): Instead, synthesize them here.
8792 (init_lex): Initialize synth_obstack.
8793 (cons_up_default_function): Stick synthesis request on
8796 Fri Aug 26 12:24:14 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8798 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
8799 accept an RTL_EXPR in what we're about to use for the instance,
8800 since anything which would end up with pcc_struct_return set
8801 inside cplus_expand_expr.
8803 * cp-tree.h (cons_up_default_function): Note change of prototype.
8805 Thu Aug 25 23:05:30 1994 Gerald Baumgartner <gb@cs.purdue.edu>
8807 * class.c (finish_struct): Undid change from Aug 21 testing
8808 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
8809 * parse.y (left_curly): Likewise, undid change from Aug 21.
8810 * decl.c (xref_tag): Undid change from Aug 21, set
8811 CLASSTYPE_INTERFACE correctly, and added comments.
8813 Thu Aug 25 00:36:31 1994 Jason Merrill <jason@deneb.cygnus.com>
8815 Rework approach to synthesized methods; don't go through the parser
8817 * class.c (finish_struct): Use new synthesis approach.
8818 * lex.c (cons_up_default_function): Now just creates declaration,
8820 (largest_union_member): #if 0 out.
8821 (default_assign_ref_body): Likewise.
8822 (default_copy_constructor_body): Likewise.
8823 * method.c (build_default_constructor): New function to synthesize X().
8824 (build_copy_constructor): Synthesize X(X&).
8825 (build_assign_ref): Synthesize X::operator=(X&).
8826 (build_dtor): Synthesize ~X().
8828 * error.c (cp_line_of): If we're dealing with an artificial
8829 TYPE_DECL, look at the type instead.
8831 Wed Aug 24 11:11:50 1994 Jason Merrill <jason@deneb.cygnus.com>
8833 * init.c (sort_member_init): Check warn_reorder.
8834 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
8836 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
8837 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
8838 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
8840 Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
8842 * error.c (dump_decl): Improve wording, so that error messages
8843 dont't read template<, class foo>...
8845 Mon Aug 22 15:30:51 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8847 * parse.y (label_colon): Also match a TYPENAME as a label name,
8848 since they may have declared a class by that name but have also
8849 tried to have a local label under the same name.
8851 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
8852 for the message so they know at what point it was instantiated.
8854 Sun Aug 21 23:07:35 1994 Gerald Baumgartner <gb@cs.purdue.edu>
8856 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
8857 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
8858 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
8859 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
8860 * parse.y (left_curly): New final resting place for setting
8861 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
8863 * class.c (finish_struct): Don't test for function/field name
8864 conflicts in signatures, since all the fields are compiler-constructed.
8866 Fri Aug 19 14:04:47 1994 Kung Hsu <kung@mexican.cygnus.com>
8868 * method.c (build_overload_nested_name): in qualified name
8869 mangling, the template with value instantiation will have numeric
8870 at end and may mixed with the name length of next nested level.
8871 Add a '_' in between.
8872 * method.c (build_overload_name): ditto.
8873 * method.c (build_overload_identifier): ditto.
8875 Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
8877 * error.c (dump_decl): Handle NULL args.
8879 Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
8881 * g++.c: Rework last change so it's done like collect.c (and
8884 Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
8886 * g++.c: Include <sys/errno.h> in case `errno' is a macro
8887 as permitted by ANSI C.
8889 Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
8891 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
8892 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
8893 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
8894 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
8895 * parse.y (left_curly): New final resting place for setting
8896 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
8898 Thu Aug 11 11:32:42 1994 H.J. Lu <hjl@nynexst.com>
8900 * g++.c (main): Only decrement "added" and set "library" to
8901 NULL when "library" != NULL.
8903 Sat Aug 13 00:14:52 1994 Jason Merrill <jason@deneb.cygnus.com>
8905 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
8906 just because its class has a known interface.
8907 (decls_match): Deal with new format of template parms.
8909 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
8912 Fri Aug 12 01:55:15 1994 Jason Merrill <jason@deneb.cygnus.com>
8914 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
8915 (xref_defn_tag): Likewise.
8916 (pushdecl): Only allow artificial typedefs to be shadowed.
8918 * init.c (emit_base_init): Pass the right binfos to
8921 * class.c (delete_duplicate_fields_1): Make it work right.
8922 (finish_struct): Catch function/field name conflict.
8924 * decl2.c (check_classfn): Pass the function to cp_error, not just
8927 * init.c (sort_member_init): Warn when order of member initializers
8928 does not match order of member declarations.
8929 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
8931 * error.c (dump_expr): Handle lists of functions.
8933 * decl.c (start_function): #pragma interface only affects functions
8934 that would otherwise be static.
8935 (finish_decl): Don't warn about an unused variable if it has both
8936 constructor and destructor, since the 'resource allocation is
8937 initialization' idiom is relatively common.
8939 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
8940 (comp_target_parms): Likewise.
8941 (compparms): Never consider default parms.
8942 (common_base_type): Don't choose a virtual baseclass if there is a
8943 more derived class in common.
8944 (build_conditional_expr): If pedantic, pedwarn about conversion to
8945 common base in conditional expr.
8947 * class.c (instantiate_type): Handle template instantiation better.
8949 * typeck.c (convert_arguments): Don't try to get tricky and convert
8950 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
8951 user-defined conversions.
8953 * lex.c (check_for_missing_semicolon): Also give error at end of
8956 * call.c (build_method_call): Don't promote arrays to pointers here.
8958 * typeck.c (convert_arguments): Don't require the actual parameter
8959 to be of a complete type if the formal parameter is a reference.
8961 Thu Aug 11 15:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
8963 * decl.c (grokdeclarator): Soften 'static' on member function error
8966 * init.c (build_new): Don't automatically save rval.
8967 (build_offset_ref): Do field lookup with proper basetype_path.
8969 Thu Aug 11 12:46:54 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
8971 * errfn.c (cp_silent): Declare to mark when we should avoid
8972 emitting warnings and errors.
8973 (cp_error): Check it.
8974 (cp_warning): Likewise.
8975 (cp_pedwarn): Likewise.
8976 (cp_compiler_error): Likewise.
8977 (cp_error_at): Likewise.
8978 (cp_warning_at): Likewise.
8979 (cp_pedwarn_at): Likewise.
8980 * call.c (compute_conversion_costs): Set CP_SILENT when we start
8981 out, and make sure we turn it off before we leave.
8983 Thu Aug 11 00:02:54 1994 Jason Merrill <jason@deneb.cygnus.com>
8985 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
8986 argument is obviously an array.
8988 Wed Aug 10 15:32:04 1994 Jason Merrill <jason@deneb.cygnus.com>
8990 * typeck.c (c_expand_start_case): Do cleanups here.
8992 * parse.y (xcond): Do bool conversion here, too.
8993 (simple_stmt, SWITCH case): Don't do cleanups here.
8995 * decl.c (duplicate_decls): Don't treat builtins that have been
8996 explicitly declared specially.
8998 Tue Aug 9 01:16:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9000 * tree.c (make_deep_copy): Support copying pointer, reference,
9001 function, array, offset and method types.
9003 * decl.c (init_decl_processing): Mark exit and abort as
9004 BUILT_IN_NONANSI so that duplicate_decls is kinder about
9006 (duplicate_decls): Don't give two errors for redeclaring a C
9007 function with the same parms but a different return type.
9009 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
9010 (condition): Instead of here.
9011 (simple_stmt, SWITCH case): Also do cleanup here.
9013 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
9015 * call.c (build_method_call): Don't throw away the side effects of
9016 the object in a call to a non-existent constructor.
9017 * parse.y (primary): Likewise.
9019 * method.c (build_decl_overload): Oop.
9021 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
9022 warn about uselessness of specifying -fansi-overloading.
9024 * method.c (build_decl_overload): Treat any non-member new with one
9025 parameter as __builtin_new.
9027 * decl.c (init_decl_processing): Setup built-in meanings of exit,
9030 Mon Aug 8 15:03:30 1994 Jason Merrill <jason@deneb.cygnus.com>
9032 * error.c (dump_readonly_or_volatile): Put a space between const and
9033 volatile if both apply.
9035 * init.c (perform_member_init): Clean up after this initialization.
9036 (emit_base_init): Clean up after each base init, not after all have
9038 (expand_aggr_vbase_init_1): Clean up after this init.
9040 Sun Aug 7 14:55:05 1994 Jason Merrill <jason@deneb.cygnus.com>
9042 * call.c (build_method_call): Deal with destroying references.
9044 * parse.y (condition): Do bool_truthvalue_conversion here.
9045 (paren_expr_or_null): And here.
9046 (simple_if): Not here.
9047 (simple_stmt): Or here.
9049 Sat Aug 6 22:29:45 1994 Jason Merrill <jason@deneb.cygnus.com>
9051 * parse.y (paren_expr_or_null): Wrap the expression in a
9053 (condition): Likewise.
9055 Sat Aug 6 19:46:37 1994 Rohan Lenard <rjl@easams.com.au>
9057 * call.c (build_scoped_method_call): Fix error message when
9058 destructor call refers to a nonexistent type.
9060 Sat Apr 16 22:43:30 1993 Gerald Baumgartner <gb@cs.purdue.edu>
9062 * lex.h (rid): Deleted RID_RAISES, it's never used.
9063 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
9064 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
9065 they don't need to be touched in `grokdeclarator.'
9066 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
9068 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
9069 RID_MAX as loop limit for finding declaration specifiers.
9071 Sat Apr 3 21:59:07 1993 Gerald Baumgartner <gb@cs.purdue.edu>
9073 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
9074 access `yytname,' which is static in parse.c.
9076 Fri Apr 2 23:36:57 1993 Gerald Baumgarnter <gb@cs.purdue.edu>
9078 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
9079 was `GNU_xref_def' instead of `GNU_xref_ref.'
9081 Fri Aug 5 14:20:16 1994 Jason Merrill <jason@deneb.cygnus.com>
9083 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
9084 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
9085 (do_type_instantiation): Likewise.
9087 * decl2.c (import_export_inline): Decides at EOF what an inline's
9089 (finish_file): Call it.
9091 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
9092 and DECL_EXTERNAL from do_*_instantiation. Only set
9093 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
9094 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
9095 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
9097 Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
9099 * class.c (get_class_offset_1, get_class_offset): New routine to
9100 find the offset of the class where a virtual function is defined,
9101 from the complete type.
9102 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
9103 get_class_offset instead of virtual_offset as get_class_offset will
9104 always provide the right answer.
9105 * tree.c (virtual_offset): Remove. It only ever worked some of the
9108 Tue Aug 2 12:44:21 1994 Jason Merrill <jason@deneb.cygnus.com>
9110 * call.c (build_method_call): Put back unary_complex_lvalue call
9111 that I thought was redundant.
9113 * typeck.c (c_expand_return): Fix a case I missed before.
9115 Sun Jul 31 17:54:02 1994 Jason Merrill <jason@deneb.cygnus.com>
9117 * pt.c (unify): Strip cv-quals from template type arguments (when
9118 'const T*' is matched to 'const char*', that does not mean that T is
9121 Fri Jul 29 01:03:06 1994 Jason Merrill <jason@deneb.cygnus.com>
9123 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
9124 typedefs. Third time's the charm?
9126 * parse.y (template_parm): Support default template parms.
9127 * pt.c (process_template_parm): Likewise.
9128 (end_template_parm_list): Likewise.
9129 (coerce_template_parms): Likewise.
9130 (mangle_class_name_for_template): Likewise.
9131 (push_template_decls): Likewise.
9133 * method.c (build_overload_identifier): Likewise.
9134 * error.c (dump_decl): Likewise.
9136 Wed Jul 27 17:47:00 1994 Jason Merrill <jason@deneb.cygnus.com>
9138 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
9140 Tue Jul 26 13:22:40 1994 Jason Merrill <jason@deneb.cygnus.com>
9142 * search.c (note_debug_info_needed): Also emit debugging information
9143 for the types of fields.
9145 Mon Jul 25 00:34:44 1994 Jason Merrill <jason@deneb.cygnus.com>
9147 * pt.c (lookup_template_class): Pass 'template' to
9148 coerce_template_parms instead of 'in_decl', since it's a more
9151 * typeck.c (c_expand_return): Make sure any cleanups for the return
9153 (build_c_cast): Use CONVERT_EXPR for conversion to void.
9155 * pt.c (do_type_instantiation): Also instantiate nested types.
9157 * typeck.c (convert_for_assignment): Don't die when comparing
9158 pointers with different levels of indirection.
9160 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
9161 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
9164 * decl2.c (finish_anon_union): Don't die if the union has no
9167 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
9168 so that 'typedef int foo, bar;' will work.
9170 * decl2.c (finish_file): Don't call expand_aggr_init for
9173 Mon Jul 25 00:03:10 1994 Teemu Torma <tot@trema.fi>
9175 * decl.c (finish_function): We can't inline constructors and
9176 destructors under some conditions with -fpic, but don't unset
9179 Mon Jul 25 00:03:10 1994 Jason Merrill <jason@deneb.cygnus.com>
9181 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
9183 Sun Jul 24 14:19:31 1994 Jason Merrill <jason@deneb.cygnus.com>
9185 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
9187 (finish_struct_methods): Use copy_assignment_arg_p.
9189 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
9192 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
9193 don't know how to compare the operands.
9195 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
9196 as a declarator-id in their program. Like the Linux headers do.
9199 * tree.c (lvalue_p): Treat calls to functions returning objects by
9200 value as lvalues again.
9202 * typeck.c (build_component_addr): Use convert_force to convert the
9203 pointer in case the component type is also a private base class.
9205 * search.c (get_matching_virtual): Fix bogus warning of overloaded
9208 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
9209 TYPE_DECL to fix bogus shadowing warnings.
9211 Fri Jul 22 01:15:32 1994 Jason Merrill <jason@deneb.cygnus.com>
9213 * init.c (expand_aggr_init_1): const and volatile mismatches do not
9214 prevent a TARGET_EXPR from initializing an object directly.
9216 Tue Jul 19 17:55:37 1994 Jason Merrill <jason@deneb.cygnus.com>
9218 * cvt.c (build_up_reference): Allow building up references to
9219 `this', don't warn about making references to artificial variables
9222 * tree.c (lvalue_p): `this' is not an lvalue.
9224 * call.c (build_method_call): Accept using a typedef name (or
9225 template type parameter) for explicit destructor calls.
9227 Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
9229 * Version 2.6.0 released.
9231 Wed Jul 13 03:57:54 1994 Jason Merrill <jason@deneb.cygnus.com>
9233 * method.c (hack_identifier): Put back old code so lists of
9234 non-functions will be handled properly.
9236 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
9237 defined in the language-independent tree.h.
9239 * tree.c (count_functions): Avoid bogus warning when compiling this
9242 Mon Jul 11 18:37:20 1994 Jason Merrill <jason@deneb.cygnus.com>
9244 * decl.c (grok_reference_init): Always save the initializer of a
9247 Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
9249 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
9250 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
9253 Fri Jul 8 12:59:38 1994 Jason Merrill <jason@deneb.cygnus.com>
9255 * method.c (hack_identifier): Fix for new overloading.
9257 * typeck.c (build_binary_op_nodefault): Don't mess with division by
9260 Fri Jul 8 13:20:28 1994 Gerald Baumgartner <gb@cs.purdue.edu>
9262 * decl2.c (finish_file): Only call walk_sigtables, if
9263 flag_handle_signatures is turned on, don't waste time otherwise.
9265 Fri Jul 8 02:27:41 1994 Jason Merrill <jason@deneb.cygnus.com>
9267 * decl.c (push_overloaded_decl): Don't create overloads of one when
9268 shadowing a class type.
9269 * typeck.c (build_x_function_call): Complain about overloads of one.
9271 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
9272 (grokdeclarator): Fix setting of TREE_STATIC.
9273 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
9275 Thu Jul 7 22:20:46 1994 Gerald Baumgartner <gb@andros.cygnus.com>
9277 * cp-tree.h (walk_sigtables): Created extern declaration.
9278 * decl2.c (walk_sigtables): Created function, patterned after
9279 walk_vtables, even though we only need it to write out sigtables.
9280 (finish_sigtable_vardecl): Created function.
9281 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
9282 (finish_file): Call walk_sigtables.
9284 * sig.c (build_signature_table_constructor): Mark class member
9285 function pointed to from signature table entry as addressable.
9287 Thu Jul 7 13:39:37 1994 Jason Merrill <jason@deneb.cygnus.com>
9289 * decl.c (start_decl): Check new decl of static member variable
9290 against the declaration in the class here.
9291 (grokvardecl): Instead of here.
9293 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
9295 (build_vtable): Likewise.
9297 * decl2.c (import_export_vtable): Move logic for deciding the
9298 interface of a template class from here.
9299 (import_export_template): To here.
9300 (finish_vtable_vardecl): Call import_export_template before
9301 import_export_vtable.
9303 Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
9305 * except.c (init_exception_processing): Setup interim_eh_hook to
9306 call lang_interim_eh.
9307 * except.c (do_unwind): Propagate throw object value across
9309 * except.c (saved_throw_value): Used to hold the value of the object
9310 being thrown. It is always a reference to the real value.
9311 * except.c (expand_start_catch_block): Add handling for the
9312 value of the exception object.
9313 * except.c (expand_start_catch_block): Add handler for the handler,
9314 so that throws inside the handler go to the outer block.
9315 * except.c (expand_end_catch_block): Likewise.
9316 * parse.y (handler_args): Use parm instead, as the other doesn't yet
9317 handle references correctly.
9319 Wed Jul 6 17:55:32 1994 Per Bothner <bothner@kalessin.cygnus.com>
9321 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
9322 vtable entry properly to abort.
9324 Tue Jul 5 14:07:54 1994 Jason Merrill <jason@deneb.cygnus.com>
9326 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
9329 * call.c (build_overload_call_real): Handle fnname being a list of
9331 * typeck.c (build_x_function_call): Pass list of functions to
9332 build_overload_call, not just the name.
9333 * tree.c (count_functions): Complain when called for invalid
9336 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
9337 and DECL_EXTERNAL on static members and initialized const members.
9338 * decl2.c (grokfield): Reflect this change.
9340 Fri Jul 1 09:35:51 1994 Jason Merrill <jason@deneb.cygnus.com>
9342 * parse.y (init): ANSI C++ does not forbid { }.
9344 Thu Jun 30 00:35:22 1994 Jason Merrill <jason@deneb.cygnus.com>
9346 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
9347 warn_nonvdtor defaults to off.
9349 * class.c (instantiate_type): Use comptypes rather than relying on
9350 types to satisfy ==.
9352 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
9355 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
9357 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
9359 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
9362 Wed Jun 29 22:31:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9364 * decl2.c (finish_file): Maybe consider static inlines multiple
9365 times, in case they reference each other.
9367 Tue Jun 28 11:58:38 1994 Gerald Baumgartner <gb@cs.purdue.edu>
9369 * class.c (finish_struct): Don't `cons_up_default_function's
9371 (finish_struct): Handle an empty method_vec correctly.
9373 * decl.c (grokdeclarator): Don't warn about a signature being
9374 empty in a signature pointer declaration if we only saw a
9375 forward declaration of the signature. Changed `warning's into
9378 * sig.c (build_sigtable): Don't die if a null signature table
9379 constructor is returned.
9380 (build_signature_pointer_constructor): If the signature table
9381 constructor is null, the _sptr field is set to a null pointer
9382 and cast to the appropriate type. Make copies of all null
9383 pointers so that the type null_pointer_node doesn't get changed.
9384 (build_signature_table_constructor): Added comments.
9386 * sig.c (build_signature_pointer_constructor): Complain if we
9387 try to assign to/initialize a signature pointer/reference of
9388 an undefined signature.
9390 Mon Jun 27 14:05:16 1994 Gerald Baumgartner <gb@cs.purdue.edu>
9392 * typeck2.c (store_init_value): Don't be pedantic about
9393 non-constant initializers of signature tables/pointers/references.
9395 Fri Jun 24 16:49:41 1994 Gerald Baumgartner <gb@cs.purdue.edu>
9397 * decl.c (grokdeclarator): If we are grokking an opaque typedef
9398 in a signature, don't complain about it begin static.
9400 Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
9402 Fixes a problem of the this pointer being wrong in virtual calls to
9403 methods that are not overridden in more derived classes.
9405 * class.c (fixup_vtable_delta): New routine. It will fixup the
9406 delta entries in vtables, wheever they need updating.
9407 * class.c (finish_struct): Call the new routine for all virtual
9408 bases, as they can have different offsets, than those used in base
9409 classes that we derive our vtable from.
9411 Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
9413 * typeck.c (build_binary_op): Use the types before default
9414 conversions in the error message.
9416 * *.c: Use c_build_type_variant instead of build_type_variant where
9417 the type might be an array.
9419 * call.c (build_method_call): Call build_type_variant and
9420 build_reference_type in the right order.
9421 * decl.c (record_builtin_type): Likewise.
9423 Wed Jun 29 16:58:53 1994 Jason Merrill <jason@deneb.cygnus.com>
9425 * call.c (build_method_call): Call build_type_variant and
9426 build_reference_type in the right order.
9427 * decl.c (record_builtin_type): Likewise.
9429 Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
9431 * typeck.c (build_binary_op): Use the types before default
9432 conversions in the error message.
9434 * *.c: Use c_build_type_variant instead of build_type_variant where
9435 the type might be an array.
9437 Sat Jun 25 11:50:54 1994 Jason Merrill <jason@deneb.cygnus.com>
9439 * cvt.c (convert_to_reference): Try UDC's before doing the
9440 reinterpret_cast thang, though.
9442 Fri Jun 24 01:24:01 1994 Jason Merrill <jason@deneb.cygnus.com>
9444 * typeck.c (c_expand_return): Don't USE the return value location
9445 after we've expanded the jump.
9447 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
9448 trying to write out an inline.
9450 * cvt.c (build_up_reference): Also do address adjustment when the
9451 target type uses MI.
9452 (convert_to_reference): Try UDCs only after built-in conversions.
9453 (build_type_conversion_1): Don't play games with the argument to the
9455 (build_type_conversion): #if 0 out code for binding to reference.
9457 Thu Jun 23 00:22:28 1994 Jason Merrill <jason@deneb.cygnus.com>
9459 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
9460 whether to emit inlines.
9462 * decl.c (grokdeclarator): Set explicit_int for decls that just
9463 specify, say, 'long'.
9465 * init.c (do_friend): Do overload C functions (or call pushdecl,
9468 Wed Jun 22 13:40:49 1994 Jason Merrill <jason@deneb.cygnus.com>
9470 * cvt.c (build_up_reference): Don't call readonly_error.
9471 (convert_to_reference): Propagate const and volatile from expr to
9474 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
9476 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
9477 creating a temporary.
9478 (convert_to_reference): Lose excessive and incorrect trickiness.
9479 (cp_convert): Call build_cplus_new with with_cleanup_p set.
9481 * typeck2.c (build_functional_cast): Likewise.
9483 Tue Jun 21 17:38:38 1994 Jason Merrill <jason@deneb.cygnus.com>
9485 * decl.c (grokdeclarator): signed, unsigned, long and short all
9488 * decl.c (grokdeclarator): Allow "this is a type" syntax.
9489 (grok_reference_init): Simplify and fix.
9491 Sun Jun 19 17:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
9493 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
9496 Sat Jun 18 04:16:50 1994 Jason Merrill <jason@deneb.cygnus.com>
9498 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
9499 tinkering to after call to pushdecl.
9501 Fri Jun 17 14:48:28 1994 Jason Merrill <jason@deneb.cygnus.com>
9503 * call.c (build_method_call): Handle destructors for non-aggregate
9506 Thu Jun 16 16:48:05 1994 Jason Merrill <jason@deneb.cygnus.com>
9508 * call.c (build_method_call): Make sure that the name given for the
9509 destructor matches the constructor_name of the instance.
9511 * pt.c (do_function_instantiation): A non-extern instantiation
9512 overrides a later extern one.
9513 (do_type_instantiation): Likewise.
9515 Wed Jun 15 19:34:54 1994 Jason Merrill <jason@deneb.cygnus.com>
9517 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
9518 unqualified array type.
9520 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
9521 CONSTRUCTOR with no elements.
9523 * decl.c (various): Lose empty_init_node.
9524 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
9525 thing depending on the value of DECL_COMMON instead of
9526 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
9527 don't have constructors, don't treat a real empty CONSTRUCTOR
9530 * typeck2.c (process_init_constructor): Don't treat empty_init_node
9533 Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
9535 * class.c (override_one_vtable): Don't forget to merge in an old
9536 overrider when we wanted to reuse a vtable, but couldn't.
9538 Wed Jun 15 15:03:16 1994 Jason Merrill <jason@deneb.cygnus.com>
9540 * decl.c (start_decl): Put statics in common again.
9542 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
9543 setting the type to error_mark_node.
9545 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
9546 bitfield assignments.
9548 Tue Jun 14 12:23:38 1994 Jason Merrill <jason@deneb.cygnus.com>
9550 * decl.c (grok_op_properties): Const objects can be passed by value.
9552 Mon Jun 13 03:10:59 1994 Jason Merrill <jason@deneb.cygnus.com>
9554 * decl2.c (import_export_vtable): Force implicit instantiations to
9555 be interface_only when -fno-implicit-templates.
9557 * decl.c (duplicate_decls): Redeclaring a class template name is an
9560 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
9561 * xref.c (GNU_xref_decl): Support templates.
9563 Sat Jun 11 17:09:05 1994 Jason Merrill <jason@deneb.cygnus.com>
9565 * decl.c (grok_op_properties): Split out checking for whether this
9566 function should suppress the default assignment operator.
9567 * decl2.c (grok_function_init): Likewise.
9568 (copy_assignment_arg_p): New function do do just that.
9569 Now considers virtual assignment operators that take a base as an
9570 argument to count as copy assignment operators.
9572 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
9573 TREE_ASM_WRITTEN, as they are redundant.
9575 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
9576 decl that has no LANG_SPECIFIC part.
9577 (do_type_instantiation): Force the debugging information for this
9580 * decl.c (start_decl): Clear up uses of various types of templates
9581 (say sorry for static data members, rather than "invalid template").
9582 (expand_static_init): Fix initialization of static data members of
9585 Fri Jun 10 00:41:19 1994 Jason Merrill <jason@deneb.cygnus.com>
9587 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
9589 * g++.c (main): Use -xc++-cpp-output for .i files.
9591 * pt.c (tsubst): Give meaningful error about declaring template for
9592 a copy constructor which was not declared in the class template.
9593 (do_type_instantiation): Explicit instantiation before the class
9594 template is an error.
9595 (instantiate_template): Don't die if tsubst returns error_mark_node.
9597 Thu Jun 9 19:04:59 1994 Jason Merrill <jason@deneb.cygnus.com>
9599 Don't synthesize the copy assignment operator if the one in a base
9600 class is pure virtual.
9601 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
9602 whether the type has a pure virtual copy assignment operator.
9603 * class.c (finish_base_struct): Don't generate the copy assignment
9604 operator if a base class has a pure virtual one.
9605 * decl.c (grok_op_properties): Add disabled code to set
9606 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
9608 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
9610 * decl2.c (import_export_vtable): Always treat template
9611 instantiations as if write_virtuals >= 2, and treat implicit
9612 instantiations as external if -fno-implicit-templates.
9613 (finish_file): Output all pending inlines if
9614 flag_keep_inline_functions.
9616 Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
9618 * tree.c (layout_vbasetypes): Align virtual base classes inside
9619 complete objects, so that we don't core dump on machines such as
9620 SPARCs when we access members that require larger than normal
9621 alignments, such as a double. Also, we bump up the total alignment
9622 on the complete type, as necessary.
9624 Wed Jun 8 16:18:14 1994 Jason Merrill <jason@deneb.cygnus.com>
9626 * gxxint.texi (Free Store): New section with code for examining
9628 (Limitations of g++): Remove operator delete entry, since it is no
9629 longer accurate. Fix access control entry.
9631 * typeck.c (build_unary_op): Pedwarn about taking the address of or
9632 incrementing a cast to non-reference type.
9633 (build_modify_expr): Use convert instead of convert_force again.
9635 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
9636 class type, not == RECORD_TYPE.
9638 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
9640 * typeck2.c (report_case_error): #if 0 out.
9641 * lex.c (real_yylex): Lose RANGE.
9642 * parse.y: Likewise.
9644 Tue Jun 7 18:17:35 1994 Jason Merrill <jason@deneb.cygnus.com>
9646 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
9648 Mon Jun 6 19:39:57 1994 Jason Merrill <jason@deneb.cygnus.com>
9650 * typeck.c (build_c_cast): Don't shortcut conversions to the same
9651 type. Don't replace consts with their values here, since that's now
9654 * cvt.c (cp_convert): When converting to bool, take
9655 integer_zero_node to false_node and all other INTEGER_CSTs to
9657 (build_type_conversion): Don't complain about multiple conversions
9658 to float if we're not really converting.
9660 Fri Jun 3 02:10:56 1994 Jason Merrill <jason@deneb.cygnus.com>
9662 Implement 'extern template class A<int>;' syntax for suppressing
9663 specific implicit instantiations.
9664 * cp-tree.h: Update prototypes for do_*_instantiation.
9665 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
9667 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
9669 (do_type_instantiation): Likewise.
9670 * parse.y (explicit_instantiation): Support 'extern template class
9672 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
9673 and DECL_EXTERNAL on explicit instantiations.
9675 * cvt.c (cp_convert): Replace constants with their values before
9677 (cp_convert): Consistently use 'e' instead of 'expr'.
9679 Thu Jun 2 03:53:30 1994 Jason Merrill <jason@deneb.cygnus.com>
9681 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
9683 Wed Jun 1 18:57:35 1994 Jason Merrill <jason@deneb.cygnus.com>
9685 * typeck2.c (digest_init): Handle initializing a pmf with an
9687 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
9689 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
9690 (xref_defn_tag): Likewise.
9691 * pt.c (process_template_parm): Likewise.
9692 (lookup_template_class): Likewise.
9693 (push_template_decls): Likewise.
9694 (instantiate_class_template): Likewise.
9695 (create_nested_upt): Likewise.
9696 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
9699 * typeck.c (convert_arguments): Make sure type is not NULL before
9700 checking its TREE_CODE.
9702 Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
9704 * class.c (get_derived_offset): New routine.
9705 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
9706 BINFO_VIRTUALS when we choose a new base class to inherit from.
9707 * class.c (modify_one_vtable): Use get_derived_offset to get the
9708 offset to the most base class subobject that we derived this binfo
9710 * class.c (finish_struct): Move code to calculate the
9711 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
9712 new calls to get_derived_offset in modify_one_vtable.
9714 Wed Jun 1 16:50:59 1994 Jason Merrill <jason@deneb.cygnus.com>
9716 * init.c (build_member_call): Use build_pointer_type instead of
9719 Wed Jun 1 11:11:15 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
9721 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
9722 try to use it in an error.
9724 Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
9726 * typeck.c (convert_arguments, convert_for_initialization): Don't
9727 strip NOP_EXPRs, when we are converting to a reference.
9729 Wed Jun 1 01:11:38 1994 Jason Merrill <jason@deneb.cygnus.com>
9731 * typeck.c (build_modify_expr): Don't dereference references when
9734 * decl2.c (grokfield): Don't check for grokdeclarator returning
9735 error_mark_node any more.
9737 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
9738 (start_method): Return void_type_node instead of error_mark_node.
9740 * typeck.c (build_modify_expr): Resolve offset refs earlier.
9742 Tue May 31 16:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
9744 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
9746 * typeck.c (build_modify_expr): Dereference references before trying
9749 * call.c (build_method_call): Don't confuse type conversion
9750 operators with constructors.
9751 * typeck2.c (build_functional_cast): Just call build_c_cast if there
9752 was only one parameter.
9753 * method.c (build_typename_overload): Don't set
9754 IDENTIFIER_GLOBAL_VALUE on these identifiers.
9755 * decl.c (grok_op_properties): Warn about defining a type conversion
9756 operator that converts to a base class (or reference to it).
9757 * cvt.c (cp_convert): Don't try to use a type conversion operator
9758 when converting to a base class.
9759 (build_type_conversion_1): Don't call constructor_name_full on an
9761 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
9763 * decl.c (start_decl): Don't complain that error_mark_node is an
9765 (finish_decl): Check for type == error_mark_node.
9767 Mon May 30 23:38:55 1994 Jason Merrill <jason@deneb.cygnus.com>
9769 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
9770 instantiations and inline members.
9772 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
9774 * lex.h: Declare looking_for_template.
9776 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
9777 between type and template interpretations of an identifier.
9779 Sat May 28 04:07:40 1994 Jason Merrill <jason@deneb.cygnus.com>
9781 * pt.c (instantiate_template): Zero out p if we found a
9784 * decl.c (grokdeclarator): Elucidate warning.
9785 (grokdeclarator): If pedantic AND -ansi, complain about long long.
9787 Make explicit instantiation work reasonably. It is now appropriate
9788 to deprecate the use of -fexternal-templates.
9789 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
9790 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
9791 (end_template_instantiation): Reflect changes in USE_TEMPLATE
9793 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
9794 (do_function_instantiation): Don't set EXPLICIT_INST if
9795 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
9796 appropriately otherwise.
9797 (do_type_instantiation): Set interface info for class. Set
9798 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
9799 flag_external_templates is set.
9800 * parse.y: Reflect changes in USE_TEMPLATE semantics.
9801 * decl2.c: New flag flag_implicit_templates determines whether or
9802 not implicit instantiations get emitted. This flag currently
9803 defaults to true, and must be true for -fexternal-templates to work.
9804 (finish_file): Consider flag_implement_inlines when
9805 setting DECL_EXTERNAL. Consider flag_implicit_templates when
9806 deciding whether or not to emit a static copy.
9807 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
9808 properly for template instantiations.
9809 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
9811 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
9812 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
9813 (various others): Accessor macros for the above.
9815 Fri May 27 13:57:40 1994 Jason Merrill <jason@deneb.cygnus.com>
9817 * typeck.c (build_binary_op_nodefault): Division by constant zero is
9820 Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
9822 * class.c (override_one_vtable): Don't modify things we don't own.
9824 Fri May 27 01:42:58 1994 Jason Merrill <jason@deneb.cygnus.com>
9826 * decl.c (finish_decl): Don't postpone processing the initializer of
9827 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
9828 PUBLIC const at toplevel.
9829 (grokdeclarator): pedwarn about initializing non-const or
9830 non-integral statics in the class body.
9832 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
9835 * call.c (convert_harshness): Dereference reference on rhs before
9836 proceeding, properly grok passing const things to non-const
9839 * typeck.c (build_unary_op): Soften error about taking the address
9840 of main() to a pedwarn.
9842 * lex.c (default_copy_constructor_body): Unambiguously specify base
9843 classes (i.e. A((const class ::A&)_ctor_arg) ).
9844 (default_assign_ref_body): Likewise.
9846 Thu May 26 13:13:55 1994 Gerald Baumgartner <gb@mexican.cygnus.com>
9848 * decl2.c (grokfield): Don't complain about local signature
9849 method declaration without definition.
9851 * call.c (convert_harshness): If `type' is a signature pointer
9852 and `parmtype' is a pointer to a signature, just return 0. We
9853 don't really convert in this case; it's a result of making the
9854 `this' parameter of a signature method a signature pointer.
9856 * call.c (build_method_call): Distinguish calling the default copy
9857 constructor of a signature pointer/reference from a signature
9858 member function call.
9860 Thu May 26 12:56:25 1994 Jason Merrill <jason@deneb.cygnus.com>
9862 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
9865 * decl.c (duplicate_decls): A previous function declaration as
9866 static overrides a subsequent non-static definition.
9867 (grokdeclarator): Don't set TREE_PUBLIC on inline method
9870 Wed May 25 14:36:38 1994 Jason Merrill <jason@deneb.cygnus.com>
9872 * decl.c (grokdeclarator): Handle initialization of static const
9874 (finish_decl): Likewise.
9876 * decl2.c (grokfield): Allow initialization of static const members
9879 * decl2.c (grokfield): Deal with grokdeclarator returning
9882 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
9883 (grokfndecl): Check the return value of grok_ctor_properties.
9884 (start_method): Likewise.
9886 * parse.y (absdcl): Expand type_quals inline.
9888 Tue May 24 19:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
9890 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
9893 Tue May 24 18:09:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
9895 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
9896 always use "__vt_%s".
9897 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
9898 when looking for a "sentinal" method (to decide on emitting vtables).
9899 * decl2.c (finish_file): Scan all decls for thunks that need
9901 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
9902 * method.c (make_thunk): Use a more meaningful label. If there
9903 exists a matching top-level THUNK_DECL re-use it; otherwise
9904 create a new THUNK_DECL (and declare it).
9905 * method.c (emit_thunk): Make thunk external/public depending
9906 on the underlying method.
9908 Tue May 24 00:22:04 1994 Jason Merrill <jason@deneb.cygnus.com>
9910 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
9913 * call.c (build_overload_call_real): Don't immediately pick a
9914 function which matches perfectly.
9916 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
9917 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
9918 reference (like 'int &const j').
9920 * typeck.c (convert_arguments): Don't mess with i for methods.
9921 * call.c (build_method_call): Pass the function decl to
9924 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
9925 checking for which multi-level pointer conversions are allowed.
9926 (comp_target_types): Call it.
9927 (convert_for_assignment): Check const parity on the ultimate target
9928 type, too. And make those warnings pedwarns.
9930 Mon May 23 14:11:24 1994 Jason Merrill <jason@deneb.cygnus.com>
9932 * error.c (dump_char): Use TARGET_* for character constants.
9934 Mon May 23 13:03:03 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
9936 * tree.c (debug_no_list_hash): Make static.
9938 * decl.c (decls_match): Say the types don't match if newdecl ends up
9939 with a null type, after we've checked if olddecl does.
9940 (pushdecl): Check if the decls themselves match before looking for
9941 an extern redeclared as static, to avoid inappropriate and incorrect
9944 Fri May 20 14:04:34 1994 Jason Merrill <jason@deneb.cygnus.com>
9946 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
9949 * typeck.c (build_c_cast): Casting to function or method type is an
9952 * class.c (finish_struct): Make warning for anonymous class with no
9953 instances a pedwarn.
9955 * Makefile.in (stamp-parse): Expect a s/r conflict.
9957 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
9960 Thu May 19 12:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
9962 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
9963 than unsigned on platforms where sizeof(char)==sizeof(int).
9965 Wed May 18 14:27:06 1994 Jason Merrill <jason@deneb.cygnus.com>
9967 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
9969 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
9970 and treat them as lvalues.
9972 * decl.c (shadow_tag): Do complain about forward declarations of
9973 enums and empty declarations.
9974 * parse.y: Don't complain about forward declarations of enums and
9977 * typeck.c (convert_for_assignment): Complain about changing
9978 the signedness of a pointer's target type.
9980 * parse.y (stmt): Move duplicated code for checking case values from
9982 * decl2.c (check_cp_case_value): To here. And add a call to
9983 constant_expression_warning.
9985 * typeck.c (convert_for_assignment): Don't complain about assigning
9986 a negative value to bool.
9988 * decl.c (init_decl_processing): Make bool unsigned.
9990 * class.c (finish_struct): Allow bool bitfields.
9992 Wed May 18 12:35:27 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
9994 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
9996 Wed May 18 03:28:35 1994 Jason Merrill <jason@deneb.cygnus.com>
9998 * cvt.c (build_type_conversion): Lose special handling of
10001 * search.c (dfs_pushdecls): Improve shadowing warning.
10003 Tue May 17 13:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
10005 * init.c (build_delete): Throw away const and volatile on `this'.
10007 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
10008 rather than the enumerators.
10009 (pushtag): s/cdecl/c_decl/g
10011 Mon May 16 23:04:01 1994 Stephen R. van den Berg <berg@pool.informatik.rwth-aachen.de>
10013 * cp/typeck.c (common_type): Attribute merging.
10014 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
10016 * cp/parse.y: Revamp attribute parsing.
10018 Mon May 16 01:40:34 1994 Jason Merrill <jason@deneb.cygnus.com>
10020 * decl.c (shadow_tag): Also check for inappropriate use of auto and
10023 * method.c (build_overload_name): Clarify that the illegal case is a
10024 pointer or reference to array of unknown bound.
10026 * error.c (dump_type_prefix): Print references to arrays properly.
10028 * typeck.c (various): Be more helpful in pointer
10029 comparison diagnostics.
10031 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
10034 * parse.y: Also catch an error after valid stmts.
10036 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
10039 * typeck.c (convert_for_initialization): If call to
10040 convert_to_reference generated a diagnostic, print out the parm
10041 number and function decl if any.
10043 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
10044 specifying a line, not atarg.
10046 * tree.c (build_cplus_method_type): Always make `this' const.
10048 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
10049 a constructor or destructor, make `this' non-const.
10051 * typeck.c (build_modify_expr): Don't warn specially about
10052 assignment to `this' here anymore, since it will be caught by the
10055 * various: Disallow specific GNU extensions (variable-size arrays,
10056 etc.) when flag_ansi is set, not necessarily when pedantic is set,
10057 so that people can compile with -pedantic-errors for tighter const
10058 checking and such without losing desirable extensions.
10060 * typeck2.c (build_functional_cast): Call build_method_call with
10062 (process_init_constructor): Only process FIELD_DECLs.
10064 * decl.c (finish_decl): Also force static consts with no explicit
10065 initializer that need constructing into the data segment.
10067 * init.c (build_delete): Undo last patch, as it interferes with
10068 automatic cleanups.
10070 Sat May 14 01:59:31 1994 Jason Merrill <jason@deneb.cygnus.com>
10072 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
10075 * init.c (build_delete): pedwarn about using plain delete to delete
10078 Fri May 13 16:45:07 1994 Jason Merrill <jason@deneb.cygnus.com>
10080 * typeck.c (comp_target_types): Be more helpful in contravariance
10081 warnings, and make them pedwarns.
10083 * decl.c (grokdeclarator): Use decl_context to decide whether or not
10084 this is an access declaration.
10086 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
10087 has a conversion to enum or bool, too.
10089 Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
10091 * method.c (emit_thunk): Make declaration for
10092 current_call_is_indirect local (needed for hppa).
10094 Fri May 13 16:16:37 1994 Jason Merrill <jason@deneb.cygnus.com>
10096 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
10097 (tsubst): Likewise.
10099 Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
10101 * pt.c (tsubst): If there is already a function for this expansion,
10103 * pt.c (instantiate_template): Likewise.
10105 Fri May 13 10:30:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
10107 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
10108 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
10109 generating debug info for unemitted symbols on some systems.
10111 * cp-tree.h (build_static_cast, build_reinterpret_cast,
10112 build_const_cast): Add declarations.
10114 Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
10116 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
10117 fix. We now try get_binfo, and if that doesn't find what we want,
10118 we go back to the old method, which still sometimes fails.
10120 Fri May 13 01:43:18 1994 Jason Merrill <jason@deneb.cygnus.com>
10122 * parse.y (initdcl): Call cplus_decl_attributes on the right
10124 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
10127 * typeck.c (build_binary_op_nodefault): Change result_type for
10128 comparison ops to bool.
10129 (build_binary_op): Convert args of && and || to bool.
10130 * cvt.c (build_default_binary_type_conversion): Convert args of &&
10132 (build_default_unary_type_conversion): Convert arg of ! to bool.
10133 (type_promotes_to): bool promotes to int.
10135 Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
10137 Implement the new builtin `bool' type.
10138 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
10140 (build_unary_op): Convert arg of ! to bool.
10141 * parse.y: Know true and false. Use bool_truthvalue_conversion.
10142 * method.c (build_overload_value): Know bool.
10143 (build_overload_name): Likewise.
10144 * lex.c (init_lex): Set up RID_BOOL.
10145 * gxx.gperf: Add bool, true, false.
10146 * error.c (*): Know bool.
10147 * decl.c (init_decl_processing): Set up bool, true, false.
10148 * cvt.c (cp_convert): Handle conversion to bool.
10149 (build_type_conversion): Likewise.
10150 * *.c: Accept bool where integers and enums are accepted (use
10151 INTEGRAL_CODE_P macro).
10153 Thu May 12 19:13:54 1994 Richard Earnshaw <rwe11@cl.cam.ac.uk>
10155 * g++.c: Use #ifdef for __MSDOS__, not #if.
10157 Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
10159 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
10160 gives old behavior , and destroys temporaries earlier. Default
10161 behavior now conforms to the ANSI working paper.
10163 Thu May 12 14:45:35 1994 Jason Merrill <jason@deneb.cygnus.com>
10165 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
10166 Use convert_force to convert the result of a recursive call when we
10167 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
10168 in COMPOUND_EXPRs any more.
10169 (various): Lose pedantic_lvalue_warning.
10170 (unary_complex_lvalue): Understand MODIFY_EXPR.
10172 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
10173 we don't know what we're initializing.
10175 Wed May 11 01:59:36 1994 Jason Merrill <jason@deneb.cygnus.com>
10177 * cvt.c (convert_to_reference): Modify to use convtype parameter.
10178 Only create temporaries when initializing a reference, not when
10180 (cp_convert): New main function.
10181 (convert): Call cp_convert.
10182 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
10183 * cp-tree.h (CONV_*): New constants used by conversion code for
10184 selecting conversions to perform.
10186 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
10188 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
10190 * parse.y: Add {static,reinterpret,const}_cast.
10191 * gxx.gperf: Likewise.
10193 * typeck.c (common_type): Allow methods with basetypes of different
10195 (comptypes): Deal with UPTs.
10196 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
10198 * pt.c (end_template_decl): Check for multiple definitions of member
10201 * call.c (build_method_call): Complain about calling an abstract
10202 virtual from a constructor.
10204 * typeck.c (pointer_int_sum): Check for the integer operand being 0
10205 after checking the validity of the pointer operand.
10207 * typeck2.c (digest_init): Pedwarn about string initializer being
10210 Tue May 10 12:10:28 1994 Jason Merrill <jason@deneb.cygnus.com>
10212 * decl.c (push_overloaded_decl): Only throw away a builtin if the
10213 decl in question is the artificial one.
10215 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
10216 expand_{start,end}_case cannot happen in the middle of a block.
10218 * cvt.c (build_type_conversion_1): Use convert again.
10220 Tue May 10 11:52:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
10222 * typeck2.c (digest_init): Make sure we check for signed and
10223 unsigned chars as well when warning about string initializers.
10225 * init.c (emit_base_init): Check if there's a DECL_NAME on the
10226 member before trying to do an initialization for it.
10228 Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
10230 * except.c: Don't do anything useful when cross compiling.
10232 Tue May 10 03:04:13 1994 Jason Merrill <jason@deneb.cygnus.com>
10234 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
10235 (push_overloaded_decl): Likewise.
10237 * cvt.c (convert): Don't look for void type conversion.
10239 Mon May 9 18:05:41 1994 Jason Merrill <jason@deneb.cygnus.com>
10241 * init.c (do_friend): Only do a pushdecl for friends, not
10242 pushdecl_top_level.
10244 Mon May 9 13:36:34 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
10246 * decl.c (lookup_name_current_level): Put empty statement after
10247 the label OUT to make the code valid C.
10249 Mon May 9 12:20:57 1994 Jason Merrill <jason@deneb.cygnus.com>
10251 * typeck.c (build_binary_op_nodefault): Only complain about
10252 comparing void * and a function pointer if void * is smaller.
10254 Sun May 8 01:29:13 1994 Jason Merrill <jason@deneb.cygnus.com>
10256 * decl.c (lookup_name_current_level): Move through temporary binding
10259 * parse.y (already_scoped_stmt): Revive.
10260 (simple_stmt): Use it again.
10262 * decl.c (poplevel): Always call poplevel recursively if we're
10263 dealing with a temporary binding level.
10265 Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
10267 * decl.c (finish_decl): Make sure we run cleanups for initial values
10268 of decls. Cures memory leak.
10269 * decl.c (expand_static_init): Likewise for static variables.
10270 * decl2.c (finish_file): Likewise for globals.
10272 Sat May 7 03:57:44 1994 Jason Merrill <jason@deneb.cygnus.com>
10274 * typeck.c (commonparms): Don't complain about redefining default
10277 * decl.c (duplicate_decls): Don't complain twice about conflicting
10279 (decls_match): Don't look at default args.
10280 (redeclaration_error_message): Complain about redefining default
10283 * call.c (build_overload_call_real): Also deal with guiding
10284 declarations coming BEFORE the template decl.
10286 * pt.c (unify): Allow different parms to have different
10288 (unify): Allow trivial conversions on non-template parms.
10290 Fri May 6 03:53:23 1994 Jason Merrill <jason@deneb.cygnus.com>
10292 * pt.c (tsubst): Support OFFSET_TYPEs.
10295 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
10297 * init.c (build_offset_ref): Fix error message.
10298 * search.c (lookup_field): Likewise.
10300 * call.c (build_scoped_method_call): Pass binfo to
10302 * typeck.c (build_object_ref): Likewise.
10304 * typeck2.c (binfo_or_else): Don't return a _TYPE.
10306 * class.c (finish_struct): Don't complain about re-use of inherited
10307 names or shadowing of type decls.
10308 * decl.c (pushdecl_class_level): Likewise.
10310 * decl.c (finish_enum): Set the type of all the enums.
10312 * class.c (finish_struct): Don't get confused by access decls.
10314 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
10315 _TYPE. You can stop using TYPE_NAME for that now.
10317 * parse.y: Lose doing_explicit (check $0 instead).
10318 * gxx.gperf: 'template' now has a RID.
10319 * lex.h (rid): Likewise.
10320 * lex.c (init_lex): Set up the RID for 'template'.
10322 * parse.y (type_specifier_seq): typed_typespecs or
10323 nonempty_type_quals. Use it.
10324 (handler_args): Fix bogus syntax.
10325 (raise_identifier{,s}, optional_identifier): Lose.
10326 * except.c (expand_start_catch_block): Use grokdeclarator to parse
10327 the catch variable.
10328 (init_exception_processing): The second argument to
10329 __throw_type_match is ptr_type_node.
10331 Fri May 6 07:18:54 1994 Chip Salzenberg <chip@fin.uucp>
10333 [ change propagated from c-decl.c of snapshot 940429 ]
10334 * cp/decl.c (finish_decl): Setting asmspec_tree should not
10335 zero out the old RTL.
10337 Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
10339 Add alpha exception handling support to the compiler.
10340 Quick and dirty backend in except.c.
10342 * cp/*: Remove most remnants of old exception handling support.
10343 * decl.c (finish_function): Call expand_exception_blocks to put
10344 the exception hanlding blocks at the end of the function.
10345 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
10346 comes after expand_decl_init.
10347 * except.c: Reimplementation.
10348 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
10349 * lex.c (init_lex): Always have catch, try and throw be reserved
10350 words, so that we may always parse exception handling.
10351 * parse.y: Cleanup to support new interface into exception handling.
10352 * tree.def (THROW_EXPR): Add.
10354 Thu May 5 17:35:37 1994 Jason Merrill <jason@deneb.cygnus.com>
10356 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
10357 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
10359 Thu May 5 16:17:27 1994 Kung Hsu <kung@mexican.cygnus.com>
10361 * parse.y (already_scoped_stmt): move expand_end_binding() to
10362 fix the unmatched LBB/LBE in stabs.
10364 Thu May 5 14:36:17 1994 Jason Merrill <jason@deneb.cygnus.com>
10366 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
10368 (pushdecl): Check TREE_MANGLED.
10369 (xref_tag): Likewise.
10370 * cp-tree.h (TREE_MANGLED): This identifier is a
10371 DECL_NESTED_TYPENAME (named to allow for future use to denote
10372 mangled function names as well).
10374 Implement inconsistency checking specified in [class.scope0].
10375 * decl.c (lookup_name_real): Don't set ICV here after all.
10376 (finish_enum): Also set the type of the enumerators themselves.
10377 (build_enumerator): Put the CONST_DECL in the list instead of its
10379 (pushdecl_class_level): Check inconsistent use of a name in the
10381 * class.c (finish_struct): Check inconsistent use of a name in the
10382 class body. Don't set DECL_CONTEXT on types here anymore.
10383 * parse.y (qualified_type_name): Note that the identifier has now
10384 been used (as a type) in the class body.
10385 * lex.c (do_identifier): Note that the identifier has now been used
10386 (as a constant) in the class body.
10387 * error.c (dump_decl): Print type and enum decls better.
10389 Thu May 5 09:35:35 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
10391 * typeck.c (build_modify_expr): Warn about assignment to `this'.
10393 Wed May 4 15:55:49 1994 Jason Merrill <jason@deneb.cygnus.com>
10395 * init.c (build_delete): Use the global operator delete when
10398 * decl.c (lookup_name_real): If we find the type we're looking in a
10399 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
10402 * class.c (finish_struct): Remove a couple of dependencies on
10405 * decl.c (pushtag): Classes do nest in extern "C" blocks.
10406 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
10408 (pushtag): Remove another dependency on the language linkage.
10410 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
10411 a const-qualified type.
10413 * decl.c (push_overloaded_decl): Throw away built-in decls here.
10414 (duplicate_decls): Instead of here.
10416 Wed May 4 15:27:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
10418 * typeck.c (get_member_function_from_ptrfunc): Do The Right
10419 Thing (I hope) if we're using thunks.
10421 Wed May 4 13:52:38 1994 Jason Merrill <jason@deneb.cygnus.com>
10423 * parse.y (specialization): aggr template_type_name ';'.
10424 (named_class_head_sans_basetype): Use it.
10425 (explicit_instantiation): Likewise.
10428 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
10429 rather than convert, to do conversions after the UDC.
10431 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
10432 instances of the class.
10434 * search.c (lookup_field): If the entity found by two routes is the
10435 same, it's not ambiguous.
10437 Wed May 4 12:10:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
10439 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
10440 to prevent the compiler from crashing ...
10442 Wed May 4 11:19:45 1994 Jason Merrill <jason@deneb.cygnus.com>
10444 * call.c (build_method_call): If we don't have an object, check
10445 basetype_path to figure out where to look up the function.
10447 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
10448 build_method_call in case exp is NULL_TREE.
10450 Tue May 3 16:02:53 1994 Per Bothner <bothner@kalessin.cygnus.com>
10452 Give a vtable entries a unique named type, for the sake of gdb.
10453 * class.c (build_vtable_entry): The addres of a thunk now has
10454 type vtable_entry_type, not ptr_type_node.
10455 * method.c (make_thunk): Fix type of THUNK_DECL.
10456 * class.c (add_virtual_function, override_one_vtable): Use
10457 vfunc_ptr_type_node, instead of ptr_type_node.
10458 * cp-tree.h (vfunc_ptr_type_node): New macro.
10459 * decl.c (init_decl_processing): Make vtable_entry_type
10460 be a unique type of pointer to a unique function type.
10462 Tue May 3 09:20:44 1994 Jason Merrill <jason@deneb.cygnus.com>
10464 * parse.y (do_explicit): Sets doing_explicit to 1.
10465 (explicit_instantiation): Use do_explicit rather than TEMPLATE
10466 directly, add "do_explicit error" rule.
10467 (datadef): Set doing_explicit to 0 after an explicit instantiation.
10468 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
10469 explicit instantiation.
10470 (named_class_head_sans_basetype): Remove aggr template_type_name
10473 Mon May 2 23:17:21 1994 Jason Merrill <jason@deneb.cygnus.com>
10475 * search.c (lookup_nested_tag): Lose.
10477 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
10478 (lookup_name_nonclass): Lose.
10480 * decl.c (poplevel_class): Add force parameter.
10481 (lookup_name_real): Fix handling of explicit scoping which specifies
10482 a class currently being defined. Add 'nonclass' argument.
10483 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
10485 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
10486 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
10487 called from finish_struct.
10489 Mon May 2 19:06:21 1994 Per Bothner <bothner@kalessin.cygnus.com>
10491 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
10492 (It seeems redundant, given build_ptrmemfunc_type.)
10493 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
10494 build_classof): Use vtable_entry_type instead of memptr_type.
10495 * method.c (emit_thunk): Call poplevel with functionbody==0
10496 to prevent DECL_INITIAL being set to a BLOCK.
10498 Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
10500 * parse.y (named_class_head_sans_basetype): Add "aggr
10501 template_type_name ';'" rule for forward declaration of
10504 Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
10506 * class.c (instantiate_type): Deal with pmf's.
10508 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
10509 stamp-objlist does.
10511 * Makefile.in (../cc1plus): Depend on OBJDEPS.
10512 (OBJDEPS): Dependency version of OBJS.
10514 Mon May 2 12:51:31 1994 Kung Hsu <kung@mexican.cygnus.com>
10516 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
10519 Fri Apr 29 12:29:56 1994 Jason Merrill <jason@deneb.cygnus.com>
10521 * class.c (finish_struct): Clear out memory of local tags. And
10524 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
10526 * search.c (get_matching_virtual): Be more helpful in error message.
10528 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
10530 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
10531 (default_copy_constructor_body): Likewise.
10533 * class.c (finish_struct): Don't gratuitously create multiple decls
10534 for nested classes.
10536 Thu Apr 28 23:39:38 1994 Jason Merrill <jason@deneb.cygnus.com>
10538 Avoid clobbering the arg types of other functions when reverting
10539 static member functions.
10540 * decl.c (revert_static_member_fn): Rearrange arguments, don't
10541 require values for 'fn' and 'argtypes', add warning to comment
10543 (decls_match): Rearrange arguments in call to rsmf.
10544 (grok_op_properties): Don't pass values for fn and argtypes.
10545 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
10547 Thu Apr 28 16:29:11 1994 Doug Evans <dje@canuck.cygnus.com>
10549 * Make-lang.in (cc1plus): Depend on stamp-objlist.
10550 * Makefile.in (BC_OBJS): Delete.
10551 (OBJS): Cat ../stamp-objlist to get language independent files.
10552 Include ../c-common.o.
10553 (../cc1plus): Delete reference to BC_OBJS.
10555 Thu Apr 28 02:12:08 1994 Jason Merrill <jason@deneb.cygnus.com>
10557 * search.c (compute_access): No really, deal with static members
10558 properly. Would I lie to you?
10560 Implement lexical hiding of function declarations.
10561 * pt.c (tsubst): Use lookup_name to look for function decls to guide
10563 * method.c (build_opfncall): Use lookup_name_nonclass to look for
10564 non-member functions.
10565 * init.c (do_friend): Use lookup_name_nonclass to look for
10567 * error.c (ident_fndecl): Use lookup_name to look for functions.
10568 * decl2.c (lookup_name_nonclass): New function, skips over
10570 * decl.c (struct binding_level): Lose overloads_shadowed field.
10571 (poplevel): Don't deal with overloads_shadowed.
10572 (push_overloaded_decl): Do lexical hiding for functions.
10573 * class.c (instantiate_type): Don't check non-members if we have
10574 members with the same name.
10575 * call.c (build_method_call): Use lookup_name_nonclass instead of
10576 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
10577 (build_overload_call_real): Likewise.
10579 * decl.c (duplicate_decls): Check for ambiguous overloads here.
10580 (push_overloaded_decl): Instead of here.
10582 * decl.c (pushdecl): Back out Chip's last change.
10584 * decl.c (grok_op_properties): operators cannot be static members.
10586 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
10587 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
10588 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
10590 * method.c (do_inline_function_hair): Don't put friends of local
10591 classes into global scope, either.
10593 * typeck2.c (build_functional_cast): Don't look for a function call
10596 Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
10598 * cp-tree.h: disable use of backend EH.
10600 Wed Apr 27 21:01:24 1994 Doug Evans <dje@canuck.cygnus.com>
10602 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
10603 * Makefile.in (INCLUDES): Move definition to same place as
10606 (OLDAR_FLAGS): Delete.
10610 (####site): Delete.
10611 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
10613 Wed Apr 27 19:10:04 1994 Kung Hsu <kung@mexican.cygnus.com>
10615 * decl.c (xref_tag): not to use strstr(), it's not available on
10618 Wed Apr 27 18:10:12 1994 Jason Merrill <jason@deneb.cygnus.com>
10620 * class.c (finish_struct): Resolve yet another class/pmf confusion.
10622 * call.c (build_overload_call_real): Don't take the single-function
10623 shortcut if we're dealing with an overloaded operator.
10625 Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
10627 * search.c (get_base_distance): Search the virtual base class
10628 binfos, incase someone wants to convert to a real virtual base
10630 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
10631 instead of convert_pointer_to, as it now will work.
10633 Wed Apr 27 15:36:49 1994 Jason Merrill <jason@deneb.cygnus.com>
10635 * cvt.c (convert_to_reference): Don't complain about casting away
10636 const and volatile.
10638 * typeck.c (build_unary_op): References are too lvalues.
10640 Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
10642 * class.c (override_one_vtable): We have to prepare_fresh_vtable
10643 before we modify it, not after, also, we cannot reuse an old vtable,
10644 once we commit to a new vtable. Implement ambiguous overrides in
10645 virtual bases as abstract. Hack until we make the class
10648 Wed Apr 27 01:17:08 1994 Jason Merrill <jason@deneb.cygnus.com>
10650 * parse.y (unary_expr): Expand new_placement[opt] and
10651 new_initializer[opt] inline.
10653 * search.c (lookup_fnfields): Don't throw away the inheritance
10654 information here, either.
10655 (compute_access): Handle static members properly.
10657 * init.c (build_member_call): Always set basetype_path, and pass it
10658 to lookup_fnfields.
10660 * search.c (lookup_field): Deal properly with the case where
10661 xbasetype is a chain of binfos; don't throw away the inheritance
10663 (compute_access): protected_ok always starts out at 0.
10665 * init.c (resolve_offset_ref): Don't cast `this' to the base type
10666 until we've got our basetype_path.
10668 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
10670 * cvt.c (build_up_reference): Use build_pointer_type rather than
10673 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
10676 * cvt.c (type_promotes_to): Retain const and volatile, add
10677 float->double promotion.
10679 * decl.c (grokdeclarator): Don't bash references to arrays into
10680 references to pointers in function parms. Use type_promotes_to.
10682 Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
10684 Finish off Apr 19th work.
10686 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
10687 might_have_abstract_virtuals.
10688 * class.c (strictly_overrides, override_one_vtable,
10689 merge_overrides): New routines to handle virtual base overrides.
10690 * class.c (finish_struct): Call merge_overrides to handle overrides
10693 Tue Apr 26 12:45:53 1994 Jason Merrill <jason@deneb.cygnus.com>
10695 * typeck.c (build_function_call): Call build_function_call_real with
10698 * *: Don't deal with TYPE_EXPRs.
10700 * tree.c (lvalue_p): If the type of the expression is a reference,
10703 * cvt.c (convert_to_reference): Complain about passing const
10704 lvalues to non-const references.
10705 (convert_from_reference): Don't arbitrarily throw away const and
10706 volatile on the target type.
10708 * parse.y: Simplify and fix rules for `new'.
10710 * decl.c (grok_op_properties): operator void is illegal.
10712 Mon Apr 25 02:36:28 1994 Jason Merrill <jason@deneb.cygnus.com>
10714 * parse.y (components): Anonymous bitfields can still have declspecs.
10716 * decl.c (pushdecl): Postpone handling of function templates like we
10719 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
10720 convert_pointer_to fails.
10722 * call.c (compute_conversion_costs_ansi): A user-defined conversion
10723 by itself is better than that UDC followed by standard conversions.
10724 Don't treat integers and reals specially.
10726 * cp-tree.h: Declare flag_ansi.
10728 * typeck.c (c_expand_return): pedwarn on return in void function
10729 even if the expression is of type void.
10730 (build_c_cast): Don't do as much checking for casts to void.
10731 (build_modify_expr): pedwarn about array assignment if this code
10732 wasn't generated by the compiler.
10734 * tree.c (lvalue_p): A comma expression is an lvalue if its second
10737 * typeck.c (default_conversion): Move code for promoting enums and
10739 * cvt.c (type_promotes_to): To here.
10740 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
10741 promotion semantics for reals.
10743 Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
10745 * Make-lang.in (c++.install-common): Check for g++-cross.
10746 * Makefile.in: Remove Cygnus cruft.
10747 (config.status): Delete.
10749 (TREE_H): Use complete pathname, some native makes have minimal
10751 (*.o): Use complete pathname to headers in parent dir.
10752 (doc, info, dvi): Delete.
10754 Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
10756 * Make-lang.in (c++.install-common): Check for g++-cross.
10757 * Makefile.in: Remove Cygnus cruft.
10758 (config.status): Delete.
10760 (TREE_H): Use complete pathname, some native makes have minimal
10762 (*.o): Use complete pathname to headers in parent dir.
10763 (doc, info, dvi): Delete.
10765 Sun Apr 24 00:47:49 1994 Jason Merrill <jason@deneb.cygnus.com>
10767 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
10768 with different return type.
10769 (decls_match): Compare return types strictly.
10771 Fri Apr 22 12:55:42 1994 Jason Merrill <jason@deneb.cygnus.com>
10773 * cvt.c (build_type_conversion): Do try to convert through other
10774 pointers. This will fail if the class defines multiple pointer
10777 * error.c (dump_type_prefix): Print out pointers to arrays properly.
10778 (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]')
10780 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
10783 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
10784 checking for shadowing a builtin. If we're redeclaring a builtin
10785 function, bash the old decl to avoid an ambiguous overload.
10787 * cvt.c (convert_to_reference): Don't force arrays to decay here.
10789 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
10791 * decl.c (duplicate_decls): Don't assume that the decls will have
10794 Mon Apr 18 11:35:32 1994 Chip Salzenberg <chip@fin.uucp>
10796 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
10797 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
10800 Fri Apr 22 06:38:56 1994 Chip Salzenberg <chip@fin.uucp>
10802 * cp/typeck2.c (signature_error): Use cp_error for "%T".
10804 Mon Apr 18 11:59:59 1994 Chip Salzenberg <chip@fin.uucp>
10806 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
10807 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
10808 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
10810 Mon Apr 18 11:55:18 1994 Chip Salzenberg <chip@fin.uucp>
10812 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
10813 * cp/decl.c (duplicate_decls): Put new type in same obstack as
10814 old ones, or permanent if old ones in different obstacks.
10816 Mon Apr 18 11:48:49 1994 Chip Salzenberg <chip@fin.uucp>
10818 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
10819 * cp/parse.y (attrib): Handle string args as expressions,
10820 merging the two rules. `mode' attribute now takes a string arg.
10821 Delete the rule for an identifier as arg.
10823 Mon Apr 18 11:24:00 1994 Chip Salzenberg <chip@fin.uucp>
10825 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
10826 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
10827 (pointer_diff): Likewise the division.
10829 Sun Mar 6 19:43:39 1994 Chip Salzenberg <chip@fin.uucp>
10831 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
10832 * cp/decl.c (finish_decl): Issue warning for large objects,
10835 Sat Feb 19 22:20:32 1994 Chip Salzenberg <chip@fin.uucp>
10837 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
10838 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
10839 * cp/decl.c (duplicate_decls): Merge section name into new decl.
10841 Tue Feb 8 09:49:17 1994 Chip Salzenberg <chip@fin.uucp>
10843 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
10844 * cp/typeck.c (signed_or_unsigned_type): Check for any
10845 INTEGRAL_TYPE_P not just INTEGER_TYPE.
10847 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
10849 * cp/decl.c (finish_enum): Start from 0 when determining precision
10852 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
10854 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
10857 Wed Nov 17 19:22:09 1993 Chip Salzenberg <chip@fin.uucp>
10859 * cp/typeck.c (build_binary_op_nodefault): Propagate code
10860 from C front-end to optimize unsigned short division.
10861 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
10863 Wed Nov 17 19:17:18 1993 Chip Salzenberg <chip@fin.uucp>
10865 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
10866 constant, prefer 'const char &' to 'int'.
10868 Wed Feb 3 13:11:48 1993 Chip Salzenberg <chip@fin.uucp>
10870 * cp/class.c (finish_struct_methods): Handle multiple
10871 constructors in fn_fields list.
10873 Fri Apr 22 12:48:10 1994 Kung Hsu <kung@mexican.cygnus.com>
10875 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
10876 types not to be dumped in stabs, like types in #pragma interface.
10877 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
10880 Fri Apr 22 03:27:26 1994 Doug Evans <dje@cygnus.com>
10882 * Language directory reorganization.
10883 See parent makefile.
10885 Thu Apr 21 18:27:57 1994 Per Bothner <bothner@kalessin.cygnus.com>
10887 * cp-tree.h (THUNK_DELTA): It is normally negative, so
10888 use signed .i variant of frame_size rather than unsigned .u.
10889 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
10890 use "VT" rather than "vt" due to binary incompatibility.
10891 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
10892 rather than sizeof, since it is now an expression.
10893 * class.c (modify_one_vtable): Modify to skip initial element
10894 containing a count of the vtable.
10896 Thu Apr 21 00:09:02 1994 Jason Merrill <jason@deneb.cygnus.com>
10898 * lex.c (check_newline): Force interface_unknown on main input file.
10900 * pt.c (do_pending_expansions): Always emit functions that have been
10901 explicitly instantiated.
10902 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
10903 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
10904 DECL_EXPLICITLY_INSTANTIATED on all my methods.
10905 * parse.y (explicit_instantiation): Call do_type_instantiation for
10907 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
10908 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
10909 that has been explicitly instantiated.
10910 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
10912 * class.c: Move import_export_vtable to decl2.c, and comment out all
10915 Wed Apr 20 16:51:06 1994 Jason Merrill <jason@deneb.cygnus.com>
10917 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
10918 (do_pending_inlines): Likewise.
10920 Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
10922 Reimplement vtable building, and most vtable pointer setting.
10923 Allows for earier maintenance, easier understandability, and most
10924 importantly, correct semantics.
10926 * class.c (build_vtable): Removed unneeded
10927 SET_BINFO_VTABLE_PATH_MARKED.
10928 * class.c (prepare_fresh_vtable): Likewise. Added argument.
10929 * class.c (modify_vtable_entry): General cleanup.
10930 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
10931 modify_vtable_entries): Removed.
10932 * class.c (add_virtual_function): General cleanup.
10933 * class.c (finish_base_struct): Setup BINFO_VTABLE and
10934 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
10936 * class.c (finish_vtbls): New routine, mostly from
10937 unmark_finished_struct.
10938 * class.c (overrides): New routine.
10939 * class.c (modify_one_vtable): New routine, mostly from
10940 modify_other_vtable_entries and modify_vtable_entries.
10941 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
10942 modify_all_vtables): New routines.
10943 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
10944 call. General cleanup on how pending_hard_virtuals are handled.
10945 General cleanup on modifying vtables. Use finish_vtbls, instead of
10946 unmark_finished_struct.
10947 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
10948 get_first_matching_virtual, get_matching_virtual,
10949 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
10950 * cvt.c (convert_pointer_to_real): cleanup error message.
10951 * decl.c (grokfndecl): General cleanup.
10952 * decl.c (finish_function): Change init_vtbl_ptrs call to
10953 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
10954 expand_indirect_vtbls_init.
10955 * init.c (expand_virtual_init): Remove unneeded argument.
10956 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
10957 two arguments to make more general. Made more general. Now can be
10958 used for vtable pointer initialization from virtual bases.
10959 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
10960 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
10961 expand_direct_vtbls_init.
10962 * init.c (expand_virtual_init): General cleanup.
10963 * init.c (expand_default_init): Change expand_vbase_vtables_init
10964 call to expand_indirect_vtbls_init.
10965 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
10966 call to expand_indirect_vtbls_init.
10967 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
10968 call to expand_indirect_vtbls_init.
10969 * search.c (get_first_matching_virtual): Rename to
10970 get_matching_virtual. General cleanup and remove setting of
10971 DECL_CONTEXT. That is now done in a cleaner way in
10972 modify_vtable_entry and add_virtual_function.
10973 * search.c (expand_vbase_vtables_init): Rename to
10974 expand_indirect_vtbls_init. General cleanup. Use
10975 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
10976 pointers from virtual bases are set up.
10977 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
10980 * *.[chy]: Remove support for VTABLE_USES_MASK.
10982 Tue Apr 19 12:51:59 1994 Jason Merrill <jason@deneb.cygnus.com>
10984 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
10985 reference and pointer types instead of bashing the types directly.
10987 * call.c (build_overload_call_real): Use the TREE_CODE to determine
10988 whether the function is overloaded or not, rather than
10990 * *: Remove all uses of TREE_OVERLOADED.
10992 * decl.c (grokdeclarator): Only complain about initializing const
10993 fields when -ansi or -pedantic.
10995 Tue Apr 19 12:42:42 1994 Doug Evans <dje@canuck.cygnus.com>
10997 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
10999 Mon Apr 18 00:17:13 1994 Jason Merrill <jason@deneb.cygnus.com>
11001 Do overloading on a block-by-block basis, not function-by-function.
11002 * decl.c: Lose overloads_to_forget.
11003 (struct binding_level): Add overloads_shadowed field.
11004 (poplevel): Restore overloads_shadowed.
11005 (push_overloaded_decl): Use overloads_shadowed instead of
11006 overloads_to_forget.
11007 (finish_function): Don't look at overloads_to_forget.
11009 Copy enum_overflow logic from c-decl.c.
11010 * decl.c (start_enum): Initialize enum_overflow.
11011 (build_enumerator): Use enum_overflow. Also use current_scope().
11013 * search.c (current_scope): Move Brendan's comment from
11014 build_enumerator here.
11016 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
11017 discarding const/volatile.
11019 Sat Apr 16 01:18:21 1994 Jason Merrill <jason@deneb.cygnus.com>
11021 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
11022 (comp_target_types): Likewise.
11024 * decl.c (lookup_name): Don't unset got_scope here.
11026 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
11027 got_scope != NULL_TREE.
11029 Fri Apr 15 16:36:33 1994 Jason Merrill <jason@deneb.cygnus.com>
11031 Horrible kludge to prevent templates from being instantiated by
11032 their base classes.
11033 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
11034 before we get to left_curly.
11035 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
11037 * error.c (dump_decl): If it's a typedef, print out the name of the
11038 decl, not just the underlying type.
11040 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
11041 update the IDENTIFIER_TYPE_VALUE of its name.
11043 * decl2.c (finish_file): When processing the initializer for a
11044 static member, pretend that the dummy function is a member of the
11047 Fri Apr 15 15:56:35 1994 Kung Hsu <kung@mexican.cygnus.com>
11049 * class.c (build_vtable_entry): revert Apr 4 change.
11050 * decl2.c (mark_vtable_entries): replace pure virtual function
11053 Fri Apr 15 13:49:33 1994 Jason Merrill <jason@deneb.cygnus.com>
11055 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
11056 mismatch, and don't pedwarn on 0/function pointer mismatch.
11058 * typeck2.c (digest_init): Lose code for special handling of unions.
11059 (process_init_constructor): Since they're handled just fine here.
11060 Pedwarn on excess elements.
11062 * decl2.c (grokfield): Complain about local class method declaration
11063 without definition.
11065 Fri Apr 15 13:19:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
11067 * method.c (emit_thunk): Add extern declaration for
11068 current_call_is_indirect (needed for hppa).
11070 Thu Apr 14 16:12:31 1994 Jason Merrill <jason@deneb.cygnus.com>
11072 Improve local class support; allow classes in different blocks to
11073 have the same name.
11074 * decl.c (pushtag): Support local classes better.
11075 (pushdecl_nonclass_level): New function for pushing mangled decls of
11076 nested types into the appropriate scope.
11077 (xref_defn_tag): Use pushdecl_nonclass_level instead of
11078 pushdecl_top_level.
11079 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
11081 * method.c (do_inline_function_hair): Likewise.
11083 * class.c (finish_struct): It is legal for a class with no
11084 constructors to have nonstatic const and reference members.
11086 Thu Apr 14 07:15:11 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
11088 * decl.c (push_overloaded_decl): Avoid giving errors about
11089 built-ins, since duplicate_decls will have given warnings/errors
11092 Thu Apr 14 03:45:12 1994 Jason Merrill <jason@deneb.cygnus.com>
11094 * cvt.c (convert_to_reference): Warn about casting pointer type to
11095 reference type when this is probably not what they wanted.
11097 Wed Apr 13 13:12:35 1994 Per Bothner <bothner@kalessin.cygnus.com>
11099 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
11100 static consts any more (toplev.c has now been modified to
11101 not emit warnings if they are unused).
11103 Wed Apr 13 00:22:35 1994 Jason Merrill <jason@deneb.cygnus.com>
11105 * decl.c (grok_op_properties): If op new/delete get here with
11106 METHOD_TYPEs, do a revert_static_member_fn.
11108 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
11109 * init.c (is_aggr_typedef): Don't look at
11110 IDENTIFIER_CLASS_TYPE_VALUE.
11111 (get_aggr_from_typedef): Likewise.
11112 (get_type_value): Likewise.
11113 * call.c (build_scoped_method_call): Don't rely on overloaded
11114 template names having IDENTIFIER_CLASS_VALUE set.
11116 * parse.y (component_decl_1, fn.def2): Revert rules for
11118 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
11121 * decl.c (start_function): Only warn about `void main()' if pedantic
11122 || warn_return_type.
11124 Tue Apr 12 02:14:17 1994 Jason Merrill <jason@deneb.cygnus.com>
11126 Clean up overloading of the template name.
11127 * class.c (pushclass): overload the template name whenever pushing
11128 into the scope of a template class, not just if it is
11130 (popclass): Correspondingly.
11131 * search.c (push_class_decls): Don't overload_template_name.
11132 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
11133 DECL_CONTEXT on things.
11134 * parse.y (left_curly): Don't overload_template_name.
11135 * class.c (finish_struct): Don't undo_template_name_overload.
11137 * method.c (build_opfncall): Only pass one argument to global op
11140 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
11141 decide how many arguments to use for vec delete.
11143 * decl.c (grok_op_properties): Be consistent in modifying
11144 current_class_type.
11145 (grokdeclarator): Only complain about function decls with no return
11146 type if we're being pedantic.
11148 Mon Apr 11 00:10:53 1994 Jason Merrill <jason@deneb.cygnus.com>
11150 Add support for operator new [] and operator delete [].
11152 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
11153 * ptree.c (print_lang_type): Indicate vec new/delete.
11154 * parse.y: Support vec new/delete.
11155 * method.c (build_decl_overload): Deal with vec new/delete.
11156 (build_opfncall): Likewise.
11157 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
11158 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
11159 * init.c (init_init_processing): Set up BIVN and BIVD.
11160 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
11161 since it doesn't happen any more.
11162 (build_new): Support vec new. Always call something.
11163 (build_x_delete): Support vec delete.
11164 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
11165 and pass it to build_x_delete.
11166 * decl2.c (delete_sanity): Don't change behavior by whether or not
11167 the type has a destructor. Pass use_global_delete to
11169 (coerce_delete_type): Make sure that the type returned has a first
11170 argument of ptr_type_node.
11171 * decl.c (init_decl_processing): Also declare the global vec
11173 (grokdeclarator): Also force vec new/delete to be static.
11174 (grok_op_properties): Note presence of vec new/delete, and play with
11175 their args. If vec delete takes the optional size_t argument, set
11176 TYPE_VEC_DELETE_TAKES_SIZE.
11177 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
11178 checking for one delete or the other.
11179 (lang_type): gets_new and gets_delete are now two bits long. The
11180 low bit is for the non-array version. Lose gets_placed_new.
11181 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
11182 delete defined by this class wants to know how much space it is
11184 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
11185 add a header containing the number of elements in the vector; i.e.
11186 when the elements need to be destroyed or vec delete wants to know
11188 * class.c (finish_struct_methods): Also check for overloading vec
11190 * call.c (build_method_call): Also delete second argument for vec
11193 * decl.c (grokdeclarator): Correct complaints again.
11194 (grokdeclarator): Fix segfault on null declarator.
11195 (decls_match): Also accept redeclaration with no arguments if both
11196 declarations were in C context. Bash TREE_TYPE (newdecl) here.
11197 (duplicate_decls): Instead of here.
11199 * parse.y (nested_name_specifier_1): Lose rules for dealing with
11200 syntax errors nicely, since they break parsing of 'const i;'.
11202 * decl.c (lookup_name): if (got_scope == current_class_type)
11203 val = IDENTIFIER_CLASS_VALUE (name).
11205 * search.c (lookup_nested_tag): Look in enclosing classes, too.
11207 * spew.c (yylex): Only look one character ahead when checking for a
11210 * lex.c (check_newline): Read first nonwhite char before
11211 incrementing lineno.
11213 * decl.c (grokdeclarator): Don't claim that typedefs are variables
11216 * parse.y: Divide up uses of unqualified_id into
11217 notype_unqualified_id and unqualified_id, so that TYPENAME can be
11218 used as an identifier after an object.
11220 * class.c (push_nested_class): Don't push into non-class scope.
11222 * decl.c (grokdeclarator): If an identifier could be a type
11223 conversion operator, but has no associated type, it's not a type
11224 conversion operator.
11226 * pt.c (unify): Check for equality of constants better.
11228 * decl.c (grokdeclarator): Don't complain about access decls.
11230 Sun Apr 10 02:39:55 1994 Jason Merrill <jason@deneb.cygnus.com>
11232 * decl.c (grokdeclarator): pedwarn about data definitions without
11235 * parse.y (datadef): Don't pedwarn about decls without types here,
11236 since that is valid for functions.
11237 (fn.def2, component_decl): Support constructors with declmods again.
11238 (nomods_initdecls): For decls without any mods, so that we don't try
11239 to get declspecs from some arbitrary $0.
11241 * search.c (lookup_field): Use cp_error.
11243 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
11244 here; it breaks destructors for non-aggr types.
11246 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
11247 a type being defined, like the comment says.
11248 If got_scope is not an aggregate, just return NULL_TREE.
11250 * pt.c (create_nested_upt): Kung's code for creating types nested
11251 within uninstantiated templates now lives here (it used to live in
11252 hack_more_ids). It needs to be expanded.
11254 * parse.y: Stop calling see_typename so much.
11256 * decl.c (lookup_name): Deal with TTPs and UPTs.
11258 * lex.c (real_yylex): Don't set looking_for_typename just because we
11260 (dont_see_typename): #if 0 out.
11262 * spew.c (yylex): Increment looking_for_typename if the next
11263 character is SCOPE, rather than setting it to 1; this way, the value
11264 from seeing an aggr specifier will not be lost. This kinda relies
11265 on looking_for_typename never being < 0, which is now true.
11267 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
11269 (named_class_head_sans_basetype): Accept template types, too. Oops.
11271 Fri Apr 8 16:39:35 1994 Jason Merrill <jason@deneb.cygnus.com>
11273 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
11275 * parse.y: Lose START_DECLARATOR.
11277 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
11280 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
11281 A::foo' syntax. Catch invalid scopes better.
11283 * parse.y, lex.c: lose TYPENAME_COLON.
11285 * decl2.c (groktypefield): #if 0 out.
11287 * decl.c (lookup_name): If the type denoted by got_scope is
11288 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
11290 * class.c (push_nested_class): Don't try to push into
11293 Fri Apr 8 07:26:36 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
11295 * Makefile.in (stamp-parse): Update count of conflicts to 33.
11297 Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
11299 A saner implementation of nested types that treats template types
11300 no differently from non-template types. There are still some
11301 shortcomings of our system; most notably, it is difficult to look
11302 for a nested type that is hidden by another name, because of the way
11303 we keep track of hidden types. But this shouldn't be a problem for
11304 just about anyone. Perhaps lookup_field should be fixed up a bit.
11306 * spew.c: Moved handling of nested types/scoping from the lexer
11307 into the parser. Removed variable template_type_seen_before_scope.
11308 Removed functions frob_identifier, hack_more_ids, and various cruft
11309 that was #if 0'd out in the past, reducing the size of the file from
11310 1146 lines to 450 lines. We can't quite do away with spew.c yet,
11311 though; we still need it for do_aggr () and checking for SCOPE after
11312 the current identifier. And setting lastiddecl.
11314 * parse.y: Moved handling of nested types/scoping from the lexer
11315 into the parser, using a new global variable `got_scope'. Reduced
11316 the number of states by 53. Implemented all uses of explicit global
11317 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
11318 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
11319 scoped_typename. Added nonterminals nested_type,
11320 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
11321 nested_name_specifier, global_scope, overqualified_id, type_name.
11322 Changed many others. Added 9 new reduce/reduce conflicts, which are
11323 nested type parallels of 9 that were already in the grammar for
11324 non-nested types. Eight of the now 33 conflicts should be removed
11325 in the process of resolving the late binding between variable and
11328 * gxxint.texi (Parser): Update.
11330 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
11332 * lex.h: Add decl for got_scope.
11334 * lex.c (see_typename): Claim to be the lexer when calling
11337 * decl.c (lookup_name): When called from the lexer, look at
11338 got_scope and looking_at_typename; otherwise don't.
11340 Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
11342 31th Cygnus<->FSF merge.
11344 Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
11346 * decl2.c (mark_vtable_entries): Call this to mark all the
11347 entries in the vtable addressable.
11348 (finish_decl_parsing): Handle SCOPE_REFs.
11350 * decl.c (decls_match): Always call compparms with strict == 1.
11351 Handle the special case of C function redecl here.
11352 (duplicate_decls): Only keep the old type if the new decl takes no
11355 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
11357 Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
11359 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
11362 Wed Apr 6 16:05:10 1994 Per Bothner <bothner@kalessin.cygnus.com>
11364 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
11365 ch-tree.h: Every place these functions were called, the result was
11366 immediately passed to expand_expr_stmt. Reduce redundancy by
11367 calling expand_expr_init *inside* these functions. These
11368 makes for a simpler interface, and we don't have to build
11369 compound expressions. Hence, rename these function to:
11370 expand_virtual_init and expand_vbase_vtables_init respectively.
11371 * init.c, decl.c: Change callers of these functions.
11372 * init.c, cp-tree.h (expand_virtual_init): Make static.
11374 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
11375 rather than DECL_SAVED_INSNS before emitting inlines.
11377 Wed Apr 6 13:06:39 1994 Jason Merrill <jason@deneb.cygnus.com>
11379 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
11381 * decl.c (duplicate_decls): If this is a new declaration of an
11382 extern "C" function, keep the type (for the argtypes).
11383 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
11384 (decls_match): Call compparms with a value of strict dependent on
11385 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
11387 * typeck.c (compparms): ... is only equivalent to non-promoting
11388 parms if we're not being strict.
11390 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
11392 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
11393 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
11395 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
11398 Tue Apr 5 17:48:41 1994 Per Bothner <bothner@kalessin.cygnus.com>
11400 Support for implementing vtables with thunks.
11401 * tree.def (THUNK_DECL): New TREE_CODE.
11402 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
11403 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
11404 * cp-tree.h (memptr_type): New variable.
11405 * class.c (build_vtable_entry): Build thunk if necessary.
11406 * class.c (build_vfn_ref): If using thunks, don't need
11407 to add delta field from vtable (there is none!).
11408 * decl.c: Add memptr_type as well as vtable_entry_type.
11409 If using thunks, the latter is just ptr_type_node.
11410 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
11411 * decl2.c (finish_vtable_vardecl): Handle thunks.
11412 * expr.c (cplus_expand_expr): Support THUNK_DECL.
11414 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
11415 * decl.c (start_function): Set current_extern_inline based on
11416 DECL_THIS_EXTERN, not TREE_PUBLIC.
11417 * decl.c (finish_function): Call mark_inline_for_output if needed,
11419 Improve intelligence about when to emit inlines.
11420 * cp-tree.h (lang_decl_flags): New field saved_inline.
11421 * cp-tree.h (DECL_SAVED_INLINE): New macro.
11422 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
11423 * decl.h, decl.c (pending_addressable_inlines): Removed.
11424 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
11425 * decl2.c (mark_inline_for_output): Do nothing if
11426 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
11427 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
11428 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
11429 * decl2.c (finish_file): Writing out inlines later, so we can
11430 also handle the ones needed for vtbales.
11431 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
11433 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
11434 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
11435 instead. (The rationale is that these optimizations both break binary
11436 compatibility, but should become the default in a future release.)
11438 Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
11440 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
11441 of a fndecl, as we might not be from that vfield.
11443 Tue Apr 5 17:43:35 1994 Kung Hsu <kung@mexican.cygnus.com>
11445 * class.c (add_virtual_function): fix bug for pure virtual, so
11446 that DECL_VINDEX of the dummy decl copied won't be error.
11447 (see also Apr 4 change)
11449 Tue Apr 5 17:23:45 1994 Per Bothner <bothner@kalessin.cygnus.com>
11451 * typeck.c (c_expand_return): Before checking that we're not
11452 returning the address of a local, make sure it's a VAR_DECL.
11453 (And don't worry about it being a TREE_LIST.)
11455 Tue Apr 5 13:26:42 1994 Jason Merrill <jason@deneb.cygnus.com>
11457 * parse.y (YYDEBUG): Always define.
11458 * lex.c (YYDEBUG): Likewise.
11460 Mon Apr 4 11:28:17 1994 Kung Hsu <kung@mexican.cygnus.com>
11462 * class.c (finish_struct): backup out the change below, put the
11463 new change for the same purpose. The change below breaks code.
11465 * class.c (finish_struct): if pure virtual, copy node and make
11466 RTL point to abort, then put in virtual table.
11467 * decl2.c (grok_function_iit): reinstate Mar 31 change.
11469 Sat Apr 2 03:12:58 1994 Jason Merrill <jason@deneb.cygnus.com>
11471 * init.c (build_new): pedwarn about newing const and volatile
11474 * tree.c (get_identifier_list): Only do the special handling
11475 thing if we're dealing with the main variant of the record type.
11477 * cvt.c (convert_to_reference): When converting between
11478 compatible reference types, use the pointer conversion machinery.
11479 Don't just blindly overwrite the old type.
11481 Fri Apr 1 17:14:42 1994 Jason Merrill <jason@deneb.cygnus.com>
11483 * call.c (build_method_call): When looking at global functions,
11484 be sure to use instance_ptr for the first argument, not some version
11485 of it that has been cast to a base class. Also do this before
11486 comparing candidates.
11488 Thu Mar 31 19:50:35 1994 Jason Merrill <jason@deneb.cygnus.com>
11490 * call.c (build_method_call): Constructors can be called for
11493 Thu Mar 31 16:20:16 1994 Kung Hsu <kung@mexican.cygnus.com>
11495 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
11496 fucntions. They can be defined somewhere else.
11498 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
11500 * decl.c (init_decl_processing): Declare __builtin_return_address
11501 and __builtin_frame_address for C++ as well.
11503 Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
11505 * typeck2.c (store_init_value): Integral constant variables are
11506 always constant, even when doing -fpic.
11508 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
11510 * decl.c (redeclaration_error_message): Pass the types to
11513 Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
11515 Cures incorrect errors about pure virtuals in a class, when they
11516 have been overridden in a derived class.
11518 * search.c (get_abstract_virtuals): Reimplement.
11519 * search.c (get_abstract_virtuals_1): New routine.
11521 Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
11523 * pt.c (push_template_decls): Make the pushed level pseudo
11526 * parse.y (extdefs): Don't pop everything if the current binding
11527 level is pseudo_global.
11529 * decl.c (pop_everything): Stop on reaching a pseudo-global
11532 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
11534 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
11535 the old decl actually had an initializer.
11537 * {various}: Clean up gcc -W complaints.
11539 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
11540 (DECL_CONTEXT (NODE) != NULL_TREE).
11542 * parse.y (lang_extdef): Call pop_everything if necessary.
11544 * decl.c (pop_everything): New function for popping binding
11545 levels left over after a syntax error.
11546 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
11547 a function is a member.
11549 Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
11551 Cures calling a more base base class function, when a more derived
11552 base class member should be called in some MI situations.
11554 * search.c (make_binfo): Use more the more specialized base
11555 binfos from the binfo given as the second argument to make_binfo,
11556 instead of the unspecialized ones from the TYPE_BINFO.
11557 * class.c (finish_base_struct): Likewise, update callers.
11558 * search.c (dfs_get_vbase_types): Likewise.
11559 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
11560 * decl.c (xref_tag): Use NULL_TREE instead of 0.
11561 * lex.c (make_lang_type): Likewise.
11563 Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
11565 * decl.c (pushdecl): If pushing a C-linkage function, only do a
11566 push_overloaded_decl.
11567 (duplicate_decls): Standard overloading does not shadow built-ins.
11569 Tue Mar 29 00:54:18 1994 Jason Merrill <jason@deneb.cygnus.com>
11571 * pt.c (end_template_decl): Don't call push_overloaded_decl.
11573 * init.c (do_friend): Don't call push_overloaded_decl.
11575 * decl.c (pushdecl): Call push_overloaded_decl for functions and
11576 function templates.
11577 (duplicate_decls): functions and function templates are not
11578 duplicates, but don't complain about calling this function to
11580 (push_overloaded_decl): Don't deal with linkage. Call
11582 (redeclaration_error_message): Deal with linkage.
11584 * decl.c (start_function): If push_overloaded_decl returns an
11585 older version of the function, deal with it.
11587 * decl.c (start_function): Be sure only to push_overloaded_decl
11590 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
11592 (start_function): Lose broken and redundant code for checking old
11595 * init.c (add_friend): Give line numbers of both friend decls
11596 when warning about re-friending.
11598 * pt.c (tsubst): Use comptypes rather than == to compare the
11599 types of the method as declared and as defined, since default
11600 parameters may be different.
11602 * call.c (build_method_call): Use brendan's candidate printing
11605 * decl.c (start_method): Methods defined in the class body are
11606 inline whether or not it's a template class.
11608 Mon Mar 28 16:39:26 1994 Jason Merrill <jason@deneb.cygnus.com>
11610 * parse.y (initdcl0): Add "extern" to current_declspecs if
11611 have_extern_spec && ! used_extern_spcec.
11613 * tree.c (really_overloaded_fn): A fn with more than one
11616 * pt.c (end_template_decl): Use really_overloaded_fn.
11618 * decl.c (duplicate_decls): When smashing a decl into a previous
11619 definition, keep the old file and line.
11620 Don't deal with overloaded functions.
11621 Lose old code for checking arg types of functions.
11622 Check for overloaded C functions.
11623 (pushdecl): Deal with overloaded functions.
11624 (start_decl): Expect pushdecl to return an appropriate function decl.
11625 (start_function): Likewise.
11626 (push_overloaded_decl): Don't check for overloaded C functions.
11628 * *.c: Stop using DECL_OVERLOADED, it being archaic.
11629 TREE_OVERLOADED should probably go, too.
11631 Mon Mar 28 14:00:45 1994 Ron Guilmette <rfg@netcom.com>
11633 * typeck.c (comp_target_types): Call comp_target_parms with
11636 Sun Mar 27 00:07:45 1994 Jason Merrill <jason@deneb.cygnus.com>
11638 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
11639 sections if we're compiling with -ansi or -pedantic.
11641 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
11643 * decl2.c (grokfield): Don't pedwarn twice about initializing
11646 * decl.c (push_overloaded_decl): Warn about shadowing
11648 (redeclaration_error_message): Don't allow 'int a; int a;'
11650 * cvt.c (build_up_reference): Only check for valid upcast if
11651 LOOKUP_PROTECT is set, not just any flag.
11653 Fri Mar 25 01:22:31 1994 Jason Merrill <jason@deneb.cygnus.com>
11655 * lex.c (check_newline): When we see a #pragma implementation,
11656 also set it for the main input file.
11658 * init.c (build_new): Convert array size argument to size_t.
11660 * parse.y (primary): If we're doing a parenthesized type-id, call
11661 groktypename before passing it to build_new.
11663 * call.c (build_method_call): Deal properly with const and
11664 volatile for instances of reference type.
11666 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
11667 (pedantic) pedwarn'.
11669 * decl.c (grokdeclarator): Don't complain about putting `static'
11670 and `inline' on template function decls.
11672 Thu Mar 24 23:18:19 1994 Jason Merrill <jason@deneb.cygnus.com>
11674 * call.c (build_method_call): Preserve const & volatile on
11677 Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
11679 * init.c (build_new, build_vec_delete): Use global new and delete
11681 * decl2.c (delete_sanity): Likewise.
11683 Thu Mar 24 02:10:46 1994 Jason Merrill <jason@deneb.cygnus.com>
11685 * cvt.c (convert_to_reference): If i is an lvalue,
11686 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
11687 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
11689 Wed Mar 23 17:45:37 1994 Jason Merrill <jason@deneb.cygnus.com>
11691 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
11692 and DECL_TEMPLATE_INSTANTIATIONS.
11694 * init.c (build_new): Handle array typedefs properly.
11696 Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
11698 30th Cygnus<->FSF merge.
11700 Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
11702 * class.c (modify_vtable_entries): Avoid running off the end of the
11703 virtuals list when processing a virtual destructor.
11704 * class.c (get_vtable_entry): Likewise.
11706 Wed Mar 23 00:23:59 1994 Jason Merrill <jason@deneb.cygnus.com>
11708 * decl.c (duplicate_decls): If two template decls don't match,
11711 Tue Mar 22 23:49:41 1994 Jason Merrill <jason@deneb.cygnus.com>
11713 * typeck.c (convert_for_assignment): Don't pedwarn about
11714 converting function pointer to void *.
11716 Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
11718 Major revamp of pointer to member functions. Cures major
11719 nonfunctionality when used in casts, and MI situations.
11721 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
11722 * typeck.c (convert_for_assignment): Likewise.
11723 * typeck2.c (digest_init): Likewise.
11724 * typeck2.c (process_init_constructor): Simplify by moving code into
11726 * typeck2.c (digest_init): Do default_conversions on init value, if
11727 we are processing pointer to member functions.
11728 * class.c (get_vfield_offset): Now non-static. Convert bit offset
11730 * cp-tree.h (get_vfield_offset): Likewise.
11731 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
11732 instance, before fetching vtable pointer.
11733 * typeck.c (get_delta_difference): New routine.
11734 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
11735 get vtable pointer out of right subobject.
11737 Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
11739 * search.c (get_binfo): Return NULL instead of aborting, when
11740 passed a UNION_TYPE.
11742 Tue Mar 22 12:44:54 1994 Jason Merrill <jason@deneb.cygnus.com>
11744 These patches implement handling of redefinition/redeclaration of
11747 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
11748 considered compatible.
11750 * parse.y (template_def): Pass defn argument to end_template_decl.
11752 * pt.c (end_template_decl): Add defn argument. Check for
11753 redefinition. Simplify.
11755 * error.c (OB_UNPUT): New macro, to remove mistakes.
11756 (aggr_variety): Subroutine of dump_aggr_type.
11758 * decl.c (decls_match): Support templates.
11759 (duplicate_decls): No longer static. Don't try to lay out template
11761 (pushdecl): Simplify.
11763 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
11766 Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
11768 * error.c (dump_decl): Support class template decls.
11769 (dump_type): Don't adorn template type parms.
11771 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
11772 if it was a definition.
11773 (redeclaration_error_message): Do the cp_error thang, and reject
11774 redefinition of templates.
11776 Mon Mar 21 19:36:06 1994 Per Bothner <bothner@kalessin.cygnus.com>
11778 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
11779 in FIELD context, when appropriate. Also,
11780 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
11781 Also, simplify check for bogus return specifiers.
11783 Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
11785 * parse.y (after_type_declarator1): Expand type_quals.
11786 (notype_declarator1): Likewise.
11787 (absdcl1): Likewise.
11789 Sat Mar 19 01:05:17 1994 Jason Merrill <jason@deneb.cygnus.com>
11791 * decl.c (grokdeclarator): Treat class-local typedefs like static
11792 members; i.e. 'typedef int f();' means that f is a function type,
11795 * parse.y (decl): Change direct_* back to *.
11796 (type_id): Change direct_abstract_declarator to absdcl.
11797 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
11799 Fri Mar 18 12:47:59 1994 Jason Merrill <jason@deneb.cygnus.com>
11801 These two patches fix crashes on instantiating a template inside a
11802 function with C linkage or containing labels.
11804 * class.c (current_lang_stacksize): No longer static.
11806 * decl.c (struct saved_scope): Add lang_base, lang_stack,
11807 lang_name, lang_stacksize, and named_labels.
11808 (push_to_top_level): Save them.
11809 (pop_from_top_level): Restore them.
11811 * gxxint.texi (Parser): Update.
11813 These two patches finish moving the task of expr/declarator
11814 ambiguity resolution from the lexer to the parser, and add one more
11815 r/r conflict. START_DECLARATOR can now be nuked.
11817 * parse.y (decl): Add "direct_" in typespec X rules.
11818 (direct_declarator): New nonterminal for
11819 direct_after_type_declarator and direct_notype_declarator.
11820 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
11821 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
11822 (named_parm): Add typespec direct_declarator rule.
11824 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
11826 These two patches disable some excessive cleverness on the part of
11827 g++; a non-class declaration always hides a class declaration in the
11828 same scope, and g++ was trying to unhide it depending on the
11829 enclosing expression.
11831 * spew.c (arbitrate_lookup): #if 0 out.
11833 * decl.c (lookup_name): Never call arbitrate_lookup.
11835 * parse.y (complex_notype_declarator1): Add '*'
11836 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
11838 * parse.y (complex_direct_notype_declarator): Restore id_scope
11839 see_typename TYPENAME rule, remove all other rules beginning with
11841 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
11843 Thu Mar 17 17:30:01 1994 Jason Merrill <jason@deneb.cygnus.com>
11845 These changes fix the compiler's handling of the functional cast/
11846 object declaration ambiguities in section 6.8 of the ARM. They also
11847 add 11 reduce/reduce conflicts. Sigh.
11849 * parse.y: Add precedence decls for OPERATOR and '~'.
11850 (notype_unqualified_id): New nonterminal, encompasses all of the
11851 ANSI unqualified-id nonterminal except TYPENAMEs.
11852 (expr_or_declarator): New nonterminal to delay parsing of code like
11854 (primary): Use notype_unqualified_id.
11855 (decl): Add typespec initdecls ';' and typespec declarator ';'
11857 (initdcl0): Deal with the above.
11858 (complex_notype_declarator1): A notype_declarator that is not also
11859 an expr_or_declarator.
11860 (complex_direct_notype_declarator): A direct_notype_declarator that
11861 doesn't conflict with expr_or_declarator. Use
11862 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
11863 (functional_cast): New nonterminal, for the three functional cast
11864 rules. So that they can be moved after
11865 complex_direct_notype_declarator.
11866 (see_typename): Don't accept type_quals any more.
11868 * decl2.c (reparse_decl_as_expr): New function to deal with parse
11869 nodes for code like `int (*a)++;'.
11870 (reparse_decl_as_expr1): Recursive subroutine of the above.
11871 (finish_decl_parsing): New function to deal with parse nodes for
11872 code like `int (*a);'. See the difference?
11874 Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
11876 These changes break binary compatibility in code with classes
11877 that use virtual bases.
11879 * search.c (dfs_get_vbase_types): Simplify and correct to make
11880 sure virtual bases are initialized in dfs ordering.
11881 * search.c (get_vbase_types): Simplify and make readable.
11883 Thu Mar 17 12:01:10 1994 Jason Merrill <jason@deneb.cygnus.com>
11885 * parse.y: s/ typename / type_id /g
11887 Wed Mar 16 17:42:52 1994 Kung Hsu <kung@mexican.cygnus.com>
11889 * parse.y (typespec): add SCOPE TYPENAME for global scoped
11892 * decl.c (complete_array_type): fix a bug that in -pendantic
11893 mode even there's no initializer, it will continue to build
11896 Wed Mar 16 17:43:07 1994 Jason Merrill <jason@deneb.cygnus.com>
11898 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
11899 all of the scoped PTYPENAME rules.
11901 Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
11903 * init.c (build_offset_ref): The value of A::typedef_name is
11904 always the TYPE_DECL, and never an error.
11906 Tue Mar 15 20:02:35 1994 Jason Merrill <jason@deneb.cygnus.com>
11908 * search.c (get_base_distance_recursive): Two binfos can only
11909 represent the same object if they are both via_virtual.
11911 * class.c (finish_base_struct): Check vbases for ambiguity, too.
11913 * search.c (get_vbase_types): Accept binfo argument, too.
11915 Tue Mar 15 19:22:05 1994 Kung Hsu <kung@mexican.cygnus.com>
11917 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
11918 initializer also, because back-end requires it.
11920 Tue Mar 15 15:33:31 1994 Jason Merrill <jason@deneb.cygnus.com>
11922 * error.c (dump_expr): Support member functions (which show up as
11925 Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
11927 * init.c (build_new): Set the return type of multidimensional
11930 Fri Mar 11 15:35:39 1994 Kung Hsu <kung@mexican.cygnus.com>
11932 * call.c (build_method_call): if basetype not equal to type
11933 of the instance, use the type of the instance in building
11936 Thu Mar 10 17:07:10 1994 Kung Hsu <kung@mexican.cygnus.com>
11938 * parse.y (direct_notype_declarator): add push_nested_type for
11939 'template_type SCOPED_NAME' rule.
11941 Tue Mar 8 00:19:58 1994 Jason Merrill <jason@deneb.cygnus.com>
11943 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
11945 Sat Mar 5 04:47:48 1994 Jason Merrill <jason@deneb.cygnus.com>
11947 * parse.y (regcast_or_absdcl): New nonterminal to implement late
11948 reduction of constructs like `int ((int)(int)(int))'.
11949 (cast_expr): Use it.
11950 (sub_cast_expr): Everything that can come after a cast.
11951 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
11952 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
11953 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
11954 '(' complex_parmlist ')' and regcast_or_absdcl.
11956 (complex_parmlist): Parmlists that are not also typenames.
11957 (parms_comma): Enabler.
11958 (named_parm): A parm that is not also a typename. Use declarator
11959 rather than dont_see_typename abs_or_notype_decl. Expand
11960 typed_declspecs inline.
11961 (abs_or_notype_decl): Lose.
11962 (dont_see_typename): Comment out.
11963 (bad_parm): Break out abs_or_notype_decl into two rules.
11965 Fri Mar 4 18:22:39 1994 Jason Merrill <jason@deneb.cygnus.com>
11967 * decl2.c (reparse_decl_as_casts): New function to change parse
11968 nodes for `(int)(int)(int)' from "function taking int and returning
11969 function taking int and returning function taking int" to "... cast
11970 to int, cast to int, cast to int".
11972 * decl2.c (reparse_decl_as_expr): Recursive function to change
11973 parse nodes for `A()()' from "function returning function returning
11974 A" to "A().operator()".
11976 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
11977 `typespec fcast_or_absdcl' rule.
11978 (fcast_or_absdcl): New nonterminal to implement late reduction of
11979 constructs like `A()()()()'.
11980 (typename): Replace `typespec absdcl1' rule with
11981 `typespec direct_abstract_declarator' rule.
11982 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
11983 with `fcast_or_absdcl type_quals' rule.
11985 Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
11987 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
11988 matches Section 5.5.
11990 Fri Mar 4 14:01:59 1994 Jason Merrill <jason@deneb.cygnus.com>
11992 * error.c (dump_type_prefix): Don't print basetype twice for
11995 Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
11997 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
11998 so that it is like setHandler(&A::handlerFn). Cures an `invalid
11999 lvalue in unary `&''.
12001 Fri Mar 4 11:15:59 1994 Jason Merrill <jason@deneb.cygnus.com>
12003 * gxxint.texi (Copying Objects): New section discussing default
12004 op= problems with virtual inheritance.
12006 * decl2.c (grokoptypename): Just does grokdeclarator and
12007 build_typename_overload, since the parser can't call grokdeclarator
12010 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
12011 and TREE_TYPE on generated identifiers.
12013 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
12015 * parse.y (parm): Convert `const char *' to `__opPCc' here.
12017 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
12018 if we can't figure out what to do.
12019 (dump_type*): Likewise.
12021 * typeck2.c (build_m_component_ref): 'component' is an expr, not
12022 a decl. Also move the IS_AGGR_TYPE check after the stripping of
12025 Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
12027 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
12028 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
12029 lvalue in unary `&''.
12031 Thu Mar 3 12:38:15 1994 Jason Merrill <jason@deneb.cygnus.com>
12033 * parse.y: Add precedence specification for START_DECLARATOR.
12034 (type_quals): Move before primary.
12035 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
12037 * decl2.c (grokoptypename): Lose.
12039 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
12040 rather than waiting until later.
12042 Wed Mar 2 14:12:23 1994 Jason Merrill <jason@deneb.cygnus.com>
12044 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
12045 than expanding it inline.
12046 (typename): Expand empty option of (former) absdcl inline.
12047 (abs_or_notype_decl): Likewise.
12048 (absdcl): Lose empty rule.
12049 (conversion_declarator): New nonterminal for 'typename' of 'operator
12051 (operator_name): Use it instead of absdcl.
12053 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
12055 (typed_declspecs): Accept typed_typespecs, rather than typespec
12056 directly. Add rules with reserved_typespecquals.
12057 (reserved_declspecs): Don't accept typespecqual_reserved at the
12058 beginning of the list. The typed_declspecs rule will deal with this
12060 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
12063 * parse.y (direct_notype_declarator,
12064 direct_after_type_declarator, direct_abstract_declarator): Split up
12065 the declarator1 nonterminals to match the draft standard and avoid
12067 (new_type_id, new_declarator, direct_new_declarator,
12068 new_member_declarator): New nonterminals to implement the subset of
12069 'typename' allowed in new expressions.
12070 (unary_expr): Use new_type_id instead of typename.
12071 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
12072 (abs_member_declarator, after_type_member_declarator): Lose.
12074 * parse.y (absdcl1): Don't require parens around
12075 abs_member_declarator.
12076 (abs_member_declarator): Lose see_typename from rules.
12077 (after_type_member_declarator): Likewise.
12079 * tree.c (get_identifier_list): New function, containing code
12080 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
12081 (get_decl_list): Use it.
12082 (list_hash_lookup_or_cons): Likewise.
12084 * parse.y (typed_declspecs, declmods): It's not necessary to hash
12085 the declspecs on class_obstack, so don't. This way typed_typespecs
12086 can reduce to typed_declspecs.
12088 Wed Mar 2 14:29:18 1994 Jason Merrill <jason@cygnus.com>
12090 * cvt.c (build_up_reference): If we aren't checking visibility,
12091 also allow base->derived conversions.
12093 Mon Feb 28 15:14:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
12095 * typeck.c (build_c_cast): Remove bogus hack when converting
12096 to a reference type.
12098 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
12100 (lang_stype::methods, lang_decl::next_method): New fields.
12101 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
12102 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
12104 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
12105 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
12106 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
12107 a non-inline virtual function to control emitting of vtables.
12108 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
12109 * search.c (build_vbase_vtables_init): Don't assemble_external
12110 (yet) if flag_vtable_hack.
12111 * class.c (build_vfn_ref): Likewise.
12113 Mon Feb 28 14:54:13 1994 Jason Merrill <jason@deneb.cygnus.com>
12115 * parse.y (component_decl): Don't include "typed_declspecs
12116 declarator ';'" speedup, since it breaks enums.
12118 Fri Feb 25 15:43:44 1994 Per Bothner <bothner@kalessin.cygnus.com>
12120 * class.c (finish_struct): Minor optimization for building
12123 Fri Feb 25 15:23:42 1994 Jason Merrill <jason@deneb.cygnus.com>
12125 * decl.c (start_function): Fix detection of function overloading.
12127 Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
12129 * lex.c (check_newline): #pragma interface can take a string
12130 argument, just like #pragma implementation. #pragma implementation
12131 checks for garbage on the line, line #pragma interface does. Main
12132 input files do not auto implement like named files, #pragma
12133 implementation must be used explicitly.
12135 Thu Feb 24 17:09:01 1994 Jason Merrill <jason@deneb.cygnus.com>
12137 * parse.y (components): Handle list of one again.
12138 (notype_components): Likewise.
12139 (after_type_declarator1): Take maybe_raises out again.
12141 * gxxint.texi (Parser): Document additional r/r conflict.
12143 Wed Feb 23 14:42:55 1994 Jason Merrill <jason@deneb.cygnus.com>
12145 * gxxint.texi (Parser): Add node.
12147 * Makefile.in (stamp-parse): Update expected conflict count.
12149 * parse.y (various): Replace "declmods declarator" with "declmods
12150 notype_declarator". The comment saying that "declmods declarator ';'"
12151 corresponds to "int i;" was wrong; it corresponds to "const i;".
12152 (component_decl): Add "typed_declspecs declarator ';'" rule; this
12153 *does* correspond to "int i;". Change "declmods components" to
12154 "declmods notype_components".
12155 (components): Don't deal with a list of one anymore.
12156 (notype_components): New nonterminal, corresponds to notype_declarator.
12157 ({after_,no}type_component_decl{,0}): More new nonterminals.
12158 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
12159 Eliminates four reduce/reduce conflicts.
12161 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
12162 (nontrivial_exprlist): New nonterminal: A list of at least two
12164 (nonnull_exprlist): Depend on nontrival_exprlist.
12165 Eliminates four reduce/reduce conflicts.
12167 (named_class_head): Move intermediate code block into separate
12168 nonterminal so that we can stick %prec EMPTY on it.
12170 Add more %prec EMPTY's to eliminate remaining shift/reduce
12173 (after_type_declarator): Add maybe_raises to fndecl rules.
12174 (after_type_declarator_no_typename): Remove.
12177 Document remaining reduce/reduce conflicts.
12179 Tue Feb 22 12:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
12181 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
12182 (TYPE_BINFO (type)) if we care about the path.
12184 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
12187 Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
12189 * Makefile.in (mostlyclean): lex.c is a source file, don't
12192 Sat Feb 19 01:27:14 1994 Jason Merrill <jason@deneb.cygnus.com>
12194 * parse.y: Eliminate 20 shift/reduce conflicts.
12196 Fri Feb 18 11:49:42 1994 Jason Merrill <jason@deneb.cygnus.com>
12198 * pt.c (type_unification): Add subr argument; if set, it means
12199 that we are calling ourselves recursively, so a partial match is OK.
12200 (unify): Support pointers to methods and functions.
12201 (tsubst): Support method pointers.
12202 * decl.c (build_ptrmemfunc_type): No longer static, so that
12203 tsubst can get at it.
12205 * init.c (is_aggr_typedef): Pretend template type parms are
12207 * decl2.c (build_push_scope): If cname refers to a template type
12208 parm, just grin and nod.
12210 * call.c (build_overload_call_real): Pass subr argument to
12212 * pt.c (do_function_instantiation): Likewise.
12213 * class.c (instantiate_type): Likewise.
12215 * search.c (get_base_distance): If BINFO is a binfo, use it and
12216 don't mess with its BINFO_INHERITANCE_CHAIN.
12218 * cvt.c (convert_to_reference): Fix temporary generation.
12219 If ambiguous, return error_mark_node.
12221 * init.c (build_new): Put back some necessary code.
12223 Thu Feb 17 15:39:47 1994 Jason Merrill <jason@deneb.cygnus.com>
12225 * init.c (build_new): Deal with array types properly.
12227 * search.c (get_binfo): Become a shell for get_base_distance.
12228 (get_binfo_recursive): Lose.
12229 (get_base_distance_recursive): Find the path to the via_virtual base
12230 that provides the most access.
12231 (get_base_distance): Likewise.
12233 * parse.y (explicit_instantiation): Syntax is 'template class
12234 A<int>', not 'template A<int>'.
12236 * typeck.c (convert_for_initialization): Remove bogus warning.
12238 * parse.y (datadef): Revert patch of Oct 27.
12240 Thu Feb 17 15:12:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
12242 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
12243 rather than integer_type_node. Does wonders for the Alpha.
12245 Thu Feb 17 13:36:21 1994 Jason Merrill <jason@deneb.cygnus.com>
12247 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
12248 goes onto the same obstack as its target type.
12250 Wed Feb 16 00:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
12252 * cvt.c (convert_to_reference): If converting via constructor
12253 on local level, go back to build_cplus_new approach.
12255 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
12256 to error_mark_node to prevent expand_expr from building a cleanup
12259 * lex.c (default_assign_ref_body): Return *this from the memcpy
12262 * decl.c (grok_reference_init): Just return if called with
12263 error_mark_node, don't worry about initializing non-const reference
12266 * cvt.c (convert_to_reference): Do the right thing for
12267 non-aggregate reference conversions, pedwarn when generating a
12268 non-const reference to a temporary.
12270 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
12271 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
12274 Tue Feb 15 19:47:19 1994 Jason Merrill <jason@deneb.cygnus.com>
12276 * decl.c (grok_reference_init): Pawn off a lot of the work on
12277 convert_to_reference. Generally do the right thing.
12279 * cvt.c (convert_to_reference): Conform to the initial comment;
12280 i.e. don't create temps if decl != error_mark_node. Handle
12281 cleanups better for temps that do get created. Don't pretend
12282 that we can use an 'A' to initialize a 'const double &' just by
12283 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
12285 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
12288 Mon Feb 14 14:50:17 1994 Jason Merrill <jason@deneb.cygnus.com>
12290 * decl.c (grok_reference_init): Make a temporary for initializing
12291 const reference from constant expression.
12293 Mon Feb 14 11:31:31 1994 Per Bothner <bothner@kalessin.cygnus.com>
12295 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
12296 * decl.c (pushdecl): Define decl in correct binding_level
12297 (which isn't always the inner_binding_level).
12299 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
12300 It's ugly, and I don't think it's the right thing to do.
12302 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
12303 Remove NEW_CLASS_SCOPING, assuming it is always 1.
12304 * decl.c (pop_decl_level): Removed; manually inlined.
12306 Sun Feb 13 19:04:56 1994 Jason Merrill <jason@deneb.cygnus.com>
12308 * class.h (candidate): Add basetypes field.
12310 * call.c (build_method_call): Do access checking after choosing a
12311 function, not before.
12313 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
12314 (mostlyclean): Remove ../cc1plus.
12316 Fri Feb 11 11:52:26 1994 Jason Merrill <jason@deneb.cygnus.com>
12318 * class.c (finish_struct): Don't allow adjusting access to a field
12319 of a base class if a local field has the same name.
12321 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
12323 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
12325 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
12326 with destructor names when either NO_DOLLAR_IN_LABEL or
12327 NO_DOT_IN_LABEL are not defined.
12329 Now `template <class T, T f(T&), const T*> class A {...}' works.
12331 * pt.c (grok_template_type): substitute template parm types
12332 with actual types in complex type as well.
12333 (coerce_template_parms): update the grok_template_type ()
12336 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
12338 * decl.c (grok_op_properties): Allow operator++/-- to have
12341 * typeck2.c (store_init_value): Don't abort when called to
12342 initialize a type that needs constructing with a CONSTRUCTOR.
12344 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
12345 store_init_value fails, build and expand an INIT_EXPR. If
12346 store_init_value succeeds, call expand_decl_init.
12348 Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
12350 * class.c (build_vbase_path): Use complete_type_p instead of
12351 resolves_to_fixed_type_p to determine if the virtual bases are in
12352 their right place for the type of expr. Cures problem of thinking a
12353 virtual base class is one place, when it is in fact someplace else.
12355 Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
12357 * init.c (resolve_offset_ref): Make sure we first convert to
12358 intermediate type, if given, when dealing with members off `this'.
12359 Solves an incorrrect `type `foo' is not a base type for type
12360 `multiple'' when it is infact, a base type.
12362 Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
12364 * class.c (modify_other_vtable_entries): Use get_binfo, instead
12365 of binfo_value. Solves problem with compiler giving a `base class
12366 `B' ambiguous in binfo_value (compiler error)' on complex MI
12367 herarchies, when a virtual function is first defied in a virtual
12370 Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
12372 * class.c (build_vbase_path): Don't complain about ambiguous
12373 intermediate conversion when converting down to a virtual base
12374 class, even if they might seem to be ambiguous.
12376 Thu Feb 10 12:18:26 1994 Jason Merrill <jason@deneb.cygnus.com>
12378 * typeck2.c (build_functional_cast): #if 0 out constructor
12379 inheritance code, improve error messages.
12381 * class.c (finish_base_struct): Complain about base with only
12382 non-default constructors in derived class with no constructors.
12384 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
12386 Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
12388 * search.c (build_mi_virtuals, add_mi_virtuals,
12389 report_ambiguous_mi_virtuals): Removed unneeded code.
12390 * class.c (finish_struct_bits): Likewise.
12392 Wed Feb 9 11:27:17 1994 Jason Merrill <jason@deneb.cygnus.com>
12394 * pt.c (end_template_instantiation): Push decl before
12395 pop_from_top_level.
12397 * typeck2.c (build_m_component_ref): Make sure datum is of
12400 * init.c (get_type_value): New function, returns
12401 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
12403 * call.c (build_method_call): Don't die on call to destructor for
12406 * decl.c (grokdeclarator): Complain about virtual op new and op
12407 delete, make static virtuals unvirtual instead of unstatic.
12409 * typeck.c (build_c_cast): Also call default_conversion on
12412 * decl.c (grokdeclarator): Don't complain about anonymous
12415 * parse.y (simple_stmt, for loops): Move the continue point after
12418 * class.c (finish_struct): Fix setting of
12419 TYPE_HAS_COMPLEX_INIT_REF.
12421 Tue Feb 8 13:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
12423 * init.c (build_new): Deal with `new double (1)'.
12425 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
12426 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
12427 TYPE_NEEDS_CONSTRUCTING.
12429 * decl.c (duplicate_decls): Propagate access decls.
12431 * typeck2.c (process_init_constructor): Accept empty_init_node
12432 for initializing unions.
12434 * class.c, lex.c, cp-tree.h: Use
12435 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
12436 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
12439 * decl.c (finish_decl): Don't complain about uninitialized const
12440 if it was initialized before.
12442 Mon Feb 7 18:12:34 1994 Jason Merrill <jason@deneb.cygnus.com>
12444 * lex.c (default_assign_ref_body): Don't deal with vbases for
12447 * decl.c (finish_decl): Fix reversed logic for objects and other
12448 things that need to be constructed but have no initializer.
12450 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
12451 set by grok_op_properties or finish_decl.
12453 * decl.c: Don't warn about extern redeclared inline unless
12454 -Wextern-inline is given.
12455 * decl2.c (lang_decode_option): Likewise.
12456 * cp-tree.h: Likewise.
12458 Mon Feb 7 17:29:24 1994 Per Bothner <bothner@kalessin.cygnus.com>
12460 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
12463 * decl.c (pushdecl_with_scope): New function.
12464 * decl.c (pushdecl_top_level): Use new function.
12465 * decl.c (pushtag): Initialize newdecl.
12466 * decl.c (pushtag): Push new type decl into correct scope.
12468 Mon Feb 7 14:42:03 1994 Jason Merrill <jason@deneb.cygnus.com>
12470 * call.c, cvt.c, init.c, search.c, cp-tree.h:
12471 Eradicate LOOKUP_PROTECTED_OK.
12473 Mon Feb 7 13:57:19 1994 Per Bothner <bothner@kalessin.cygnus.com>
12475 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
12476 'globalize' to signify implicit declarations.
12477 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
12478 * decl.c (set_identifier_type_value_with_scope): New function.
12479 * decl.c (set_identifier_local_value): Simplify.
12480 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
12481 forward declaration (followed by ';' and not preceded by 'friend').
12482 * class.c, decl.c, except.c, init.c, parse.y,
12483 pt.c, search.c: Add new argument to calls to xref_tag and
12486 Mon Feb 7 00:22:59 1994 Jason Merrill <jason@deneb.cygnus.com>
12488 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
12489 ACCESSIBLY_DERIVED_FROM_P meant before.
12490 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
12492 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
12494 * search.c (get_base_distance_recursive): Members and friends of
12495 a class X can implicitly convert an X* to a pointer to a private or
12496 protected immediate base class of X.
12497 (get_binfo_recursive): Likewise.
12498 (get_base_distance): Ignore ambiguity if PROTECT < 0.
12499 (get_binfo): Lose multiple values of PROTECT.
12500 (compute_access): Protected is OK if the start of the
12501 search is an accessible base class of current_class_type.
12503 * method.c (build_opfncall): Do check access on operator new here.
12505 * decl.c (finish_function): Don't check access on operator new
12508 Sun Feb 6 14:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
12510 * decl.c (xref_tag): The base of a derived struct is NOT always
12513 * pt.c (do_explicit_instantiation): New function, called from
12514 parser to do explicit function instantiation.
12515 (type_unification): Allow the args list to be terminated with
12517 (do_pending_expansions): Look at i->interface for non-member
12520 * parse.y (datadef): Move explicit_instantiation here.
12521 (structsp): From here.
12522 (datadef): Complain about `int;'.
12524 Sun Feb 6 12:33:18 1994 Per Bothner <bothner@kalessin.cygnus.com>
12526 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
12527 second parameter, and simplify first from a TREE_LIST where
12528 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
12529 * pt.c (instantiate_member_templates): Simplify argument list
12530 from a TREE_LIST to just an IDENTIFIER.
12531 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
12532 * parse.y (template_instantiate_once): Simplify accordingly.
12533 * decl.c (inner_binding_level): New. Use various places to
12536 Sun Feb 6 02:49:37 1994 Jason Merrill <jason@deneb.cygnus.com>
12538 * typeck2.c (build_functional_cast): int() -> int(0).
12540 Sat Feb 5 00:53:21 1994 Jason Merrill <jason@deneb.cygnus.com>
12542 * class.c (finish_struct): Don't do a bitwise copy for op= if the
12543 class has a virtual function table.
12545 * typeck.c (convert_for_initialization): Restore warnings about
12546 not using defined op=. Should really be my_friendly_aborts, I
12549 Fri Feb 4 14:21:00 1994 Jason Merrill <jason@deneb.cygnus.com>
12551 * class.c (finish_struct): Tidy up conditions for doing bitwise
12554 * decl.c (build_default_constructor): #if 0 out.
12556 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
12557 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
12559 * decl.c (grokdeclarator): Don't return void_type_node for
12560 friends being defined here.
12562 * init.c (perform_member_init): Only do the init if it's useful.
12564 * lex.c (default_copy_constructor_body): If we don't need to do
12565 memberwise init, just call __builtin_memcpy.
12566 (default_assign_ref_body): Likewise.
12568 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
12570 Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
12572 * lex.c (reinit_parse_for_method, cons_up_default_function):
12573 Don't give warn_if_unknown_interface warning when it came from a
12574 system header file.
12575 * pt.c (end_template_decl, instantiate_template): Likewise.
12576 * decl.c (start_decl): Likewise.
12578 Fri Feb 4 00:41:21 1994 Jason Merrill <jason@deneb.cygnus.com>
12580 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
12583 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
12584 IS_AGGR_TYPE, since we don't know it's a type.
12586 Thu Feb 3 11:36:46 1994 Jason Merrill <jason@deneb.cygnus.com>
12588 * decl.c (grokdeclarator): Don't complain about anonymous unions.
12590 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
12591 anonymous, but had a name given to it by a typedef.
12593 * decl.c (grokdeclarator): When renaming an anonymous struct, set
12594 TYPE_WAS_ANONYMOUS.
12596 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
12598 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
12600 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
12601 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
12603 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
12604 anonymous structs that get typedef'd.
12606 * decl.c (grokdeclarator): Always return void_type_node for
12609 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
12611 (dump_function_decl): Don't print out default args for
12612 a function used in an expression.
12614 * decl.c (grokdeclarator): Give error on abstract declarator used
12615 in an invalid context (i.e. `void (*)();').
12617 * error.c (cp_line_of): Support _TYPE nodes.
12618 (cp_file_of): Likewise.
12620 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
12621 it can happen for the RHS of an assignment stmt where the LHS is
12624 * init.c (expand_aggr_init_1): Deal with bracketed initializer
12627 * class.c (finish_struct): Deal with enumerators and typedefs
12630 Wed Feb 2 11:30:22 1994 Jason Merrill <jason@deneb.cygnus.com>
12632 * class.c (finish_struct): Tidy up loop over fields.
12634 * errfn.c (cp_thing): Don't advance twice after a format.
12636 * class.c (finish_struct): Complain about needing a constructor
12637 if a member has only non-default constructors, and don't try to
12638 generate a default constructor.
12640 * decl.c (finish_decl): Also do the constructor thing if
12641 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
12643 * search.c (unuse_fields): New function: mark all fields in this
12645 (dfs_unuse_fields): Helper function.
12647 * class.c (pushclass): If the new class is the same as the old
12648 class, still unuse the fields.
12649 (unuse_fields): Move to search.c.
12651 * decl.c (grok_op_properties): Add friendp argument.
12652 (grokfndecl): Pass it.
12653 (start_method): Likewise.
12655 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
12658 * parse.y (unary_expr): Pass new parameter to delete_sanity.
12660 * lex.c (default_copy_constructor_body): Don't choke if the union
12662 (default_assign_ref_body): Likewise.
12664 * call.c (compute_conversion_costs_ansi): Do the right thing for
12667 * decl.c (push_to_top_level): Optimize.
12669 * decl.c (start_function): Look for the lexical scope of a friend
12670 in DECL_CLASS_CONTEXT.
12672 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
12674 Tue Feb 1 15:59:24 1994 Jason Merrill <jason@deneb.cygnus.com>
12676 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
12678 * init.c (init_init_processing): Don't assign BIN/BID to the
12679 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
12680 (build_new): Check TREE_GETS_PLACED_NEW.
12682 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
12683 op new with placement, set TREE_GETS_PLACED_NEW.
12685 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
12687 * class.c (finish_struct): Don't treat anonymous unions like
12688 other aggregate members. Do synthesize methods for unions without
12689 a name, since they may or may not be "anonymous unions".
12691 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
12692 in anonymous unions.
12694 * lex.c (default_copy_constructor_body): Support unions.
12695 (default_assign_ref_body): Likewise.
12697 Mon Jan 31 12:07:30 1994 Jason Merrill <jason@deneb.cygnus.com>
12699 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
12701 * error.c (args_as_string): New function (%A), like type_as_string
12702 except NULL_TREE -> "..."
12704 * call.c (build_overload_call_real): Fix for new overloading.
12706 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
12709 * parse.y (operator_name): Instead of here.
12711 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
12714 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
12716 * method.c (build_opfncall): Don't need to massage return value
12717 any more, call build_overload_call with all flags.
12719 * typeck.c (build_x_binary_op): Put back speculative call to
12721 (build_x_unary_op): Likewise.
12722 (build_x_conditional_expr): Likewise.
12724 Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
12726 * cvt.c (build_type_conversion_1): Change call to pedwarn into
12727 warning, and conditionalize upon warn_cast_qual.
12729 Fri Jan 28 11:48:15 1994 Jason Merrill <jason@deneb.cygnus.com>
12731 * search.c (lookup_field): If xbasetype is a binfo, copy it to
12732 avoid clobbering its inheritance info.
12734 * call.c (build_method_call): Don't overwrite basetype_path with
12735 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
12737 * search.c (compute_access): Fix handling of protected inheritance
12738 and friendship with the enclosing class.
12740 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
12741 initialization of arbitrary variable.
12743 * typeck2.c (build_functional_cast): Only try calling a method if
12746 * decl.c (grokdeclarator): Move handling of constructor syntax
12747 initialization into first loop for generality.
12748 (parmlist_is_random): Lose.
12750 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
12751 to default function.
12753 Thu Jan 27 19:26:51 1994 Jason Merrill <jason@deneb.cygnus.com>
12755 * decl.c (grokparms): Abort if we get called with something we don't
12758 Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
12760 * call.c (build_overload_call_real): Change argument complain to
12761 flags to match style of rest of code. Pass it down to
12762 build_function_call_real as necessary.
12763 * call.c (build_overload_call, build_overload_call_maybe): Change
12764 argument complain to flags to match style of rest of code.
12765 * cp-tree.h (build_function_call_real): Added fourth flags
12767 * cvt.c (convert_to_reference): Only give warning messages, if
12768 LOOKUP_COMPLAIN is set.
12769 * typeck.c (build_x_function_call): Change simple complain
12770 argument to build_overload_call_maybe and build_overload_call, to
12771 LOOKUP_COMPLAIN to match style of rest of code.
12772 * typeck2.c (build_functional_cast): Likewise.
12773 * typeck.c (build_function_call_real): Add flags, so that we can
12774 not complain, if we don't want to complain. Complain about
12775 arguments, if we are complaining, otherwise don't.
12776 * typeck.c (build_function_call, build_function_call_maybe):
12777 Stick in flags argument.
12778 * typeck.c (build_x_binary_op, build_x_unary_op,
12779 build_x_conditional_expr, build_x_compound_expr): Follow style of
12780 build_x_indirect_ref, as it is more correct and more common.
12782 Thu Jan 27 14:36:20 1994 Jason Merrill <jason@deneb.cygnus.com>
12784 * call.c (build_method_call): Don't check for being called with
12787 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
12788 static initializer function.
12790 * init.c (build_member_call): Use convert_force here, too.
12792 * search.c (compute_access): Only treat static members specially
12793 if they are referenced directly.
12795 Wed Jan 26 18:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
12797 * gxxint.texi (Access Control): New node.
12799 * search.c (current_scope): New function; returns whichever of
12800 current_class_type and current_function_decl is the most nested.
12801 (compute_access): Total overhaul to make it clearer and more
12802 correct. Don't use the cache for now; in the only situation where
12803 it was used before, it gained nothing. This frees up three of the
12804 DECL_LANG_FLAGs for possible other use!
12806 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
12808 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
12810 * call.c (build_method_call): Use convert_force to cast `this' --
12811 rely on the access checking for the method itself.
12813 * init.c (is_friend): Do the nesting thing, handle types. I am
12815 (is_friend_type): Become a shell for is_friend.
12816 (add_friend): Never stick in ctype.
12817 Why are the friendship functions in init.c, anyway?
12819 Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
12821 * cvt.c (build_type_conversion_1): Don't conditionalize call to
12822 pedwarn upon pedantic.
12824 Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
12826 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
12827 gets a warning if one tries to initialize a non-const & from a
12829 * cvt.c (convert_to_reference): Use %P format for argument
12830 numbers in warnings.
12832 Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
12834 * init.c (build_delete): Follow style in call.c to construct the
12835 virtual call to the desctructor, as that code is right. Fixes a
12836 problem of the compiler saying a pointer conversion is ambiguous.
12838 Wed Jan 26 11:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
12840 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
12841 VTABLE_NAME_FORMAT to VTABLE_NAME.
12843 * *: s/visibility/access/g
12845 Tue Jan 25 18:39:12 1994 Jason Merrill <jason@deneb.cygnus.com>
12847 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
12849 Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
12851 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
12854 Tue Jan 25 13:11:45 1994 Jason Merrill <jason@deneb.cygnus.com>
12856 * decl.c (duplicate_decls): Fix pointer arithmetic.
12858 Mon Jan 24 15:50:06 1994 Chip Salzenberg <chip@fin.uucp>
12860 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
12861 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
12862 clauses on a declaration.
12864 Mon Jan 24 17:06:23 1994 Jason Merrill <jason@deneb.cygnus.com>
12866 * class.c (finish_struct): Do synthesize methods for anon
12867 structs, just not unions.
12869 Mon Jan 24 13:50:13 1994 Kung Hsu <kung@mexican.cygnus.com>
12871 * decl.c (xref_tag): handle anonymous nested type.
12872 * decl.c (globalize_nested_type): add no globalize bit check.
12873 * spew.c (hack_more_ids) : templated nested decl not push top
12876 * parse.y : get rid of 'goto do_components'. It is much better
12879 * decl.c (is_anon_name): get rid of the function and use the
12880 macro ANON_AGGRNAME_P.
12883 Fri Jan 21 14:06:02 1994 Jason Merrill <jason@deneb.cygnus.com>
12885 * class.c (finish_struct): Don't synthesize any methods for
12886 anonymous structs/unions.
12888 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
12890 Thu Jan 20 18:56:46 1994 Jason Merrill <jason@deneb.cygnus.com>
12892 * method.c (build_opfncall): Call build_indirect_ref on
12893 synthesized instance for operator delete.
12895 * pt.c (type_unification): Don't abort if called with a list of
12898 * class.c (instantiate_type): Deal with function templates.
12900 Thu Jan 20 16:55:35 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
12902 * Makefile.in (CC): Default to cc not gcc.
12904 Thu Jan 20 13:47:54 1994 Jason Merrill <jason@deneb.cygnus.com>
12906 * typeck.c (build_modify_expr): Call constructor if appropriate.
12908 * decl.c (push_to_top_level): Clear out class-level bindings cache.
12910 Wed Jan 19 13:51:22 1994 Jason Merrill <jason@deneb.cygnus.com>
12912 * call.c (resolve_scope_to_name): Work recursively (previously only
12913 looked down one level).
12915 * lex.c (do_pending_inlines): If we're still dealing with the last
12916 batch of inlines, don't start working on a new one.
12918 * Makefile.in (stamp-parse): Update conflict count.
12921 * parse.y (explicit_instantiation): New rule; implements
12922 'template A<int>' syntax (though not 'template foo(int)' yet).
12923 (structsp): Add explicit_instantiation.
12925 Tue Jan 18 13:53:05 1994 Jason Merrill <jason@deneb.cygnus.com>
12927 * class.c (finish_struct, etc.): Simplify decision to synthesize
12930 * call.c, class.c, cp-tree.h, decl.c, init.c,
12931 ptree.c, search.c, typeck.c, typeck2.c: Nuke
12932 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
12933 * init.c (expand_aggr_init_1): Don't try non-constructor methods
12934 of initializing objects.
12935 (build_new): Don't try other methods if the constructor lookup fails.
12937 * class.c (finish_base_struct): Set cant_have_default_ctor and
12938 cant_synth_copy_ctor properly.
12939 (finish_struct): Likewise.
12941 Mon Jan 17 13:58:18 1994 Jason Merrill <jason@deneb.cygnus.com>
12943 * typeck.c (build_modify_expr_1): #if 0 out again.
12944 (build_modify_expr): #if 0 out memberwise init code again.
12946 * lex.c (default_copy_constructor_body): Be const-correct.
12947 (default_assign_ref_body): Likewise.
12949 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
12950 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
12951 (expand_aggr_init): Disable silent conversion from initializer list
12952 to list of args for a constructor.
12954 * class.c (base_info): Lose needs_default_ctor.
12955 (finish_base_struct): Likewise.
12956 (finish_struct): Likewise.
12958 * decl.c (init_decl_processing): Don't turn off flag_default_inline
12959 just because flag_no_inline is on.
12960 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
12963 * class.c (finish_struct): Synthesize default ctor whenever
12966 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
12968 Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
12970 * Makefile.in, configure: Handle the C++ front-end in a
12972 * cp-*: Move C++ front-end to cp/*.
12974 Fri Jan 14 14:09:37 1994 Jason Merrill <jason@deneb.cygnus.com>
12976 * cp-typeck.c (build_function_call_real): Modify to match other
12977 instances of taking the address of the function.
12979 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
12980 there are non-synthesized constructors.
12981 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
12982 Always generate copy constructor if possible.
12984 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
12985 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
12987 * cp-lex.c (default_copy_constructor_body): Use init syntax
12990 * cp-type2.c (store_init_value): Only give error for initializer list
12991 if TYPE_HAS_REAL_CONSTRUCTOR.
12993 Thu Jan 13 15:38:29 1994 Jason Merrill <jason@deneb.cygnus.com>
12995 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
12996 (lang_decl): Add synthesized bitfield to decl_flags.
12998 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
12999 artificial methods, rather than a line # of 0.
13001 Fri Jan 14 18:25:29 1994 Kung Hsu <kung@mexican.cygnus.com>
13003 * cp-decl (xref_tag): fix a bug in conflict type.
13004 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
13006 * cp-spew.c (yylex) : generated SCOPED_NAME token.
13007 * cp-lex.c (yyprint): handle SCOPED_NAME.
13009 Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
13011 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
13014 Thu Jan 13 14:00:35 1994 Kung Hsu <kung@mexican.cygnus.com>
13016 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
13019 Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
13021 Ensure that all vtable pointers are initialized with all the right
13024 * cp-class.c (is_normal): Changed to reflect new meaning of
13025 CLASSTYPE_VFIELD_PARENT.
13026 * cp-class.c (maybe_fixup_vptrs): Use of
13027 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
13028 BINFO_MODIFIED instead.
13029 * cp-class.c (finish_struct): Changed to reflect new meaning of
13030 CLASSTYPE_VFIELD_PARENT.
13031 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
13032 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
13034 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
13036 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
13037 * cp-tree.h (vfield_parent): Changed to integer.
13038 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
13040 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
13042 Wed Jan 12 18:24:16 1994 Kung Hsu <kung@mexican.cygnus.com>
13044 * cp-decl.c (xref_tag): re-implement globalize nested type.
13045 * cp-decl2.c (grok_x_components): ditto.
13046 * cp-parse.y: ditto.
13047 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
13049 Wed Jan 12 14:08:09 1994 Jason Merrill <jason@deneb.cygnus.com>
13051 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
13052 decls with a definition attached.
13054 * cp-typeck.c (build_modify_expr): Undo previous change in the case
13057 Tue Jan 11 19:33:03 1994 Jason Merrill <jason@deneb.cygnus.com>
13059 * cp-typeck.c (build_modify_expr): Replace code for generating
13060 assignment semantics for classes with an error.
13061 (build_modify_expr_1): #if 0 out.
13063 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
13064 behavior for overloaded functions (it doesn't push anything).
13066 * cp-class.c (finish_struct): When generating default op=,
13067 set TYPE_HAS_ASSIGNMENT.
13069 Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
13071 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
13073 * cp-typeck.c (convert_for_assignment): Simplify.
13074 * cp-decl2.c (warn_enum_clash): Removed.
13075 * invoke.texi (-Wenum-clash): Removed.
13076 * toplev.c (-Wenum-clash): Removed.
13078 Mon Jan 10 17:48:37 1994 Kung Hsu <kung@mexican.cygnus.com>
13080 * cp-decl.c (finish_decl): fix incorrect popclass call.
13082 * cp-decl.c (is_anon_name): new function, check whether the name
13083 is anonymous name generated by compiler.
13084 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
13085 * cp-spew.c (hack_more_ids): handle nested type in template.
13086 * cp-parse.y : handle nested type reference in uninstantiated
13088 * cp-call.c (build_method_call): handle uninstantiated template
13090 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
13092 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
13094 * cp-pt.c (tsubst): handle nested type search by name.
13096 Mon Jan 10 14:32:18 1994 Jason Merrill <jason@deneb.cygnus.com>
13098 * cp-init.c (build_member_call): Propagate qualifiers to new type.
13100 * cp-call.c (build_method_call): Count functions the new way.
13102 Fri Jan 7 19:03:26 1994 Jason Merrill <jason@deneb.cygnus.com>
13104 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
13107 Tue Jan 4 16:45:51 1994 Kung Hsu <kung@cirdan.cygnus.com>
13109 * cp-parse.y: change to handle whether to globalize nested class.
13110 * cp-decl.c(xref_tag, maybe_globalize_type): Likewise.
13112 Mon Jan 3 22:22:32 1994 Gerald Baumgartner <gb@cygnus.com>
13114 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
13115 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
13116 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
13117 gplus.gperf toplev.c: Incorporated C++ signature extension.
13118 * cp-sig.c: New file, contains most of signature processing.
13119 * cp-hash.h: Regenerated from gplus.gperf.
13121 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
13122 and `-fno-handle-signatures' command line flags.
13124 * gcc.texi: Changed the last-modification date.
13125 * invoke.texi: Added `-fhandle-signatures' in the list of
13126 C++ language options. Added explanation for this option.
13128 Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
13130 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
13133 Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
13135 * cp-pt.c (do_pending_expansions): Decide to expand a template
13136 member function, based upon it's class type, not the class type of
13137 the first place it was declared.
13139 Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
13141 * cp-class.c (is_normal): New routine, use to determine when the
13142 given binfo is the normal one. (The one that should have the simple
13144 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
13145 to check if two fndecls are `the same'. Sometimes this routine can
13146 modify the main vtable, and normal should be 1, in that case, so use
13147 is_normal() to determine if this is the main vtable for the class.
13148 Don't recurse down virtual bases, as they are shared, and we take
13149 care of them elsewhere.
13150 * cp-class.c (modify_vtable_entries): If we have already updated the
13151 vtable with the new virtual, don't do it again.
13152 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
13153 appropriate. Do virtual function overriding in virtual bases, after
13154 normal overriding, so that the base function list in DECL_VINDEX is
13155 not overridden, before we have a chance to run through the list.
13156 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
13157 Make sure we pass the right address into modify_vtable_entries.
13158 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
13159 binfo is the one that has the vtable that we based our vtable on.
13161 Fri Dec 24 09:40:52 1993 Michael Tiemann <tiemann@blues.cygnus.com>
13163 * cp-typeck.c (c_expand_start_case): Use default_conversion to
13164 convert expression from reference type if necessary.
13166 Wed Dec 22 17:58:43 1993 Jason Merrill <jason@deneb.cygnus.com>
13168 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
13169 trying to read its TREE_VALUE.
13171 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
13172 (finish_struct): Instead of here.
13174 Tue Dec 21 14:34:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13176 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
13177 have TYPE_PTRMEMFUNC_P set before we try to build its
13178 CLASSTYPE_ID_AS_LIST.
13179 (get_decl_list): Likewise, when trying to read it.
13181 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
13182 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
13184 Mon Dec 20 13:35:03 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13186 * cp-typeck.c (rationalize_conditional_expr): New function.
13187 (unary_complex_lvalue): Use it.
13188 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
13189 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
13192 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
13193 (lang_decode_option): Set warn_return_type, not explicit_*, for
13194 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
13195 decide if it should go into jump_optimize or not.
13196 * cp-tree.h (explicit_warn_return_type): Deleted.
13197 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
13198 (finish_function): Also complain about no return in a non-void fn if
13199 we're being pedantic (don't rely on use of -Wreturn-type).
13201 Fri Dec 17 15:45:46 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13203 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
13204 static if it's being done inside another function.
13206 * cp-search.c (compute_visibility): Check for friendship both ways.
13208 Fri Dec 17 14:28:25 1993 Jason Merrill <jason@deneb.cygnus.com>
13210 * cp-cvt.c (build_default_binary_type_conversion): Make error
13211 messages more helpful.
13213 * cp-error.c (op_as_string): New function, returns "operator =="
13214 given EQ_EXPR or suchlike.
13216 Fri Dec 17 13:28:11 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13218 * cp-call.c (print_n_candidates): New function.
13219 (build_overload_call_real): Use it when we complain about a call
13222 Fri Dec 17 12:41:17 1993 Jason Merrill <jason@deneb.cygnus.com>
13224 * cp-call.c (build_method_call): Fix checking for static call
13227 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
13230 * cp-init.c (build_new): Don't mess with rval when building
13233 Thu Dec 16 16:48:05 1993 Kung Hsu <kung@cirdan.cygnus.com>
13235 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
13236 NAME(type) may not be exist. It's not a problem for old compiler.
13238 Thu Dec 16 14:46:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13240 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
13241 never used for anything.
13242 (struct lang_type, member type_flags): Delete field
13243 `alters_visibility', and up `dummy' by 1.
13244 * cp-class.c (finish_base_struct): Delete code that copies the
13245 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
13246 (finish_struct): Delete code that sets it.
13248 Thu Dec 16 14:44:39 1993 Jason Merrill <jason@deneb.cygnus.com>
13250 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
13251 build_method_call that I messed up before.
13253 * cp-search.c (get_base_distance): If protect > 1, allow immediate
13256 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
13257 (finish_struct): Likewise. Well, nigh-correctly; it won't deal
13258 properly with the case where a class contains an object of an
13259 ambiguous base class which has a protected op=. Should be fixed
13260 when the access control code gets overhauled.
13261 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
13263 Thu Dec 16 12:17:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13265 * cp-lex.c (real_yylex): Turn the code back on that deals with
13266 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
13267 avoid the ambiguity problems that led to it being turned off in the
13270 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
13271 to see if something is a method.
13273 Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
13275 * cp-typeck.c (build_modify_expr): Avoid error messages on small
13277 * cp-typeck.c (convert_for_assignment): Add missing argument to
13278 cp_warning and cp_pedwarn calls.
13280 Wed Dec 15 18:25:32 1993 Jason Merrill <jason@deneb.cygnus.com>
13282 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
13283 initializers; it's just anachronistic.
13285 * cp-decl.c (finish_decl): Don't require external-linkage arrays
13286 to have a complete type at declaration time when pedantic.
13288 Tue Dec 14 11:37:23 1993 Jason Merrill <jason@deneb.cygnus.com>
13290 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
13292 * cp-call.c (build_method_call): Don't dereference pointer given
13295 * cp-decl.c (finish_function): Don't pass pointer to
13297 (finish_function): Likewise.
13299 * cp-typeck.c (build_x_function_call): Likewise.
13301 * cp-method.c (build_component_type_expr): Likewise.
13303 * cp-init.c (build_member_call): Likewise.
13304 (build_new): Likewise.
13306 Mon Dec 13 18:04:33 1993 Kung Hsu <kung@cirdan.cygnus.com>
13308 * cp-decl.c (xref_tag): fix regression created by changes made
13310 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
13312 Fri Dec 10 12:40:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13314 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
13315 out the final evaluation of the function, so we can see if ELLIPSIS,
13316 USER, and EVIL were set at the end.
13318 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
13319 only go for setting TRIVIAL_CODE if we are dealing with types that
13322 Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
13324 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
13325 * toplev.c (lang_options): Likewise.
13326 * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise.
13327 * cp-decl.c (delta_type_node): New type for delta entries.
13328 * cp-tree.h (delta_type_node): Likewise.
13329 * cp-decl.c (init_decl_processing): Setup delta_type_node.
13330 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
13331 delta_type_node instead of short_integer_type_node.
13332 * cp-class.c (build_vtable_entry): Likewise.
13334 Thu Dec 9 16:19:05 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13336 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
13337 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
13338 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
13340 Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
13342 * cp-decl.c (finish_decl): Make sure things that can go into
13343 "common", do go into common, if -fcommon is given.
13345 Wed Dec 8 13:01:54 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13347 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
13348 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
13349 argument matching diagnostics to make instantly clear what the
13352 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
13353 then check to see if the penalty was increased due to
13354 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
13356 Tue Dec 7 18:29:14 1993 Kung Hsu <kung@cirdan.cygnus.com>
13358 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
13361 Tue Dec 7 16:09:34 1993 Jason Merrill <jason@deneb.cygnus.com>
13363 * cp-class.c (finish_struct): Before synthesizing methods, if no
13364 methods have yet been declared then set nonprivate_method. Don't
13365 set non_private method after synthesizing a method.
13367 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
13368 is set, tie emitted code to the location of template instantiation,
13369 rather than definition.
13371 * cp-tree.h: Declare flag_alt_external_templates.
13373 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
13375 * toplev.c (lang_options): Likewise.
13377 Mon Oct 4 12:50:02 1993 Chip Salzenberg <chip@fin.uucp>
13379 [changes propagated from 930810 snapshot]
13380 * cp-decl.c (init_decl_processing): Make long long available for use
13381 as SIZE_TYPE and PTRDIFF_TYPE.
13382 (finish_decl): Allow file-scope static incomplete array.
13383 (grokdeclarator): Don't pass on const and volatile fron function
13384 value type to function type.
13385 Warn here for volatile fn returning non-void type.
13386 * cp-parse.y (attrib): Accept attributes `volatile' with alias
13387 `noreturn', and `const'.
13388 * cp-typeck.c (default_conversion): Don't lose const and volatile.
13389 (build_binary_op_nodefault): Generate pedantic warning for comparison
13390 of complete pointer type with incomplete pointer type.
13391 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
13393 Tue Dec 7 10:46:48 1993 Jason Merrill <jason@deneb.cygnus.com>
13395 * cp-init.c (expand_vec_init): When creating a temporary for copying
13396 arrays, use the type of the source, not the target.
13398 * cp-cvt.c (convert): Pass an argument for errtype to
13399 convert_to_reference.
13401 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
13402 methods, -> and `this'.
13404 Mon Dec 6 17:12:33 1993 Jason Merrill <jason@deneb.cygnus.com>
13406 * cp-error.c (parm_as_string): New function; returns `this' or arg
13407 number. Corresponds to %P.
13408 (dump_expr): Deal with method calls.
13410 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
13411 * cp-typeck.c (convert_for_assignment): Likewise.
13412 (warn_for_assignment): Lose.
13414 Mon Dec 6 11:33:35 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13416 * cp-call.c (ideal_candidate_ansi): Delete code that was never
13417 doing anything useful. Instead, sort once, and DO NOT wipe
13418 out any codes with EVIL_CODE, since that's what we use as a
13419 marker for the end of the list of candidates.
13421 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
13423 Mon Dec 6 12:49:17 1993 Jason Merrill <jason@deneb.cygnus.com>
13425 * cp-init.c (get_aggr_from_typedef): New function, like
13426 is_aggr_typedef but returns the _TYPE.
13428 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
13430 Sun Dec 5 18:12:48 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13432 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
13434 Thu Nov 25 23:50:19 1993 Chip Salzenberg <chip@fin.uucp>
13436 Delay language context change until beginning of next decl.
13438 * cp-lex.h (c_header_level): Removed.
13439 (pending_lang_change): Declared.
13440 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
13441 (pending_lang_change): Defined.
13442 (check_newline): Rework code that recognizes line number and
13443 filename changes. Instead of pushing and popping lang context,
13444 increment and decrement pending_lang_change.
13445 (do_pending_lang_change): Push and pop lang context according
13446 to value of pending_lang_change.
13447 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
13448 (extdef): Same as extdef, but call do_pending_lang_change() first.
13450 Mon Nov 15 15:39:15 1993 Chip Salzenberg <chip@fin.uucp>
13452 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
13453 compare of ptr with 0 only if pedantic in both cases.
13455 Thu Nov 25 13:31:37 1993 Chip Salzenberg <chip@fin.uucp>
13457 Reinstate the below patch, which got lost in the Cygnus merge:
13458 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
13459 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
13461 Wed Nov 17 19:03:30 1993 Chip Salzenberg <chip@fin.uucp>
13463 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
13465 Fri Oct 22 20:43:37 1993 Paul Eggert <eggert@twinsun.com>
13467 * cp-lex.c (real_yylex): Diagnose floating point constants
13468 that are too large.
13470 Wed Nov 17 19:10:37 1993 Chip Salzenberg <chip@fin.uucp>
13472 * cp-type2.c (build_functional_cast): ARM page 16: When a class
13473 and an object, function or enumerator are declared in the same
13474 scope with the same name, the class name is hidden.
13476 Wed Nov 17 19:07:18 1993 Chip Salzenberg <chip@fin.uucp>
13478 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
13479 and long double from each other when overloading.
13480 (compute_conversion_costs_{ansi,old}, build_method_call,
13481 build_overlay_call_real, convert_to_aggr): Always set and
13482 always use H_LEN member of candidate structure.
13484 Mon Oct 11 23:10:53 1993 Chip Salzenberg <chip@fin.uucp>
13486 * cp-decl.c (duplicate_decls): Note redeclarations of library
13487 functions, and generate distinct warnings for them.
13489 Mon Oct 4 12:26:49 1993 Chip Salzenberg <chip@fin.uucp>
13491 Support format warnings in G++.
13493 * cp-tree.h: Protect against multiple inclusion.
13494 Declare all public functions in c-common.c (copy from c-tree.h).
13495 (STDIO_PROTO): Define.
13496 (warn_format): Declare.
13497 (record_format_info): Remove declaration.
13498 * cp-decl.c (init_decl_processing): Call init_function_format_info.
13499 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
13500 * cp-typeck.c (build_function_call_real): Call check_function_format.
13501 (record_format_info): Remove -- obsolete stub.
13503 Sat Jul 24 12:04:29 1993 Chip Salzenberg <chip@fin.uucp>
13505 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
13506 following an extern one (for -Wredundant-decls).
13507 * cp-parse.y (primary): In statement expression case, if compstmt
13508 returns something other than a BLOCK, return it unchanged.
13510 Thu Dec 2 20:44:58 1993 Chip Salzenberg <chip@fin.uucp>
13512 * cp-decl.c (warn_extern_redeclared_static): New function made
13513 from code extracted from pushdecl.
13514 (duplicate_decls, pushdecl): Call new function.
13515 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
13516 to be a TREE_LIST when function is declared in 'extern "C" {}'.
13518 Fri Dec 3 16:01:10 1993 Jason Merrill <jason@deneb.cygnus.com>
13520 * cp-class.c (duplicate_tag_error): Use cp_error.
13521 (finish_base_struct): Check for ambiguity with direct base, and don't
13522 generate op= or copy ctor if it exists.
13524 Fri Dec 3 15:32:34 1993 Kung Hsu <kung@cirdan.cygnus.com>
13526 * cp-init.c (expand_member_init): when initializer name is null,
13527 don't try to build it now because emit_base_init will handle it.
13529 Fri Dec 3 12:28:59 1993 Jason Merrill <jason@deneb.cygnus.com>
13531 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
13532 code such as ExceptionHandler::operator=.
13534 Fri Dec 3 10:32:08 1993 Jason Merrill <jason@deneb.cygnus.com>
13536 * cp-decl.c (grokdeclarator): Don't try to print out dname when
13537 complaining about arrays of references if decl_context==TYPENAME,
13538 since it will be null.
13540 * cp-decl2.c: Default to flag_ansi_overloading.
13542 Thu Dec 2 18:05:56 1993 Kung Hsu <kung@cirdan.cygnus.com>
13544 * cp-call.c (build_method_call): use binfo from instance if it's
13545 different from binfo (basetype_path) passed from above.
13547 Wed Nov 17 19:14:29 1993 Chip Salzenberg <chip@fin.uucp>
13549 cp-error.c (dump_expr): Use unsigned chars to output a
13550 TREE_REAL_CST in hex.
13552 Thu Dec 2 11:05:48 1993 Jason Merrill <jason@deneb.cygnus.com>
13554 * cp-class.c (finish_struct): Fix typo in setting
13555 cant_synth_asn_ref.
13557 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
13558 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
13560 * cp-lex.c (default_copy_constructor_body): Change
13561 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
13562 (default_assign_ref_body): Likewise.
13563 (default_copy_constructor_body): Call operator= explicitly for
13564 base classes that have no constructor.
13566 Thu Dec 2 10:47:15 1993 Michael Tiemann <tiemann@blues.cygnus.com>
13568 * cp-call.c (build_method_call): If the instance variable is
13569 converted to error_mark_node when we're trying to convert it to the
13570 base type of a method we're looking up, return error_mark_node.
13572 Thu Dec 2 10:41:16 1993 Torbjorn Granlund <tege@cygnus.com>
13574 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
13575 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
13577 Wed Dec 1 13:33:34 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13579 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
13580 harshness_code, not the size of short, for clearing out the
13583 * cp-call.c (print_candidates): New function.
13584 (build_method_call): When we had some candidates, but didn't get a
13585 usable match, don't report that we got an error with the first
13586 candidate. Instead, say there were no matches, and list the
13587 candidates with print_candidates. In the second pass, make sure we
13588 clear out ever_seen, so we can accurately count the number of
13589 functions that qualified.
13591 Wed Dec 1 09:53:59 1993 Torbjorn Granlund <tege@cygnus.com>
13593 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
13594 only if op1 is known to be != -1.
13595 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
13597 Tue Nov 30 14:07:26 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
13599 * cp-method.c (hack_identifier): If the field itself is private, and
13600 not from a private base class, say so.
13602 Mon Nov 29 03:00:56 1993 Jason Merrill <jason@deneb.cygnus.com>
13604 * cp-decl.c (grokdeclarator): Always warn on initialization of
13607 Wed Nov 24 00:49:35 1993 Jason Merrill <jason@deneb.cygnus.com>
13609 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
13610 (finish_base_struct): Set cant_synth_asn_ref properly.
13612 * cp-lex.c (cons_up_default_function): Add section for operator=.
13613 (default_assign_ref_body): New function, mostly cribbed from
13614 default_copy_constructor_body.
13616 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
13617 cant_synth_asn_ref, no_const_asn_ref.
13618 (finish_base_struct): Update no_const_asn_ref, note that you should
13619 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
13620 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
13621 initialize them properly. Set no_const_asn_ref properly. Set
13622 cant_synth_* in some of the situations where they should be set.
13623 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
13624 to cons_up_default_function for operator=.
13626 Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
13628 * cp-cvt.c (convert_force): Add code to perform casting of pointer
13629 to member function types.
13630 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
13631 when the conversion should be done, regardless.
13632 * cp-tree.h (build_ptrmemfunc): Likewise.
13633 * cp-type2.c (digest_init): Likewise.
13634 * cp-typeck.c (convert_for_assignment): Likewise.
13636 Tue Nov 23 18:06:58 1993 Jason Merrill <jason@deneb.cygnus.com>
13638 * cp-error.c (dump_expr): Do the right thing for variables of
13641 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
13642 and its kin properly.
13643 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
13645 Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
13647 * cp-method.c (build_opfncall): Don't count pointer to member
13648 functions as aggregates here, as we don't want to look up methods in
13649 them. The compiler would core dump if we did, as they don't have
13651 * cp-typeck.c (build_indirect_ref): Improve wording on error
13654 Mon Nov 22 14:22:23 1993 Jason Merrill <jason@deneb.cygnus.com>
13656 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
13657 (since it's supported in other compiler bits).
13659 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
13662 * cp-error.c (dump_function_decl): Don't print return type for
13663 constructors and destructors.
13665 * cp-cvt.c (cp_convert_to_pointer): Import code from
13666 convert_to_pointer so we can return error_mark_node in the case of an
13667 error, and to allow more meaningful error messages.
13668 (build_type_conversion): Don't go through void* when trying
13669 to convert to a pointer type.
13671 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
13672 after grokclassfn so that it's dealing with the right decl.
13673 (grok_op_properties): Don't assert !methodp for op new and op delete.
13675 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
13676 no uses of it in the compiler).
13678 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
13680 (build_method_call): Likewise.
13682 Fri Nov 19 12:59:38 1993 Jason Merrill <jason@deneb.cygnus.com>
13684 * cp-tree.c (count_functions): Abstraction function.
13686 * cp-call.c (build_overload_call_real): Deal with new overloading
13687 properly, remove dead code.
13689 * gcc.c (default_compilers): Generate and use .ii files in the
13690 intermediate stage of compiling C++ source.
13692 Fri Nov 19 11:26:09 1993 Jim Wilson <wilson@sphagnum.cygnus.com>
13694 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
13695 address before using it, so it can be later safely compared.
13697 Fri Nov 12 15:30:27 1993 Jason Merrill <jason@deneb.cygnus.com>
13699 * cp-pt.c (tsubst): Deal with new overloading.
13701 * cp-typeck.c (fntype_p): is the arg function type?
13702 (comp_target_parms): pedwarn on conversion from (anything) to (...).
13703 (build_x_function_call): Deal with new overloading.
13705 * cp-tree.c (decl_list_length): Deal with new overloading.
13706 (decl_value_member): Like value_member, but for DECL_CHAINs.
13708 * cp-decl.c (duplicate_decls): Deal with new overloading.
13709 (start_decl): Likewise.
13711 * cp-class.c (instantiate_type): Deal with new overloading.
13713 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
13714 (convert_harshness_old): Deal with new overloading.
13715 (build_overload_call_real): Likewise.
13717 Mon Nov 8 13:50:49 1993 Jason Merrill <jason@deneb.cygnus.com>
13719 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
13720 if unambiguous, NULL_TREE otherwise.
13721 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
13722 (is_overloaded_fn): Returns whether or not the passed tree is
13723 a function or list of functions.
13725 * cp-init.c (init_init_processing): use `get_first_fn' to find
13726 the FUNCTION_DEFN for new and delete.
13728 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
13729 code size in half (I spit on special cases).
13731 Tue Sep 7 20:03:33 1993 Jason Merrill <jason@deneb.cygnus.com>
13733 * cp-decl.c: Allow references and template type parameters as well