Richard E Maine wrote:
> > 1) If IOSTAT is specified--is the compiler required to catch the
> > error
> I'd hope that it would, but that's just my hope, unsupported by the
> standard.
That is unfortunate, since I was looking for a way to force the compiler
to check for the error. Are you saying that most compilers will either
check for an error with or without IOSTAT (and abort in the former or
continue in the later case), or not check for it at all? This would
mean that there is no way to force a check for buffer overflow :-( And
I do not quite see how to easily do it myself, since calculating the
total length for non-trivial output is too hard for me to do.
What do compilers actually do with buffer overflow?
Thanks,
Aleks
|