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:

C and C++ source file suffixes imply a default language variety. For example, the .c suffix implies --c90. Explicitly specifying --c90, --c99, --cpp, or --cpp11 overrides the implied defaults for these 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.

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.

On UNIX platforms, for files in the input file list suffixed with .S, the compiler preprocesses the assembly source before 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 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.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.