This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Running C test with g++?
- From: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 15 Jan 2015 14:02:11 +0100
- Subject: Re: Running C test with g++?
- Authentication-results: sourceware.org; auth=none
- References: <20150115123331 dot GA19594 at linux dot vnet dot ibm dot com> <CAH6eHdQBL0hx8KQ6CtrEGyKs4yf++S5QWFH3XQeYpwh063f1PQ at mail dot gmail dot com>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Thu, Jan 15, 2015 at 12:40:00PM +0000, Jonathan Wakely wrote:
> On 15 January 2015 at 12:33, Dominik Vogt wrote:
> > I have a target specific tests for C in
> > gcc/testsuite/gcc.target/s390 and would like to make sure that it
> > also runs with g++. Is there a way to execute the C tests with
> > g++?
>
> Would copying the test to a new file and adding this work?
>
> // { dg-options "-x c++" }
Hm, although it adds the "-x c++" to the xgcc command line, it
seems the C compiler is still used (I added some c++ specific code
to the test to check that). At the moment I run
$ make -k check-gcc RUNTESTFLAGS="s390-c++.exp=<testname>.c"
(Where s390-c++.exp is a copy of s390.exp that includes g++-dg.exp
instead of gcc-dg.exp, but I've no idea whether that is
sufficient.)
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany