This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Promoting floats to doubles?


On Tue, 2004-05-04 at 16:57, Kean Johnston wrote:
> But thats a bit of a moot point, as even a Java or C++ or Fortran
> program can (and most liekly will) link against things like libm.so,
> which was compiled by the SCO compiler

But the only reason that libm is a problem is because the prototypes in
the system header files are wrong, and these prototypes won't work with
Fortran code, so you don't need the promotion for Fortran.  The system
header files also won't work for Ada, Pascal, etc.  I don't know if
system header file prototypes matter for Java, does Java code ever
include <math.h>?  If no, then you don't need the promotion for Java. We
can also ask the question of whether the prototypes get used for C++
code, but it probably does.  This makes it a C family issue again.

I think it is a judgment call as to whether you need to fix this with an
ABI change or a C/C++ family front end change.  I am inclined to treat
it as a C family problem, because the underlying problem is that SCO
still has a compiler following K&R C rules instead of ISO C rules.  But
it is reasonable to also handle this as an ABI issue.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]