Problems with PR 21210

Nathan (Jasper) Myers ncm@codesourcery.com
Wed Jun 1 14:04:00 GMT 2005


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



More information about the Libstdc++ mailing list