[PATCH 06/25] Add struct scratch_buffer and its internal helper functions
Florian Weimer
fweimer@redhat.com
Thu Apr 9 06:05:00 GMT 2015
On 04/09/2015 04:56 AM, David Miller wrote:
> The first problem is that 1ULL << 32 doesn't fit in a size_t,
> therefore gcc complains about the value being implicitly
> truncated to an unsigned type.
>
> For that, I think these >=1<<32 value tests should simply be elided on
> 32-bit systems.
It's just a matter of adding a cast to size_t, at least on i386 with GCC
4.9.2.
> Secondly I get inlining failure warnings for the scratch_buffer_free
> calls in do_test(). I do not have a recommendation for how to solve
> that. Frankly I think if something can't be inlined, in many cases
> that's fine and opaque details of gcc's inlining heuristics shouldn't
> fail the build ever.
What's the exact failure? Does it refuse to inline because it's not a
hot path?
I could add __always_inline, which should address, at the cost of worse
code. Or I could move scratch_buffer_free out of line.
> These warnings failing the build are generally very frustrating, and
> they have been so for those of us who have limited time to work on
> glibc arch maintainence. We come in to attack a specific problem and
> find that we can't even begin to do so because the tree doesn't even
> build due to some obscure warning that the developer who installed the
> warning causing change doesn't even see.
Yes, I cautioned against enabling optimizer-dependent warnings (which
includes certain inline failure warnings) for -Werror because they are a
pain to deal with.
--
Florian Weimer / Red Hat Product Security
More information about the Libc-alpha
mailing list