From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Earnshaw To: Bernd Schmidt Cc: rearnsha@arm.com Subject: Re: Is this a gcc bug? Date: Thu, 11 Jan 2001 09:44:00 -0000 Message-id: <200101111744.RAA23838@cam-mail2.cambridge.arm.com> References: X-SW-Source: 2001-01/msg00744.html > On Thu, 11 Jan 2001, Joe Buck wrote: > > > > > > > > How about something like: > > > > warning: 'x' may have unexpected value because of side-effects > > > > or > > > > warning: side-effects make value of 'x' undefined > > > > or > > > > warning: undefined order of side-effects on 'x' > > > > One might replace "side-effects" by "updates" or "changes to". > > > > > > How about, multiple side-effects on 'x' between sequence points? > > > > "sequence points" is standardese and doesn't mean anything to most users. > > Even "side-effects" may be surprising -- I don't think a user thinks > > of the increment of x in x++ as a "side effect". > > > > How about: > > > > warning: the order of the modifications to 'x' is undefined > > Possibly "may be undefined". I think the wording "may" was put there > intentionally because the first versions of this code tended to generate > false positives now and then. This can probably still happen with the > current version in some rare cases. Well, I don't know if we catch it, but "x++ + x" is also undefined, but there is only one modification. How about: Expression containing 'x' has undefined meaning (more than one interpretation possible). R.