This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Assignment to volatile objects> wrote:

> I would prefer this to generate a warning.  The C language standard change
> you refer to is a classic example of a misguided change, and any code whose
> behavior depends on this deserves a warning message, NOT an option to work
> one way or the other.

Sure. However, a compiler is a tool and the best thing it can do is to serve
its user's needs. Generate a warning, because there's an ambiguous construct
(actually, it has always been a bit iffy, but now it is officially an
implementation choice).

When there is a possibility of helping the user, what's wrong with offering
it? If there's a switch and it is being used, then the user explicitely tells
you how (s)he wants the ambiguity to be resolved. The user, by specifying his
or her preference clearly indicates that (s)he is aware of the ambiguity,
i.e. knows what (s)he is doing and asked you kindly to resolve it this way or
the other. You can answer with a "piss off, idiot" or just do what the user
asked you to do. So why not help the user?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]