Menu

#3 GCC-6 doesn't allow implicit cast from bool to pointer

Unstable (example)
open
nobody
None
5
2017-07-23
2017-07-23
Hodorgasm
No

Compiling with GCC-6 fails with messages like:

map.cpp:3157:10: error: cannot convert ‘bool’ to ‘Shape*’ in return
   return false;
          ^~~~~

Boolean false can no longer be implicitly casted to a NULL pointer. Using NULL insead of false is a C++ dialect and compiler neutral solution.

1 Attachments

Discussion


Log in to post a comment.