Article View: comp.std.c
Article #4645Re: brief summary of Technical Corrigendum 2
From: Mark Brader
Date: Tue, 16 Jan 1996 17:41
Date: Tue, 16 Jan 1996 17:41
26 lines
1518 bytes
1518 bytes
Paul Eggert (eggert@twinsun.com) writes:
> Publication of Technical Corrigendum 2 is ``imminent'', according to
> Douglas A. Gwyn, ``C Standards Update'', _The Journal of C Language
> Translation_ *6*, 3 (March 1995), 150-156.
Hurray.
> * String and wide string literals need not be distinct even if not identical,
> so long as their elements have appropriate values.
This may be momentarily puzzling, if you don't realize that "their
elements" includes the trailing null character. So, given:
char *p = "classes", *q = "lasses", *r = "asses", *s = "ass", *t = "as";
it will now be permissible for any or all of p+2, q+1, and r to point to
the same byte of storage, but s and t must still each be different.
The change resolves an ambiguity as to the meaning of "identical string
literals" in the existing standard; remember that "c" "l" "asses" is
effectively equivalent to "classes".
--
Mark Brader "C was developed for the programmer
msb@sq.com (two of them, in fact)"
SoftQuad Inc., Toronto -- Alasdair Grant
My text in this article is in the public domain.
Technical Details
Message-ID:
<1996Jan16.174120.3636@sq.com>Path:
arc1-ca.pugleaf.net!nntp.coast.net!torn!sq!msbReferences:
<4d554m$q4b@news1.halcyon.com> <4dfgdt$se6@der.twinsun.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!nntp.coast.net!torn!sq!msb From: msb@sq.com (Mark Brader) Subject: Re: brief summary of Technical Corrigendum 2 Message-ID: <1996Jan16.174120.3636@sq.com> Organization: SoftQuad Inc., Toronto, Canada References: <4d554m$q4b@news1.halcyon.com> <4dfgdt$se6@der.twinsun.com> Date: Tue, 16 Jan 1996 17:41:20 GMT