Re: [PATCH] C undefined behavior fix

From: mike stump (mrs@windriver.com)
Date: Mon Jan 07 2002 - 19:16:32 EST


> Date: Mon, 7 Jan 2002 22:49:07 +0100
> From: jtv <jtv@xs4all.nl>
> To: Bernard Dautrevaux <Dautrevaux@microprocess.com>

> One problem I ran into considering 'char *volatile' was this one:
> the compiler is supposed to disable certain optimizations involving
> registerization and such, but isn't it still allowed to do constant
> folding?

No. That would be a bug. gcc used to have volatile bugs, most of
them are now gone. Please submit a bug report, if you can discover it
again.

I assume you meant something like this:

char * volatile cp;

main() {
  return cp - cp;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:37 EST