This is the mail archive of the 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: fix build errors with -DNDEBUG

Given that, are there any objections to the patch?

Please don't check this in for 2.22.

Please restart this discussion with a new thread when 2.23 opens.

I think each of these cases you cover needs to be reviewed independently
and fixed correctly.

The patch is a handful of trivial changes that add attribute
unused to local variables that are only used in the assert or
assert_perror macros. When glibc is compiled with -NDEBUG the
macros expand to nothing and, without the attribute or some
similar annotation, GCC complains about the variables being
unused. (I haven't investigated the "may be uninitialized"
warning but initializing variables is always safe so this
change too is innocuous.)

I don't see what about this is worth spending any more than
has already been spent.

If you have specific concerns with the change as your comment
about fixing each problem correctly suggests, can you please
explain what they are?


PS I came across this problem while building glibc for RHEL
where the build scripts adds -DNDEBUG option to the command
line. Releasing glibc that doesn't build that way will
require either introducing a RHEL-specific patch for it
if 2.22 is adopted, or removing the -DNDEBUG. I assume
avoiding both is preferable.

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