Programming Standards
Chris Bare
chris at ankh.ftl.fl.us
Sat May 11 07:00:31 AEST 1991
I am developing code on AIX 3.1 and I would like to make sure that it
complies with as many standards as possible. Presently I am including
the following in my CFLAGS:
-qlanglvl=ansi -D_POSIX_SOURCE
and the following headers in all my .c files:
#include <stdio.h>
#include <stdlib.h> /* ANSI */
#include <unistd.h> /* POSIX */
I believe that these should make my code ANSI and POSIX compatible.
I have several questions about this however:
1. Does true ANSI C allow the K&R style function definitions?
2. Is there a way (in AIX 3.1) to give warnings or errors on K&R style
function definitions?
3. Is there a way to require function prototypes? (again warnings or errors)
4. Are there any other flags, includes, etc. that I should use to make my
code more standards-compliant and more portable?
Thanks in advance for all info.
Chris Bare
chris at ankh.ftl.fl.us
CASI-RUSCO
More information about the Comp.unix.aix
mailing list