Skip to content
Commit fa5fd41b authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Stephanos Ioannidis
Browse files

kernel: Add C++ main() support



The C++ standard requires the main() function to have the return type
of 'int' and does not allow the main() to be defined with the 'void'
return type. Moreover, GCC goes as far as to emit a hard error when the
'::main()' has the return type of `void`.

This commit introduces an option to instruct the Zephyr kernel to call
the 'int main(void)' instead of the 'void main(void)' in case a Zephyr
application defines main() in a C++ source file.

Signed-off-by: default avatarStephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
parent 53666831
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment