On Fri, 7 Aug 2009, Manuel López-Ibáñez wrote:

> Often I want to test the exactly same testcase in C and C++, so I find
> myself adding duplicate tests under gcc.dg/ and g++.dg/. Would it be
> possible to have a shared testsuite dir that is run for both C and C++
> languages? (possibly with different default configurations, like
> adding -Wc++-compat to the commandline for C runs).

You'd need to have two .exp files (one in a gcc.something directory and 
one in a g++.something directory) that look somewhere other than 
$srcdir/$subdir to find the test source files.  $srcdir in the .exp files 
should refer to the gcc/testsuite directory so you should be able to write 
the .exp files to look in $srcdir/c-c++-common (say) to find the source 
files to use in the tests.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to