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: Fri, 6 Feb 2015 11:39:33 +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> <20150115130211 dot GA21071 at linux dot vnet dot ibm dot com>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Thu, Jan 15, 2015 at 02:02:11PM +0100, Dominik Vogt wrote:
> 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++" }
It seems that the -x option has to appear on the command line
before the source file. As the command line run by dejagnu does
it the other way round, -x does not help. I've solved my problem
by renamimg the test files from *.c to *.C. When the wrapper
encounters a .C file, it chooses the c++ compiler by default.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany