1 Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
3 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
5 Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com)
7 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
8 bitmask for lexing character constants.
10 * call.c (build_method_call): Disable code that tries to do tricky
11 stuff with a default parameter that is a constructor call, but
12 actually does other tricky stuff that breaks things.
14 Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
16 * decl.c (finish_enum): Disable code which forces enums to be signed,
17 since this conflicts with their use as bitfields. type_promotes_to
18 handles promotion of enums of underlying unsigned types to signed
21 Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com)
23 * cvt.c (type_promotes_to): Also promote enums to long if
26 * typeck.c (default_conversion): Don't expect type_promotes_to to
27 return a main variant.
29 Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com)
31 * call.c (build_scoped_method_call): Don't lose side effects in the
32 object expression when calling a non-existent destructor.
34 Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au)
36 * call.c (build_scoped_method_call): Remove erroneous error message
37 when destructor call is written as a scoped call.
39 Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
41 * various: Cast pointer arguments to bzero and bcopy to char *.
43 Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
45 * lex.c (cons_up_default_function): Mark methods in a template class
46 as template instances. Store the values of interface_unknown and
47 interface_only for do_pending_inlines.
48 (do_pending_inlines): Use them.
50 Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
52 * method.c (do_build_copy_constructor): Handle anonymous unions.
53 (do_build_assign_ref): Ditto.
54 (largest_union_member): Move from lex.c.
56 Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
58 * call.c (build_overload_call_real): Don't immediately do
59 array->pointer conversion.
61 * pt.c (type_unification): If not passing to a reference, strip
62 cv-quals. Also handle array->pointer conversion.
64 Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com)
66 * decl.c (grokdeclarator): Don't warn about applying const to a
67 const typedef or template type parameter.
69 Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
71 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
72 dealing with exceptions.
74 Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com)
76 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
77 (direct_notype_declarator): Ditto.
78 (complex_direct_notype_declarator): Remove it here.
80 Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com)
82 * init.c (resolve_offset_ref): Fix types used in resolving .*
85 Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
87 * g++.c: Rework last change so it's done like collect.c (and
90 Wed Sep 28 19:19:01 1994 Brendan Kehoe (brendan@mole.gnu.ai.mit.edu)
92 * except.c (register_exception_table): Use Pmode, not PTRmode.
94 Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
96 * g++.c: Include <sys/errno.h> in case `errno' is a macro
97 as permitted by ANSI C.
99 Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
101 * typeck.c (c_expand_return): Use magic so the backend can fixup the
102 assignment into the return register, so cleanups won't clobber it.
104 Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
106 * method.c (hack_identifier): Don't call assemble_external for
109 * decl.c (finish_decl): Also end temporary allocation if the decl in
110 question has a type of error_mark_node.
112 Wed Sep 28 21:45:00 1994 Mike Stump (mrs@cygnus.com)
114 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
115 that if the ?: was a reference type, that the subparts will be also.
117 Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
119 * except.c (register_exception_table): Use Pmode, not PTRmode.
121 Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
123 * lex.c (do_pending_inlines): Do method synthesis after the
124 pending_inlines have been reversed.
126 Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
128 * decl2.c (finish_file): Fix Brendan's fix: Only call
129 register_exception_table if there is a non-empty exception table.
131 Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
133 * decl2.c (finish_file): Only do register_exception_table if
134 -fhandle-exceptions is being used.
136 Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
138 * except.c (output_exception_table_entry): Simplify
139 by using assemble_integer.
140 (build_exception_table): Change to return a count.
141 Cleanup to use standard macros, instead of hard-wired
142 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
143 (register_exception_table): New function. Generate call to builtin.
144 * decl2.c (finish_file): Call register_exception_table.
145 * cp-tree.h (build_exception_table): Fix prototype.
147 Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
149 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
151 * decl2.c (delete_sanity): Give an error at trying to delete a
154 Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
156 * lex.c (cons_up_default_function): Mark synthesized destructors
159 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
160 something other than __wchar_t, complaining if -pedantic and not in
163 Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
165 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
168 * typeck.c (build_modify_expr): Require complete type after checking
171 * call.c (build_method_call): Print parmtypes when complaining of
174 * typeck.c (build_modify_expr): Handle assignment to array from
177 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
179 * call.c (build_method_call): Don't bother with the exact match.
181 Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
183 * init.c (expand_aggr_init): If we munge the type of the variable,
184 also munge the type of the initializer.
186 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
187 (init_decl_processing): Push artificial declaration of wchar_t so
188 people don't have to declare it before they can use it.
190 * error.c (cp_line_of): return lineno in lieu of 0.
192 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
194 (build_component_ref): Fold the COMPONENT_REF in case it can be
197 * typeck2.c (store_init_value): Don't pedwarn about non-constant
198 bracketed initializers for automatic variables.
200 Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
202 * error.c (dump_decl): Don't say `typedef enum foo foo'.
204 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
205 because they're affected by #pragma i/i. We'll deal with that when
206 they get instantiated.
208 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
210 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
211 ADDR_EXPRs if appropriate.
213 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
215 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
216 initializer properly.
217 * typeck2.c (digest_init): Ditto.
219 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
220 it uses build_cplus_array_type.
221 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
223 * pt.c (do_type_instantiation): Don't try to instantiate nested
226 Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
228 * cvt.c (build_up_reference): Handle preincrement and predecrement
231 Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
233 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
236 Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
238 * decl.c (finish_decl): Lay out the rtl for DECL before doing
239 grok_reference_init, in case it's static.
241 Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
243 * class.c (finish_struct): Don't synthesize constructors if the
244 class has a field with the same name as the class. Don't die on
245 classes with no constructors or destructors. Don't die if the head
246 and tail of the class are in different files.
248 * decl.c (grokdeclarator): Don't treat a function pointer field
249 with the same name as the class as a constructor.
251 Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
253 * typeck.c (build_c_cast): Pull constant values out of their
256 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
257 FUNCTION_DECLs and TEMPLATE_DECLs.
259 Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
261 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
264 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
265 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
266 TREE_PUBLIC unless -fexternal-templates.
268 Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
270 * pt.c (do_type_instantiation): Call instantiate_member_templates.
271 Deal with specializations.
272 (tsubst): Don't stick the mangled name in DECL_NAME for function
273 instantiations. Don't push them, either.
275 * decl2.c (grokfield): Move code for generating the
276 DECL_ASSEMBLER_NAME for static members from here.
277 * method.c (build_static_name): To here.
278 * decl.c (grokvardecl): Call build_static_name.
279 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
281 Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
283 * call.c (build_method_call): if -Wsynth, warn when selecting
284 synthesized op= over user-supplied one cfront would select.
285 * decl2.c (lang_decode_option): Handle -Wsynth.
287 Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
289 * decl.c (finish_enum): Overhaul to fix several bugs.
290 (start_enum): Disable useless code.
292 Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
294 * typeck.c (c_expand_return): Warn about returning a reference to a
296 (convert_arguments): Increment argument counter when using default
299 Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
301 * decl.c (finish_decl): If the type of decl is error_mark_node,
302 don't bother trying to do anything.
304 * typeck.c (convert_for_initialization): If the rhs contains a
305 constructor call, pretend the lhs type needs to be constructed.
307 * init.c (expand_default_init): If we stick the object inside the
308 initializer, mark the initializer used.
310 Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
312 * method.c (build_assign_ref): return *this;
313 (build_assign_ref): Fix base assignment order.
314 (build_copy_constructor): Fix member init order.
316 Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
318 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
321 Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
323 * method.c (build_copy_constructor): Also copy virtual bases.
325 Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
327 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
328 any synthesis. Also first set deja_vu on all pending_inlines.
330 * method.c (build_assign_ref): Use build_member_call to invoke base
331 operator=, rather than build_modify_expr. And use
332 build_reference_type instead of TYPE_REFERENCE_TO.
333 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
336 * decl2.c (grokfield): Don't complain about undefined local class
339 * class.c (finish_struct): Don't try to synthesize methods here.
340 * lex.c (do_pending_inlines): Instead, synthesize them here.
341 (init_lex): Initialize synth_obstack.
342 (cons_up_default_function): Stick synthesis request on
345 Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
347 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
348 accept an RTL_EXPR in what we're about to use for the instance,
349 since anything which would end up with pcc_struct_return set
350 inside cplus_expand_expr.
352 * cp-tree.h (cons_up_default_function): Note change of prototype.
354 Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
356 * class.c (finish_struct): Undid change from Aug 21 testing
357 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
358 * parse.y (left_curly): Ditto, undid change from Aug 21.
359 * decl.c (xref_tag): Undid change from Aug 21, set
360 CLASSTYPE_INTERFACE correctly, and added comments.
362 Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
364 Rework approach to synthesized methods; don't go through the parser
366 * class.c (finish_struct): Use new synthesis approach.
367 * lex.c (cons_up_default_function): Now just creates declaration,
369 (largest_union_member): #if 0 out.
370 (default_assign_ref_body): Ditto.
371 (default_copy_constructor_body): Ditto.
372 * method.c (build_default_constructor): New function to synthesize X().
373 (build_copy_constructor): Synthesize X(X&).
374 (build_assign_ref): Synthesize X::operator=(X&).
375 (build_dtor): Synthesize ~X().
377 * error.c (cp_line_of): If we're dealing with an artificial
378 TYPE_DECL, look at the type instead.
380 Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
382 * init.c (sort_member_init): Check warn_reorder.
383 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
385 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
386 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
387 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
389 Tue Aug 23 09:28:35 1994 Mike Stump (mrs@cygnus.com)
391 * error.c (dump_decl): Improve wording, so that error messages
392 dont't read template<, class foo>...
394 Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
396 * parse.y (label_colon): Also match a TYPENAME as a label name,
397 since they may have declared a class by that name but have also
398 tried to have a local label under the same name.
400 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
401 for the message so they know at what point it was instantiated.
403 Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
405 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
406 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
407 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
408 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
409 * parse.y (left_curly): New final resting place for setting
410 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
412 * class.c (finish_struct): Don't test for function/field name
413 conflicts in signatures, since all the fields are compiler-constructed.
415 Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
417 * method.c (build_overload_nested_name): in qualified name
418 mangling, the template with value instantiation will have numeric
419 at end and may mixed with the name length of next nested level.
420 Add a '_' in between.
421 * method.c (build_overload_name): ditto.
422 * method.c (build_overload_identifier): ditto.
424 Thu Aug 18 16:24:43 1994 Mike Stump (mrs@cygnus.com)
426 * error.c (dump_decl): Handle NULL args.
428 Thu Aug 18 12:48:09 1994 Mike Stump (mrs@cygnus.com)
430 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
431 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
432 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
433 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
434 * parse.y (left_curly): New final resting place for setting
435 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
437 Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
439 * g++.c (main): Only decrement "added" and set "library" to
440 NULL when "library" != NULL.
442 Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
444 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
445 just because its class has a known interface.
446 (decls_match): Deal with new format of template parms.
448 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
451 Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
453 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
454 (xref_defn_tag): Ditto.
455 (pushdecl): Only allow artificial typedefs to be shadowed.
457 * init.c (emit_base_init): Pass the right binfos to
460 * class.c (delete_duplicate_fields_1): Make it work right.
461 (finish_struct): Catch function/field name conflict.
463 * decl2.c (check_classfn): Pass the function to cp_error, not just
466 * init.c (sort_member_init): Warn when order of member initializers
467 does not match order of member declarations.
468 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
470 * error.c (dump_expr): Handle lists of functions.
472 * decl.c (start_function): #pragma interface only affects functions
473 that would otherwise be static.
474 (finish_decl): Don't warn about an unused variable if it has both
475 constructor and destructor, since the 'resource allocation is
476 initialization' idiom is relatively common.
478 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
479 (comp_target_parms): Ditto.
480 (compparms): Never consider default parms.
481 (common_base_type): Don't choose a virtual baseclass if there is a
482 more derived class in common.
483 (build_conditional_expr): If pedantic, pedwarn about conversion to
484 common base in conditional expr.
486 * class.c (instantiate_type): Handle template instantiation better.
488 * typeck.c (convert_arguments): Don't try to get tricky and convert
489 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
490 user-defined conversions.
492 * lex.c (check_for_missing_semicolon): Also give error at end of
495 * call.c (build_method_call): Don't promote arrays to pointers here.
497 * typeck.c (convert_arguments): Don't require the actual parameter
498 to be of a complete type if the formal parameter is a reference.
500 Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
502 * decl.c (grokdeclarator): Soften 'static' on member function error
505 * init.c (build_new): Don't automatically save rval.
506 (build_offset_ref): Do field lookup with proper basetype_path.
508 Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
510 * errfn.c (cp_silent): Declare to mark when we should avoid
511 emitting warnings and errors.
512 (cp_error): Check it.
513 (cp_warning): Likewise.
514 (cp_pedwarn): Likewise.
515 (cp_compiler_error): Likewise.
516 (cp_error_at): Likewise.
517 (cp_warning_at): Likewise.
518 (cp_pedwarn_at): Likewise.
519 * call.c (compute_conversion_costs): Set CP_SILENT when we start
520 out, and make sure we turn it off before we leave.
522 Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
524 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
525 argument is obviously an array.
527 Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
529 * typeck.c (c_expand_start_case): Do cleanups here.
531 * parse.y (xcond): Do bool conversion here, too.
532 (simple_stmt, SWITCH case): Don't do cleanups here.
534 * decl.c (duplicate_decls): Don't treat builtins that have been
535 explicitly declared specially.
537 Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
539 * tree.c (make_deep_copy): Support copying pointer, reference,
540 function, array, offset and method types.
542 * decl.c (init_decl_processing): Mark exit and abort as
543 BUILT_IN_NONANSI so that duplicate_decls is kinder about
545 (duplicate_decls): Don't give two errors for redeclaring a C
546 function with the same parms but a different return type.
548 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
549 (condition): Instead of here.
550 (simple_stmt, SWITCH case): Also do cleanup here.
552 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
554 * call.c (build_method_call): Don't throw away the side effects of
555 the object in a call to a non-existent constructor.
556 * parse.y (primary): Ditto.
558 * method.c (build_decl_overload): Oop.
560 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
561 warn about uselessness of specifying -fansi-overloading.
563 * method.c (build_decl_overload): Treat any non-member new with one
564 parameter as __builtin_new.
566 * decl.c (init_decl_processing): Setup built-in meanings of exit,
569 Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
571 * error.c (dump_readonly_or_volatile): Put a space between const and
572 volatile if both apply.
574 * init.c (perform_member_init): Clean up after this initialization.
575 (emit_base_init): Clean up after each base init, not after all have
577 (expand_aggr_vbase_init_1): Clean up after this init.
579 Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
581 * call.c (build_method_call): Deal with destroying references.
583 * parse.y (condition): Do bool_truthvalue_conversion here.
584 (paren_expr_or_null): And here.
585 (simple_if): Not here.
586 (simple_stmt): Or here.
588 Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
590 * parse.y (paren_expr_or_null): Wrap the expression in a
594 Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
596 * call.c (build_scoped_method_call): Fix error message when
597 destructor call refers to a nonexistent type.
599 Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
601 * lex.h (rid): Deleted RID_RAISES, it's never used.
602 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
603 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
604 they don't need to be touched in `grokdeclarator.'
605 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
607 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
608 RID_MAX as loop limit for finding declaration specifiers.
610 Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
612 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
613 access `yytname,' which is static in parse.c.
615 Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
617 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
618 was `GNU_xref_def' instead of `GNU_xref_ref.'
620 Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
622 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
623 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
624 (do_type_instantiation): Ditto.
626 * decl2.c (import_export_inline): Decides at EOF what an inline's
628 (finish_file): Call it.
630 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
631 and DECL_EXTERNAL from do_*_instantiation. Only set
632 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
633 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
634 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
636 Fri Aug 5 01:12:20 1994 Mike Stump (mrs@cygnus.com)
638 * class.c (get_class_offset_1, get_class_offset): New routine to
639 find the offset of the class where a virtual function is defined,
640 from the complete type.
641 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
642 get_class_offset instead of virtual_offset as get_class_offset will
643 always provide the right answer.
644 * tree.c (virtual_offset): Remove. It only ever worked some of the
647 Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
649 * call.c (build_method_call): Put back unary_complex_lvalue call
650 that I thought was redundant.
652 * typeck.c (c_expand_return): Fix a case I missed before.
654 Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
656 * pt.c (unify): Strip cv-quals from template type arguments (when
657 'const T*' is matched to 'const char*', that does not mean that T is
660 Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
662 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
663 typedefs. Third time's the charm?
665 * parse.y (template_parm): Support default template parms.
666 * pt.c (process_template_parm): Ditto.
667 (end_template_parm_list): Ditto.
668 (coerce_template_parms): Ditto.
669 (mangle_class_name_for_template): Ditto.
670 (push_template_decls): Ditto.
672 * method.c (build_overload_identifier): Ditto.
673 * error.c (dump_decl): Ditto.
675 Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
677 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
679 Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
681 * search.c (note_debug_info_needed): Also emit debugging information
682 for the types of fields.
684 Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
686 * pt.c (lookup_template_class): Pass 'template' to
687 coerce_template_parms instead of 'in_decl', since it's a more
690 * typeck.c (c_expand_return): Make sure any cleanups for the return
692 (build_c_cast): Use CONVERT_EXPR for conversion to void.
694 * pt.c (do_type_instantiation): Also instantiate nested types.
696 * typeck.c (convert_for_assignment): Don't die when comparing
697 pointers with different levels of indirection.
699 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
700 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
703 * decl2.c (finish_anon_union): Don't die if the union has no
706 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
707 so that 'typedef int foo, bar;' will work.
709 * decl2.c (finish_file): Don't call expand_aggr_init for
712 Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
714 * decl.c (finish_function): We can't inline constructors and
715 destructors under some conditions with -fpic, but don't unset
718 Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
720 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
722 Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
724 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
726 (finish_struct_methods): Use copy_assignment_arg_p.
728 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
731 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
732 don't know how to compare the operands.
734 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
735 as a declarator-id in their program. Like the Linux headers do.
738 * tree.c (lvalue_p): Treat calls to functions returning objects by
739 value as lvalues again.
741 * typeck.c (build_component_addr): Use convert_force to convert the
742 pointer in case the component type is also a private base class.
744 * search.c (get_matching_virtual): Fix bogus warning of overloaded
747 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
748 TYPE_DECL to fix bogus shadowing warnings.
750 Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
752 * init.c (expand_aggr_init_1): const and volatile mismatches do not
753 prevent a TARGET_EXPR from initializing an object directly.
755 Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
757 * cvt.c (build_up_reference): Allow building up references to
758 `this', don't warn about making references to artificial variables
761 * tree.c (lvalue_p): `this' is not an lvalue.
763 * call.c (build_method_call): Accept using a typedef name (or
764 template type parameter) for explicit destructor calls.
766 Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
768 * method.c (hack_identifier): Put back old code so lists of
769 non-functions will be handled properly.
771 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
772 defined in the language-independent tree.h.
774 * tree.c (count_functions): Avoid bogus warning when compiling this
777 Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
779 * decl.c (grok_reference_init): Always save the initializer of a
782 Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com)
784 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
785 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
788 Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
790 * method.c (hack_identifier): Fix for new overloading.
792 * typeck.c (build_binary_op_nodefault): Don't mess with division by
795 Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
797 * decl2.c (finish_file): Only call walk_sigtables, if
798 flag_handle_signatures is turned on, don't waste time otherwise.
800 Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
802 * decl.c (push_overloaded_decl): Don't create overloads of one when
803 shadowing a class type.
804 * typeck.c (build_x_function_call): Complain about overloads of one.
806 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
807 (grokdeclarator): Fix setting of TREE_STATIC.
808 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
810 Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
812 * cp-tree.h (walk_sigtables): Created extern declaration.
813 * decl2.c (walk_sigtables): Created function, patterned after
814 walk_vtables, even though we only need it to write out sigtables.
815 (finish_sigtable_vardecl): Created function.
816 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
817 (finish_file): Call walk_sigtables.
819 * sig.c (build_signature_table_constructor): Mark class member
820 function pointed to from signature table entry as addressable.
822 Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
824 * decl.c (start_decl): Check new decl of static member variable
825 against the declaration in the class here.
826 (grokvardecl): Instead of here.
828 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
830 (build_vtable): Ditto.
832 * decl2.c (import_export_vtable): Move logic for deciding the
833 interface of a template class from here.
834 (import_export_template): To here.
835 (finish_vtable_vardecl): Call import_export_template before
836 import_export_vtable.
838 Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
840 * except.c (init_exception_processing): Setup interim_eh_hook to
841 call lang_interim_eh.
842 * except.c (do_unwind): Propagate throw object value across
844 * except.c (saved_throw_value): Used to hold the value of the object
845 being thrown. It is always a reference to the real value.
846 * except.c (expand_start_catch_block): Add handling for the
847 value of the exception object.
848 * except.c (expand_start_catch_block): Add handler for the handler,
849 so that throws inside the handler go to the outer block.
850 * except.c (expand_end_catch_block): Ditto.
851 * parse.y (handler_args): Use parm instead, as the other doesn't yet
852 handle references correctly.
854 Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
856 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
857 vtable entry properly to abort.
859 Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
861 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
864 * call.c (build_overload_call_real): Handle fnname being a list of
866 * typeck.c (build_x_function_call): Pass list of functions to
867 build_overload_call, not just the name.
868 * tree.c (count_functions): Complain when called for invalid
871 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
872 and DECL_EXTERNAL on static members and initialized const members.
873 * decl2.c (grokfield): Reflect this change.
875 Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
877 * parse.y (init): ANSI C++ does not forbid { }.
879 Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
881 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
882 warn_nonvdtor defaults to off.
884 * class.c (instantiate_type): Use comptypes rather than relying on
887 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
890 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
892 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
894 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
897 Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
899 * decl2.c (finish_file): Maybe consider static inlines multiple
900 times, in case they reference each other.
902 Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
904 * class.c (finish_struct): Don't `cons_up_default_function's
906 (finish_struct): Handle an empty method_vec correctly.
908 * decl.c (grokdeclarator): Don't warn about a signature being
909 empty in a signature pointer declaration if we only saw a
910 forward declaration of the signature. Changed `warning's into
913 * sig.c (build_sigtable): Don't die if a null signature table
914 constructor is returned.
915 (build_signature_pointer_constructor): If the signature table
916 constructor is null, the _sptr field is set to a null pointer
917 and cast to the appropriate type. Make copies of all null
918 pointers so that the type null_pointer_node doesn't get changed.
919 (build_signature_table_constructor): Added comments.
921 * sig.c (build_signature_pointer_constructor): Complain if we
922 try to assign to/initialize a signature pointer/reference of
923 an undefined signature.
925 Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
927 * typeck2.c (store_init_value): Don't be pedantic about
928 non-constant initializers of signature tables/pointers/references.
930 Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
932 * decl.c (grokdeclarator): If we are grokking an opaque typedef
933 in a signature, don't complain about it begin static.
935 Wed Jun 29 16:44:45 1994 Mike Stump (mrs@cygnus.com)
937 Fixes a problem of the this pointer being wrong in virtual calls to
938 methods that are not overridden in more derived classes.
940 * class.c (fixup_vtable_delta): New routine. It will fixup the
941 delta entries in vtables, wheever they need updating.
942 * class.c (finish_struct): Call the new routine for all virtual
943 bases, as they can have different offsets, than those used in base
944 classes that we derive our vtable from.
946 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
948 * typeck.c (build_binary_op): Use the types before default
949 conversions in the error message.
951 * *.c: Use c_build_type_variant instead of build_type_variant where
952 the type might be an array.
954 * call.c (build_method_call): Call build_type_variant and
955 build_reference_type in the right order.
956 * decl.c (record_builtin_type): Ditto.
958 Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
960 * call.c (build_method_call): Call build_type_variant and
961 build_reference_type in the right order.
962 * decl.c (record_builtin_type): Ditto.
964 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
966 * typeck.c (build_binary_op): Use the types before default
967 conversions in the error message.
969 * *.c: Use c_build_type_variant instead of build_type_variant where
970 the type might be an array.
972 Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
974 * cvt.c (convert_to_reference): Try UDC's before doing the
975 reinterpret_cast thang, though.
977 Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
979 * typeck.c (c_expand_return): Don't USE the return value location
980 after we've expanded the jump.
982 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
983 trying to write out an inline.
985 * cvt.c (build_up_reference): Also do address adjustment when the
987 (convert_to_reference): Try UDCs only after built-in conversions.
988 (build_type_conversion_1): Don't play games with the argument to the
990 (build_type_conversion): #if 0 out code for binding to reference.
992 Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
994 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
995 whether to emit inlines.
997 * decl.c (grokdeclarator): Set explicit_int for decls that just
998 specify, say, 'long'.
1000 * init.c (do_friend): Do overload C functions (or call pushdecl,
1003 Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1005 * cvt.c (build_up_reference): Don't call readonly_error.
1006 (convert_to_reference): Propagate const and volatile from expr to
1009 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
1011 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
1012 creating a temporary.
1013 (convert_to_reference): Lose excessive and incorrect trickiness.
1014 (cp_convert): Call build_cplus_new with with_cleanup_p set.
1016 * typeck2.c (build_functional_cast): Ditto.
1018 Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1020 * decl.c (grokdeclarator): signed, unsigned, long and short all
1023 * decl.c (grokdeclarator): Allow "this is a type" syntax.
1024 (grok_reference_init): Simplify and fix.
1026 Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
1028 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
1031 Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
1033 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
1034 tinkering to after call to pushdecl.
1036 Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
1038 * call.c (build_method_call): Handle destructors for non-aggregate
1041 Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
1043 * call.c (build_method_call): Make sure that the name given for the
1044 destructor matches the constructor_name of the instance.
1046 * pt.c (do_function_instantiation): A non-extern instantiation
1047 overrides a later extern one.
1048 (do_type_instantiation): Ditto.
1050 Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
1052 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
1053 unqualified array type.
1055 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
1056 CONSTRUCTOR with no elements.
1058 * decl.c (various): Lose empty_init_node.
1059 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
1060 thing depending on the value of DECL_COMMON instead of
1061 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
1062 don't have constructors, don't treat a real empty CONSTRUCTOR
1065 * typeck2.c (process_init_constructor): Don't treat empty_init_node
1068 Wed Jun 15 19:05:25 1994 Mike Stump (mrs@cygnus.com)
1070 * class.c (override_one_vtable): Don't forget to merge in an old
1071 overrider when we wanted to reuse a vtable, but couldn't.
1073 Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
1075 * decl.c (start_decl): Put statics in common again.
1077 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
1078 setting the type to error_mark_node.
1080 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
1081 bitfield assignments.
1083 Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1085 * decl.c (grok_op_properties): Const objects can be passed by value.
1087 Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1089 * decl2.c (import_export_vtable): Force implicit instantiations to
1090 be interface_only when -fno-implicit-templates.
1092 * decl.c (duplicate_decls): Redeclaring a class template name is an
1095 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
1096 * xref.c (GNU_xref_decl): Support templates.
1098 Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
1100 * decl.c (grok_op_properties): Split out checking for whether this
1101 function should suppress the default assignment operator.
1102 * decl2.c (grok_function_init): Ditto.
1103 (copy_assignment_arg_p): New function do do just that.
1104 Now considers virtual assignment operators that take a base as an
1105 argument to count as copy assignment operators.
1107 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
1108 TREE_ASM_WRITTEN, as they are redundant.
1110 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
1111 decl that has no LANG_SPECIFIC part.
1112 (do_type_instantiation): Force the debugging information for this
1115 * decl.c (start_decl): Clear up uses of various types of templates
1116 (say sorry for static data members, rather than "invalid template").
1117 (expand_static_init): Fix initialization of static data members of
1120 Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
1122 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
1124 * g++.c (main): Use -xc++-cpp-output for .i files.
1126 * pt.c (tsubst): Give meaningful error about declaring template for
1127 a copy constructor which was not declared in the class template.
1128 (do_type_instantiation): Explicit instantiation before the class
1129 template is an error.
1130 (instantiate_template): Don't die if tsubst returns error_mark_node.
1132 Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1134 Don't synthesize the copy assignment operator if the one in a base
1135 class is pure virtual.
1136 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
1137 whether the type has a pure virtual copy assignment operator.
1138 * class.c (finish_base_struct): Don't generate the copy assignment
1139 operator if a base class has a pure virtual one.
1140 * decl.c (grok_op_properties): Add disabled code to set
1141 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
1143 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
1145 * decl2.c (import_export_vtable): Always treat template
1146 instantiations as if write_virtuals >= 2, and treat implicit
1147 instantiations as external if -fno-implicit-templates.
1148 (finish_file): Output all pending inlines if
1149 flag_keep_inline_functions.
1151 Wed Jun 8 20:48:02 1994 Mike Stump (mrs@cygnus.com)
1153 * tree.c (layout_vbasetypes): Align virtual base classes inside
1154 complete objects, so that we don't core dump on machines such as
1155 SPARCs when we access members that require larger than normal
1156 alignments, such as a double. Also, we bump up the total alignment
1157 on the complete type, as necessary.
1159 Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
1161 * gxxint.texi (Free Store): New section with code for examining
1163 (Limitations of g++): Remove operator delete entry, since it is no
1164 longer accurate. Fix access control entry.
1166 * typeck.c (build_unary_op): Pedwarn about taking the address of or
1167 incrementing a cast to non-reference type.
1168 (build_modify_expr): Use convert instead of convert_force again.
1170 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
1171 class type, not == RECORD_TYPE.
1173 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
1175 * typeck2.c (report_case_error): #if 0 out.
1176 * lex.c (real_yylex): Lose RANGE.
1179 Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1181 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
1183 Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1185 * typeck.c (build_c_cast): Don't shortcut conversions to the same
1186 type. Don't replace consts with their values here, since that's now
1189 * cvt.c (cp_convert): When converting to bool, take
1190 integer_zero_node to false_node and all other INTEGER_CSTs to
1192 (build_type_conversion): Don't complain about multiple conversions
1193 to float if we're not really converting.
1195 Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
1197 Implement 'extern template class A<int>;' syntax for suppressing
1198 specific implicit instantiations.
1199 * cp-tree.h: Update prototypes for do_*_instantiation.
1200 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
1202 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
1204 (do_type_instantiation): Ditto.
1205 * parse.y (explicit_instantiation): Support 'extern template class
1207 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
1208 and DECL_EXTERNAL on explicit instantiations.
1210 * cvt.c (cp_convert): Replace constants with their values before
1212 (cp_convert): Consistently use 'e' instead of 'expr'.
1214 Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
1216 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
1218 Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1220 * typeck2.c (digest_init): Handle initializing a pmf with an
1222 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
1224 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
1225 (xref_defn_tag): Ditto.
1226 * pt.c (process_template_parm): Ditto.
1227 (lookup_template_class): Ditto.
1228 (push_template_decls): Ditto.
1229 (instantiate_class_template): Ditto.
1230 (create_nested_upt): Ditto.
1231 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
1234 * typeck.c (convert_arguments): Make sure type is not NULL before
1235 checking its TREE_CODE.
1237 Wed Jun 1 17:40:39 1994 Mike Stump (mrs@cygnus.com)
1239 * class.c (get_derived_offset): New routine.
1240 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
1241 BINFO_VIRTUALS when we choose a new base class to inherit from.
1242 * class.c (modify_one_vtable): Use get_derived_offset to get the
1243 offset to the most base class subobject that we derived this binfo
1245 * class.c (finish_struct): Move code to calculate the
1246 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
1247 new calls to get_derived_offset in modify_one_vtable.
1249 Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1251 * init.c (build_member_call): Use build_pointer_type instead of
1254 Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1256 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
1257 try to use it in an error.
1259 Wed Jun 1 09:48:49 1994 Mike Stump (mrs@cygnus.com)
1261 * typeck.c (convert_arguments, convert_for_initialization): Don't
1262 strip NOP_EXPRs, when we are converting to a reference.
1264 Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1266 * typeck.c (build_modify_expr): Don't dereference references when
1269 * decl2.c (grokfield): Don't check for grokdeclarator returning
1270 error_mark_node any more.
1272 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
1273 (start_method): Return void_type_node instead of error_mark_node.
1275 * typeck.c (build_modify_expr): Resolve offset refs earlier.
1277 Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
1279 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
1281 * typeck.c (build_modify_expr): Dereference references before trying
1284 * call.c (build_method_call): Don't confuse type conversion
1285 operators with constructors.
1286 * typeck2.c (build_functional_cast): Just call build_c_cast if there
1287 was only one parameter.
1288 * method.c (build_typename_overload): Don't set
1289 IDENTIFIER_GLOBAL_VALUE on these identifiers.
1290 * decl.c (grok_op_properties): Warn about defining a type conversion
1291 operator that converts to a base class (or reference to it).
1292 * cvt.c (cp_convert): Don't try to use a type conversion operator
1293 when converting to a base class.
1294 (build_type_conversion_1): Don't call constructor_name_full on an
1296 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
1298 * decl.c (start_decl): Don't complain that error_mark_node is an
1300 (finish_decl): Check for type == error_mark_node.
1302 Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
1304 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
1305 instantiations and inline members.
1307 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
1309 * lex.h: Declare looking_for_template.
1311 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
1312 between type and template interpretations of an identifier.
1314 Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
1316 * pt.c (instantiate_template): Zero out p if we found a
1319 * decl.c (grokdeclarator): Elucidate warning.
1320 (grokdeclarator): If pedantic AND -ansi, complain about long long.
1322 Make explicit instantiation work reasonably. It is now appropriate
1323 to deprecate the use of -fexternal-templates.
1324 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
1325 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
1326 (end_template_instantiation): Reflect changes in USE_TEMPLATE
1328 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
1329 (do_function_instantiation): Don't set EXPLICIT_INST if
1330 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
1331 appropriately otherwise.
1332 (do_type_instantiation): Set interface info for class. Set
1333 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
1334 flag_external_templates is set.
1335 * parse.y: Reflect changes in USE_TEMPLATE semantics.
1336 * decl2.c: New flag flag_implicit_templates determines whether or
1337 not implicit instantiations get emitted. This flag currently
1338 defaults to true, and must be true for -fexternal-templates to work.
1339 (finish_file): Consider flag_implement_inlines when
1340 setting DECL_EXTERNAL. Consider flag_implicit_templates when
1341 deciding whether or not to emit a static copy.
1342 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
1343 properly for template instantiations.
1344 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
1346 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
1347 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
1348 (various others): Accessor macros for the above.
1350 Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
1352 * typeck.c (build_binary_op_nodefault): Division by constant zero is
1355 Fri May 27 13:50:15 1994 Mike Stump (mrs@cygnus.com)
1357 * class.c (override_one_vtable): Don't modify things we don't own.
1359 Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
1361 * decl.c (finish_decl): Don't postpone processing the initializer of
1362 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
1363 PUBLIC const at toplevel.
1364 (grokdeclarator): pedwarn about initializing non-const or
1365 non-integral statics in the class body.
1367 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
1370 * call.c (convert_harshness): Dereference reference on rhs before
1371 proceeding, properly grok passing const things to non-const
1374 * typeck.c (build_unary_op): Soften error about taking the address
1375 of main() to a pedwarn.
1377 * lex.c (default_copy_constructor_body): Unambiguously specify base
1378 classes (i.e. A((const class ::A&)_ctor_arg) ).
1379 (default_assign_ref_body): Ditto.
1381 Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
1383 * decl2.c (grokfield): Don't complain about local signature
1384 method declaration without definition.
1386 * call.c (convert_harshness): If `type' is a signature pointer
1387 and `parmtype' is a pointer to a signature, just return 0. We
1388 don't really convert in this case; it's a result of making the
1389 `this' parameter of a signature method a signature pointer.
1391 * call.c (build_method_call): Distinguish calling the default copy
1392 constructor of a signature pointer/reference from a signature
1393 member function call.
1395 Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
1397 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
1400 * decl.c (duplicate_decls): A previous function declaration as
1401 static overrides a subsequent non-static definition.
1402 (grokdeclarator): Don't set TREE_PUBLIC on inline method
1405 Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1407 * decl.c (grokdeclarator): Handle initialization of static const
1409 (finish_decl): Ditto.
1411 * decl2.c (grokfield): Allow initialization of static const members
1414 * decl2.c (grokfield): Deal with grokdeclarator returning
1417 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
1418 (grokfndecl): Check the return value of grok_ctor_properties.
1419 (start_method): Ditto.
1421 * parse.y (absdcl): Expand type_quals inline.
1423 Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
1425 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
1428 Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
1430 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
1431 always use "__vt_%s".
1432 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
1433 when looking for a "sentinal" method (to decide on emitting vtables).
1434 * decl2.c (finish_file): Scan all decls for thunks that need
1436 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
1437 * method.c (make_thunk): Use a more meaningful label. If there
1438 exists a matching top-level THUNK_DECL re-use it; otherwise
1439 create a new THUNK_DECL (and declare it).
1440 * method.c (emit_thunk): Make thunk external/public depending
1441 on the underlying method.
1443 Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
1445 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
1448 * call.c (build_overload_call_real): Don't immediately pick a
1449 function which matches perfectly.
1451 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
1452 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
1453 reference (like 'int &const j').
1455 * typeck.c (convert_arguments): Don't mess with i for methods.
1456 * call.c (build_method_call): Pass the function decl to
1459 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
1460 checking for which multi-level pointer conversions are allowed.
1461 (comp_target_types): Call it.
1462 (convert_for_assignment): Check const parity on the ultimate target
1463 type, too. And make those warnings pedwarns.
1465 Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
1467 * error.c (dump_char): Use TARGET_* for character constants.
1469 Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1471 * tree.c (debug_no_list_hash): Make static.
1473 * decl.c (decls_match): Say the types don't match if newdecl ends up
1474 with a null type, after we've checked if olddecl does.
1475 (pushdecl): Check if the decls themselves match before looking for
1476 an extern redeclared as static, to avoid inappropriate and incorrect
1479 Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
1481 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
1484 * typeck.c (build_c_cast): Casting to function or method type is an
1487 * class.c (finish_struct): Make warning for anonymous class with no
1488 instances a pedwarn.
1490 * Makefile.in (stamp-parse): Expect a s/r conflict.
1492 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
1495 Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
1497 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
1498 than unsigned on platforms where sizeof(char)==sizeof(int).
1500 Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
1502 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
1504 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
1505 and treat them as lvalues.
1507 * decl.c (shadow_tag): Do complain about forward declarations of
1508 enums and empty declarations.
1509 * parse.y: Don't complain about forward declarations of enums and
1512 * typeck.c (convert_for_assignment): Complain about changing
1513 the signedness of a pointer's target type.
1515 * parse.y (stmt): Move duplicated code for checking case values from
1517 * decl2.c (check_cp_case_value): To here. And add a call to
1518 constant_expression_warning.
1520 * typeck.c (convert_for_assignment): Don't complain about assigning
1521 a negative value to bool.
1523 * decl.c (init_decl_processing): Make bool unsigned.
1525 * class.c (finish_struct): Allow bool bitfields.
1527 Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1529 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
1531 Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1533 * cvt.c (build_type_conversion): Lose special handling of
1536 * search.c (dfs_pushdecls): Improve shadowing warning.
1538 Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
1540 * init.c (build_delete): Throw away const and volatile on `this'.
1542 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
1543 rather than the enumerators.
1544 (pushtag): s/cdecl/c_decl/g
1546 Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
1548 * cp/typeck.c (common_type): Attribute merging.
1549 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
1551 * cp/parse.y: Revamp attribute parsing.
1553 Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
1555 * decl.c (shadow_tag): Also check for inappropriate use of auto and
1558 * method.c (build_overload_name): Clarify that the illegal case is a
1559 pointer or reference to array of unknown bound.
1561 * error.c (dump_type_prefix): Print references to arrays properly.
1563 * typeck.c (various): Be more helpful in pointer
1564 comparison diagnostics.
1566 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
1569 * parse.y: Also catch an error after valid stmts.
1571 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
1574 * typeck.c (convert_for_initialization): If call to
1575 convert_to_reference generated a diagnostic, print out the parm
1576 number and function decl if any.
1578 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
1579 specifying a line, not atarg.
1581 * tree.c (build_cplus_method_type): Always make `this' const.
1583 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
1584 a constructor or destructor, make `this' non-const.
1586 * typeck.c (build_modify_expr): Don't warn specially about
1587 assignment to `this' here anymore, since it will be caught by the
1590 * various: Disallow specific GNU extensions (variable-size arrays,
1591 etc.) when flag_ansi is set, not necessarily when pedantic is set,
1592 so that people can compile with -pedantic-errors for tighter const
1593 checking and such without losing desirable extensions.
1595 * typeck2.c (build_functional_cast): Call build_method_call with
1597 (process_init_constructor): Only process FIELD_DECLs.
1599 * decl.c (finish_decl): Also force static consts with no explicit
1600 initializer that need constructing into the data segment.
1602 * init.c (build_delete): Undo last patch, as it interferes with
1605 Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
1607 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
1610 * init.c (build_delete): pedwarn about using plain delete to delete
1613 Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
1615 * typeck.c (comp_target_types): Be more helpful in contravariance
1616 warnings, and make them pedwarns.
1618 * decl.c (grokdeclarator): Use decl_context to decide whether or not
1619 this is an access declaration.
1621 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
1622 has a conversion to enum or bool, too.
1624 Fri May 13 16:31:27 1994 Mike Stump (mrs@cygnus.com)
1626 * method.c (emit_thunk): Make declaration for
1627 current_call_is_indirect local (needed for hppa).
1629 Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1631 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
1634 Fri May 13 16:23:32 1994 Mike Stump (mrs@cygnus.com)
1636 * pt.c (tsubst): If there is already a function for this expansion,
1638 * pt.c (instantiate_template): Ditto.
1640 Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1642 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
1643 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
1644 generating debug info for unemitted symbols on some systems.
1646 * cp-tree.h (build_static_cast, build_reinterpret_cast,
1647 build_const_cast): Add declarations.
1649 Fri May 13 09:50:31 1994 Mike Stump (mrs@cygnus.com)
1651 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
1652 fix. We now try get_binfo, and if that doesn't find what we want,
1653 we go back to the old method, which still sometimes fails.
1655 Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
1657 * parse.y (initdcl): Call cplus_decl_attributes on the right
1659 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
1662 * typeck.c (build_binary_op_nodefault): Change result_type for
1663 comparison ops to bool.
1664 (build_binary_op): Convert args of && and || to bool.
1665 * cvt.c (build_default_binary_type_conversion): Convert args of &&
1667 (build_default_unary_type_conversion): Convert arg of ! to bool.
1668 (type_promotes_to): bool promotes to int.
1670 Fri May 13 01:43:18 1994 Mike Stump (mrs@cygnus.com)
1672 Implement the new builtin `bool' type.
1673 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
1675 (build_unary_op): Convert arg of ! to bool.
1676 * parse.y: Know true and false. Use bool_truthvalue_conversion.
1677 * method.c (build_overload_value): Know bool.
1678 (build_overload_name): Ditto.
1679 * lex.c (init_lex): Set up RID_BOOL.
1680 * gxx.gperf: Add bool, true, false.
1681 * error.c (*): Know bool.
1682 * decl.c (init_decl_processing): Set up bool, true, false.
1683 * cvt.c (cp_convert): Handle conversion to bool.
1684 (build_type_conversion): Ditto.
1685 * *.c: Accept bool where integers and enums are accepted (use
1686 INTEGRAL_CODE_P macro).
1688 Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
1690 * g++.c: Use #ifdef for __MSDOS__, not #if.
1692 Thu May 12 18:05:18 1994 Mike Stump (mrs@cygnus.com)
1694 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
1695 gives old behavior , and destroys temporaries earlier. Default
1696 behavior now conforms to the ANSI working paper.
1698 Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1700 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
1701 Use convert_force to convert the result of a recursive call when we
1702 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
1703 in COMPOUND_EXPRs any more.
1704 (various): Lose pedantic_lvalue_warning.
1705 (unary_complex_lvalue): Understand MODIFY_EXPR.
1707 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
1708 we don't know what we're initializing.
1710 Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
1712 * cvt.c (convert_to_reference): Modify to use convtype parameter.
1713 Only create temporaries when initializing a reference, not when
1715 (cp_convert): New main function.
1716 (convert): Call cp_convert.
1717 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
1718 * cp-tree.h (CONV_*): New constants used by conversion code for
1719 selecting conversions to perform.
1721 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
1723 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
1725 * parse.y: Add {static,reinterpret,const}_cast.
1728 * typeck.c (common_type): Allow methods with basetypes of different
1730 (comptypes): Deal with UPTs.
1731 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
1733 * pt.c (end_template_decl): Check for multiple definitions of member
1736 * call.c (build_method_call): Complain about calling an abstract
1737 virtual from a constructor.
1739 * typeck.c (pointer_int_sum): Check for the integer operand being 0
1740 after checking the validity of the pointer operand.
1742 * typeck2.c (digest_init): Pedwarn about string initializer being
1745 Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
1747 * decl.c (push_overloaded_decl): Only throw away a builtin if the
1748 decl in question is the artificial one.
1750 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
1751 expand_{start,end}_case cannot happen in the middle of a block.
1753 * cvt.c (build_type_conversion_1): Use convert again.
1755 Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1757 * typeck2.c (digest_init): Make sure we check for signed and
1758 unsigned chars as well when warning about string initializers.
1760 * init.c (emit_base_init): Check if there's a DECL_NAME on the
1761 member before trying to do an initialization for it.
1763 Tue May 10 11:34:37 1994 Mike Stump (mrs@cygnus.com)
1765 * except.c: Don't do anything useful when cross compiling.
1767 Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1769 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
1770 (push_overloaded_decl): Ditto.
1772 * cvt.c (convert): Don't look for void type conversion.
1774 Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
1776 * init.c (do_friend): Only do a pushdecl for friends, not
1779 Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
1781 * decl.c (lookup_name_current_level): Put empty statement after
1782 the label OUT to make the code valid C.
1784 Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1786 * typeck.c (build_binary_op_nodefault): Only complain about
1787 comparing void * and a function pointer if void * is smaller.
1789 Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1791 * decl.c (lookup_name_current_level): Move through temporary binding
1794 * parse.y (already_scoped_stmt): Revive.
1795 (simple_stmt): Use it again.
1797 * decl.c (poplevel): Always call poplevel recursively if we're
1798 dealing with a temporary binding level.
1800 Sat May 7 10:52:28 1994 Mike Stump (mrs@cygnus.com)
1802 * decl.c (finish_decl): Make sure we run cleanups for initial values
1803 of decls. Cures memory leak.
1804 * decl.c (expand_static_init): Ditto for static variables.
1805 * decl2.c (finish_file): Ditto for globals.
1807 Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1809 * typeck.c (commonparms): Don't complain about redefining default
1812 * decl.c (duplicate_decls): Don't complain twice about conflicting
1814 (decls_match): Don't look at default args.
1815 (redeclaration_error_message): Complain about redefining default
1818 * call.c (build_overload_call_real): Also deal with guiding
1819 declarations coming BEFORE the template decl.
1821 * pt.c (unify): Allow different parms to have different
1823 (unify): Allow trivial conversions on non-template parms.
1825 Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
1827 * pt.c (tsubst): Support OFFSET_TYPEs.
1830 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
1832 * init.c (build_offset_ref): Fix error message.
1833 * search.c (lookup_field): Ditto.
1835 * call.c (build_scoped_method_call): Pass binfo to
1837 * typeck.c (build_object_ref): Ditto.
1839 * typeck2.c (binfo_or_else): Don't return a _TYPE.
1841 * class.c (finish_struct): Don't complain about re-use of inherited
1842 names or shadowing of type decls.
1843 * decl.c (pushdecl_class_level): Ditto.
1845 * decl.c (finish_enum): Set the type of all the enums.
1847 * class.c (finish_struct): Don't get confused by access decls.
1849 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
1850 _TYPE. You can stop using TYPE_NAME for that now.
1852 * parse.y: Lose doing_explicit (check $0 instead).
1853 * gxx.gperf: 'template' now has a RID.
1854 * lex.h (rid): Ditto.
1855 * lex.c (init_lex): Set up the RID for 'template'.
1857 * parse.y (type_specifier_seq): typed_typespecs or
1858 nonempty_type_quals. Use it.
1859 (handler_args): Fix bogus syntax.
1860 (raise_identifier{,s}, optional_identifier): Lose.
1861 * except.c (expand_start_catch_block): Use grokdeclarator to parse
1863 (init_exception_processing): The second argument to
1864 __throw_type_match is ptr_type_node.
1866 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
1868 [ change propagated from c-decl.c of snapshot 940429 ]
1869 * cp/decl.c (finish_decl): Setting asmspec_tree should not
1870 zero out the old RTL.
1872 Fri May 6 01:25:38 1994 Mike Stump (mrs@cygnus.com)
1874 Add alpha exception handling support to the compiler.
1875 Quick and dirty backend in except.c.
1877 * cp/*: Remove most remnants of old exception handling support.
1878 * decl.c (finish_function): Call expand_exception_blocks to put
1879 the exception hanlding blocks at the end of the function.
1880 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
1881 comes after expand_decl_init.
1882 * except.c: Reimplementation.
1883 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
1884 * lex.c (init_lex): Always have catch, try and throw be reserved
1885 words, so that we may always parse exception handling.
1886 * parse.y: Cleanup to support new interface into exception handling.
1887 * tree.def (THROW_EXPR): Add.
1889 Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1891 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
1892 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
1894 Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
1896 * parse.y (already_scoped_stmt): move expand_end_binding() to
1897 fix the unmatched LBB/LBE in stabs.
1899 Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1901 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
1903 (pushdecl): Check TREE_MANGLED.
1905 * cp-tree.h (TREE_MANGLED): This identifier is a
1906 DECL_NESTED_TYPENAME (named to allow for future use to denote
1907 mangled function names as well).
1909 Implement inconsistency checking specified in [class.scope0].
1910 * decl.c (lookup_name_real): Don't set ICV here after all.
1911 (finish_enum): Also set the type of the enumerators themselves.
1912 (build_enumerator): Put the CONST_DECL in the list instead of its
1914 (pushdecl_class_level): Check inconsistent use of a name in the
1916 * class.c (finish_struct): Check inconsistent use of a name in the
1917 class body. Don't set DECL_CONTEXT on types here anymore.
1918 * parse.y (qualified_type_name): Note that the identifier has now
1919 been used (as a type) in the class body.
1920 * lex.c (do_identifier): Note that the identifier has now been used
1921 (as a constant) in the class body.
1922 * error.c (dump_decl): Print type and enum decls better.
1924 Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1926 * typeck.c (build_modify_expr): Warn about assignment to `this'.
1928 Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1930 * init.c (build_delete): Use the global operator delete when
1933 * decl.c (lookup_name_real): If we find the type we're looking in a
1934 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
1937 * class.c (finish_struct): Remove a couple of dependencies on
1940 * decl.c (pushtag): Classes do nest in extern "C" blocks.
1941 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
1943 (pushtag): Remove another dependency on the language linkage.
1945 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
1946 a const-qualified type.
1948 * decl.c (push_overloaded_decl): Throw away built-in decls here.
1949 (duplicate_decls): Instead of here.
1951 Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1953 * typeck.c (get_member_function_from_ptrfunc): Do The Right
1954 Thing (I hope) if we're using thunks.
1956 Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1958 * parse.y (specialization): aggr template_type_name ';'.
1959 (named_class_head_sans_basetype): Use it.
1960 (explicit_instantiation): Ditto.
1963 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
1964 rather than convert, to do conversions after the UDC.
1966 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
1967 instances of the class.
1969 * search.c (lookup_field): If the entity found by two routes is the
1970 same, it's not ambiguous.
1972 Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
1974 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
1975 to prevent the compiler from crashing ...
1977 Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
1979 * call.c (build_method_call): If we don't have an object, check
1980 basetype_path to figure out where to look up the function.
1982 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
1983 build_method_call in case exp is NULL_TREE.
1985 Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
1987 Give a vtable entries a unique named type, for the sake of gdb.
1988 * class.c (build_vtable_entry): The addres of a thunk now has
1989 type vtable_entry_type, not ptr_type_node.
1990 * method.c (make_thunk): Fix type of THUNK_DECL.
1991 * class.c (add_virtual_function, override_one_vtable): Use
1992 vfunc_ptr_type_node, instead of ptr_type_node.
1993 * cp-tree.h (vfunc_ptr_type_node): New macro.
1994 * decl.c (init_decl_processing): Make vtable_entry_type
1995 be a unique type of pointer to a unique function type.
1997 Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1999 * parse.y (do_explicit): Sets doing_explicit to 1.
2000 (explicit_instantiation): Use do_explicit rather than TEMPLATE
2001 directly, add "do_explicit error" rule.
2002 (datadef): Set doing_explicit to 0 after an explicit instantiation.
2003 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
2004 explicit instantiation.
2005 (named_class_head_sans_basetype): Remove aggr template_type_name
2008 Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
2010 * search.c (lookup_nested_tag): Lose.
2012 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
2013 (lookup_name_nonclass): Lose.
2015 * decl.c (poplevel_class): Add force parameter.
2016 (lookup_name_real): Fix handling of explicit scoping which specifies
2017 a class currently being defined. Add 'nonclass' argument.
2018 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
2020 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
2021 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
2022 called from finish_struct.
2024 Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
2026 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
2027 (It seeems redundant, given build_ptrmemfunc_type.)
2028 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
2029 build_classof): Use vtable_entry_type instead of memptr_type.
2030 * method.c (emit_thunk): Call poplevel with functionbody==0
2031 to prevent DECL_INITIAL being set to a BLOCK.
2033 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
2035 * parse.y (named_class_head_sans_basetype): Add "aggr
2036 template_type_name ';'" rule for forward declaration of
2039 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
2041 * class.c (instantiate_type): Deal with pmf's.
2043 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
2046 * Makefile.in (../cc1plus): Depend on OBJDEPS.
2047 (OBJDEPS): Dependency version of OBJS.
2049 Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
2051 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
2054 Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
2056 * class.c (finish_struct): Clear out memory of local tags. And
2059 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
2061 * search.c (get_matching_virtual): Be more helpful in error message.
2063 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
2065 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
2066 (default_copy_constructor_body): Ditto.
2068 * class.c (finish_struct): Don't gratuitously create multiple decls
2071 Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
2073 Avoid clobbering the arg types of other functions when reverting
2074 static member functions.
2075 * decl.c (revert_static_member_fn): Rearrange arguments, don't
2076 require values for 'fn' and 'argtypes', add warning to comment
2078 (decls_match): Rearrange arguments in call to rsmf.
2079 (grok_op_properties): Don't pass values for fn and argtypes.
2080 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
2082 Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
2084 * Make-lang.in (cc1plus): Depend on stamp-objlist.
2085 * Makefile.in (BC_OBJS): Delete.
2086 (OBJS): Cat ../stamp-objlist to get language independent files.
2087 Include ../c-common.o.
2088 (../cc1plus): Delete reference to BC_OBJS.
2090 Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
2092 * search.c (compute_access): No really, deal with static members
2093 properly. Would I lie to you?
2095 Implement lexical hiding of function declarations.
2096 * pt.c (tsubst): Use lookup_name to look for function decls to guide
2098 * method.c (build_opfncall): Use lookup_name_nonclass to look for
2099 non-member functions.
2100 * init.c (do_friend): Use lookup_name_nonclass to look for
2102 * error.c (ident_fndecl): Use lookup_name to look for functions.
2103 * decl2.c (lookup_name_nonclass): New function, skips over
2105 * decl.c (struct binding_level): Lose overloads_shadowed field.
2106 (poplevel): Don't deal with overloads_shadowed.
2107 (push_overloaded_decl): Do lexical hiding for functions.
2108 * class.c (instantiate_type): Don't check non-members if we have
2109 members with the same name.
2110 * call.c (build_method_call): Use lookup_name_nonclass instead of
2111 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
2112 (build_overload_call_real): Ditto.
2114 * decl.c (duplicate_decls): Check for ambiguous overloads here.
2115 (push_overloaded_decl): Instead of here.
2117 * decl.c (pushdecl): Back out Chip's last change.
2119 * decl.c (grok_op_properties): operators cannot be static members.
2121 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
2122 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
2123 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
2125 * method.c (do_inline_function_hair): Don't put friends of local
2126 classes into global scope, either.
2128 * typeck2.c (build_functional_cast): Don't look for a function call
2131 Thu Apr 28 15:19:46 1994 Mike Stump (mrs@cygnus.com)
2133 * cp-tree.h: disable use of backend EH.
2135 Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
2137 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
2138 * Makefile.in (INCLUDES): Move definition to same place as
2141 (OLDAR_FLAGS): Delete.
2146 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
2148 Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
2150 * decl.c (xref_tag): not to use strstr(), it's not available on
2153 Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
2155 * class.c (finish_struct): Resolve yet another class/pmf confusion.
2157 * call.c (build_overload_call_real): Don't take the single-function
2158 shortcut if we're dealing with an overloaded operator.
2160 Wed Apr 27 17:35:37 1994 Mike Stump (mrs@cygnus.com)
2162 * search.c (get_base_distance): Search the virtual base class
2163 binfos, incase someone wants to convert to a real virtual base
2165 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
2166 instead of convert_pointer_to, as it now will work.
2168 Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
2170 * cvt.c (convert_to_reference): Don't complain about casting away
2173 * typeck.c (build_unary_op): References are too lvalues.
2175 Wed Apr 27 13:58:05 1994 Mike Stump (mrs@cygnus.com)
2177 * class.c (override_one_vtable): We have to prepare_fresh_vtable
2178 before we modify it, not after, also, we cannot reuse an old vtable,
2179 once we commit to a new vtable. Implement ambiguous overrides in
2180 virtual bases as abstract. Hack until we make the class
2183 Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
2185 * parse.y (unary_expr): Expand new_placement[opt] and
2186 new_initializer[opt] inline.
2188 * search.c (lookup_fnfields): Don't throw away the inheritance
2189 information here, either.
2190 (compute_access): Handle static members properly.
2192 * init.c (build_member_call): Always set basetype_path, and pass it
2195 * search.c (lookup_field): Deal properly with the case where
2196 xbasetype is a chain of binfos; don't throw away the inheritance
2198 (compute_access): protected_ok always starts out at 0.
2200 * init.c (resolve_offset_ref): Don't cast `this' to the base type
2201 until we've got our basetype_path.
2203 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
2205 * cvt.c (build_up_reference): Use build_pointer_type rather than
2208 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
2211 * cvt.c (type_promotes_to): Retain const and volatile, add
2212 float->double promotion.
2214 * decl.c (grokdeclarator): Don't bash references to arrays into
2215 references to pointers in function parms. Use type_promotes_to.
2217 Tue Apr 26 23:44:36 1994 Mike Stump (mrs@cygnus.com)
2219 Finish off Apr 19th work.
2221 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
2222 might_have_abstract_virtuals.
2223 * class.c (strictly_overrides, override_one_vtable,
2224 merge_overrides): New routines to handle virtual base overrides.
2225 * class.c (finish_struct): Call merge_overrides to handle overrides
2228 Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2230 * typeck.c (build_function_call): Call build_function_call_real with
2233 * *: Don't deal with TYPE_EXPRs.
2235 * tree.c (lvalue_p): If the type of the expression is a reference,
2238 * cvt.c (convert_to_reference): Complain about passing const
2239 lvalues to non-const references.
2240 (convert_from_reference): Don't arbitrarily throw away const and
2241 volatile on the target type.
2243 * parse.y: Simplify and fix rules for `new'.
2245 * decl.c (grok_op_properties): operator void is illegal.
2247 Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
2249 * parse.y (components): Anonymous bitfields can still have declspecs.
2251 * decl.c (pushdecl): Postpone handling of function templates like we
2254 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
2255 convert_pointer_to fails.
2257 * call.c (compute_conversion_costs_ansi): A user-defined conversion
2258 by itself is better than that UDC followed by standard conversions.
2259 Don't treat integers and reals specially.
2261 * cp-tree.h: Declare flag_ansi.
2263 * typeck.c (c_expand_return): pedwarn on return in void function
2264 even if the expression is of type void.
2265 (build_c_cast): Don't do as much checking for casts to void.
2266 (build_modify_expr): pedwarn about array assignment if this code
2267 wasn't generated by the compiler.
2269 * tree.c (lvalue_p): A comma expression is an lvalue if its second
2272 * typeck.c (default_conversion): Move code for promoting enums and
2274 * cvt.c (type_promotes_to): To here.
2275 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
2276 promotion semantics for reals.
2278 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
2280 * Make-lang.in (c++.install-common): Check for g++-cross.
2281 * Makefile.in: Remove Cygnus cruft.
2282 (config.status): Delete.
2284 (TREE_H): Use complete pathname, some native makes have minimal
2286 (*.o): Use complete pathname to headers in parent dir.
2287 (doc, info, dvi): Delete.
2289 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
2291 * Make-lang.in (c++.install-common): Check for g++-cross.
2292 * Makefile.in: Remove Cygnus cruft.
2293 (config.status): Delete.
2295 (TREE_H): Use complete pathname, some native makes have minimal
2297 (*.o): Use complete pathname to headers in parent dir.
2298 (doc, info, dvi): Delete.
2300 Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
2302 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
2303 with different return type.
2304 (decls_match): Compare return types strictly.
2306 Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2308 * cvt.c (build_type_conversion): Do try to convert through other
2309 pointers. This will fail if the class defines multiple pointer
2312 * error.c (dump_type_prefix): Print out pointers to arrays properly.
2313 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
2315 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
2318 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
2319 checking for shadowing a builtin. If we're redeclaring a builtin
2320 function, bash the old decl to avoid an ambiguous overload.
2322 * cvt.c (convert_to_reference): Don't force arrays to decay here.
2324 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
2326 * decl.c (duplicate_decls): Don't assume that the decls will have
2329 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
2331 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
2332 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
2335 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
2337 * cp/typeck2.c (signature_error): Use cp_error for "%T".
2339 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
2341 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
2342 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
2343 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
2345 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
2347 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
2348 * cp/decl.c (duplicate_decls): Put new type in same obstack as
2349 old ones, or permanent if old ones in different obstacks.
2351 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
2353 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
2354 * cp/parse.y (attrib): Handle string args as expressions,
2355 merging the two rules. `mode' attribute now takes a string arg.
2356 Delete the rule for an identifier as arg.
2358 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
2360 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
2361 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
2362 (pointer_diff): Likewise the division.
2364 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
2366 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
2367 * cp/decl.c (finish_decl): Issue warning for large objects,
2370 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
2372 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
2373 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
2374 * cp/decl.c (duplicate_decls): Merge section name into new decl.
2376 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
2378 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
2379 * cp/typeck.c (signed_or_unsigned_type): Check for any
2380 INTEGRAL_TYPE_P not just INTEGER_TYPE.
2382 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
2384 * cp/decl.c (finish_enum): Start from 0 when determining precision
2387 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
2389 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
2392 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
2394 * cp/typeck.c (build_binary_op_nodefault): Propagate code
2395 from C front-end to optimize unsigned short division.
2396 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
2398 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
2400 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
2401 constant, prefer 'const char &' to 'int'.
2403 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
2405 * cp/class.c (finish_struct_methods): Handle multiple
2406 constructors in fn_fields list.
2408 Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
2410 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
2411 types not to be dumped in stabs, like types in #pragma interface.
2412 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
2415 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
2417 * Language directory reorganization.
2418 See parent makefile.
2420 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
2422 * Language directory reorganization.
2423 See parent makefile.
2425 Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
2427 * cp-tree.h (THUNK_DELTA): It is normally negative, so
2428 use signed .i variant of frame_size rather than unsigned .u.
2429 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
2430 use "VT" rather than "vt" due to binary incompatibility.
2431 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
2432 rather than sizeof, since it is now an expression.
2433 * class.c (modify_one_vtable): Modify to skip initial element
2434 containing a count of the vtable.
2436 Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
2438 * lex.c (check_newline): Force interface_unknown on main input file.
2440 * pt.c (do_pending_expansions): Always emit functions that have been
2441 explicitly instantiated.
2442 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
2443 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
2444 DECL_EXPLICITLY_INSTANTIATED on all my methods.
2445 * parse.y (explicit_instantiation): Call do_type_instantiation for
2447 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
2448 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
2449 that has been explicitly instantiated.
2450 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
2452 * class.c: Move import_export_vtable to decl2.c, and comment out all
2455 Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
2457 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
2458 (do_pending_inlines): Ditto.
2460 Tue Apr 19 22:25:41 1994 Mike Stump (mrs@cygnus.com)
2462 Reimplement vtable building, and most vtable pointer setting.
2463 Allows for earier maintenance, easier understandability, and most
2464 importantly, correct semantics.
2466 * class.c (build_vtable): Removed unneeded
2467 SET_BINFO_VTABLE_PATH_MARKED.
2468 * class.c (prepare_fresh_vtable): Ditto. Added argument.
2469 * class.c (modify_vtable_entry): General cleanup.
2470 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
2471 modify_vtable_entries): Removed.
2472 * class.c (add_virtual_function): General cleanup.
2473 * class.c (finish_base_struct): Setup BINFO_VTABLE and
2474 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
2476 * class.c (finish_vtbls): New routine, mostly from
2477 unmark_finished_struct.
2478 * class.c (overrides): New routine.
2479 * class.c (modify_one_vtable): New routine, mostly from
2480 modify_other_vtable_entries and modify_vtable_entries.
2481 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
2482 modify_all_vtables): New routines.
2483 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
2484 call. General cleanup on how pending_hard_virtuals are handled.
2485 General cleanup on modifying vtables. Use finish_vtbls, instead of
2486 unmark_finished_struct.
2487 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
2488 get_first_matching_virtual, get_matching_virtual,
2489 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
2490 * cvt.c (convert_pointer_to_real): cleanup error message.
2491 * decl.c (grokfndecl): General cleanup.
2492 * decl.c (finish_function): Change init_vtbl_ptrs call to
2493 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
2494 expand_indirect_vtbls_init.
2495 * init.c (expand_virtual_init): Remove unneeded argument.
2496 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
2497 two arguments to make more general. Made more general. Now can be
2498 used for vtable pointer initialization from virtual bases.
2499 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
2500 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
2501 expand_direct_vtbls_init.
2502 * init.c (expand_virtual_init): General cleanup.
2503 * init.c (expand_default_init): Change expand_vbase_vtables_init
2504 call to expand_indirect_vtbls_init.
2505 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
2506 call to expand_indirect_vtbls_init.
2507 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
2508 call to expand_indirect_vtbls_init.
2509 * search.c (get_first_matching_virtual): Rename to
2510 get_matching_virtual. General cleanup and remove setting of
2511 DECL_CONTEXT. That is now done in a cleaner way in
2512 modify_vtable_entry and add_virtual_function.
2513 * search.c (expand_vbase_vtables_init): Rename to
2514 expand_indirect_vtbls_init. General cleanup. Use
2515 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
2516 pointers from virtual bases are set up.
2517 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
2520 * *.[chy]: Remove support for VTABLE_USES_MASK.
2522 Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2524 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
2525 reference and pointer types instead of bashing the types directly.
2527 * call.c (build_overload_call_real): Use the TREE_CODE to determine
2528 whether the function is overloaded or not, rather than
2530 * *: Remove all uses of TREE_OVERLOADED.
2532 * decl.c (grokdeclarator): Only complain about initializing const
2533 fields when -ansi or -pedantic.
2535 Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
2537 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
2539 Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
2541 Do overloading on a block-by-block basis, not function-by-function.
2542 * decl.c: Lose overloads_to_forget.
2543 (struct binding_level): Add overloads_shadowed field.
2544 (poplevel): Restore overloads_shadowed.
2545 (push_overloaded_decl): Use overloads_shadowed instead of
2546 overloads_to_forget.
2547 (finish_function): Don't look at overloads_to_forget.
2549 Copy enum_overflow logic from c-decl.c.
2550 * decl.c (start_enum): Initialize enum_overflow.
2551 (build_enumerator): Use enum_overflow. Also use current_scope().
2553 * search.c (current_scope): Move Brendan's comment from
2554 build_enumerator here.
2556 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
2557 discarding const/volatile.
2559 Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
2561 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
2562 (comp_target_types): Ditto.
2564 * decl.c (lookup_name): Don't unset got_scope here.
2566 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
2567 got_scope != NULL_TREE.
2569 Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
2571 Horrible kludge to prevent templates from being instantiated by
2573 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
2574 before we get to left_curly.
2575 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
2577 * error.c (dump_decl): If it's a typedef, print out the name of the
2578 decl, not just the underlying type.
2580 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
2581 update the IDENTIFIER_TYPE_VALUE of its name.
2583 * decl2.c (finish_file): When processing the initializer for a
2584 static member, pretend that the dummy function is a member of the
2587 Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2589 * class.c (build_vtable_entry): revert Apr 4 change.
2590 * decl2.c (mark_vtable_entries): replace pure virtual function
2593 Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
2595 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
2596 mismatch, and don't pedwarn on 0/function pointer mismatch.
2598 * typeck2.c (digest_init): Lose code for special handling of unions.
2599 (process_init_constructor): Since they're handled just fine here.
2600 Pedwarn on excess elements.
2602 * decl2.c (grokfield): Complain about local class method declaration
2605 Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
2607 * method.c (emit_thunk): Add extern declaration for
2608 current_call_is_indirect (needed for hppa).
2610 Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2612 Improve local class support; allow classes in different blocks to
2614 * decl.c (pushtag): Support local classes better.
2615 (pushdecl_nonclass_level): New function for pushing mangled decls of
2616 nested types into the appropriate scope.
2617 (xref_defn_tag): Use pushdecl_nonclass_level instead of
2619 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
2621 * method.c (do_inline_function_hair): Ditto.
2623 * class.c (finish_struct): It is legal for a class with no
2624 constructors to have nonstatic const and reference members.
2626 Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2628 * decl.c (push_overloaded_decl): Avoid giving errors about
2629 built-ins, since duplicate_decls will have given warnings/errors
2632 Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
2634 * cvt.c (convert_to_reference): Warn about casting pointer type to
2635 reference type when this is probably not what they wanted.
2637 Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
2639 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
2640 static consts any more (toplev.c has now been modified to
2641 not emit warnings if they are unused).
2643 Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2645 * decl.c (grok_op_properties): If op new/delete get here with
2646 METHOD_TYPEs, do a revert_static_member_fn.
2648 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
2649 * init.c (is_aggr_typedef): Don't look at
2650 IDENTIFIER_CLASS_TYPE_VALUE.
2651 (get_aggr_from_typedef): Ditto.
2652 (get_type_value): Ditto.
2653 * call.c (build_scoped_method_call): Don't rely on overloaded
2654 template names having IDENTIFIER_CLASS_VALUE set.
2656 * parse.y (component_decl_1, fn.def2): Revert rules for
2658 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
2661 * decl.c (start_function): Only warn about `void main()' if pedantic
2662 || warn_return_type.
2664 Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
2666 Clean up overloading of the template name.
2667 * class.c (pushclass): overload the template name whenever pushing
2668 into the scope of a template class, not just if it is
2670 (popclass): Correspondingly.
2671 * search.c (push_class_decls): Don't overload_template_name.
2672 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
2673 DECL_CONTEXT on things.
2674 * parse.y (left_curly): Don't overload_template_name.
2675 * class.c (finish_struct): Don't undo_template_name_overload.
2677 * method.c (build_opfncall): Only pass one argument to global op
2680 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
2681 decide how many arguments to use for vec delete.
2683 * decl.c (grok_op_properties): Be consistent in modifying
2685 (grokdeclarator): Only complain about function decls with no return
2686 type if we're being pedantic.
2688 Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2690 Add support for operator new [] and operator delete [].
2692 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
2693 * ptree.c (print_lang_type): Indicate vec new/delete.
2694 * parse.y: Support vec new/delete.
2695 * method.c (build_decl_overload): Deal with vec new/delete.
2696 (build_opfncall): Ditto.
2697 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
2698 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
2699 * init.c (init_init_processing): Set up BIVN and BIVD.
2700 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
2701 since it doesn't happen any more.
2702 (build_new): Support vec new. Always call something.
2703 (build_x_delete): Support vec delete.
2704 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
2705 and pass it to build_x_delete.
2706 * decl2.c (delete_sanity): Don't change behavior by whether or not
2707 the type has a destructor. Pass use_global_delete to
2709 (coerce_delete_type): Make sure that the type returned has a first
2710 argument of ptr_type_node.
2711 * decl.c (init_decl_processing): Also declare the global vec
2713 (grokdeclarator): Also force vec new/delete to be static.
2714 (grok_op_properties): Note presence of vec new/delete, and play with
2715 their args. If vec delete takes the optional size_t argument, set
2716 TYPE_VEC_DELETE_TAKES_SIZE.
2717 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
2718 checking for one delete or the other.
2719 (lang_type): gets_new and gets_delete are now two bits long. The
2720 low bit is for the non-array version. Lose gets_placed_new.
2721 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
2722 delete defined by this class wants to know how much space it is
2724 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
2725 add a header containing the number of elements in the vector; i.e.
2726 when the elements need to be destroyed or vec delete wants to know
2728 * class.c (finish_struct_methods): Also check for overloading vec
2730 * call.c (build_method_call): Also delete second argument for vec
2733 * decl.c (grokdeclarator): Correct complaints again.
2734 (grokdeclarator): Fix segfault on null declarator.
2735 (decls_match): Also accept redeclaration with no arguments if both
2736 declarations were in C context. Bash TREE_TYPE (newdecl) here.
2737 (duplicate_decls): Instead of here.
2739 * parse.y (nested_name_specifier_1): Lose rules for dealing with
2740 syntax errors nicely, since they break parsing of 'const i;'.
2742 * decl.c (lookup_name): if (got_scope == current_class_type)
2743 val = IDENTIFIER_CLASS_VALUE (name).
2745 * search.c (lookup_nested_tag): Look in enclosing classes, too.
2747 * spew.c (yylex): Only look one character ahead when checking for a
2750 * lex.c (check_newline): Read first nonwhite char before
2751 incrementing lineno.
2753 * decl.c (grokdeclarator): Don't claim that typedefs are variables
2756 * parse.y: Divide up uses of unqualified_id into
2757 notype_unqualified_id and unqualified_id, so that TYPENAME can be
2758 used as an identifier after an object.
2760 * class.c (push_nested_class): Don't push into non-class scope.
2762 * decl.c (grokdeclarator): If an identifier could be a type
2763 conversion operator, but has no associated type, it's not a type
2764 conversion operator.
2766 * pt.c (unify): Check for equality of constants better.
2768 * decl.c (grokdeclarator): Don't complain about access decls.
2770 Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2772 * decl.c (grokdeclarator): pedwarn about data definitions without
2775 * parse.y (datadef): Don't pedwarn about decls without types here,
2776 since that is valid for functions.
2777 (fn.def2, component_decl): Support constructors with declmods again.
2778 (nomods_initdecls): For decls without any mods, so that we don't try
2779 to get declspecs from some arbitrary $0.
2781 * search.c (lookup_field): Use cp_error.
2783 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
2784 here; it breaks destructors for non-aggr types.
2786 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
2787 a type being defined, like the comment says.
2788 If got_scope is not an aggregate, just return NULL_TREE.
2790 * pt.c (create_nested_upt): Kung's code for creating types nested
2791 within uninstantiated templates now lives here (it used to live in
2792 hack_more_ids). It needs to be expanded.
2794 * parse.y: Stop calling see_typename so much.
2796 * decl.c (lookup_name): Deal with TTPs and UPTs.
2798 * lex.c (real_yylex): Don't set looking_for_typename just because we
2800 (dont_see_typename): #if 0 out.
2802 * spew.c (yylex): Increment looking_for_typename if the next
2803 character is SCOPE, rather than setting it to 1; this way, the value
2804 from seeing an aggr specifier will not be lost. This kinda relies
2805 on looking_for_typename never being < 0, which is now true.
2807 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
2809 (named_class_head_sans_basetype): Accept template types, too. Oops.
2811 Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2813 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
2815 * parse.y: Lose START_DECLARATOR.
2817 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
2820 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
2821 A::foo' syntax. Catch invalid scopes better.
2823 * parse.y, lex.c: lose TYPENAME_COLON.
2825 * decl2.c (groktypefield): #if 0 out.
2827 * decl.c (lookup_name): If the type denoted by got_scope is
2828 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
2830 * class.c (push_nested_class): Don't try to push into
2833 Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2835 * Makefile.in (stamp-parse): Update count of conflicts to 33.
2837 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2839 A saner implementation of nested types that treats template types
2840 no differently from non-template types. There are still some
2841 shortcomings of our system; most notably, it is difficult to look
2842 for a nested type that is hidden by another name, because of the way
2843 we keep track of hidden types. But this shouldn't be a problem for
2844 just about anyone. Perhaps lookup_field should be fixed up a bit.
2846 * spew.c: Moved handling of nested types/scoping from the lexer
2847 into the parser. Removed variable template_type_seen_before_scope.
2848 Removed functions frob_identifier, hack_more_ids, and various cruft
2849 that was #if 0'd out in the past, reducing the size of the file from
2850 1146 lines to 450 lines. We can't quite do away with spew.c yet,
2851 though; we still need it for do_aggr () and checking for SCOPE after
2852 the current identifier. And setting lastiddecl.
2854 * parse.y: Moved handling of nested types/scoping from the lexer
2855 into the parser, using a new global variable `got_scope'. Reduced
2856 the number of states by 53. Implemented all uses of explicit global
2857 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
2858 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
2859 scoped_typename. Added nonterminals nested_type,
2860 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
2861 nested_name_specifier, global_scope, overqualified_id, type_name.
2862 Changed many others. Added 9 new reduce/reduce conflicts, which are
2863 nested type parallels of 9 that were already in the grammar for
2864 non-nested types. Eight of the now 33 conflicts should be removed
2865 in the process of resolving the late binding between variable and
2868 * gxxint.texi (Parser): Update.
2870 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
2872 * lex.h: Add decl for got_scope.
2874 * lex.c (see_typename): Claim to be the lexer when calling
2877 * decl.c (lookup_name): When called from the lexer, look at
2878 got_scope and looking_at_typename; otherwise don't.
2880 Thu Apr 7 22:05:47 1994 Mike Stump (mrs@cygnus.com)
2882 31th Cygnus<->FSF merge.
2884 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2886 * decl2.c (mark_vtable_entries): Call this to mark all the
2887 entries in the vtable addressable.
2888 (finish_decl_parsing): Handle SCOPE_REFs.
2890 * decl.c (decls_match): Always call compparms with strict == 1.
2891 Handle the special case of C function redecl here.
2892 (duplicate_decls): Only keep the old type if the new decl takes no
2895 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
2897 Thu Apr 7 16:17:50 1994 Mike Stump (mrs@cygnus.com)
2899 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
2902 Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
2904 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
2905 ch-tree.h: Every place these functions were called, the result was
2906 immediately passed to expand_expr_stmt. Reduce redundancy by
2907 calling expand_expr_init *inside* these functions. These
2908 makes for a simpler interface, and we don't have to build
2909 compound expressions. Hence, rename these function to:
2910 expand_virtual_init and expand_vbase_vtables_init respectively.
2911 * init.c, decl.c: Change callers of these functions.
2912 * init.c, cp-tree.h (expand_virtual_init): Make static.
2914 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
2915 rather than DECL_SAVED_INSNS before emitting inlines.
2917 Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2919 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
2921 * decl.c (duplicate_decls): If this is a new declaration of an
2922 extern "C" function, keep the type (for the argtypes).
2923 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
2924 (decls_match): Call compparms with a value of strict dependent on
2925 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
2927 * typeck.c (compparms): ... is only equivalent to non-promoting
2928 parms if we're not being strict.
2930 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
2932 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
2933 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
2935 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
2938 Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
2940 Support for implementing vtables with thunks.
2941 * tree.def (THUNK_DECL): New TREE_CODE.
2942 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
2943 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
2944 * cp-tree.h (memptr_type): New variable.
2945 * class.c (build_vtable_entry): Build thunk if necessary.
2946 * class.c (build_vfn_ref): If using thunks, don't need
2947 to add delta field from vtable (there is none!).
2948 * decl.c: Add memptr_type as well as vtable_entry_type.
2949 If using thunks, the latter is just ptr_type_node.
2950 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
2951 * decl2.c (finish_vtable_vardecl): Handle thunks.
2952 * expr.c (cplus_expand_expr): Support THUNK_DECL.
2954 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
2955 * decl.c (start_function): Set current_extern_inline based on
2956 DECL_THIS_EXTERN, not TREE_PUBLIC.
2957 * decl.c (finish_function): Call mark_inline_for_output if needed,
2959 Improve intelligence about when to emit inlines.
2960 * cp-tree.h (lang_decl_flags): New field saved_inline.
2961 * cp-tree.h (DECL_SAVED_INLINE): New macro.
2962 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
2963 * decl.h, decl.c (pending_addressable_inlines): Removed.
2964 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
2965 * decl2.c (mark_inline_for_output): Do nothing if
2966 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
2967 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
2968 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
2969 * decl2.c (finish_file): Writing out inlines later, so we can
2970 also handle the ones needed for vtbales.
2971 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
2973 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
2974 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
2975 instead. (The rationale is that these optimizations both break binary
2976 compatibility, but should become the default in a future release.)
2978 Wed Apr 6 10:53:56 1994 Mike Stump (mrs@cygnus.com)
2980 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
2981 of a fndecl, as we might not be from that vfield.
2983 Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2985 * class.c (add_virtual_function): fix bug for pure virtual, so
2986 that DECL_VINDEX of the dummy decl copied won't be error.
2987 (see also Apr 4 change)
2989 Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
2991 * typeck.c (c_expand_return): Before checking that we're not
2992 returning the address of a local, make sure it's a VAR_DECL.
2993 (And don't worry about it being a TREE_LIST.)
2995 Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2997 * parse.y (YYDEBUG): Always define.
2998 * lex.c (YYDEBUG): Ditto.
3000 Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
3002 * class.c (finish_struct): backup out the change below, put the
3003 new change for the same purpose. The change below breaks code.
3005 * class.c (finish_struct): if pure virtual, copy node and make
3006 RTL point to abort, then put in virtual table.
3007 * decl2.c (grok_function_iit): reinstate Mar 31 change.
3009 Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3011 * init.c (build_new): pedwarn about newing const and volatile
3014 * tree.c (get_identifier_list): Only do the special handling
3015 thing if we're dealing with the main variant of the record type.
3017 * cvt.c (convert_to_reference): When converting between
3018 compatible reference types, use the pointer conversion machinery.
3019 Don't just blindly overwrite the old type.
3021 Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
3023 * call.c (build_method_call): When looking at global functions,
3024 be sure to use instance_ptr for the first argument, not some version
3025 of it that has been cast to a base class. Also do this before
3026 comparing candidates.
3028 Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3030 * call.c (build_method_call): Constructors can be called for
3033 Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
3035 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
3036 fucntions. They can be defined somewhere else.
3038 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
3040 * decl.c (init_decl_processing): Declare __builtin_return_address
3041 and __builtin_frame_address for C++ as well.
3043 Thu Mar 31 12:35:49 1994 Mike Stump (mrs@cygnus.com)
3045 * typeck2.c (store_init_value): Integral constant variables are
3046 always constant, even when doing -fpic.
3048 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
3050 * decl.c (redeclaration_error_message): Pass the types to
3053 Wed Mar 30 21:29:25 1994 Mike Stump (mrs@cygnus.com)
3055 Cures incorrect errors about pure virtuals in a class, when they
3056 have been overridden in a derived class.
3058 * search.c (get_abstract_virtuals): Reimplement.
3059 * search.c (get_abstract_virtuals_1): New routine.
3061 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
3063 * pt.c (push_template_decls): Make the pushed level pseudo
3066 * parse.y (extdefs): Don't pop everything if the current binding
3067 level is pseudo_global.
3069 * decl.c (pop_everything): Stop on reaching a pseudo-global
3072 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
3074 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
3075 the old decl actually had an initializer.
3077 * {various}: Clean up gcc -W complaints.
3079 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
3080 (DECL_CONTEXT (NODE) != NULL_TREE).
3082 * parse.y (lang_extdef): Call pop_everything if necessary.
3084 * decl.c (pop_everything): New function for popping binding
3085 levels left over after a syntax error.
3086 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
3087 a function is a member.
3089 Wed Mar 30 14:20:50 1994 Mike Stump (mrs@cygnus.com)
3091 Cures calling a more base base class function, when a more derived
3092 base class member should be called in some MI situations.
3094 * search.c (make_binfo): Use more the more specialized base
3095 binfos from the binfo given as the second argument to make_binfo,
3096 instead of the unspecialized ones from the TYPE_BINFO.
3097 * class.c (finish_base_struct): Ditto, update callers.
3098 * search.c (dfs_get_vbase_types): Ditto.
3099 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
3100 * decl.c (xref_tag): Use NULL_TREE instead of 0.
3101 * lex.c (make_lang_type): Ditto.
3103 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
3105 * decl.c (pushdecl): If pushing a C-linkage function, only do a
3106 push_overloaded_decl.
3107 (duplicate_decls): Standard overloading does not shadow built-ins.
3109 Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
3111 * pt.c (end_template_decl): Don't call push_overloaded_decl.
3113 * init.c (do_friend): Don't call push_overloaded_decl.
3115 * decl.c (pushdecl): Call push_overloaded_decl for functions and
3117 (duplicate_decls): functions and function templates are not
3118 duplicates, but don't complain about calling this function to
3120 (push_overloaded_decl): Don't deal with linkage. Call
3122 (redeclaration_error_message): Deal with linkage.
3124 * decl.c (start_function): If push_overloaded_decl returns an
3125 older version of the function, deal with it.
3127 * decl.c (start_function): Be sure only to push_overloaded_decl
3130 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
3132 (start_function): Lose broken and redundant code for checking old
3135 * init.c (add_friend): Give line numbers of both friend decls
3136 when warning about re-friending.
3138 * pt.c (tsubst): Use comptypes rather than == to compare the
3139 types of the method as declared and as defined, since default
3140 parameters may be different.
3142 * call.c (build_method_call): Use brendan's candidate printing
3145 * decl.c (start_method): Methods defined in the class body are
3146 inline whether or not it's a template class.
3148 Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3150 * parse.y (initdcl0): Add "extern" to current_declspecs if
3151 have_extern_spec && ! used_extern_spcec.
3153 * tree.c (really_overloaded_fn): A fn with more than one
3156 * pt.c (end_template_decl): Use really_overloaded_fn.
3158 * decl.c (duplicate_decls): When smashing a decl into a previous
3159 definition, keep the old file and line.
3160 Don't deal with overloaded functions.
3161 Lose old code for checking arg types of functions.
3162 Check for overloaded C functions.
3163 (pushdecl): Deal with overloaded functions.
3164 (start_decl): Expect pushdecl to return an appropriate function decl.
3165 (start_function): Ditto.
3166 (push_overloaded_decl): Don't check for overloaded C functions.
3168 * *.c: Stop using DECL_OVERLOADED, it being archaic.
3169 TREE_OVERLOADED should probably go, too.
3171 Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
3173 * typeck.c (comp_target_types): Call comp_target_parms with
3176 Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
3178 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
3179 sections if we're compiling with -ansi or -pedantic.
3181 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
3183 * decl2.c (grokfield): Don't pedwarn twice about initializing
3186 * decl.c (push_overloaded_decl): Warn about shadowing
3188 (redeclaration_error_message): Don't allow 'int a; int a;'
3190 * cvt.c (build_up_reference): Only check for valid upcast if
3191 LOOKUP_PROTECT is set, not just any flag.
3193 Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3195 * lex.c (check_newline): When we see a #pragma implementation,
3196 also set it for the main input file.
3198 * init.c (build_new): Convert array size argument to size_t.
3200 * parse.y (primary): If we're doing a parenthesized type-id, call
3201 groktypename before passing it to build_new.
3203 * call.c (build_method_call): Deal properly with const and
3204 volatile for instances of reference type.
3206 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
3207 (pedantic) pedwarn'.
3209 * decl.c (grokdeclarator): Don't complain about putting `static'
3210 and `inline' on template function decls.
3212 Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3214 * call.c (build_method_call): Preserve const & volatile on
3217 Thu Mar 24 16:21:52 1994 Mike Stump (mrs@cygnus.com)
3219 * init.c (build_new, build_vec_delete): Use global new and delete
3221 * decl2.c (delete_sanity): Ditto.
3223 Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3225 * cvt.c (convert_to_reference): If i is an lvalue,
3226 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
3227 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
3229 Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3231 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
3232 and DECL_TEMPLATE_INSTANTIATIONS.
3234 * init.c (build_new): Handle array typedefs properly.
3236 Wed Mar 23 18:23:33 1994 Mike Stump (mrs@cygnus.com)
3238 30th Cygnus<->FSF merge.
3240 Wed Mar 23 00:46:24 1994 Mike Stump (mrs@cygnus.com)
3242 * class.c (modify_vtable_entries): Avoid running off the end of the
3243 virtuals list when processing a virtual destructor.
3244 * class.c (get_vtable_entry): Ditto.
3246 Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3248 * decl.c (duplicate_decls): If two template decls don't match,
3251 Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
3253 * typeck.c (convert_for_assignment): Don't pedwarn about
3254 converting function pointer to void *.
3256 Tue Mar 22 22:23:19 1994 Mike Stump (mrs@cygnus.com)
3258 Major revamp of pointer to member functions. Cures major
3259 nonfunctionality when used in casts, and MI situations.
3261 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
3262 * typeck.c (convert_for_assignment): Ditto.
3263 * typeck2.c (digest_init): Ditto.
3264 * typeck2.c (process_init_constructor): Simplify by moving code into
3266 * typeck2.c (digest_init): Do default_conversions on init value, if
3267 we are processing pointer to member functions.
3268 * class.c (get_vfield_offset): Now non-static. Convert bit offset
3270 * cp-tree.h (get_vfield_offset): Ditto.
3271 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
3272 instance, before fetching vtable pointer.
3273 * typeck.c (get_delta_difference): New routine.
3274 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
3275 get vtable pointer out of right subobject.
3277 Tue Mar 22 17:56:48 1994 Mike Stump (mrs@cygnus.com)
3279 * search.c (get_binfo): Return NULL instead of aborting, when
3280 passed a UNION_TYPE.
3282 Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3284 These patches implement handling of redefinition/redeclaration of
3287 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
3288 considered compatible.
3290 * parse.y (template_def): Pass defn argument to end_template_decl.
3292 * pt.c (end_template_decl): Add defn argument. Check for
3293 redefinition. Simplify.
3295 * error.c (OB_UNPUT): New macro, to remove mistakes.
3296 (aggr_variety): Subroutine of dump_aggr_type.
3298 * decl.c (decls_match): Support templates.
3299 (duplicate_decls): No longer static. Don't try to lay out template
3301 (pushdecl): Simplify.
3303 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
3306 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3308 * error.c (dump_decl): Support class template decls.
3309 (dump_type): Don't adorn template type parms.
3311 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
3312 if it was a definition.
3313 (redeclaration_error_message): Do the cp_error thang, and reject
3314 redefinition of templates.
3316 Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
3318 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
3319 in FIELD context, when appropriate. Also,
3320 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
3321 Also, simplify check for bogus return specifiers.
3323 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3325 * parse.y (after_type_declarator1): Expand type_quals.
3326 (notype_declarator1): Ditto.
3329 Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3331 * decl.c (grokdeclarator): Treat class-local typedefs like static
3332 members; i.e. 'typedef int f();' means that f is a function type,
3335 * parse.y (decl): Change direct_* back to *.
3336 (type_id): Change direct_abstract_declarator to absdcl.
3337 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
3339 Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3341 These two patches fix crashes on instantiating a template inside a
3342 function with C linkage or containing labels.
3344 * class.c (current_lang_stacksize): No longer static.
3346 * decl.c (struct saved_scope): Add lang_base, lang_stack,
3347 lang_name, lang_stacksize, and named_labels.
3348 (push_to_top_level): Save them.
3349 (pop_from_top_level): Restore them.
3351 * gxxint.texi (Parser): Update.
3353 These two patches finish moving the task of expr/declarator
3354 ambiguity resolution from the lexer to the parser, and add one more
3355 r/r conflict. START_DECLARATOR can now be nuked.
3357 * parse.y (decl): Add "direct_" in typespec X rules.
3358 (direct_declarator): New nonterminal for
3359 direct_after_type_declarator and direct_notype_declarator.
3360 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
3361 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
3362 (named_parm): Add typespec direct_declarator rule.
3364 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
3366 These two patches disable some excessive cleverness on the part of
3367 g++; a non-class declaration always hides a class declaration in the
3368 same scope, and g++ was trying to unhide it depending on the
3369 enclosing expression.
3371 * spew.c (arbitrate_lookup): #if 0 out.
3373 * decl.c (lookup_name): Never call arbitrate_lookup.
3375 * parse.y (complex_notype_declarator1): Add '*'
3376 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
3378 * parse.y (complex_direct_notype_declarator): Restore id_scope
3379 see_typename TYPENAME rule, remove all other rules beginning with
3381 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
3383 Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
3385 These changes fix the compiler's handling of the functional cast/
3386 object declaration ambiguities in section 6.8 of the ARM. They also
3387 add 11 reduce/reduce conflicts. Sigh.
3389 * parse.y: Add precedence decls for OPERATOR and '~'.
3390 (notype_unqualified_id): New nonterminal, encompasses all of the
3391 ANSI unqualified-id nonterminal except TYPENAMEs.
3392 (expr_or_declarator): New nonterminal to delay parsing of code like
3394 (primary): Use notype_unqualified_id.
3395 (decl): Add typespec initdecls ';' and typespec declarator ';'
3397 (initdcl0): Deal with the above.
3398 (complex_notype_declarator1): A notype_declarator that is not also
3399 an expr_or_declarator.
3400 (complex_direct_notype_declarator): A direct_notype_declarator that
3401 doesn't conflict with expr_or_declarator. Use
3402 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
3403 (functional_cast): New nonterminal, for the three functional cast
3404 rules. So that they can be moved after
3405 complex_direct_notype_declarator.
3406 (see_typename): Don't accept type_quals any more.
3408 * decl2.c (reparse_decl_as_expr): New function to deal with parse
3409 nodes for code like `int (*a)++;'.
3410 (reparse_decl_as_expr1): Recursive subroutine of the above.
3411 (finish_decl_parsing): New function to deal with parse nodes for
3412 code like `int (*a);'. See the difference?
3414 Thu Mar 17 12:16:10 1994 Mike Stump (mrs@cygnus.com)
3416 These changes break binary compatibility in code with classes
3417 that use virtual bases.
3419 * search.c (dfs_get_vbase_types): Simplify and correct to make
3420 sure virtual bases are initialized in dfs ordering.
3421 * search.c (get_vbase_types): Simplify and make readable.
3423 Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
3425 * parse.y: s/ typename / type_id /g
3427 Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
3429 * parse.y (typespec): add SCOPE TYPENAME for global scoped
3432 * decl.c (complete_array_type): fix a bug that in -pendantic
3433 mode even there's no initializer, it will continue to build
3436 Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
3438 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
3439 all of the scoped PTYPENAME rules.
3441 Wed Mar 16 16:39:02 1994 Mike Stump (mrs@cygnus.com)
3443 * init.c (build_offset_ref): The value of A::typedef_name is
3444 always the TYPE_DECL, and never an error.
3446 Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3448 * search.c (get_base_distance_recursive): Two binfos can only
3449 represent the same object if they are both via_virtual.
3451 * class.c (finish_base_struct): Check vbases for ambiguity, too.
3453 * search.c (get_vbase_types): Accept binfo argument, too.
3455 Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
3457 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
3458 initializer also, because back-end requires it.
3460 Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3462 * error.c (dump_expr): Support member functions (which show up as
3465 Mon Mar 14 16:24:36 1994 Mike Stump (mrs@cygnus.com)
3467 * init.c (build_new): Set the return type of multidimensional
3470 Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
3472 * call.c (build_method_call): if basetype not equal to type
3473 of the instance, use the type of the instance in building
3476 Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
3478 * parse.y (direct_notype_declarator): add push_nested_type for
3479 'template_type SCOPED_NAME' rule.
3481 Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3483 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
3485 Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
3487 * parse.y (regcast_or_absdcl): New nonterminal to implement late
3488 reduction of constructs like `int ((int)(int)(int))'.
3489 (cast_expr): Use it.
3490 (sub_cast_expr): Everything that can come after a cast.
3491 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
3492 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
3493 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
3494 '(' complex_parmlist ')' and regcast_or_absdcl.
3496 (complex_parmlist): Parmlists that are not also typenames.
3497 (parms_comma): Enabler.
3498 (named_parm): A parm that is not also a typename. Use declarator
3499 rather than dont_see_typename abs_or_notype_decl. Expand
3500 typed_declspecs inline.
3501 (abs_or_notype_decl): Lose.
3502 (dont_see_typename): Comment out.
3503 (bad_parm): Break out abs_or_notype_decl into two rules.
3505 Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
3507 * decl2.c (reparse_decl_as_casts): New function to change parse
3508 nodes for `(int)(int)(int)' from "function taking int and returning
3509 function taking int and returning function taking int" to "... cast
3510 to int, cast to int, cast to int".
3512 * decl2.c (reparse_decl_as_expr): Recursive function to change
3513 parse nodes for `A()()' from "function returning function returning
3514 A" to "A().operator()".
3516 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
3517 `typespec fcast_or_absdcl' rule.
3518 (fcast_or_absdcl): New nonterminal to implement late reduction of
3519 constructs like `A()()()()'.
3520 (typename): Replace `typespec absdcl1' rule with
3521 `typespec direct_abstract_declarator' rule.
3522 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
3523 with `fcast_or_absdcl type_quals' rule.
3525 Fri Mar 4 16:18:03 1994 Mike Stump (mrs@cygnus.com)
3527 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
3528 matches Section 5.5.
3530 Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3532 * error.c (dump_type_prefix): Don't print basetype twice for
3535 Fri Mar 4 13:24:33 1994 Mike Stump (mrs@cygnus.com)
3537 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
3538 so that it is like setHandler(&A::handlerFn). Cures an `invalid
3539 lvalue in unary `&''.
3541 Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3543 * gxxint.texi (Copying Objects): New section discussing default
3544 op= problems with virtual inheritance.
3546 * decl2.c (grokoptypename): Just does grokdeclarator and
3547 build_typename_overload, since the parser can't call grokdeclarator
3550 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
3551 and TREE_TYPE on generated identifiers.
3553 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
3555 * parse.y (parm): Convert `const char *' to `__opPCc' here.
3557 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
3558 if we can't figure out what to do.
3559 (dump_type*): Ditto.
3561 * typeck2.c (build_m_component_ref): 'component' is an expr, not
3562 a decl. Also move the IS_AGGR_TYPE check after the stripping of
3565 Fri Mar 4 04:46:05 1994 Mike Stump (mrs@cygnus.com)
3567 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
3568 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
3569 lvalue in unary `&''.
3571 Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
3573 * parse.y: Add precedence specification for START_DECLARATOR.
3574 (type_quals): Move before primary.
3575 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
3577 * decl2.c (grokoptypename): Lose.
3579 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
3580 rather than waiting until later.
3582 Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
3584 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
3585 than expanding it inline.
3586 (typename): Expand empty option of (former) absdcl inline.
3587 (abs_or_notype_decl): Ditto.
3588 (absdcl): Lose empty rule.
3589 (conversion_declarator): New nonterminal for 'typename' of 'operator
3591 (operator_name): Use it instead of absdcl.
3593 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
3595 (typed_declspecs): Accept typed_typespecs, rather than typespec
3596 directly. Add rules with reserved_typespecquals.
3597 (reserved_declspecs): Don't accept typespecqual_reserved at the
3598 beginning of the list. The typed_declspecs rule will deal with this
3600 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
3603 * parse.y (direct_notype_declarator,
3604 direct_after_type_declarator, direct_abstract_declarator): Split up
3605 the declarator1 nonterminals to match the draft standard and avoid
3607 (new_type_id, new_declarator, direct_new_declarator,
3608 new_member_declarator): New nonterminals to implement the subset of
3609 'typename' allowed in new expressions.
3610 (unary_expr): Use new_type_id instead of typename.
3611 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
3612 (abs_member_declarator, after_type_member_declarator): Lose.
3614 * parse.y (absdcl1): Don't require parens around
3615 abs_member_declarator.
3616 (abs_member_declarator): Lose see_typename from rules.
3617 (after_type_member_declarator): Ditto.
3619 * tree.c (get_identifier_list): New function, containing code
3620 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
3621 (get_decl_list): Use it.
3622 (list_hash_lookup_or_cons): Ditto.
3624 * parse.y (typed_declspecs, declmods): It's not necessary to hash
3625 the declspecs on class_obstack, so don't. This way typed_typespecs
3626 can reduce to typed_declspecs.
3628 Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
3630 * cvt.c (build_up_reference): If we aren't checking visibility,
3631 also allow base->derived conversions.
3633 Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3635 * typeck.c (build_c_cast): Remove bogus hack when converting
3636 to a reference type.
3638 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
3640 (lang_stype::methods, lang_decl::next_method): New fields.
3641 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
3642 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
3644 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
3645 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
3646 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
3647 a non-inline virtual function to control emitting of vtables.
3648 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
3649 * search.c (build_vbase_vtables_init): Don't assemble_external
3650 (yet) if flag_vtable_hack.
3651 * class.c (build_vfn_ref): Ditto.
3653 Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
3655 * parse.y (component_decl): Don't include "typed_declspecs
3656 declarator ';'" speedup, since it breaks enums.
3658 Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
3660 * class.c (finish_struct): Minor optimization for building
3663 Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
3665 * decl.c (start_function): Fix detection of function overloading.
3667 Thu Feb 24 22:26:19 1994 Mike Stump (mrs@cygnus.com)
3669 * lex.c (check_newline): #pragma interface can take a string
3670 argument, just like #pragma implementation. #pragma implementation
3671 checks for garbage on the line, line #pragma interface does. Main
3672 input files do not auto implement like named files, #pragma
3673 implementation must be used explicitly.
3675 Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
3677 * parse.y (components): Handle list of one again.
3678 (notype_components): Ditto.
3679 (after_type_declarator1): Take maybe_raises out again.
3681 * gxxint.texi (Parser): Document additional r/r conflict.
3683 Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3685 * gxxint.texi (Parser): Add node.
3687 * Makefile.in (stamp-parse): Update expected conflict count.
3689 * parse.y (various): Replace "declmods declarator" with "declmods
3690 notype_declarator". The comment saying that "declmods declarator ';'"
3691 corresponds to "int i;" was wrong; it corresponds to "const i;".
3692 (component_decl): Add "typed_declspecs declarator ';'" rule; this
3693 *does* correspond to "int i;". Change "declmods components" to
3694 "declmods notype_components".
3695 (components): Don't deal with a list of one anymore.
3696 (notype_components): New nonterminal, corresponds to notype_declarator.
3697 ({after_,no}type_component_decl{,0}): More new nonterminals.
3698 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
3699 Eliminates four reduce/reduce conflicts.
3701 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
3702 (nontrivial_exprlist): New nonterminal: A list of at least two
3704 (nonnull_exprlist): Depend on nontrival_exprlist.
3705 Eliminates four reduce/reduce conflicts.
3707 (named_class_head): Move intermediate code block into separate
3708 nonterminal so that we can stick %prec EMPTY on it.
3710 Add more %prec EMPTY's to eliminate remaining shift/reduce
3713 (after_type_declarator): Add maybe_raises to fndecl rules.
3714 (after_type_declarator_no_typename): Remove.
3717 Document remaining reduce/reduce conflicts.
3719 Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
3721 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
3722 (TYPE_BINFO (type)) if we care about the path.
3724 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
3727 Mon Feb 21 19:59:40 1994 Mike Stump (mrs@cygnus.com)
3729 * Makefile.in (mostlyclean): lex.c is a source file, don't
3732 Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3734 * parse.y: Eliminate 20 shift/reduce conflicts.
3736 Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
3738 * pt.c (type_unification): Add subr argument; if set, it means
3739 that we are calling ourselves recursively, so a partial match is OK.
3740 (unify): Support pointers to methods and functions.
3741 (tsubst): Support method pointers.
3742 * decl.c (build_ptrmemfunc_type): No longer static, so that
3743 tsubst can get at it.
3745 * init.c (is_aggr_typedef): Pretend template type parms are
3747 * decl2.c (build_push_scope): If cname refers to a template type
3748 parm, just grin and nod.
3750 * call.c (build_overload_call_real): Pass subr argument to
3752 * pt.c (do_function_instantiation): Ditto.
3753 * class.c (instantiate_type): Ditto.
3755 * search.c (get_base_distance): If BINFO is a binfo, use it and
3756 don't mess with its BINFO_INHERITANCE_CHAIN.
3758 * cvt.c (convert_to_reference): Fix temporary generation.
3759 If ambiguous, return error_mark_node.
3761 * init.c (build_new): Put back some necessary code.
3763 Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
3765 * init.c (build_new): Deal with array types properly.
3767 * search.c (get_binfo): Become a shell for get_base_distance.
3768 (get_binfo_recursive): Lose.
3769 (get_base_distance_recursive): Find the path to the via_virtual base
3770 that provides the most access.
3771 (get_base_distance): Ditto.
3773 * parse.y (explicit_instantiation): Syntax is 'template class
3774 A<int>', not 'template A<int>'.
3776 * typeck.c (convert_for_initialization): Remove bogus warning.
3778 * parse.y (datadef): Revert patch of Oct 27.
3780 Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3782 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
3783 rather than integer_type_node. Does wonders for the Alpha.
3785 Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3787 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
3788 goes onto the same obstack as its target type.
3790 Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3792 * cvt.c (convert_to_reference): If converting via constructor
3793 on local level, go back to build_cplus_new approach.
3795 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
3796 to error_mark_node to prevent expand_expr from building a cleanup
3799 * lex.c (default_assign_ref_body): Return *this from the memcpy
3802 * decl.c (grok_reference_init): Just return if called with
3803 error_mark_node, don't worry about initializing non-const reference
3806 * cvt.c (convert_to_reference): Do the right thing for
3807 non-aggregate reference conversions, pedwarn when generating a
3808 non-const reference to a temporary.
3810 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
3811 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
3814 Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3816 * decl.c (grok_reference_init): Pawn off a lot of the work on
3817 convert_to_reference. Generally do the right thing.
3819 * cvt.c (convert_to_reference): Conform to the initial comment;
3820 i.e. don't create temps if decl != error_mark_node. Handle
3821 cleanups better for temps that do get created. Don't pretend
3822 that we can use an 'A' to initialize a 'const double &' just by
3823 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
3825 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
3828 Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3830 * decl.c (grok_reference_init): Make a temporary for initializing
3831 const reference from constant expression.
3833 Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
3835 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
3836 * decl.c (pushdecl): Define decl in correct binding_level
3837 (which isn't always the inner_binding_level).
3839 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
3840 It's ugly, and I don't think it's the right thing to do.
3842 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
3843 Remove NEW_CLASS_SCOPING, assuming it is always 1.
3844 * decl.c (pop_decl_level): Removed; manually inlined.
3846 Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
3848 * class.h (candidate): Add basetypes field.
3850 * call.c (build_method_call): Do access checking after choosing a
3851 function, not before.
3853 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
3854 (mostlyclean): Remove ../cc1plus.
3856 Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3858 * class.c (finish_struct): Don't allow adjusting access to a field
3859 of a base class if a local field has the same name.
3861 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
3863 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
3865 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
3866 with destructor names when either NO_DOLLAR_IN_LABEL or
3867 NO_DOT_IN_LABEL are not defined.
3869 Now `template <class T, T f(T&), const T*> class A {...}' works.
3871 * pt.c (grok_template_type): substitute template parm types
3872 with actual types in complex type as well.
3873 (coerce_template_parms): update the grok_template_type ()
3876 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
3878 * decl.c (grok_op_properties): Allow operator++/-- to have
3881 * typeck2.c (store_init_value): Don't abort when called to
3882 initialize a type that needs constructing with a CONSTRUCTOR.
3884 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
3885 store_init_value fails, build and expand an INIT_EXPR. If
3886 store_init_value succeeds, call expand_decl_init.
3888 Fri Feb 11 02:49:23 1994 Mike Stump (mrs@cygnus.com)
3890 * class.c (build_vbase_path): Use complete_type_p instead of
3891 resolves_to_fixed_type_p to determine if the virtual bases are in
3892 their right place for the type of expr. Cures problem of thinking a
3893 virtual base class is one place, when it is in fact someplace else.
3895 Fri Feb 11 00:26:46 1994 Mike Stump (mrs@cygnus.com)
3897 * init.c (resolve_offset_ref): Make sure we first convert to
3898 intermediate type, if given, when dealing with members off `this'.
3899 Solves an incorrrect `type `foo' is not a base type for type
3900 `multiple'' when it is infact, a base type.
3902 Thu Feb 10 21:49:35 1994 Mike Stump (mrs@cygnus.com)
3904 * class.c (modify_other_vtable_entries): Use get_binfo, instead
3905 of binfo_value. Solves problem with compiler giving a `base class
3906 `B' ambiguous in binfo_value (compiler error)' on complex MI
3907 herarchies, when a virtual function is first defied in a virtual
3910 Thu Feb 10 17:19:32 1994 Mike Stump (mrs@cygnus.com)
3912 * class.c (build_vbase_path): Don't complain about ambiguous
3913 intermediate conversion when converting down to a virtual base
3914 class, even if they might seem to be ambiguous.
3916 Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3918 * typeck2.c (build_functional_cast): #if 0 out constructor
3919 inheritance code, improve error messages.
3921 * class.c (finish_base_struct): Complain about base with only
3922 non-default constructors in derived class with no constructors.
3924 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
3926 Wed Feb 9 22:02:32 1994 Mike Stump (mrs@cygnus.com)
3928 * search.c (build_mi_virtuals, add_mi_virtuals,
3929 report_ambiguous_mi_virtuals): Removed unneeded code.
3930 * class.c (finish_struct_bits): Ditto.
3932 Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3934 * pt.c (end_template_instantiation): Push decl before
3937 * typeck2.c (build_m_component_ref): Make sure datum is of
3940 * init.c (get_type_value): New function, returns
3941 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
3943 * call.c (build_method_call): Don't die on call to destructor for
3946 * decl.c (grokdeclarator): Complain about virtual op new and op
3947 delete, make static virtuals unvirtual instead of unstatic.
3949 * typeck.c (build_c_cast): Also call default_conversion on
3952 * decl.c (grokdeclarator): Don't complain about anonymous
3955 * parse.y (simple_stmt, for loops): Move the continue point after
3958 * class.c (finish_struct): Fix setting of
3959 TYPE_HAS_COMPLEX_INIT_REF.
3961 Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3963 * init.c (build_new): Deal with `new double (1)'.
3965 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
3966 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
3967 TYPE_NEEDS_CONSTRUCTING.
3969 * decl.c (duplicate_decls): Propagate access decls.
3971 * typeck2.c (process_init_constructor): Accept empty_init_node
3972 for initializing unions.
3974 * class.c, lex.c, cp-tree.h: Use
3975 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
3976 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
3979 * decl.c (finish_decl): Don't complain about uninitialized const
3980 if it was initialized before.
3982 Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3984 * lex.c (default_assign_ref_body): Don't deal with vbases for
3987 * decl.c (finish_decl): Fix reversed logic for objects and other
3988 things that need to be constructed but have no initializer.
3990 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
3991 set by grok_op_properties or finish_decl.
3993 * decl.c: Don't warn about extern redeclared inline unless
3994 -Wextern-inline is given.
3995 * decl2.c (lang_decode_option): Ditto.
3998 Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
4000 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
4003 * decl.c (pushdecl_with_scope): New function.
4004 * decl.c (pushdecl_top_level): Use new function.
4005 * decl.c (pushtag): Initialize newdecl.
4006 * decl.c (pushtag): Push new type decl into correct scope.
4008 Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
4010 * call.c, cvt.c, init.c, search.c, cp-tree.h:
4011 Eradicate LOOKUP_PROTECTED_OK.
4013 Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
4015 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
4016 'globalize' to signify implicit declarations.
4017 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
4018 * decl.c (set_identifier_type_value_with_scope): New function.
4019 * decl.c (set_identifier_local_value): Simplify.
4020 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
4021 forward declaration (followed by ';' and not preceded by 'friend').
4022 * class.c, decl.c, except.c, init.c, parse.y,
4023 pt.c, search.c: Add new argument to calls to xref_tag and
4026 Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
4028 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
4029 ACCESSIBLY_DERIVED_FROM_P meant before.
4030 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
4032 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
4034 * search.c (get_base_distance_recursive): Members and friends of
4035 a class X can implicitly convert an X* to a pointer to a private or
4036 protected immediate base class of X.
4037 (get_binfo_recursive): Ditto.
4038 (get_base_distance): Ignore ambiguity if PROTECT < 0.
4039 (get_binfo): Lose multiple values of PROTECT.
4040 (compute_access): Protected is OK if the start of the
4041 search is an accessible base class of current_class_type.
4043 * method.c (build_opfncall): Do check access on operator new here.
4045 * decl.c (finish_function): Don't check access on operator new
4048 Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
4050 * decl.c (xref_tag): The base of a derived struct is NOT always
4053 * pt.c (do_explicit_instantiation): New function, called from
4054 parser to do explicit function instantiation.
4055 (type_unification): Allow the args list to be terminated with
4057 (do_pending_expansions): Look at i->interface for non-member
4060 * parse.y (datadef): Move explicit_instantiation here.
4061 (structsp): From here.
4062 (datadef): Complain about `int;'.
4064 Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
4066 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
4067 second parameter, and simplify first from a TREE_LIST where
4068 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
4069 * pt.c (instantiate_member_templates): Simplify argument list
4070 from a TREE_LIST to just an IDENTIFIER.
4071 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
4072 * parse.y (template_instantiate_once): Simplify accordingly.
4073 * decl.c (inner_binding_level): New. Use various places to
4076 Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
4078 * typeck2.c (build_functional_cast): int() -> int(0).
4080 Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
4082 * class.c (finish_struct): Don't do a bitwise copy for op= if the
4083 class has a virtual function table.
4085 * typeck.c (convert_for_initialization): Restore warnings about
4086 not using defined op=. Should really be my_friendly_aborts, I
4089 Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
4091 * class.c (finish_struct): Tidy up conditions for doing bitwise
4094 * decl.c (build_default_constructor): #if 0 out.
4096 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
4097 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
4099 * decl.c (grokdeclarator): Don't return void_type_node for
4100 friends being defined here.
4102 * init.c (perform_member_init): Only do the init if it's useful.
4104 * lex.c (default_copy_constructor_body): If we don't need to do
4105 memberwise init, just call __builtin_memcpy.
4106 (default_assign_ref_body): Ditto.
4108 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
4110 Fri Feb 4 13:02:56 1994 Mike Stump (mrs@cygnus.com)
4112 * lex.c (reinit_parse_for_method, cons_up_default_function):
4113 Don't give warn_if_unknown_interface warning when it came from a
4115 * pt.c (end_template_decl, instantiate_template): Ditto.
4116 * decl.c (start_decl): Ditto.
4118 Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
4120 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
4123 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
4124 IS_AGGR_TYPE, since we don't know it's a type.
4126 Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
4128 * decl.c (grokdeclarator): Don't complain about anonymous unions.
4130 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
4131 anonymous, but had a name given to it by a typedef.
4133 * decl.c (grokdeclarator): When renaming an anonymous struct, set
4136 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
4138 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
4140 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
4141 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
4143 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
4144 anonymous structs that get typedef'd.
4146 * decl.c (grokdeclarator): Always return void_type_node for
4149 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
4151 (dump_function_decl): Don't print out default args for
4152 a function used in an expression.
4154 * decl.c (grokdeclarator): Give error on abstract declarator used
4155 in an invalid context (i.e. `void (*)();').
4157 * error.c (cp_line_of): Support _TYPE nodes.
4158 (cp_file_of): Ditto.
4160 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
4161 it can happen for the RHS of an assignment stmt where the LHS is
4164 * init.c (expand_aggr_init_1): Deal with bracketed initializer
4167 * class.c (finish_struct): Deal with enumerators and typedefs
4170 Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
4172 * class.c (finish_struct): Tidy up loop over fields.
4174 * errfn.c (cp_thing): Don't advance twice after a format.
4176 * class.c (finish_struct): Complain about needing a constructor
4177 if a member has only non-default constructors, and don't try to
4178 generate a default constructor.
4180 * decl.c (finish_decl): Also do the constructor thing if
4181 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
4183 * search.c (unuse_fields): New function: mark all fields in this
4185 (dfs_unuse_fields): Helper function.
4187 * class.c (pushclass): If the new class is the same as the old
4188 class, still unuse the fields.
4189 (unuse_fields): Move to search.c.
4191 * decl.c (grok_op_properties): Add friendp argument.
4192 (grokfndecl): Pass it.
4193 (start_method): Ditto.
4195 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
4198 * parse.y (unary_expr): Pass new parameter to delete_sanity.
4200 * lex.c (default_copy_constructor_body): Don't choke if the union
4202 (default_assign_ref_body): Ditto.
4204 * call.c (compute_conversion_costs_ansi): Do the right thing for
4207 * decl.c (push_to_top_level): Optimize.
4209 * decl.c (start_function): Look for the lexical scope of a friend
4210 in DECL_CLASS_CONTEXT.
4212 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
4214 Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
4216 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
4218 * init.c (init_init_processing): Don't assign BIN/BID to the
4219 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
4220 (build_new): Check TREE_GETS_PLACED_NEW.
4222 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
4223 op new with placement, set TREE_GETS_PLACED_NEW.
4225 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
4227 * class.c (finish_struct): Don't treat anonymous unions like
4228 other aggregate members. Do synthesize methods for unions without
4229 a name, since they may or may not be "anonymous unions".
4231 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
4232 in anonymous unions.
4234 * lex.c (default_copy_constructor_body): Support unions.
4235 (default_assign_ref_body): Ditto.
4237 Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
4239 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
4241 * error.c (args_as_string): New function (%A), like type_as_string
4242 except NULL_TREE -> "..."
4244 * call.c (build_overload_call_real): Fix for new overloading.
4246 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
4249 * parse.y (operator_name): Instead of here.
4251 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
4254 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
4256 * method.c (build_opfncall): Don't need to massage return value
4257 any more, call build_overload_call with all flags.
4259 * typeck.c (build_x_binary_op): Put back speculative call to
4261 (build_x_unary_op): Ditto.
4262 (build_x_conditional_expr): Ditto.
4264 Mon Jan 31 10:00:30 1994 Mike Stump (mrs@cygnus.com)
4266 * cvt.c (build_type_conversion_1): Change call to pedwarn into
4267 warning, and conditionalize upon warn_cast_qual.
4269 Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
4271 * search.c (lookup_field): If xbasetype is a binfo, copy it to
4272 avoid clobbering its inheritance info.
4274 * call.c (build_method_call): Don't overwrite basetype_path with
4275 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
4277 * search.c (compute_access): Fix handling of protected inheritance
4278 and friendship with the enclosing class.
4280 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
4281 initialization of arbitrary variable.
4283 * typeck2.c (build_functional_cast): Only try calling a method if
4286 * decl.c (grokdeclarator): Move handling of constructor syntax
4287 initialization into first loop for generality.
4288 (parmlist_is_random): Lose.
4290 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
4291 to default function.
4293 Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
4295 * decl.c (grokparms): Abort if we get called with something we don't
4298 Thu Jan 27 17:37:25 1994 Mike Stump (mrs@cygnus.com)
4300 * call.c (build_overload_call_real): Change argument complain to
4301 flags to match style of rest of code. Pass it down to
4302 build_function_call_real as necessary.
4303 * call.c (build_overload_call, build_overload_call_maybe): Change
4304 argument complain to flags to match style of rest of code.
4305 * cp-tree.h (build_function_call_real): Added fourth flags
4307 * cvt.c (convert_to_reference): Only give warning messages, if
4308 LOOKUP_COMPLAIN is set.
4309 * typeck.c (build_x_function_call): Change simple complain
4310 argument to build_overload_call_maybe and build_overload_call, to
4311 LOOKUP_COMPLAIN to match style of rest of code.
4312 * typeck2.c (build_functional_cast): Ditto.
4313 * typeck.c (build_function_call_real): Add flags, so that we can
4314 not complain, if we don't want to complain. Complain about
4315 arguments, if we are complaining, otherwise don't.
4316 * typeck.c (build_function_call, build_function_call_maybe):
4317 Stick in flags argument.
4318 * typeck.c (build_x_binary_op, build_x_unary_op,
4319 build_x_conditional_expr, build_x_compound_expr): Follow style of
4320 build_x_indirect_ref, as it is more correct and more common.
4322 Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
4324 * call.c (build_method_call): Don't check for being called with
4327 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
4328 static initializer function.
4330 * init.c (build_member_call): Use convert_force here, too.
4332 * search.c (compute_access): Only treat static members specially
4333 if they are referenced directly.
4335 Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
4337 * gxxint.texi (Access Control): New node.
4339 * search.c (current_scope): New function; returns whichever of
4340 current_class_type and current_function_decl is the most nested.
4341 (compute_access): Total overhaul to make it clearer and more
4342 correct. Don't use the cache for now; in the only situation where
4343 it was used before, it gained nothing. This frees up three of the
4344 DECL_LANG_FLAGs for possible other use!
4346 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
4348 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
4350 * call.c (build_method_call): Use convert_force to cast `this' --
4351 rely on the access checking for the method itself.
4353 * init.c (is_friend): Do the nesting thing, handle types. I am
4355 (is_friend_type): Become a shell for is_friend.
4356 (add_friend): Never stick in ctype.
4357 Why are the friendship functions in init.c, anyway?
4359 Wed Jan 26 17:50:00 1994 Mike Stump (mrs@cygnus.com)
4361 * cvt.c (build_type_conversion_1): Don't conditionalize call to
4362 pedwarn upon pedantic.
4364 Wed Jan 26 17:20:46 1994 Mike Stump (mrs@cygnus.com)
4366 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
4367 gets a warning if one tries to initialize a non-const & from a
4369 * cvt.c (convert_to_reference): Use %P format for argument
4370 numbers in warnings.
4372 Wed Jan 26 14:35:06 1994 Mike Stump (mrs@cygnus.com)
4374 * init.c (build_delete): Follow style in call.c to construct the
4375 virtual call to the desctructor, as that code is right. Fixes a
4376 problem of the compiler saying a pointer conversion is ambiguous.
4378 Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
4380 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
4381 VTABLE_NAME_FORMAT to VTABLE_NAME.
4383 * *: s/visibility/access/g
4385 Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
4387 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
4389 Tue Jan 25 13:54:29 1994 Mike Stump (mrs@cygnus.com)
4391 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
4394 Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
4396 * decl.c (duplicate_decls): Fix pointer arithmetic.
4398 Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
4400 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
4401 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
4402 clauses on a declaration.
4404 Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
4406 * class.c (finish_struct): Do synthesize methods for anon
4407 structs, just not unions.
4409 Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
4411 * decl.c (xref_tag): handle anonymous nested type.
4412 * decl.c (globalize_nested_type): add no globalize bit check.
4413 * spew.c (hack_more_ids) : templated nested decl not push top
4416 * parse.y : get rid of 'goto do_components'. It is much better
4419 * decl.c (is_anon_name): get rid of the function and use the
4420 macro ANON_AGGRNAME_P.
4423 Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
4425 * class.c (finish_struct): Don't synthesize any methods for
4426 anonymous structs/unions.
4428 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
4430 Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
4432 * method.c (build_opfncall): Call build_indirect_ref on
4433 synthesized instance for operator delete.
4435 * pt.c (type_unification): Don't abort if called with a list of
4438 * class.c (instantiate_type): Deal with function templates.
4440 Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
4442 * Makefile.in (CC): Default to cc not gcc.
4444 Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
4446 * typeck.c (build_modify_expr): Call constructor if appropriate.
4448 * decl.c (push_to_top_level): Clear out class-level bindings cache.
4450 Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
4452 * call.c (resolve_scope_to_name): Work recursively (previously only
4453 looked down one level).
4455 * lex.c (do_pending_inlines): If we're still dealing with the last
4456 batch of inlines, don't start working on a new one.
4458 * Makefile.in (stamp-parse): Update conflict count.
4461 * parse.y (explicit_instantiation): New rule; implements
4462 'template A<int>' syntax (though not 'template foo(int)' yet).
4463 (structsp): Add explicit_instantiation.
4465 Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
4467 * class.c (finish_struct, etc.): Simplify decision to synthesize
4470 * call.c, class.c, cp-tree.h, decl.c, init.c,
4471 ptree.c, search.c, typeck.c, typeck2.c: Nuke
4472 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
4473 * init.c (expand_aggr_init_1): Don't try non-constructor methods
4474 of initializing objects.
4475 (build_new): Don't try other methods if the constructor lookup fails.
4477 * class.c (finish_base_struct): Set cant_have_default_ctor and
4478 cant_synth_copy_ctor properly.
4479 (finish_struct): Ditto.
4481 Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
4483 * typeck.c (build_modify_expr_1): #if 0 out again.
4484 (build_modify_expr): #if 0 out memberwise init code again.
4486 * lex.c (default_copy_constructor_body): Be const-correct.
4487 (default_assign_ref_body): Ditto.
4489 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
4490 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
4491 (expand_aggr_init): Disable silent conversion from initializer list
4492 to list of args for a constructor.
4494 * class.c (base_info): Lose needs_default_ctor.
4495 (finish_base_struct): Ditto.
4496 (finish_struct): Ditto.
4498 * decl.c (init_decl_processing): Don't turn off flag_default_inline
4499 just because flag_no_inline is on.
4500 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
4503 * class.c (finish_struct): Synthesize default ctor whenever
4506 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
4508 Sat Jan 15 18:34:33 1994 Mike Stump (mrs@cygnus.com)
4510 * Makefile.in, configure: Handle the C++ front-end in a
4512 * cp-*: Move C++ front-end to cp/*.
4514 Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
4516 * cp-typeck.c (build_function_call_real): Modify to match other
4517 instances of taking the address of the function.
4519 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
4520 there are non-synthesized constructors.
4521 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
4522 Always generate copy constructor if possible.
4524 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
4525 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
4527 * cp-lex.c (default_copy_constructor_body): Use init syntax
4530 * cp-type2.c (store_init_value): Only give error for initializer list
4531 if TYPE_HAS_REAL_CONSTRUCTOR.
4533 Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
4535 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
4536 (lang_decl): Add synthesized bitfield to decl_flags.
4538 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
4539 artificial methods, rather than a line # of 0.
4541 Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
4543 * cp-decl (xref_tag): fix a bug in conflict type.
4544 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
4546 * cp-spew.c (yylex) : generated SCOPED_NAME token.
4547 * cp-lex.c (yyprint): handle SCOPED_NAME.
4549 Fri Jan 14 17:00:29 1994 Mike Stump (mrs@cygnus.com)
4551 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
4554 Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
4556 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
4559 Thu Jan 13 11:39:34 1994 Mike Stump (mrs@cygnus.com)
4561 Ensure that all vtable pointers are initialized with all the right
4564 * cp-class.c (is_normal): Changed to reflect new meaning of
4565 CLASSTYPE_VFIELD_PARENT.
4566 * cp-class.c (maybe_fixup_vptrs): Use of
4567 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
4568 BINFO_MODIFIED instead.
4569 * cp-class.c (finish_struct): Changed to reflect new meaning of
4570 CLASSTYPE_VFIELD_PARENT.
4571 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
4572 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
4574 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
4576 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
4577 * cp-tree.h (vfield_parent): Changed to integer.
4578 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
4580 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
4582 Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
4584 * cp-decl.c (xref_tag): re-implement globalize nested type.
4585 * cp-decl2.c (grok_x_components): ditto.
4586 * cp-parse.y: ditto.
4587 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
4589 Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
4591 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
4592 decls with a definition attached.
4594 * cp-typeck.c (build_modify_expr): Undo previous change in the case
4597 Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
4599 * cp-typeck.c (build_modify_expr): Replace code for generating
4600 assignment semantics for classes with an error.
4601 (build_modify_expr_1): #if 0 out.
4603 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
4604 behavior for overloaded functions (it doesn't push anything).
4606 * cp-class.c (finish_struct): When generating default op=,
4607 set TYPE_HAS_ASSIGNMENT.
4609 Mon Jan 10 18:48:06 1994 Mike Stump (mrs@cygnus.com)
4611 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
4613 * cp-typeck.c (convert_for_assignment): Simplify.
4614 * cp-decl2.c (warn_enum_clash): Removed.
4615 * invoke.texi (-Wenum-clash): Removed.
4616 * toplev.c (-Wenum-clash): Removed.
4618 Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
4620 * cp-decl.c (finish_decl): fix incorrect popclass call.
4622 * cp-decl.c (is_anon_name): new function, check whether the name
4623 is anonymous name generated by compiler.
4624 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
4625 * cp-spew.c (hack_more_ids): handle nested type in template.
4626 * cp-parse.y : handle nested type reference in uninstantiated
4628 * cp-call.c (build_method_call): handle uninstantiated template
4630 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
4632 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
4634 * cp-pt.c (tsubst): handle nested type search by name.
4636 Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
4638 * cp-init.c (build_member_call): Propagate qualifiers to new type.
4640 * cp-call.c (build_method_call): Count functions the new way.
4642 Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
4644 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
4647 Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
4649 * cp-parse.y: change to handle whether to globalize nested class.
4650 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
4652 Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
4654 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
4655 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
4656 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
4657 gplus.gperf toplev.c: Incorporated C++ signature extension.
4658 * cp-sig.c: New file, contains most of signature processing.
4659 * cp-hash.h: Regenerated from gplus.gperf.
4661 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
4662 and `-fno-handle-signatures' command line flags.
4664 * gcc.texi: Changed the last-modification date.
4665 * invoke.texi: Added `-fhandle-signatures' in the list of
4666 C++ language options. Added explanation for this option.
4668 Tue Dec 28 21:10:03 1993 Mike Stump (mrs@cygnus.com)
4670 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
4673 Tue Dec 28 13:42:22 1993 Mike Stump (mrs@cygnus.com)
4675 * cp-pt.c (do_pending_expansions): Decide to expand a template
4676 member function, based upon it's class type, not the class type of
4677 the first place it was declared.
4679 Tue Dec 28 05:42:31 1993 Mike Stump (mrs@cygnus.com)
4681 * cp-class.c (is_normal): New routine, use to determine when the
4682 given binfo is the normal one. (The one that should have the simple
4684 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
4685 to check if two fndecls are `the same'. Sometimes this routine can
4686 modify the main vtable, and normal should be 1, in that case, so use
4687 is_normal() to determine if this is the main vtable for the class.
4688 Don't recurse down virtual bases, as they are shared, and we take
4689 care of them elsewhere.
4690 * cp-class.c (modify_vtable_entries): If we have already updated the
4691 vtable with the new virtual, don't do it again.
4692 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
4693 appropriate. Do virtual function overriding in virtual bases, after
4694 normal overriding, so that the base function list in DECL_VINDEX is
4695 not overridden, before we have a chance to run through the list.
4696 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
4697 Make sure we pass the right address into modify_vtable_entries.
4698 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
4699 binfo is the one that has the vtable that we based our vtable on.
4701 Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
4703 * cp-typeck.c (c_expand_start_case): Use default_conversion to
4704 convert expression from reference type if necessary.
4706 Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
4708 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
4709 trying to read its TREE_VALUE.
4711 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
4712 (finish_struct): Instead of here.
4714 Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4716 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
4717 have TYPE_PTRMEMFUNC_P set before we try to build its
4718 CLASSTYPE_ID_AS_LIST.
4719 (get_decl_list): Likewise, when trying to read it.
4721 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
4722 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
4724 Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4726 * cp-typeck.c (rationalize_conditional_expr): New function.
4727 (unary_complex_lvalue): Use it.
4728 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
4729 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
4732 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
4733 (lang_decode_option): Set warn_return_type, not explicit_*, for
4734 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
4735 decide if it should go into jump_optimize or not.
4736 * cp-tree.h (explicit_warn_return_type): Deleted.
4737 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
4738 (finish_function): Also complain about no return in a non-void fn if
4739 we're being pedantic (don't rely on use of -Wreturn-type).
4741 Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4743 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
4744 static if it's being done inside another function.
4746 * cp-search.c (compute_visibility): Check for friendship both ways.
4748 Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
4750 * cp-cvt.c (build_default_binary_type_conversion): Make error
4751 messages more helpful.
4753 * cp-error.c (op_as_string): New function, returns "operator =="
4754 given EQ_EXPR or suchlike.
4756 Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4758 * cp-call.c (print_n_candidates): New function.
4759 (build_overload_call_real): Use it when we complain about a call
4762 Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4764 * cp-call.c (build_method_call): Fix checking for static call
4767 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
4770 * cp-init.c (build_new): Don't mess with rval when building
4773 Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
4775 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
4776 NAME(type) may not be exist. It's not a problem for old compiler.
4778 Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4780 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
4781 never used for anything.
4782 (struct lang_type, member type_flags): Delete field
4783 `alters_visibility', and up `dummy' by 1.
4784 * cp-class.c (finish_base_struct): Delete code that copies the
4785 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
4786 (finish_struct): Delete code that sets it.
4788 Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
4790 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
4791 build_method_call that I messed up before.
4793 * cp-search.c (get_base_distance): If protect > 1, allow immediate
4796 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
4797 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
4798 properly with the case where a class contains an object of an
4799 ambiguous base class which has a protected op=. Should be fixed
4800 when the access control code gets overhauled.
4801 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
4803 Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4805 * cp-lex.c (real_yylex): Turn the code back on that deals with
4806 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
4807 avoid the ambiguity problems that led to it being turned off in the
4810 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
4811 to see if something is a method.
4813 Wed Dec 15 18:35:58 1993 Mike Stump (mrs@cygnus.com)
4815 * cp-typeck.c (build_modify_expr): Avoid error messages on small
4817 * cp-typeck.c (convert_for_assignment): Add missing argument to
4818 cp_warning and cp_pedwarn calls.
4820 Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
4822 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
4823 initializers; it's just anachronistic.
4825 * cp-decl.c (finish_decl): Don't require external-linkage arrays
4826 to have a complete type at declaration time when pedantic.
4828 Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4830 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
4832 * cp-call.c (build_method_call): Don't dereference pointer given
4835 * cp-decl.c (finish_function): Don't pass pointer to
4837 (finish_function): Ditto.
4839 * cp-typeck.c (build_x_function_call): Ditto.
4841 * cp-method.c (build_component_type_expr): Ditto.
4843 * cp-init.c (build_member_call): Ditto.
4846 Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
4848 * cp-decl.c (xref_tag): fix regression created by changes made
4850 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
4852 Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4854 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
4855 out the final evaluation of the function, so we can see if ELLIPSIS,
4856 USER, and EVIL were set at the end.
4858 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
4859 only go for setting TRIVIAL_CODE if we are dealing with types that
4862 Thu Dec 9 18:27:22 1993 Mike Stump (mrs@cygnus.com)
4864 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
4865 * toplev.c (lang_options): Ditto.
4866 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
4867 * cp-decl.c (delta_type_node): New type for delta entries.
4868 * cp-tree.h (delta_type_node): Ditto.
4869 * cp-decl.c (init_decl_processing): Setup delta_type_node.
4870 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
4871 delta_type_node instead of short_integer_type_node.
4872 * cp-class.c (build_vtable_entry): Ditto.
4874 Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4876 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
4877 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
4878 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
4880 Wed Dec 8 17:38:06 1993 Mike Stump (mrs@cygnus.com)
4882 * cp-decl.c (finish_decl): Make sure things that can go into
4883 "common", do go into common, if -fcommon is given.
4885 Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4887 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
4888 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
4889 argument matching diagnostics to make instantly clear what the
4892 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
4893 then check to see if the penalty was increased due to
4894 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
4896 Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
4898 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
4901 Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
4903 * cp-class.c (finish_struct): Before synthesizing methods, if no
4904 methods have yet been declared then set nonprivate_method. Don't
4905 set non_private method after synthesizing a method.
4907 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
4908 is set, tie emitted code to the location of template instantiation,
4909 rather than definition.
4911 * cp-tree.h: Declare flag_alt_external_templates.
4913 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
4915 * toplev.c (lang_options): Ditto.
4917 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
4919 [changes propagated from 930810 snapshot]
4920 * cp-decl.c (init_decl_processing): Make long long available for use
4921 as SIZE_TYPE and PTRDIFF_TYPE.
4922 (finish_decl): Allow file-scope static incomplete array.
4923 (grokdeclarator): Don't pass on const and volatile fron function
4924 value type to function type.
4925 Warn here for volatile fn returning non-void type.
4926 * cp-parse.y (attrib): Accept attributes `volatile' with alias
4927 `noreturn', and `const'.
4928 * cp-typeck.c (default_conversion): Don't lose const and volatile.
4929 (build_binary_op_nodefault): Generate pedantic warning for comparison
4930 of complete pointer type with incomplete pointer type.
4931 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
4933 Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4935 * cp-init.c (expand_vec_init): When creating a temporary for copying
4936 arrays, use the type of the source, not the target.
4938 * cp-cvt.c (convert): Pass an argument for errtype to
4939 convert_to_reference.
4941 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
4942 methods, -> and `this'.
4944 Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4946 * cp-error.c (parm_as_string): New function; returns `this' or arg
4947 number. Corresponds to %P.
4948 (dump_expr): Deal with method calls.
4950 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
4951 * cp-typeck.c (convert_for_assignment): Ditto.
4952 (warn_for_assignment): Lose.
4954 Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4956 * cp-call.c (ideal_candidate_ansi): Delete code that was never
4957 doing anything useful. Instead, sort once, and DO NOT wipe
4958 out any codes with EVIL_CODE, since that's what we use as a
4959 marker for the end of the list of candidates.
4961 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
4963 Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4965 * cp-init.c (get_aggr_from_typedef): New function, like
4966 is_aggr_typedef but returns the _TYPE.
4968 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
4970 Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4972 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
4974 Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
4976 Delay language context change until beginning of next decl.
4978 * cp-lex.h (c_header_level): Removed.
4979 (pending_lang_change): Declared.
4980 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
4981 (pending_lang_change): Defined.
4982 (check_newline): Rework code that recognizes line number and
4983 filename changes. Instead of pushing and popping lang context,
4984 increment and decrement pending_lang_change.
4985 (do_pending_lang_change): Push and pop lang context according
4986 to value of pending_lang_change.
4987 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
4988 (extdef): Same as extdef, but call do_pending_lang_change() first.
4990 Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
4992 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
4993 compare of ptr with 0 only if pedantic in both cases.
4995 Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
4997 Reinstate the below patch, which got lost in the Cygnus merge:
4998 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
4999 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
5001 Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
5003 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
5005 Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
5007 * cp-lex.c (real_yylex): Diagnose floating point constants
5010 Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
5012 * cp-type2.c (build_functional_cast): ARM page 16: When a class
5013 and an object, function or enumerator are declared in the same
5014 scope with the same name, the class name is hidden.
5016 Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
5018 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
5019 and long double from each other when overloading.
5020 (compute_conversion_costs_{ansi,old}, build_method_call,
5021 build_overlay_call_real, convert_to_aggr): Always set and
5022 always use H_LEN member of candidate structure.
5024 Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
5026 * cp-decl.c (duplicate_decls): Note redeclarations of library
5027 functions, and generate distinct warnings for them.
5029 Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
5031 Support format warnings in G++.
5033 * cp-tree.h: Protect against multiple inclusion.
5034 Declare all public functions in c-common.c (copy from c-tree.h).
5035 (STDIO_PROTO): Define.
5036 (warn_format): Declare.
5037 (record_format_info): Remove declaration.
5038 * cp-decl.c (init_decl_processing): Call init_function_format_info.
5039 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
5040 * cp-typeck.c (build_function_call_real): Call check_function_format.
5041 (record_format_info): Remove -- obsolete stub.
5043 Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
5045 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
5046 following an extern one (for -Wredundant-decls).
5047 * cp-parse.y (primary): In statement expression case, if compstmt
5048 returns something other than a BLOCK, return it unchanged.
5050 Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
5052 * cp-decl.c (warn_extern_redeclared_static): New function made
5053 from code extracted from pushdecl.
5054 (duplicate_decls, pushdecl): Call new function.
5055 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
5056 to be a TREE_LIST when function is declared in 'extern "C" {}'.
5058 Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
5060 * cp-class.c (duplicate_tag_error): Use cp_error.
5061 (finish_base_struct): Check for ambiguity with direct base, and don't
5062 generate op= or copy ctor if it exists.
5064 Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
5066 * cp-init.c (expand_member_init): when initializer name is null,
5067 don't try to build it now because emit_base_init will handle it.
5069 Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
5071 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
5072 code such as ExceptionHandler::operator=.
5074 Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
5076 * cp-decl.c (grokdeclarator): Don't try to print out dname when
5077 complaining about arrays of references if decl_context==TYPENAME,
5078 since it will be null.
5080 * cp-decl2.c: Default to flag_ansi_overloading.
5082 Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
5084 * cp-call.c (build_method_call): use binfo from instance if it's
5085 different from binfo (basetype_path) passed from above.
5087 Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
5089 Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
5091 cp-error.c (dump_expr): Use unsigned chars to output a
5092 TREE_REAL_CST in hex.
5094 Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
5096 * cp-class.c (finish_struct): Fix typo in setting
5099 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
5100 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
5102 * cp-lex.c (default_copy_constructor_body): Change
5103 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
5104 (default_assign_ref_body): Ditto.
5105 (default_copy_constructor_body): Call operator= explicitly for
5106 base classes that have no constructor.
5108 Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
5110 * cp-call.c (build_method_call): If the instance variable is
5111 converted to error_mark_node when we're trying to convert it to the
5112 base type of a method we're looking up, return error_mark_node.
5114 Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
5116 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
5117 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
5119 Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
5121 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
5122 harshness_code, not the size of short, for clearing out the
5125 * cp-call.c (print_candidates): New function.
5126 (build_method_call): When we had some candidates, but didn't get a
5127 usable match, don't report that we got an error with the first
5128 candidate. Instead, say there were no matches, and list the
5129 candidates with print_candidates. In the second pass, make sure we
5130 clear out ever_seen, so we can accurately count the number of
5131 functions that qualified.
5133 Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
5135 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
5136 only if op1 is known to be != -1.
5137 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
5139 Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
5141 * cp-method.c (hack_identifier): If the field itself is private, and
5142 not from a private base class, say so.
5144 Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
5146 * cp-decl.c (grokdeclarator): Always warn on initialization of
5149 Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
5151 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
5152 (finish_base_struct): Set cant_synth_asn_ref properly.
5154 * cp-lex.c (cons_up_default_function): Add section for operator=.
5155 (default_assign_ref_body): New function, mostly cribbed from
5156 default_copy_constructor_body.
5158 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
5159 cant_synth_asn_ref, no_const_asn_ref.
5160 (finish_base_struct): Update no_const_asn_ref, note that you should
5161 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
5162 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
5163 initialize them properly. Set no_const_asn_ref properly. Set
5164 cant_synth_* in some of the situations where they should be set.
5165 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
5166 to cons_up_default_function for operator=.
5168 Tue Nov 23 20:24:58 1993 Mike Stump (mrs@cygnus.com)
5170 * cp-cvt.c (convert_force): Add code to perform casting of pointer
5171 to member function types.
5172 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
5173 when the conversion should be done, regardless.
5174 * cp-tree.h (build_ptrmemfunc): Ditto.
5175 * cp-type2.c (digest_init): Ditto.
5176 * cp-typeck.c (convert_for_assignment): Ditto.
5178 Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
5180 * cp-error.c (dump_expr): Do the right thing for variables of
5183 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
5184 and its kin properly.
5185 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
5187 Tue Nov 23 12:26:13 1993 Mike Stump (mrs@cygnus.com)
5189 * cp-method.c (build_opfncall): Don't count pointer to member
5190 functions as aggregates here, as we don't want to look up methods in
5191 them. The compiler would core dump if we did, as they don't have
5193 * cp-typeck.c (build_indirect_ref): Improve wording on error
5196 Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
5198 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
5199 (since it's supported in other compiler bits).
5201 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
5204 * cp-error.c (dump_function_decl): Don't print return type for
5205 constructors and destructors.
5207 * cp-cvt.c (cp_convert_to_pointer): Import code from
5208 convert_to_pointer so we can return error_mark_node in the case of an
5209 error, and to allow more meaningful error messages.
5210 (build_type_conversion): Don't go through void* when trying
5211 to convert to a pointer type.
5213 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
5214 after grokclassfn so that it's dealing with the right decl.
5215 (grok_op_properties): Don't assert !methodp for op new and op delete.
5217 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
5218 no uses of it in the compiler).
5220 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
5222 (build_method_call): Ditto.
5224 Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
5226 * cp-tree.c (count_functions): Abstraction function.
5228 * cp-call.c (build_overload_call_real): Deal with new overloading
5229 properly, remove dead code.
5231 * gcc.c (default_compilers): Generate and use .ii files in the
5232 intermediate stage of compiling C++ source.
5234 Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
5236 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
5237 address before using it, so it can be later safely compared.
5239 Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
5241 * cp-pt.c (tsubst): Deal with new overloading.
5243 * cp-typeck.c (fntype_p): is the arg function type?
5244 (comp_target_parms): pedwarn on conversion from (anything) to (...).
5245 (build_x_function_call): Deal with new overloading.
5247 * cp-tree.c (decl_list_length): Deal with new overloading.
5248 (decl_value_member): Like value_member, but for DECL_CHAINs.
5250 * cp-decl.c (duplicate_decls): Deal with new overloading.
5251 (start_decl): Ditto.
5253 * cp-class.c (instantiate_type): Deal with new overloading.
5255 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
5256 (convert_harshness_old): Deal with new overloading.
5257 (build_overload_call_real): Ditto.
5259 Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
5261 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
5262 if unambiguous, NULL_TREE otherwise.
5263 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
5264 (is_overloaded_fn): Returns whether or not the passed tree is
5265 a function or list of functions.
5267 * cp-init.c (init_init_processing): use `get_first_fn' to find
5268 the FUNCTION_DEFN for new and delete.
5270 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
5271 code size in half (I spit on special cases).
5273 Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
5275 * cp-decl.c: Allow references and template type parameters as well
5278 eval: (auto-fill-mode)