Topic: Incompatibilities with C (was null pointer constants)
Author: Barry Margolin <barmar@bbnplanet.com>
Date: 1998/10/27 Raw View
In article <F1GErq.ApB@research.att.com>,
Andrew Koenig <ark@research.att.com> wrote:
>In article <36349391.41C6@wizard.net>, James Kuyper <kuyper@wizard.net> wrote:
>
>> > I'm not sure I get your point. The original question was about
>> > something like
>> > const int j = 0;
>> > char * ptr = (char *)j;
>
....
>Because it isn't an incompatibility in the usual sense of the word.
>
>An incompatibility is when C defines a meaning for a program or part of
>a program, and the same code means something different in C++. That
>definition doesn't apply in this case, because C doesn't define the
>meaning of the code cited.
Doesn't C say that it's implementation-defined (I don't have a copy of the
C standard handy, so I could be remembering incorrectly)? In thinking
about whether something is an incompatibility, should a distinction be made
between constructs that C leaves undefined versus those that it requires to
be implementation-defined? While the change shouldn't make any difference
to strictly conforming programs, it can affect other correct, but not
necessarily portable, programs that make use of implementation-defined
values.
--
Barry Margolin, barmar@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]