Paul Eggert <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>> Is it really permitted to have sizeof (size_t) < sizeof (unsigned int)?
...
>> The offending warning breaks coreutils' `make distcheck' rule.
>
> Would it make sense to rewrite coreutils 'make distcheck' to filter
Jim Meyering <[EMAIL PROTECTED]> writes:
> Is it really permitted to have sizeof (size_t) < sizeof (unsigned int)?
Yes, I'm afraid so. The C Standard merely says that size_t is an
unsigned integer type; size_t is allowed to be narrower than unsigned int.
See, for example, Mark Brader's 10-year-o
Paul Eggert <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>
>> Is there a patch yet to make gcc suppress that warning?
>
> Sorry, not yet. Other things are on my plate
>
>> - unsigned int n1 = n0 + 1;
>> + /* FIXME: technically, the type of n1 should be `unsig
Jim Meyering <[EMAIL PROTECTED]> writes:
> Is there a patch yet to make gcc suppress that warning?
Sorry, not yet. Other things are on my plate
> - unsigned int n1 = n0 + 1;
> + /* FIXME: technically, the type of n1 should be `unsigned int',
> + but that evokes an unsuppressi
t in the expansion of xalloc_oversized]:
> quotearg.c: In function `quotearg_n_options':
> quotearg.c:586: warning: comparison is always false due to limited range of
> data type
In the meantime, I've just checked in this change in coreutils/lib:
2005-08-31 Jim Meyering &
Paul Eggert wrote:
> Shouldn't we simply fix GCC instead?
I agree. The appended simpler test case (with 'unsigned short' instead of
'unsigned int', to see the warning on a 32-bit platform as well) produces
the warning with "gcc -Wall", even without -W, with any of 3.3.1, 3.4.3,
4.0.0.
It appears
y fail. Something like this?
> (completely untested):
>
> 2005-06-22 Paul Eggert <[EMAIL PROTECTED]>
>
> * xalloc.h: Work around a bogus GCC 4.0.0 warning "comparison is always
> false due to limited range of data type". Problem rep
Paul Eggert <[EMAIL PROTECTED]>
* xalloc.h: Work around a bogus GCC 4.0.0 warning "comparison is always
false due to limited range of data type". Problem reported by
Oskar Liljeblad.
(xalloc_lt, xalloc_lt_always_false): New macros.
(x
Paul Eggert <[EMAIL PROTECTED]> wrote:
>> "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote:
...
>>> quotearg.c: In function `quotearg_n_options':
>>> quotearg.c:586: warning: comparison is always false due to limited range of
>>> data type
...
how turned on by default?
>
> $ gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c quotearg.c
> quotearg.c: In function `quotearg_n_options':
> quotearg.c:586: warning: comparison is always false due to limited range of
> data type
No. It was my fault.
I'd changed it to size_t, th
unction `quotearg_n_options':
quotearg.c:586: warning: comparison is always false due to limited range of
data type
$ gcc -DHAVE_CONFIG_H -I. -I. -I.. -c quotearg.c
quotearg.c: In function `quotearg_n_options':
quotearg.c:586: warning: comparison is always false due to limited range of
data
Oskar Liljeblad <[EMAIL PROTECTED]> wrote:
> On Wednesday, June 22, 2005 at 11:50, Jim Meyering wrote:
...
>> These days, I rarely use -W (and never use it with -Werror),
>> for precisely that reason.
>
> I get that warning without both -W and -Wall, I think.
> (gcc 3.3.6)
I've tried with the foll
On Wednesday, June 22, 2005 at 11:50, Jim Meyering wrote:
> > Isn't that a cure that is worse than the disease? That patch will
> > slow down the code on his platform, by causing the compiler to insert
> > a run-time check where it now does the check at compile-time (and can
> > therefore omit the
Paul Eggert <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>
>> "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote:
>>> What's the proper way to fix these warnings?
>>>
>>> quotearg.c: In function `quotearg_n_
Jim Meyering <[EMAIL PROTECTED]> writes:
> "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote:
>> What's the proper way to fix these warnings?
>>
>> quotearg.c: In function `quotearg_n_options':
>> quotearg.c:586: warning: comparison is always
"Oskar Liljeblad" <[EMAIL PROTECTED]> wrote:
> What's the proper way to fix these warnings?
>
> quotearg.c: In function `quotearg_n_options':
> quotearg.c:586: warning: comparison is always false due to limited range of
> data type
Paul, if you don
What's the proper way to fix these warnings?
quotearg.c: In function `quotearg_n_options':
quotearg.c:586: warning: comparison is always false due to limited range of
data type
argp-help.c: In function `make_hol':
argp-help.c:430: warning: comparison is always true due to limite
17 matches
Mail list logo