🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #6069

Re: const in latest draft

#6069
From: Doug Gwyn
Date: Tue, 30 May 1989 07:11
31 lines
1813 bytes
In article <16259@gryphon.COM> sarima@gryphon.COM (Stan Friesen) writes:
>[is] the clause in 3.5.3 stating that "For two qualified types to be
>compatible, both shall have the identically qualified version of a
>compatible type" ... still present?

Yes.

>is the footnote on the previous page stating "The implementation may place
>a const object that is not volatile in read-only storage" still present?

Yes.

>[is it] still true that "All declarations that refer to the same object or
>function shall have compatible type; otherwise the behavior is undefined"
>(as per 3.1.2.6) [?]

Yes.

>I am asking because I question the necessity of an implementation decision
>made by Lattice Corp in version 3.4 of their C compiler, and I need to know
>if my reasoning based on the Jan 11 draft is still valid.

I don't know what Lattice has been up to; if you would tell us then perhaps
we could directly address the specific issue.

Note that the final draft clarifies that qualified and unqualified versions
of a type have the same representation and alignment requirements, as do
pointers to qualified and unqualified versions of compatible types.  This
implies interchangeability as arguments to functions, return values from
functions, and members of unions, thus legitimatizing a decision K&R made
when preparing examples for the second edition of their book.
Technical Details
Message-ID: <10339@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!ukma!uflorida!haven!adm!smoke!gwyn
References: <16259@gryphon.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!ukma!uflorida!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: const in latest draft
Message-ID: <10339@smoke.BRL.MIL>
Date: 30 May 89 07:11:13 GMT
References: <16259@gryphon.COM>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 31