This is the mail archive of the glibc-bugs@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]

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


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.

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