Brandon Bray said:
That's not a requirement for compiling non-extension code, so there isn't a
way. Since you seem to be highly concerned about portability, simply
sticking to standards conformance doesn't get you that. Highly portable
programs can make use of very little of what is in the standard.
Usable highly portable programs can be written
so that at least 80% of the code is C++ only
without any extensions.
And on the platforms we need, VC, CW, GCC, and
Comeau _are_ close enough to the standard so
that we can use just about everything that is
in the standard except 'export'. What remains
are those many little annoyances: This compiler
choking on one little template, that compiler
ICEing on another one, the third one missing
support for two-phase lookup or accepting code
that all the others won't accept because it
is non-standard.
(BTW, usually, VC7.1 is a mix of the second and
the third. said:
We do spend a lot of time working towards compiling standards conforming
programs. Working towards limitting programs to standards conformance
doesn't really benefit our customers.
I can understand that most of your customers
won't appreciate you working on disallowing
non-conforming code. However, "most" is not
"all".
First, there is really no test suite
to judge this, which means if we were to expend energy on it, you would be
required to trust our implementation.
The reason for wanting std conforming code
to compile only is that we need to port. And
when you port among a variety of compilers,
code that is non-std usually is found very
quick.
(And you have to admint that como in fact
is pretty close to beeing a good test bed.
So far, I have heard of one bug in it [a GC
bug]. I have yet to find one.)
Secondly, it's actually a poor
barometer of what you actually want -- portability.
That is plain wrong. If you have good, std
conforming compilers (that don't let you
get away with non-std code), sticking to
strictly std conforming code in the plat-
form-indepened 80% of the code takes you a
long way. Since we do have such compilers
on all the needed platforms and since we
follow this route, porting has become a
lot easier.
All that said, we do have plans on making sure programmers know when they're
using highly visible extensions. In this case, this is a pesky issue that
spending any time on our part wouldn't really help you out.
I don't know what you draw this conclusion
from. I think it is wrong.
I think it can be safley assumed that most
of the compiler/library vendors aim for std
conformance. So the more compilers conform,
the more portable is my code. In fact, there
is even more than that: Since the C++ std is
the only general agreement on what C++ really
is, it is the the safest bet I can make when
I need my code to be compilable by more than
one compiler.
The compilers
you use on other platforms may not be correct either.
I did say we use Comeau? said:
To get the result you
want, you must use the intersection of the features. That, in practice, has
nothing to do with the standard (other than we know generally the
intersection is supporting more of the standard, but still it is desperately
small).
This is wrong. It might be desperately small
when you need some platforms where you depend
on one compiler supplier. However, on the
platforms we target (mainly Win, MacOS, Linux),
it is good. (In fact, for many many years,
your compiler was the cause of most of our
woes. I am really glad that 7.1 has stopped
this.)
Schobi
--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers