Keil Logo

Technical Support

On-Line Manuals

Compiler User Guide

Preface Overview of the Compiler Getting Started with the Compiler Compiler command-line syntax Compiler command-line options listed by group Default compiler behavior Order of compiler command-line options Using stdin to input source code to the compiler Directing output to stdout Filename suffixes recognized by the compiler Compiler output files Factors influencing how the compiler searches for Compiler command-line options and search paths Compiler search rules and the current place The ARMCC5INC environment variable Code compatibility between separately compiled and Linker feedback during compilation Unused function code Minimizing code size by eliminating unused functio Compilation build time Compilation build time Minimizing compilation build time Minimizing compilation build time with a single ar Effect of --multifile on compilation build time Minimizing compilation build time with parallel ma Compilation build time on Windows Compiler Features Compiler Coding Practices Compiler Diagnostic Messages Using the Inline and Embedded Assemblers of the AR Compiler Command-line Options Language Extensions Compiler-specific Features C and C++ Implementation Details What is Semihosting? Via File Syntax Summary Table of GNU Language Extensions Standard C Implementation Definition Standard C++ Implementation Definition C and C++ Compiler Implementation Limits

Filename suffixes recognized by the compiler

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 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.
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.