This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Documentation request for -ansi


On Thu, Jun 22, 2000 at 12:52:59AM +0200, Philipp Thomas wrote:
: * Claus Fischer (claus.fischer@intel.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
: declarations.

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?

Claus

-- 
claus.fischer@intel.com   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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]