GNU GCC recognizes all of the following as C++ files and will utilize C++ compilation whether invoked with gcc or g++:
C, C++, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP,
The.C - case is important in GCC;.c is a C file, whereas.C is a C++ file (if you let the compiler decide what it is compiling that is).
Other suffixes are supported by GCC to signal specific processing; for example, a.ii file will be built as C++ but will not be pre-processed (intended for separately pre-processed code).
All recognized suffixes are listed at gcc.gnu.org.