This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix -Os related -Werror failures.


On Fri, 28 Oct 2016, Carlos O'Donell wrote:

> I agree that we can't account for _all_ optimizations someone might want
> to disable in their build, but I think it is a reasonable goal to target
> a few key _default_ optimization including -O3, -O2, and -Os.

And -O1 (bug 19444).  And -Og for debuggability.

> I agree with Arnd that this code is _overly_ complex and could be
> rewritten such that it's a little clearer and makes sense to the compiler
> at -Os.

In general, making code clearer is a good approach.

For -O1 / -Og I'd also be willing to consider default initializers as a 
less verbose way than DIAG_* macros of making it obvious to the compiler 
that a variable is initialized (at -Os, that may not be such a good idea 
because presumably the user cares about saving a few instructions from an 
unnecessary initialization).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]