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]

Re: How "broken" is C complex number support?



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


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