Re: user-mode port 0.44-2.4.7

From: Chris Friesen (
Date: Wed Jul 25 2001 - 18:37:20 EST

Linus Torvalds wrote:
> On Thu, 26 Jul 2001, Andrea Arcangeli wrote:
> >
> > I will if Honza assures me that no future version of gcc will cause me to
> > crash if I don't declare xtime volatile and I play with it while it can
> > change under me (which seems not the case from his last email).
> This is not a gcc issue. Even if gcc _were_ to generate bad code, the
> global volatile _still_ wouldn't be the correct answer.

I think his worry is the pedantic reason that without the volatile gcc is
allowed to write code that chokes and dies if xtime happens to change in a
volatile manner. The example given earlier was:

code as written:

code as compiled by gcc (with xtime not specified as volatile):
        suseconds_t temp = xtime.tv_usec;
        if (temp != xtime.tv_usec)

I hope that gcc would not do such a thing, but I think a case could be made that
it could do it and still comply with the language standard.

Of course, since the linux kernel is an important thing for gcc to compile, I
can't imagine them doing something that would break it on purpose without a
really good reason.


Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:25 EST