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, or --cpp 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 On UNIX platforms, implies --cpp. On non-UNIX platforms, 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.

.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.

On UNIX platforms, for files in the input file list suffixed with .S, the compiler preprocesses the assembly source prior to passing that source to the assembler.

On non-UNIX platforms, .S is equivalent to .s. That is, preprocessing is not performed.

.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 prior to 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
8.7 --arm
8.109 --interleave
8.117 --list
8.128 --md
8.146 --pch
8.166 -S
11.9 Template instantiation in ARM C++
8.23 --c90
8.24 --c99
8.91 --gnu
8.37 --cpp
8.173 --strict, --no_strict
8.27 --compile_all_input, --no_compile_all_input
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.