Re: INT_MIN and compiler diagnostic
- From: Clark Cox <clarkcox3@xxxxxxxxx>
- Date: Wed, 28 Feb 2007 10:09:11 -0800
On 2007-02-28 09:01:31 -0800, strangerdream@xxxxxxxxx said:
On Feb 28, 7:14 pm, "*** T. Winter" <***.Win...@xxxxxx> wrote:
<snip>
There are no negative constants in C.
But the warning message says:
warning: this decimal constant is unsigned only in ISO C90
What is a signed constant then?
It is a constant with a signed type (i.e. int or long). Just because something is signed doesn't mean that it is negative. Under C90, a constant to large to fit in a long would have the type (unsigned long). Under C99, this is different (because of the addition of long long and the associated changes to the promotion rules)
.
- References:
- Re: INT_MIN and compiler diagnostic
- From: bytebro
- Re: INT_MIN and compiler diagnostic
- From: pete
- Re: INT_MIN and compiler diagnostic
- From: bytebro
- Re: INT_MIN and compiler diagnostic
- From: *** T. Winter
- Re: INT_MIN and compiler diagnostic
- From: strangerdream
- Re: INT_MIN and compiler diagnostic
- Prev by Date: Re: INT_MIN and compiler diagnostic
- Next by Date: Re: Comparing string input to enum data type
- Previous by thread: Re: INT_MIN and compiler diagnostic
- Next by thread: Re: INT_MIN and compiler diagnostic
- Index(es):