Compiler User GuidePreface 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
Using stdin to input source code to the compiler
2.5 Using stdin to input source code to the compiler
Instead of creating a file for your source code, you can use
This is useful if you want to test a short piece of code without having to create a file for it.
An assembly listing for the keyboard input is sent to the output stream after input has been terminated if both the following are true:
Otherwise, an object file is created or preprocessor output is sent to the standard output stream, depending on whether you used the
The compiler accepts source code from the standard input stream in combination with other files, when performing a link step. For example, the following are permitted:
Executing the following command compiles the source code you provide on standard input, and links it into test.axf:
armcc -o test.axf -
You can only combine standard input with other source files when you are linking code. If you attempt to combine standard input with other source files when not linking, the compiler generates an error.
of your data.