The GNU compiler determines the type of your file from the file extension. The following table lists the valid extensions and the corresponding file types. The GCC wrapper calls the appropriate lower level tools by recognizing these file types.
Extension | File Type (Dialect) |
---|---|
.c | C file |
.C | C++ file |
.cxx | C++ file |
.cpp | C++ file |
.c++ | C++ file |
.cc | C++ file |
.S | Assembly file, but might have preprocessor directives |
.s | Assembly file with no preprocessor directives |