🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2246

Interaction between storage class and qualifiers

#2246
From: Jack Jansen
Date: Mon, 07 Jan 1991 15:01
22 lines
1477 bytes
The SGI C compiler treats the following two pointers as unequal:
	register volatile struct foo *p1;
	volatile register struct foo *p2;
p1 is a pointer (in a register) to a volatile struct foo, while
p2 is a volatile pointer (in a register) to a struct foo.

Gcc treats the pointers as identical, and in my opinion this is
as it should be. However, I haven't been able to find anything in
the standard about the interaction of storage classes and type
qualifiers. Since the 'register' in the declaration of p2 already
refers to the variable p2 it is argueable that the volatile in front
of it can't refer to the structure anymore.

Could anyone who knows the standard better than I do please shed
some light on this?

(preferrably by mail, I don't read this group too often. I'll summarize)
-- 
--
Een volk dat voor tirannen zwicht	| Oral:     Jack Jansen
zal meer dan lijf en goed verliezen	| Internet: jack@cwi.nl
dan dooft het licht			| Uucp:     hp4nl!cwi.nl!jack
Technical Details
Message-ID: <2760@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!charon!jack

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!charon!jack
From: jack@cwi.nl (Jack Jansen)
Newsgroups: comp.std.c,comp.sys.sgi
Subject: Interaction between storage class and qualifiers
Message-ID: <2760@charon.cwi.nl>
Date: 7 Jan 91 15:01:31 GMT
Sender: news@cwi.nl
Followup-To: comp.std.c
Organization: CWI, Amsterdam
Lines: 22
Originator: jack@schelvis.cwi.nl