[petsc-dev] Compiling C code with C compiler
Satish Balay
balay at mcs.anl.gov
Mon Apr 4 21:11:45 CDT 2011
On Mon, 4 Apr 2011, Sean Farley wrote:
> >
> > ok '-x c++' is getting rid of the warning.
> >
> > asterix:/home/balay/junk>clang sizeof.c
> > asterix:/home/balay/junk>clang++ sizeof.c
> > clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior
> > is deprecated
> > asterix:/home/balay/junk>clang++ -x c++ sizeof.c
> > asterix:/home/balay/junk>
>
>
> Yes, and the other way works too:
>
> $ clang++ -x c sizeof.c
But why would I do that? The whole point of invoking 'clang++' is to to compile the
code as 'C++' - not as 'C'
Satish
More information about the petsc-dev
mailing list