This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Documentation request for -ansi
On Thu, Jun 22, 2000 at 12:28:05AM +0100, Nix wrote:
[ snip Lots of legal arguments. ]
I know your facts, and agree with most of your conclusions.
How does that address the practical problem?
A similar line of arguments could be made for not parsing format
strings; they are a libc issue and should be ignored at compile time.
But I'm extremely grateful to the GCC folks that they came up with
that check.
The trap is mostly `set up' for people doing numerical software;
mainstream programs will probably hardly ever use more than
exponentiation and trigonometric functions, which are standardized.
The problem only occurs for functions returning floating point
values and are not in the scope of the standard. They have been
put into <math.h> since they `belong there'.
***
I agree it's a libc issue. Libc should notify GCC at compile time
(via the headers) that although it didn't export a prototype for
the function, if linking occurred, it would resolve the symbol.
Presently, there is no means for such a notification.
It might be impossible to find one. It might be resolvable purely
at the libc level. Now might not be the time to ask.
But by exposing the problem on the mailing list, there's a chance
that some GCC developers will put it in the back of their mind,
and perhaps later one of them will come up with a good idea.
And that would benefit a lot of persons.
Regards,
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