Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: otRe: Difference between these pointer syntaxes Date: Sat, 27 Aug 2016 22:53:49 -0700 Organization: None to speak of Lines: 35 Message-ID: References: <86fe4ec0-6dcd-4aa0-8a21-f8e57038c3bb@googlegroups.com> <1bvayl601g.fsf@pfeifferfamily.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="4409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Bt3I/3HoOY7UFje35m9Nz" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:4nY0RV0zyb79TjXqmFxhffYEqXs= sha1:omzS/EJoZJhgD3pbVMFa1Uh6RyE= Xref: csiph.com comp.lang.c:92837 Lew Pitcher writes: [...] > I think that Malcolm is referring to parity-bit protected memory. > In this situation, each memory location contains 8 writable bits and one > parity bit. The parity bit is set by the memory hardware so that there are > always an even number of 1 bits in the combined 9-bit value. > > When read back, a new parity value is computed, and compared to the stored > parity bit, again by memory hardware. If the two parity bits (the stored one > and the computed one) differ, an exception is raised, indicating that the > contents of that memory location are corrupt. > > The ARM processors are examples of such a system: > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0363g/Chdgfjac.html > > Now, memory corruption, as flagged by parity bit differences, /might/ be > something that you could call a "trap representation". No. A *trap representation* is a kind of *object representation*, which is a set of bytes (should have been referred to as a *sequence* of bytes) copied from an object into an array of unsigned char, e.g., by memcpy. Parity bits are not part of the object representation. N1570 6.2.6.1. Certainly a conforming implementation can use parity bits, and trap if they're set incorrectly (when the behavior is otherwise undefined), but they're not part of a trap representation as defined by the standard. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"