Frama-C Bug Tracking System - Frama-C
View Issue Details
0002347Frama-CPlug-in > clangpublic2018-01-22 20:502018-01-23 13:36
jens 
virgile 
normalcrashalways
assignedopen 
Frama-C GIT, precise the release id 
 
0002347: direct initialisation of bool by nullptr
The attached program "nullptr_crash.cpp" compiles without warnings with g++-7.2 in C++11 mode.
Clang-5.0 issues a warning (and if I understood the standard correctly, it shouldn't, because the example uses "direct initialisation").
Frama-Clang crashes on the example.

The second example "nullptr_bool.cpp" which uses "copy initialisation" only warns about implicit conversion...
No tags attached.
cpp nullptr_crash.cpp (54) 2018-01-22 20:50
https://bts.frama-c.com/file_download.php?file_id=1227&type=bug
cpp nullptr_bool.cpp (55) 2018-01-22 20:51
https://bts.frama-c.com/file_download.php?file_id=1228&type=bug
cpp nullptr_no_crash.cpp (54) 2018-01-23 13:35
https://bts.frama-c.com/file_download.php?file_id=1229&type=bug
Issue History
2018-01-22 20:50jensNew Issue
2018-01-22 20:50jensStatusnew => assigned
2018-01-22 20:50jensAssigned To => virgile
2018-01-22 20:50jensFile Added: nullptr_crash.cpp
2018-01-22 20:51jensFile Added: nullptr_bool.cpp
2018-01-23 13:35jensFile Added: nullptr_no_crash.cpp
2018-01-23 13:36jensNote Added: 0006511

Notes
(0006511)
jens   
2018-01-23 13:36   
I added another example nullptr_no_crash.cpp that shows that for the "usual form" of direct initialisation the program does not crash.