Problem with fstream in gcc3.4.0 (directory reading allowed?)

Karel Gardas kgardas@objectsecurity.com
Fri Apr 16 09:47:00 GMT 2004


Hi Paolo,

On Fri, 16 Apr 2004, Paolo Carlini wrote:

> The little longer answer (I think should be explained more clearly in a
> FAQ entry, actually), is that gcc3.4 is much /better/ than 3.3.x at
> telling *real* eof from errors. In this case, actually, since the dir
> cannot be read the underlying filebuf::underflow throws an exception
> (because the under-underlying ;) read syscall returns -1), doesn't return
> simply eof: correct! Therefore, in turn, getline just fails.

This sounds really good and I will change the problematic code as you have
suggested.

Thanks for your quick help,

Karel
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com



More information about the Gcc mailing list