jack@cwi.nl (Jack Jansen) (01/07/91)
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