This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ICE
- To: Thomas Matelich <sosedada at usa dot net>
- Subject: Re: ICE
- From: Mumit Khan <khan at xraylith dot wisc dot EDU>
- Date: Fri, 09 Jul 1999 00:17:47 -0500
- cc: egcs-bugs at egcs dot cygnus dot com
Thomas Matelich <sosedada@usa.net> writes:
> typedef.cc:
> ---------------
> #include <complex>
>
> typedef std::complex<double> complex;
>
> int main()
> {
> complex x;
>
> x += 1;
>
> return 0;
> }
> tom> g++ -v -fhonor-std typedef_std.cc
Note that gcc-2.95 will report, using -fhonor-std:
typedef-bug1.cc:3: syntax error before `;'
typedef-bug1.cc: In function `int main()':
typedef-bug1.cc:7: `complex' undeclared (first use this function)
typedef-bug1.cc:7: (Each undeclared identifier is reported only once
typedef-bug1.cc:7: for each function it appears in.)
typedef-bug1.cc:7: parse error before `;'
typedef-bug1.cc:9: `x' undeclared (first use this function)
unless you wrap `#include <complex>' in the std namespace. Until the new
standard compliant C++ library[1] is released, I'm afraid it'll remain
that way when you -fhonor-std.
The compiler bug is fixed in upcoming gcc-2.95. The library limitation is
a another issue.
[1] See http://sourceware.cygnus.com/libstdc++/
Regards,
Mumit