2.7 Filename suffixes recognized by the compiler

The compiler uses filename suffixes to identify the classes of file involved in compilation and in the link stage.

The filename suffixes recognized by the compiler are described in the following table.

Note

Explicitly specifying --c90, --c99, --cpp, or --cpp11 overrides the effect of filename suffixes.

Table 2-1 Filename suffixes recognized by the compiler

Suffix Description Usage notes
.c
C source file
Implies --c90
.C C or C++ source file Implies --c90.
.cpp
.c++
.cxx
.cc
.CC
C++ source file
Implies --cpp
The compiler uses the suffixes .cc and .CC to identify files for implicit inclusion.
.d
Dependency list file
.d is the default output filename suffix for files output using the --md option.
.h
C or C++ header file
-
.i C or C++ source file A C or C++ file that has already been preprocessed, and is to be compiled without additional preprocessing.
.ii C++ source file A C++ file that has already been preprocessed, and is to be compiled without additional preprocessing.
.lst
Error and warning list file
.lst is the default output filename suffix for files output using the --list option.
.a
.lib
.o
.obj
.so
ARM, Thumb, or mixed ARM and Thumb object file or library.
-
.pch
Precompiled header file
.pch is the default output filename suffix for files output using the --pch option.

Note

Support for Precompiled Header (PCH) files is deprecated from ARM Compiler 5.05 onwards on all platforms. Note that ARM Compiler on Windows 8 never supported PCH files.
.s
ARM, Thumb, or mixed ARM and Thumb assembly language source file.
For files in the input file list suffixed with .s, the compiler invokes the assembler, armasm, to assemble the file.
.s is the default output filename suffix for files output using either the option -S or --asm.
.S ARM, Thumb, or mixed ARM and Thumb assembly language source file.
.S is equivalent to .s.
.sx ARM, Thumb, or mixed ARM and Thumb assembly language source file. For files in the input file list suffixed with .sx, the compiler preprocesses the assembly source before passing that source to the assembler.
.txt
Text file
.txt is the default output filename suffix for files output using the -S or --asm option in combination with the --interleave option.
Related reference
7.7 --arm
7.90 --interleave
7.99 --list
7.110 --md
7.129 --pch
7.149 -S
7.23 --compile_all_input, --no_compile_all_input
10.9 Template instantiation in ARM C++
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.