Subsections

- 3.1.7.1 Translation
- 3.1.7.2 Environment
- 3.1.7.3 Identifiers
- 3.1.7.4 Characters
- 3.1.7.5 Integers
- 3.1.7.6 Floating point
- 3.1.7.7 Arrays and Pointers
- 3.1.7.8 Hints
- 3.1.7.9 Structures, unions, enumerations and bit-fields
- 3.1.7.10 Qualifiers
- 3.1.7.11 Preprocessing directives
- 3.1.7.12 Library functions
- 3.1.7.13 Architecture

## 3.1.7 Implementation-defined behavior

### 3.1.7.1 Translation

- Diagnostics are output to stderr, in the format <filename>:<line-number>: <warning|error> <diagnostic-number>: <diagnostic-description>
- Nonempty sequences of white-space are retained in translation phase 3.

### 3.1.7.2 Environment

- See SDCC source (and your own code if you use a custom crt0 for a target that supports it) for any information on the environment.

### 3.1.7.3 Identifiers

- See the compiler and assembler source for information on characters that may appear in identifiers and on the number of significant initial characters.

### 3.1.7.4 Characters

- There are 8 bits in a byte.
- Values of members of the execution character set: TODO.
- Values of members of the execution character set for escape sequences: TODO.
- Value of char with something weird stored in it: TODO.
- unsigned char has the same range, representation and behavior as ”plain” char.
- See the SDCC source for further information on character sets.

### 3.1.7.5 Integers

- There are no extended integer types.

### 3.1.7.6 Floating point

- See the implementation (soft float library) for any information on floating point.

### 3.1.7.7 Arrays and Pointers

- For the result of converting between pointers and integers see the SDCC source code.
- For the size of the result of subtracting two pointers to elements of the same array see the SDCC source code.

### 3.1.7.8 Hints

- The extend to which suggestions made by register are effective depends on the target.
- SDCC will inline functions if and only if they are declared using inline and do not have variable arguments.

### 3.1.7.9 Structures, unions, enumerations and bit-fields

- A plain int bit-field is treated as an unsigned int bit-field.
- There are no allowed bit-field types other than _Bool, signed int and unsigned int.
- Atomic types are not permitted for bit-fields.
- If a bit-fields does not fit into the same byte as the previous bit-fields, it starts on the next byte.
- bit-fields are allocated in the same order as they appear in the source.
- Non-bit-field members of structures are aligned on byte boundaries (i.e. there are no padding bytes).
- For enumerations, the compatible type is the first from the following list that fits the constants: bool, unsigned char, signed char, unsigned int, signed int, unsigned long int, signed long int, unsigned long long int, signed long long int.

### 3.1.7.10 Qualifiers

- SDCC shall preserve all volatile reads and writes, but does not guarantee them to be atomic (except for atomic types and volatile sig_atomic_t).

### 3.1.7.11 Preprocessing directives

- See the preprocessor source for information on preprocessing directives.

### 3.1.7.12 Library functions

- See the respective library headers for the library functions available.
- See assert.h and library source for the format of the diagnostic printed by the assert macro.
- There is no fegetexceptflag function.
- There is no feraiseexcept function.
- There is no setlocale function.
- There is no FLT_EVAL_METHOD macro.
- There is no DEC_EVAL_METHOD macro.
- There are no non-required domain errors for mathematics functions.
- See library source for the values returned by mathematical functions on domain error and pole error (and anything else on mathematical functions and floating type encodings).
- See library headers for the null-pointer constant to which NULL expands.
- See library headers and source for anything else about the library.

### 3.1.7.13 Architecture

- See the respective library headers for the values or expressions for macros specified in float.h, limits.h, stdint.h.
- Multithreading is not supported.
- The number of bytes in any object is the minimum allowed (except for some padding bits on bit-fields), byte order depends on the target.
- No extended alignments are supported.
- There are no valid alignments other than those returned by _Alignof.
- sizeof always returns the smallest value allowed assuming an 8-bit char. _Alignof always returns 0.