[cfe-dev] clang options

John Thompson john.thompson.jtsoftware at gmail.com
Fri Nov 20 13:15:03 PST 2009


Oh, I didn't see that last option from the help message.  That's it.
Thanks.

On Fri, Nov 20, 2009 at 11:39 AM, Jean-Daniel Dupas
<devlists at shadowlab.org>wrote:

>
> Le 20 nov. 2009 à 20:18, John Thompson a écrit :
>
> > How to force clang to compile a file as C++?
> >
> > I tried:
> >
> > clang -Xclang "-x=c++" -fsyntax-only file.c
> > but I get the error:
> >
> > clang-cc.exe: for the -x option: may only occur zero or one times!
> >
> > Is this a general problem with the driver in that options passed with -x
> don't supercede those provided by the driver?
> >
> > I tried:
> >
> > clang -Xclang="-x=c++" -fsyntax-only file.c
> > but it apparently ignored the argument.
> >
> > I tried:
> >
> > clang -ccc-cxx -fsyntax-only file.c
> >
> > but it still compiles it as C.
>
> What about
>
> clang -x c++ main.c
>
> -- Jean-Daniel
>
>
>
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091120/80082f0f/attachment.html>


More information about the cfe-dev mailing list