Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by J. Scott Hofmann
Tue, 11 Aug 1992 20:59
gcc doesn't warn about unreachable code
Author: J. Scott Hofmann
Date: Tue, 11 Aug 1992 20:59
Date: Tue, 11 Aug 1992 20:59
27 lines
1305 bytes
1305 bytes
In the following short program I have a line which is never reached. gcc
rightly omits the line from the .s file, but does not print a warning that
it is omitting some code, even with -Wall -pedantic.
/* Demonstrate a problem in gcc. Note that printf("two\n") will never be
* reached.
*/
#include <stdio.h>
void main(void) {
int i;
for (i = 1; i < 10; i++) {
printf("i = %d\n", i);
continue;
printf("two\n");
}
printf("three\n");
}
scott
--
-------------------------------------------------------------------------------
J. Scott Hofmann | "Yes, I am competely loopy."
hofmann@cs.uiuc.edu (NeXTmail accepted) | -John Cleese
Epoch development team, UIUC |
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads