6.5.2 Safety measures ¶
During the compilation step, we check for user errors :
- No main function is given.
- Multiple main functions are given.
- A function is defined with the name of an already defined function.
- A function defines a parameter, or a variable, with the name of an
already existing, local to the function, parameter or variable.
- A function that is not referenced is invoked.
- A function that takes n parameters is invoked with more or less than n
parameters.
- A return value is given to a function of type void.
- An empty return is given to a function of type non-void.
- An assignement of the return of a void-typed function is made.