This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [patch, libstdc++, testsuite] Modify tests to use tmpnam()


On Wed, 2010-03-03 at 14:57 -0800, Janis Johnson wrote:

> I had forgotten that GNU ld warns about use of tmpnam:
> 
>    warning: the use of `tmpnam' is dangerous, better use `mkstemp'
> 
> It would be messy for the tests to turn off that warning since GNU ld
> isn't the only linker used with GCC.  Other tests that use tmpnam are
> compile-only and do not link.
> 
> Janis

My mistake, the message is there in the log file on Linux but the test
still passes for some reason:

/tmp/ccIqVtui.o: In function `test01()':
/proj/opensrc/nightly/src/trunk/libstd
++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc:48: warning: the use of
`tmpnam' is dangerous, better use `mkstemp'^M
output is:
/tmp/ccIqVtui.o: In function `test01()':
/proj/opensrc/nightly/src/trunk/libstdc
++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc:48: warning: the use of
`tmpnam' is dangerous, better use `mkstemp'

PASS: 27_io/objects/wchar_t/9661-1.cc (test for excess errors)


Steve Ellcey
sje@cup.hp.com



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