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 #19444 - build failures with -O1 due to -Wmaybe-uninitialized


On Wed, 13 Jan 2016, Martin Sebor wrote:

> FWIW, between the two approaches, my general preference is to
> initialize variables rather than adding special annotation.

Established glibc practice is not to add such initializations where the 
initial value can't be used.

> In the other cases, such as do_sincos_1() in
> sysdeps/ieee754/dbl-64/s_sin.c, there's no case and switch
> statement to add __builtin_unreachable to.  Other similar

There certainly seems to be such a switch statement to me.

  int k1 = (n + k) & 3;
  switch (k1)

> functions in this file already initialize the retval local
> variable, so doing it consistently makes sense.

Well, consistently (with glibc practice) would be to remove the 
unnecessary initializations.

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