Cling crashing instead of reporting error

Hi,

I tried cling with the following input (entering main() in raw mode and then calling it) and it crashed.

Obviously main has an int return type but it does not actually return any int value. Is there a way to make it so that cling correctly reports the error and refuses to execute main() instead of going into segmentation fault?

Thanks,
Alessandro

[cling]! .rawInput 1
[cling]! int main(){
[cling]! ? std::cout << “Hello World!”;
[cling]! ? }
[cling]! .rawInput 0
[cling]$ main()
Segmentation fault: 11

Hi,

Don’t name your function main() - cling already has one!

The crash on missing return is sft.its.cern.ch/jira/browse/ROOT-7031

Axel.