This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Keyword _Imaginary in C99 standard and in GCC
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Yao qi <qiyaobit at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 19 Aug 2005 11:51:40 +0000 (UTC)
- Subject: Re: Keyword _Imaginary in C99 standard and in GCC
- References: <BAY12-F2394AC0ACF3BDE02853942DFB50@phx.gbl>
On Fri, 19 Aug 2005, Yao qi wrote:
> Hi, everyone,
> I have looked through C99 standard, in 6.4.1 Keywords, "_Imaginary" is
> mentioned as a keyword in this standard. However, it seems that GCC can not
> recognize it, report error: '_Imaginary' undeclared. I also search it in GCC
> info, there is no spot mentioned that. Maybe GCC does not include it as a
> keyword, I am not sure about that, am I missing something? Maybe someone of
> you could clarify for me. Thanks in advance.
What use do you have for a keyword which is reserved but cannot be used
anywhere? As of TC2, _Imaginary is just that; it is not a type specifier,
and an implementation implementing Annex G (which is not normative) is
incompatible with the normative parts of the standard (at least as regards
the header definition of "I" having conflicting definitions in the
standard and in Annex G). There are serious doubts (as discussed on the
WG14 reflector in the past) about the utility of imaginary types as
defined in Annex G.
Now, adding _Imaginary as a keyword which is not permitted anywhere in the
syntax (so you get parse errors and can't e.g. declare variables called
_Imaginary) would be a trivial patch, but not clearly a very useful one.
--
Joseph S. Myers
joseph@codesourcery.com