Mail Archives: djgpp-workers/2003/11/26/06:35:30
On Tue, 25 Nov 2003, Richard Dawe wrote:
> Maybe it would be good to have C99-standard assert available by default? E.g.:
>
> #if !defined(__STRICT_ANSI__) || (C99-defines)
> ...
> #endif
>
> This may require some checking of the gcc version.
Gcc will default to -std=gnu99 sooner or later, and then the C99
compliant assert will be the default. FWIW, I'm actually against having
the function name on assert's failure message; it just makes it longer
for no good reason (if I need to know the function's name, I can read it
from the stack traceback or straight from the source when I look at it
to see why it failed). Therefore I'm inclined to do the minimum needed
to comply with C99, which is what the patch does.
> Note that gcc's C99 mode (-std=c99) didn't seem to do much, last time I tried
> it. Maybe it's better in gcc 3.3.x?
Maybe a little, but still not very good; see
http://gcc.gnu.org/gcc-3.3/c99status.html (about C99 support in general,
not the effects of -std=c99).
--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
- Raw text -