Specifies the language of source files.
Specifies the language of subsequent source files, one of the following:
- C code.
- C++ code.
- Assembly code containing C directives that require the C preprocessor.
- Assembly code that does not require the C preprocessor.
-x overrides the default language
standard for the subsequent input files that follow it on the command-line. For
inputfile1.s -xc inputfile2.s inputfile3.s
In this example, armclang treats the input files as follows:
inputfile1.sappears before the
-xcoption, so armclang treats it as assembly code because of the
inputfile3.sappear after the
-xcoption, so armclang treats them as C code.
-stdto set the default language standard.
By default the compiler determines the source file language from the filename suffix, as follows:
.CCindicate C++, equivalent to
.cindicates C, equivalent to
.s(lowercase) indicates assembly code that does not require preprocessing, equivalent to
.S(uppercase) indicates assembly code that requires preprocessing, equivalent to
NoteWindows platforms do not detect
.Sfiles correctly because the file system does not distinguish case.