http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30162



--- Comment #44 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-18 
18:44:02 UTC ---

If unformatted sequential ever worked, it was by chance.



Look at this piece of code:



  /* Seek to the head and overwrite the bogus length with the real

     length.  */



  if (unlikely (sseek (dtp->u.p.current_unit->s, - m - 2 * record_marker, 

               SEEK_CUR) < 0))

    goto io_error;



This works if it happens within a buffer, but you cannot rely on that.



I would therefore suggest to resolve this PR by issuing a well-defined

error if we encounter a pipe on opening.



I'll prepare a patch.

Reply via email to