lkml.org 
[lkml]   [2002]   [Jan]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromPaul Mackerras <>
DateFri, 4 Jan 2002 20:29:19 +1100 (EST)
SubjectRe: [PATCH] C undefined behavior fix
Pavel Machek writes:

> gcc is allowed not to pass it anywhere. You may not second guess
> optimizer. If it is not defined, it is not defined.
> 
> Imagine
> 
> strcpy(a, "xyzzy"+b);
> if (b>16)
> 	printf("foo");
> 
> . gcc is permitted to kill printf(), because if b<0 or b>16 behaviour is
> undefined. So gcc may assume b<=16.

So... I'm curious.  How is the result of virt_to_phys ever anything
other than undefined?

Paul.
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:15    [from the cache]
©2003-2008