c89 — ANSI (1989) C compiler
| Use Case | Command | Description |
|---|---|---|
| Compile with ANSI C | c89 -o program program.c | Compile a C source file using strict ANSI C89 mode |
| Enable all pedantic warnings | c89 -pedantic -o program program.c | Warn about all non-ANSI constructs |
| Treat warnings as errors | c89 -pedantic-errors -o program program.c | Fail compilation on any non-ANSI violation |
| Define ANSI source symbol | c89 -D_ANSI_SOURCE -o program program.c | Explicitly define the _ANSI_SOURCE preprocessor macro |
| View all compiler options | man cc or cc --help | See full option list for the underlying compiler |
c89 [-pedantic] [-pedantic-errors] [-D_ANSI_SOURCE] options ...
Calls the C compiler (cc) with the given options, using a C language environment compatible with the -ansiC specification.
This includes proper handling of trigraphs, disabling non-ANSI compiler features (such as asm, inline, typeof, and the $ character in identifiers), and definition of the preprocessor symbol __STRICT_ANSI__.
cc(1) for a description of all options.
Appeared in NetBSD 1.4.
Since c89 is a shell wrapper script to cc, compile errors are prefixed by "cc:".
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-03 12:21 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)