[C++ PATCH] pr15551.C fix

Mark Mitchell mark@codesourcery.com
Sun Apr 23 21:14:00 GMT 2006


David Edelsohn wrote:

> 	I do not see any precedent for deleting a file within a G++
> testcase.  Most C++ references suggest using cstdio header and
> std::remove.  One could include unistd.h, but I am not sure if that is a
> reasonable assumption for all G++ targets that might want to run the G++
> testsuite. 

As you guessed, that would be a bad assumption; we shouldn't assume
functionality beyond that required from the ISO C++ runtime, as
augmented by extensions in libstdc++, except with appropriate target
markers or #ifdefs.  (We try to make the C++ compiler testsuite depend
on as little library functionality as possible, in general.)

> 	This patch modifies the existing testcase to include cstdio header
> and changes unlink to remove.  With these changes, the testcase now passes
> for me.

Yes, that's a good change.

> Okay for mainline?

Yes, thanks.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list