Zack Weinberg <za...@panix.com> writes:

> -ansi, however, should not be in there at all; it doesn't just turn on
> strict conformance mode, it turns on strict *C89* conformance mode,
> which is often wrong for new code.  And even nowadays, strict
> conformance mode in general tends to break system headers.

Seconded.  I have one package that I do test with -ansi, but mostly out of
personal curiosity.  Satisfying -ansi requires several contortions that
are not really helpful for real-world portability for typical free
software packages, such as limiting the length of quoted strings and
messing about with feature-test macros.  I think it's more of a
specialized flag best reserved for environments with very particular
standards-conformance requirements, or where one is targeting platforms
that may not provide any functionality over the bare ANSI minimum.

The same concerns apply to a lesser extent to --std=c99 or --std=c11.

-- 
Russ Allbery (ea...@eyrie.org)              <http://www.eyrie.org/~eagle/>

Reply via email to