Dear VDR developers,
I am curious why the C++ source files have the extension `.c` and not `.c{c,pp,xx}`.
I am asking because I tried to use `scan-build` from Clang/LLVM and by default – and I did not find an option to change that – it treats `.c` files as C files and not C++.
Running Clang directly on the `.c` files the following message is displayed.
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
The folks an #llvm helped me and by verifying this putting
#ifndef __cplusplus #error Not C++ #endif
in a file. Clang can be passed `-x c++` to override that behavior.
In the end I renamed the files and adapted `Makefile` to get `scan-build` working and it did not find any errors.
Thanks,
Paul
On 23.04.2011 12:46, Paul Menzel wrote:
... I am curious why the C++ source files have the extension `.c` and not `.c{c,pp,xx}`.
Well, I had programmed in C for quite a while before getting into contact with C++. To me, C++ was not a totally different programming language, but rather an extension to C. Therefore I didn't see the need to get used to an all new file extension and just stayed with ".c". Besides, it's less typing ;-)
Klaus