English
Language : 

AN3350 Datasheet, PDF (94/185 Pages) STMicroelectronics – eTPU compiler tools
C compiler
AN3350
12.2.6
12.2.7
12.2.8
12.2.9
Implicit return from main()
When the C99 extensions setting is on, the compiler inserts this statement at the end of a
program’s main() function if the function does not return a value:
return 0;
Non-constant static data initialization
When the C99 extensions setting is on, the compiler allows static variables to be initialized
with non-constant expressions.
Variable argument macros
When the C99 extensions setting is on, the compiler allows macros to have a variable
number of arguments. Example 31 shows an example.
Example 31 Variable argument macros example
#define MYLOG(...) fprintf(myfile, __VA_ARGS__)
#define MYVERSION 1
#define MYNAME "SockSorter"
int main(void)
{
MYLOG("%d %s\n", MYVERSION, MYNAME);
/* Expands to: fprintf(myfile, "%d %s\n", 1, "SockSorter"); */
return 0;
}
Extra C99 keywords
When the C99 extensions setting is on, the compiler recognizes extra keywords and the
language features they represent. Table 14 lists these keywords.
Table 14. Extra C99 keywords
This keyword or combination of keywords...
_Bool
long long
restrict
inline
_Complex
_Imaginary
represents this language feature
boolean data type
integer data type
type qualifier
function qualifier
complex number data type
imaginary number data type
12.2.10
C++-style comments
When the C99 extensions setting is on, the compiler allows C++-style comments as well as
regular C comments. A C++-style comment begins with
94/185
Doc ID 018512 Rev 2