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

Re: GCC 4.1 now the default GCC version for etch

Scripsit Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
> Henning Makholm <henning@makholm.net> writes:
>> Scripsit Falk Hueffner <falk@debian.org>
>>> Henning Makholm wrote:

>>>> Another related bug type that I found lurking in my packages when I
>>>> investigated the warnings in this list, is trying to format a size_t
>>>> value with a %u or %d format string,

>>> Since any sane ABI pads arguments to word size, this is only a problem
>>> on big endian 64-bit architectures (that is, no current release
>>> architecture).

>> Hm, that makes sense. Perhaps I should back out my (clumsy) fixes for
>> it, then.

> No, the bug remains and should be fixed.

The fix should be somehow unclumsified, though. Currently I inject
some horrible runtime testing in the configure script to find out
whether the clib supports the %zu format of C99, but that breaks
crosscompilability (which I'm not sure worked before, but still...)

Would it be safe to assume that a size_t can always be cast losslessly
to an unsigned long (and then printed with %lu), or are there systems
on which only an unsigned long long will do?

Henning Makholm             "Jeg forstår mig på at anvende sådanne midler på
                           folks legemer, at jeg kan varme eller afkøle dem,
                    som jeg vil, og få dem til at kaste op, hvis det er det,
                  jeg vil, eller give afføring og meget andet af den slags."

Reply to: