You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without strict compiler warnings, it is possible to write quite a bit of C++ without it be obvious once needs to study the details of numeric casting. Implicit conversion will convert various integer types to other integer types and to floating point types, quietly and hopefully correctly.
Because we can't have correct code based on hope, we should instead enable warnings from the get go that warn about implicit conversion and specifically truncating or narrowing conversion and convertions that might overflow.
So, we want to enable warnings like -Wconversion per #37.
What this means is that you'll get loud warnings right away about converting types and will need to figure out how to avoid or suppress them correctly, to fix the potential existing bugs they hint at and avoid creating new bugs in the process.
Without strict compiler warnings, it is possible to write quite a bit of C++ without it be obvious once needs to study the details of numeric casting. Implicit conversion will convert various integer types to other integer types and to floating point types, quietly and hopefully correctly.
Because we can't have correct code based on hope, we should instead enable warnings from the get go that warn about implicit conversion and specifically truncating or narrowing conversion and convertions that might overflow.
So, we want to enable warnings like
-Wconversion
per #37.What this means is that you'll get loud warnings right away about converting types and will need to figure out how to avoid or suppress them correctly, to fix the potential existing bugs they hint at and avoid creating new bugs in the process.
Refs mapbox/node-cpp-skel#78 (comment) mapbox/carmen-cache#94
refs mapbox/gzip-hpp#19 (comment)
/cc @mapsam @GretaCB @flippmoke
The text was updated successfully, but these errors were encountered: