This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/42753] _Complex_I is reported as undeclared. Code builds with Sun compiler.
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2010 18:32:24 -0000
- Subject: [Bug target/42753] _Complex_I is reported as undeclared. Code builds with Sun compiler.
- References: <bug-42753-16025@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from joseph at codesourcery dot com 2010-01-15 18:32 -------
Subject: Re: _Complex_I is reported as undeclared. Code
builds with Sun compiler.
On Fri, 15 Jan 2010, david dot kirkby at onetel dot net wrote:
> Is this is trivial fix that could be implemted quickly, or it will require
> quite a bit of work, and so I should not expect a solution soon?
It could be implemented quickly if someone familiar with fixincludes
wishes to fix it.
> Is there any workaround you can suggest? Would simply adding
>
> #define _Complex_I _Complex_I
> #define complex _Complex
> #define _Imaginary_I _Imaginary_I
> #define imaginary _Imaginary
> #undef I
> #define I _Imaginary_I
>
> at the top of the source files work?
Adding copies of the non-GCC definitions certainly won't work. I suppose
you could add #undef of the problem macros followed by #define to values
valid for GCC (such as those used by glibc), after including any system
headers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42753