automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying AM_CPPFLAGS from within configure.ac


From: Jirka Hanika
Subject: Re: Specifying AM_CPPFLAGS from within configure.ac
Date: Mon, 6 Jun 2005 16:54:50 +0200
User-agent: Mutt/1.4.1i

On Mon, Jun 06, 2005 at 03:12:48PM +0200, Andreas Schwab wrote:
> Jirka Hanika <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]