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/9868] New: use of do; while(0) in pthread.h makes gcc barf


When using strict compiling flags, (-Wempty-body that is) the use of
pthread_cleanup_pop generates warnings like:

mcms/mcms-if-file.c:534: error: suggest braces around empty body in 'do'
statement [-Wempty-body]

This is because of the use of `do; while(0)`.
Please use `(void)0;` or `do { } while(0)` instead which won't trigger the same
warning and still allow to place a label before pthread_cleanup_pop which is
what the `do; while(0)` tries to achieve.

-- 
           Summary: use of do; while(0) in pthread.h makes gcc barf
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: madcoder at debian dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=9868

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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