This is the mail archive of the
mailing list for the GCC project.
Re: Documentation request for -ansi
On Thu, Jun 22, 2000 at 12:52:59AM +0200, Philipp Thomas wrote:
: * Claus Fischer (email@example.com) [20000622 00:44]:
: > o Functions are undefined, and the user gets an error
: > (could be in the linking phase ==> glibc issue)
: Well, I'd say it would also be good if you could turn a specific warning
: into an error. Then gcc would abort whenever it encounters implicit
Yes; and the standard -ansi behaviour should/could turn on this
behaviour; at least the documentation of `-ansi' should urge users
to do that.
Users mostly use `-ansi' to find violations of ANSI rules in their
code (accidental trigraphs in comments ;)). In those cases, they
probably want non-prototyped functions to fail as well.
But it's not clear to me whether this practical point of view would
excuse a legal violation of the ANSI standard; a legal program using
int erfc(double) as a user-defined function, without a prototype,
would technically comply with the ANSI standard.
So perhaps -ansi must (legally) remain as it is, and then how can
we warn the user?
firstname.lastname@example.org Intel Corporation SC12-205 ... not speaking
phone +1-408-765-6808 2200 Mission College Blvd. for Intel
fax +1-408-765-9322 Santa Clara, CA 95052-8119