Sine and Cosine Accuracy
Russ Allbery
rra@stanford.edu
Sat May 28 11:26:00 GMT 2005
Scott Robert Ladd <scott.ladd@coyotegulch.com> writes:
> Gabriel Dos Reis wrote:
>> Scott Robert Ladd <scott.ladd@coyotegulch.com> writes:
>> | Then, as someone else said, why doesn't the compiler enforce -ansi
>> | and/or -pedantic by default?
>> Care submitting a ptach?
> Would a strictly ansi default be accepted on principle? Given the
> existing code base of non-standard code, such a change may be unrealistic.
-ansi introduces strict namespace support in C, which then introduces all
sorts of portability issues and ends up being impractical for a lot of
real-world, cross-platform code that already uses facilities like
Autoconf, unless one wants to spend a lot of time tracking down issues
that really don't improve the code quality. I used to try to use -ansi in
warnings builds and gave up even on that.
-pedantic is significantly more useful in practice than -ansi is. It's
really obnoxious to have to define some preprocessor variable just to be
able to get an fdopen() prototype out of <stdio.h>, even if I can see how
it would be theoretically useful.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the Gcc
mailing list