This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc.dg/compat/struct-layout-1.exp does not supported installed-compilertesting

DJ Delorie wrote:
(There's still a POSIX-ism in the generator, in that it tries to
write to "/dev/null".  On Windows systems, I bet this will often
work, but create a real file with that name.  It would be better,
and avoid portability problems, to guard the calls to fwrite, etc.,
with "if (file)" rather than spew to "/dev/null", but that's for
another day.)

Both Cygwin and DJGPP know about /dev/null just fine.  I don't know
about MinGW though.

It doesn't. MinGW is just MSVCRT.

But it's a lot faster if you don't do the write at all ;-)

Yes; that's why I said "better" in addition to "avoid portability problems". :-)

I kinda think any program opening /dev/null itself is slightly confused; /dev/null is a convenience for users to use with programs that insist on writing to a file, not for programs that might or might not themselves want to write to things. Of course, this particular program is not performance-critical, so it's not like anyone has, or should have, tried hard to make it go maximally fast. :-)

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]