vippstar
8/13/2008 8:22:00 PM
On Aug 13, 7:58 pm, Keith Thompson <ks...@mib.org> wrote:
> vipps...@gmail.com writes:
> > On Aug 13, 6:52 pm, j...@toerring.de (Jens Thoms Toerring) wrote:
> >> Daniel Molina Wegener <d...@coder.cl> wrote:
> > <snip>
>
> >> > The buffer isn't flushed?, apply fflush(3) over stdin.
>
> >> fflush() can only be used for output streams, using it
> >> for input is a Windows extension which doesn't work on
> >> other systems.
>
> > It's not an extension, it's undefined behavior.
>
> An implementation may define the behavior of a construct whose
> behavior is not defined by the C standard. That's a valid way to
> provide an extension.
Yes, I know. But C says it's UB, the impl says it's an extension.
This is comp.lang.c so I thought I should mention what C thinks of
that, because the poster did not mention UB.
> But whether you call it an extension or UB, it's certainly
> non-portable (and, in this particular case, unnecessary).