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: [PATCHv4] sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]


On Mon, 1 Oct 2018, Andreas Schwab wrote:

> How about adding __builtin_unreachable instead?  That doesn't add any
> code, but helps the compiler seeing the whole picture.

Yes, adding default: __builtin_unreachable (); to the switch statements in 
question seems reasonable as an approach for these particular 
uninitialized warnings (it only works for cases like this where there's a 
suitable place to add such a call, of course).

-- 
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]