Mail Archives: djgpp/2000/04/29/05:34:56
Joel Hunsberger wrote:
> Now, the interesting part is that the implicit conversion "taking place" is
> only
> reported when the compiler switch -pedantic is ON. Without it, compilation
> was silent and apparently succesful. However, when cgets receives a -1 as
> the
> buffer length, the stack gets corrupted... Data back from cgets is (in
> fact)
> okay (although the stack is corrupted) so the next return goes off in the
> weeds.
Welcome to C programming ;-). The C language is traditionally permissive to
what could be dangerous practice on the part of the programmer, so it assumes
the programmer generally knows what he/she is doing. Using -pedantic prints
lots of warnings about perfectly valid C code, that's why it is OFF by
default.
> "> Do you mean to say that it was not known to you... "
>
> Are you really that surprised?
No, I was just trying to understand what is it that you'd like the docs to
say more explicitly.
- Raw text -