This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2926] New: assert macro contains unreachable code
- From: "Jerry dot James at usu dot edu" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Jul 2006 19:55:14 -0000
- Subject: [Bug libc/2926] New: assert macro contains unreachable code
- Reply-to: sourceware-bugzilla at sourceware dot org
When compiling with gcc and the -Wunreachable-code flag, gcc warns about every
use of the assert macro from <assert.h>. This was reported as a gcc bug (see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22414), but the gcc team declared it
to be a glibc bug. Indeed, moving __ASSERT_VOID_CAST inward to apply to the two
instances of 0 in assert and assert_perror leaves the assertions working
correctly and eliminates the warnings for me. I don't see a place to include a
patch on this page, so I'll submit the bug and hope I can attach a patch later.
--
Summary: assert macro contains unreachable code
Product: glibc
Version: 2.4
Status: NEW
Severity: minor
Priority: P3
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: Jerry dot James at usu dot edu
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=2926
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.