4 ms·
The same is trivially true for C++: https://godbolt.org/z/h5znfchf8 https://godbolt.org/z/h5znfchf8
by moefh 2y ago
The same is trivially true for C++: https://godbolt.org/z/h5znfchf8 https://godbolt.org/z/h5znfchf8
- jcalvinowens 2y agoI was just editing my comment to add this point :)
- kazinator 2y agoBut that uses a cast. Moreover, an old style cast. GNU c++ has an opt-in warning for those, -Wold-style-cast. You then need const_cast to get around that. Then we can grep the program for that new style cast (unless it token-pasted the const_cast together in the preprocessor haha). In C we can make such a program which contains no devices that defeat the type system, and which otherwise requires no diagnostic.