This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/26828] New: missed diagnostic about unreachable code.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2006 16:37:03 -0000
- Subject: [Bug other/26828] New: missed diagnostic about unreachable code.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct node { struct node* next; };
static inline
void destruct_list( struct node const* begin, struct node const* end )
{
while ( begin != end )
{
begin = begin->next;
}
}
int main()
{
struct node n;
n.next = &n;
destruct_list(&n, 0);
return 0;
}
bug.c.t97.final_cleanup:
main ()
{
struct node * begin;
struct node n;
<bb 0>:
n.next = &n;
begin = &n;
<L1>:;
begin = begin->next;
if (begin != 0B) goto <L1>; else goto <L4>;
<L4>:;
return 0;
}
-Wunreachable-code reports nothing.
--
Summary: missed diagnostic about unreachable code.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: *
GCC host triplet: *
GCC target triplet: *
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26828