This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3] sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Jansa <martin dot jansa at gmail dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Sun, 30 Sep 2018 16:52:56 +0000
- Subject: Re: [PATCHv3] sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
- References: <20180930135031.GE1449@jam> <20180930155134.32524-1-Martin.Jansa@gmail.com>
On Sun, 30 Sep 2018, Martin Jansa wrote:
> + /* With GCC 8 (and older) when compiling with -O the compiler
> + warns that the variable 'temp', may be used uninitialized.
> + The switch above covers all possible values of n & 3
> + but GCC without VRP enabled isn't able to figure out the
> + range of possible values is [0,3] as explained in:
> + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69230
> + so it's false possitive with -O1 and lower. */
"positive" (for all such comments). Also note there should be two spaces
at the end of a comment between "." and the trailing "*/".
Are you sure about the "and lower", or is this warning disabled for -O0?
(glibc disallows building with -O0 at present, but I think we *should* fix
things to be able to build with -O0, because being able to build with -O0
would be helpful for debugging - any particular pieces needing
optimization should then just have it force-enabled, or functions declared
as always_inline, or whatever is needed, locally.)
--
Joseph S. Myers
joseph@codesourcery.com