[Bug nptl/21513] pthread_cleanup_push macro generates warning when -Wclobbered is set

pcarroll at codesourcery dot com sourceware-bugzilla@sourceware.org
Tue Jun 27 00:41:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21513

--- Comment #7 from Paul Carroll <pcarroll at codesourcery dot com> ---
Created attachment 10223
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10223&action=edit
Proposed patch for avoiding the compiler warning

I am adding a possible patch, which makes the 2 variables volatile, so the
compiler no longer warns about them.
The patch also includes a test case, which is checking for whether the warning
is emitted or not.
I tested with glibc 2.25, both unpatched and patched, and it behaves as
expected.
The unpatched toolkit will get an error in the test case when the
pthread_cleanup_push() macro is used while the patched toolkit will not.
The test itself does nothing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list