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


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


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