Describes implementation-defined aspects of the Arm® C compiler and C library relating to environment, as required by the ISO C standard.
- The mapping between physical source file multibyte characters and the source character set in translation phase 1 (220.127.116.11).
- The compiler interprets the physical source file multibyte characters as UTF-8.
- The name and type of the function called at program startup in a freestanding environment (18.104.22.168).
- When linking with microlib, the function
main()must be declared to take no arguments and must not return.
- The effect of program termination in a freestanding environment (22.214.171.124).
- The function
exit()is not supported by microlib and the function
main()must not return.
- An alternative manner in which the main function can be defined (126.96.36.199.1).
The main function can be defined in one of the following forms:
int main(void) int main() int main(int) int main(int, char **) int main(int,char **, char **)
- The values given to the strings pointed to by the argv argument to main (188.8.131.52.1).
- In the generic Arm library the arguments given to
main()are the words of the command line not including input/output redirections, delimited by whitespace, except where the whitespace is contained in double quotes.
- What constitutes an interactive device (184.108.40.206).
- What constitutes an interactive device depends on the environment and the
_sys_isttyfunction. The standard I/O streams
stderrare assumed to be interactive devices. They are line-buffered at program startup, regardless of what
_sys_isttyreports for them. An exception is if they have been redirected on the command line.
- Whether a program can have more than one thread of execution in a freestanding environment (220.127.116.11).
- Depends on the environment. The microlib C library is not thread-safe.
- The set of signals, their semantics, and their default handling (7.14).
<signal.h>header defines the following signals:
Signal Value Semantics
1 Abnormal termination
2 Arithmetic exception
3 Illegal instruction execution
4 Interactive attention signal
5 Bad memory access
6 Termination request
7 Stack overflow (obsolete)
8 Run-time redirection error
9 Run-time memory error
10 Available for the user
11 Available for the user
12 Pure virtual function called
13 Not normally used
::operator newcannot allocate memory
The default handling of all recognized signals is to print a diagnostic message and call
- Signal values other than
SIGSEGVthat correspond to a computational exception (18.104.22.168).
- No signal values other than
SIGSEGVcorrespond to a computational exception.
- Signals for which the equivalent of
signal(sig, SIG_IGN);is executed at program startup (22.214.171.124).
- No signals are ignored at program startup.
- The set of environment names and the method for altering the environment
list used by the
- The default implementation returns
NULL, indicating that no environment information is available.
- The manner of execution of the string by the system function (126.96.36.199).
- Depends on the environment. The default implementation of the function uses semihosting.