This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Problems with PR 21210
- From: "Nathan (Jasper) Myers" <ncm at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, gdr at integrable-solutions dot net,jason at redhat dot com, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org,nathan at codesourcery dot com
- Date: Wed, 1 Jun 2005 10:04:14 -0400
- Subject: Re: Problems with PR 21210
- References: <xyphdgkpc53.fsf@miranda.boston.redhat.com> <429B9AAF.30509@codesourcery.com> <m34qckfc3j.fsf@uniton.integrable-solutions.net> <429BBDDE.10301@codesourcery.com> <20050531170242.6a3d8f55.bkoz@redhat.com> <429CE32D.3060801@codesourcery.com> <20050601023843.GC8966@codesourcery.com> <429D26F1.30609@codesourcery.com> <20050601034004.GD8966@codesourcery.com> <429D4CF4.4090904@codesourcery.com>
On Tue, May 31, 2005 at 10:51:48PM -0700, Mark Mitchell wrote:
> Nathan (Jasper) Myers wrote:
> >On Tue, May 31, 2005 at 08:09:37PM -0700, Mark Mitchell wrote:
> >>Nathan (Jasper) Myers wrote:
>
> >>Under this interpretation, would you have to #include <complex> before
> >>you got to use _Complex? (That's not true in C99.)
> >
> >Of course not.
>
> Well, I asked, because you have to #include <typeinfo> before you can
> use std::type_info, which is rather more built-in than std::complex in
> most compilers.
C++ programs can't mention std::complex without the header, and making
_Complex a keyword need not change that. Of course no C99 program can
mention std::complex, header or no.
> >This also depends on somebody not myself doing a not-insubstantial
> >amount of core compiler work to make it happen; and somebody else
> >jimmying the libstdc++ headers to match, presumably a lesser task.
>
> I agree that this could be made to work, by essentially hard-wiring
> std::complex/_Complex into the compiler, rather than defining it in
> the library.
>
> That would be a considerably more radical change, though; historically,
> G++ has indeed treated the types as separate.
... albeit with results that are extremely unlikely to be compatible
with the eventual standard.
Nathan Myers
ncm@codesourcery.com