This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv4] sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Martin Jansa <martin dot jansa at gmail dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 2 Oct 2018 15:44:32 +0000
- Subject: Re: [PATCHv4] sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
- References: <20180930220030.GJ1449@jama> <20180930220150.3859-1-Martin.Jansa@gmail.com> <mvmr2ha6s8v.fsf@suse.de>
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