Does "complex xxx" work?

Gabriel Dos Reis gdr@integrable-solutions.net
Sat Jun 21 20:17:00 GMT 2003


Scott Robert Ladd <coyote@coyotegulch.com> writes:

| H. J. Lu wrote:
|  > c_common_nodes_and_builtins calls
|  >
|  >  (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
|  >                                get_identifier ("complex float"),
|  >                                complex_float_type_node));
| [snip]
|  >
|  > What are they used for? I still can't use any of those in C++.
| 
| C99 defines a new keyword, _Complex, for creating various complex
| number types; by including <complex.h>, a programmer can used the
| synonym "complex" for "_Complex".
| 
| I've used these types in gcc-compiled C99 programs, so they must work.

I believe the real question was: Why does GCC treat "complex" (not
_Complex)  as keyword?  Clearly that is a bug in GCC.

-- Gaby



More information about the Gcc mailing list