From: Julian S. <js...@ac...> - 2007-03-29 23:32:26
|
> Patch is below. Nice! Did it allow you to track down the original problem with env vars (now lost in the mists of time) ? My only concerns are (mostly the 2nd point): - could you change 'int result' to 'Word result' (64-bit paranoia w.r.t the horrible CALL_FN_W.. macros) - how do we stop some future gcc-5.7.2 from noticing that "if (p) while (*p++) ;" does not compute anything useful and and therefore optimising it away? Only solution I can think of (is horrible) is: if (p) { while (*p++) ; __asm__ __volatile__( "" : /*out*/ : /*in*/ "r"(p) ); } Since gcc has no way to know what is going in inside the asm, it has to believe our claim that it reads p. Nicer suggestions welcomed. J |