This is the mail archive of the
mailing list for the GCC project.
g77 patch (g++ and other front end maintainers take note!)
- To: d dot love at dl dot ac dot uk
- Subject: g77 patch (g++ and other front end maintainers take note!)
- From: Craig Burley <burley at gnu dot org>
- Date: Sat, 11 Jul 1998 19:38:17 -0400 (EDT)
- Cc: egcs-patches at cygnus dot com
(Dave Love, could you install this patch for me please?)
Aside from a one-liner, most of this patch remove the __eprintf
function from the g77 front end. I believe all front ends should
do the same, because this function is provided in libgcc2.c.
As a result of making this fix, internal g77 crashes due to
triggering assert() calls have more sensible diagnostics.
Previously, they implied that the crash was within g77's
copy of __eprintf, since it calls abort().
So, if this patch is wrong, let me know and I'll revert it, but
we really should find a better solution than to have an identical
function in each front end, and solve the confusing diagnostic
problem some other way perhaps.
tq vm, (burley)
Sat Jul 11 18:24:37 1998 Craig Burley <firstname.lastname@example.org>
* com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding
for constant is non-zero.
* com.c (__eprintf): Delete this function, it is obsolete.
*** g77-e/gcc/f/com.c.~1~ Mon Jul 6 04:29:26 1998
--- g77-e/gcc/f/com.c Fri Jul 10 06:53:49 1998
*************** ffecom_expr_ (ffebld expr, tree dest_tre
*** 2884,2887 ****
--- 2884,2888 ----
+ assert (ffebld_conter_pad (expr) == 0);
= ffecom_constantunion (&ffebld_constant_union (ffebld_conter (expr)),
*************** start_function (tree name, tree type, in
*** 14823,14849 ****
/* Here are the public functions the GNU back end needs. */
- /* This is used by the `assert' macro. It is provided in libgcc.a,
- which `cc' doesn't know how to link. Note that the C++ front-end
- no longer actually uses the `assert' macro (instead, it calls
- my_friendly_assert). But all of the back-end files still need this. */
- __eprintf (string, expression, line, filename)
- #ifdef __STDC__
- const char *string;
- const char *expression;
- unsigned line;
- const char *filename;
- char *string;
- char *expression;
- unsigned line;
- char *filename;
- fprintf (stderr, string, expression, line, filename);
- fflush (stderr);
- abort ();
--- 14824,14827 ----