_Complex and _Imaginary datatypes

Marcel Cox marcel_cox@hotmail.com
Sun Feb 23 22:06:00 GMT 2003


"Justin Hibbits" <jrh29@po.cwru.edu> wrote in message
news:20030223201818.GA29555@lothlorien.cwru.edu...
> Hi, I'm not on the list, so CC all replies to me, (or some other way of
letting
> me get them).

There are actually 2 convieniant ways to look at the messages if you are not
subscribed:

1) The mailing list archives at http://gcc.gnu.org/ml/gcc/

2) The gmane news server:
news://news.gmane.org/gmane.comp.gcc.devel

> Basically, I want to rally high-profile compiler developers to change the
C99
> standard.  I think that the _Complex and _Imaginary data types are
completely
> useless in the mainline language and should be moved back to the library,
which
> is where they usually are.

Forget it:
- once a feature in in the official standard of a language, it is almost
impossible to remove it. The idea is that new versions of the standard are
allowed to extend or clarify the language, but existing programs should
remain compatible with the new standard, or at least require a minimum
effort of adjustment. However if you would remove complex number support
again, all programs using this feature would stop working without any
suitable replacement.
As for the uselessness of these features, I'm sure that many people will
very strongly disagree with you. The lack of these data types was one of the
reasons why so much numerical code is still done in Fortran. The numerical
enhacements in C99 is directly targeted to making C a valid replacement for
Fortran for numerical code. All previous C standards were lacking too many
features (date types and numerical functions) Fortran programmes were used
to.

> My biggest argument is that it increases the complexity of the compiler
itself,
> which is not necessary.

Most popular C compilers already support the complex data types. So the work
is already done, and it's quite useless to complain about the compelxity
now. Besides, the support of complex number is small in complexity compred
to for example many features C++ compilers have to implement. As most of the
time, C and C++ compilers are kind of developed together, the support for
complex numbers is simply trivial to the overall compiler support.

Marcel





More information about the Gcc mailing list