The world is not ready for 'volatile'

Geoff Clemm geoff at endor.harvard.edu
Tue Jan 3 10:03:38 AEST 1989


In article <15171 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>>In article <15166 at mimsy.UUCP> I suggested that
>>>... ["register"] implies not-volatile and not-aliased; and it does so
>>>in a way that the compiler can reasonably enforce.
>
>In article <9236 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>>No, I reject this claim.

I would have to second this rejection.  There is nothing in the
reference manual that lets you count on register variables not being
volatile.

>You mean to say that a register could be aliased?  Not in C!  How
>about a volatile register?  It is a possibility, but it seems entirely
>unnecessary.

Now Chris, this is a total waffle.  For folks that are seriously concerned
about portability, one needs a stronger argument than that "it seems entirely
unnecessary" for a compiler writer to do something -- especially since many
compiler writers ignore register declarations, which means register variables
will be as volatile or non-volatile as any other variable.

Geoff Clemm



More information about the Comp.lang.c mailing list