R
Richard Heathfield
Richard said:
I only have two - K&R C and C90 - and of the two I choose C90. (No surprise
there.)
Note that gcc, despite its std=c99 switch, is not a conforming C99 compiler.
Nor does it have a conforming C99 libc.
FYI my command line switches to gcc are:
CFLAGS=-W -Wall -ansi -pedantic -Wformat-nonliteral -Wcast-align
-Wpointer-arith -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef
-Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings
-Wno-conversion -ffloat-store -O2
Yes, but where are the compilers?
I'm not against C99. I'm against non-portability. But wait...!
Which conforming mode?
I only have two - K&R C and C90 - and of the two I choose C90. (No surprise
there.)
I have the following command line options: Pretty strict it is too.
CFLAGS=-std=c99 -pedantic-errors -Wall -pthread -g $(DEBUGFLAGS)
Note that gcc, despite its std=c99 switch, is not a conforming C99 compiler.
Nor does it have a conforming C99 libc.
FYI my command line switches to gcc are:
CFLAGS=-W -Wall -ansi -pedantic -Wformat-nonliteral -Wcast-align
-Wpointer-arith -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef
-Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings
-Wno-conversion -ffloat-store -O2
Nothing particularly evil. OK, we know our target OS.
These features don't suddenly make it weaker C code - this is
comp.lang.c and C99 is the C language too.
Yes, but where are the compilers?
Like it, or more probably in your case, not.
I'm not against C99. I'm against non-portability. But wait...!