This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How "broken" is C complex number support?
- To: "Steven G. Johnson" <stevenj at gil-galad dot mit dot edu>
- Subject: Re: How "broken" is C complex number support?
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Tue, 23 May 2000 13:16:20 -0400 (EDT)
- cc: gcc at gcc dot gnu dot org
- Reply-To: moshier at mediaone dot net
Steven G. Johnson <stevenj@gil-galad.mit.edu> wrote
> According to http://gcc.gnu.org/c9xstatus.html, support for the C99
> complex type is currently "broken." What exactly does this mean?
> Is it just that complex numbers in gcc (a longstanding extension) have
> some minor technical incompatibilities with the C99 specification?
> Or is even the gcc version seriously buggy?
The complex type generally works OK on any gcc back to about
gcc-2.7 but no released version works properly with float complex on
64-bit machines. Double complex might or might not work on certain
64-bit machines. This problem has been mostly fixed in the development
compiler by Meissner's patches but there are (or were) supposedly
still some problems with inlining, again just on 64-bit computers.
Regarding C99, gcc has no pure imaginary type yet.
C99 complex requires header file and math library support that do not come
with the compiler. The GNU-linux C library has complex support for C99.
Or you could try a portable suite for C99 complex using gcc from
http://www.netlib.org/cephes/c9x-complex.shar.gz