Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Fred J. Tydeman
Sun, 01 Dec 1996 00:00
gcc not reporting error
Author: Fred J. Tydeman
Date: Sun, 01 Dec 1996 00:00
Date: Sun, 01 Dec 1996 00:00
62 lines
2587 bytes
2587 bytes
The following program should get errors reported by gcc.
/* Program: gccemx01.c from tydeman@tybor.com */
/* Problem: Invalid code is not being caught */
#include <math.h> /* fabs(), sqrt(), sin(), cos() */
int fabs = 0; /* these appear to be special builtin identifiers */
int sqrt = 1;
int sin = 2;
int cos = 3;
#if 0 /* make this a 1 and errors happen (as expected) */
int tan = 4;
#endif
int main( void ){
return fabs + sqrt + sin + cos < 0;
}
My system is an Intel 80486DX running OS/2 Warp and I am using gcc 2.5.7
with emx 0.8h as found on the Ready to Run Hobbes OS/2 CD-ROM of Nov 1994.
I submitted this sample program to the emx author and he ran it on
gcc 2.7.2.1 and he said that there is no error reported there.
This is a Standard C conformance issue and not an impact on production
code, so this can be treated as a low priority item.
I compile with the following options:
CCFLAGS = "-ansi",
"-pedantic-errors",
"-W",
"-Wall",
"-Wtraditional",
"-Wshadow",
"-Wpointer-arith",
"-Wcast-qual",
"-Wcast-align",
"-Wstrict-prototypes",
"-Wmissing-prototypes",
"-Wredundant-decls",
"-Wno-unused",
"-mieee-fp",
"-fno-fast-math",
"-ffloat-store",
"-Wconversion"
---
Fred J. Tydeman +49 (7031) 288-964 Tydeman Consulting
Meisenweg 20 tydeman@tybor.com Programming, testing, C/C++ training
D-71032 Boeblingen Voting member of X3J11 (ANSI "C")
Germany Sample FPCE tests: ftp://ftp.netcom.com/pub/ty/tydeman
---
Fred J. Tydeman +49 (7031) 288-964 Tydeman Consulting
Meisenweg 20 tydeman@tybor.com Programming, testing, C/C++ training
D-71032 Boeblingen Voting member of X3J11 (ANSI "C")
Germany Sample FPCE tests: ftp://ftp.netcom.com/pub/ty/tydeman
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