On Mon, Jun 06, 2005 at 03:12:48PM +0200, Andreas Schwab wrote: > Jirka Hanika <[EMAIL PROTECTED]> writes: > > > For example I'll try to upgrade the "unused variable" warning avoidance > > code to something like > > > > if (((int)argv) * ((int)argv) < 0 || argc < 0) printf(""); > > conftest.c: In function ‘main’: > conftest.c:5: warning: cast from pointer to integer of different size > conftest.c:5: warning: cast from pointer to integer of different size > conftest.c:5: warning: zero-length printf format string > > conftest.cc: In function ‘int main(int, char**)’: > conftest.cc:5: error: cast from ‘char**’ to ‘int’ loses precision > conftest.cc:5: error: cast from ‘char**’ to ‘int’ loses precision > conftest.cc:5: warning: zero-length printf format string
Thanks. I think I'm finally getting to see the point. (Now I remember this cast warning already bit me in other code a long time ago. I then switched to assigning an unused expression to an extern variable, which worked for me. Doesn't change the point. Absolute compiler output is a silly thing to check.) Jirka