I found a workaround by setting the following flag in the compiler options (Compiler Settings -> Other options) with GCC:
-x none
This GCC flag turns off any specification of a language. As a consequence source files are handled according to their file name suffixes *.c
correspond to C files, whereas *.C, *.cc, *.cpp, *.CPP,... stand for C++ files). So, even if the command g++ is invoked, *.c files are compiled with the C compiler (and not the C++ one).
However, if there is a way to set up which command (gcc or g++) is used for single files, I am still interested!