🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5567

Re: volatile registers (was: The world is not ready for 'volatile')

#5567
From: T. William Wells
Date: Sat, 07 Jan 1989 13:59
26 lines
1776 bytes
In article <9316@ihlpb.ATT.COM> nevin1@ihlpb.UUCP (55528-Liber,N.J.) writes:
: [Side note:  I was skimming through the dpANS C, and the only place I
: could find restricting register to being non-aliased is in footnote
: #55, section 3.5.1.  Since footnotes aren't an official part of the
: Standard, could someone please email me an official reference to this?
: If it is not official, then I am asking why not?]

It doesn't have to say this. To alias something, one must have its
address.  Registers can't have their addresses taken. Therefore
register variables can't be aliased. QED.

: [Another side note:  is it even possible to have a strictly conforming
: C program whose behavior would change by declaring any of its
: variables volatile?

No. Volatile might change the way the compiler generates code.  And
that may change the way that the compiler handles implementation
defined parts of the language. However, by definition, a strictly
conforming C program can't behave differently because of something
implementation defined.  Thus, if a program were to change because of
the volatile keyword, it wouldn't have been a strictly conforming
program in the first place.

---
Bill
{ uunet!proxftl | novavax } !twwells!bill
Technical Details
Message-ID: <298@twwells.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!nrl-cmf!ukma!uflorida!novavax!twwells!bill
References: <141@bms-at.UUCP> <275@twwells.uucp> <15166@mimsy.UUCP> <9236@smoke.BRL.MIL> <15171@mimsy.UUCP> <9316@ihlpb.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!nrl-cmf!ukma!uflorida!novavax!twwells!bill
From: bill@twwells.uucp (T. William Wells)
Newsgroups: comp.std.c
Subject: Re: volatile registers (was: The world is not ready for 'volatile')
Message-ID: <298@twwells.uucp>
Date: 7 Jan 89 13:59:05 GMT
References: <141@bms-at.UUCP> <275@twwells.uucp> <15166@mimsy.UUCP> <9236@smoke.BRL.MIL> <15171@mimsy.UUCP> <9316@ihlpb.ATT.COM>
Reply-To: bill@twwells.UUCP (T. William Wells)
Organization: None, Ft. Lauderdale
Lines: 26