Topic: Levels of C++ (Was: What is the macro NULL according to standard C++?)
Author: "Valentin Bonnard" <Valentin.Bonnard@free.fr>
Date: Wed, 1 Nov 2000 19:25:35 GMT Raw View
James Dennett wrote:
> I do think it reasonable to require that C++ compilers should, at some time
> in the future, be required to support two compilation modes for C++. One
> would be there to allow legacy features (such as 0 as an NPC and the implicit
> conversion from string literal to non-const "char *") and the other to allow
> for safer compilation.
It's worth noting that this is Actual Practice in the Real World,
so the committee cannot even consider it. ;)
> Right now we have only the sledgehammer of deprecation with which to hit
> these problems, and there is (IMO) too much resistance to deprecating
> widely used features. That resistance is somewhat understandable, but also
> damaging.
Having many standard C++ dialects could also be confusing...
but probably less than most compilers' choices of modes/options.
> Implementations are clearly allowed to issue diagnostics for such
> legacy features,
But I prefer not to rely on that.
> but I believe that the C++ Standard
> might be strengthened if for certain pieces of code it required compilers
> to be able to both compile the code and also to issue a diagnostic.
At least one other ISO standard makes such a requirement (Ada).
> AFAIK
> whenever the C++ Standard of today requires a diagnostic the compiler is
> allowed to fail to compile the source code.
That's correct.
--
Valentin Bonnard
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]