This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Running C test with g++?


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


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