4 ms·
>uninitialised variables are warned against when compiling with the (hopefully standard) -Wall -Werror Not with GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi
by anon1385 12y ago
>uninitialised variables are warned against when compiling with the (hopefully standard) -Wall -Werror
Not with GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18501 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18501
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55873 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55873
Obviously it should warn you, but when one of the most popular C++ compilers has been failing to report uninitialised variables for 10 years then I think that the issue is worth raising. Clearly significant sections of the C++ community don't place a high value on the accuracy of these kinds of compiler warnings.
- jahnu 12y agoIn case anyone reading this is not familiar with it cppcheck is invaluable for finding such things. http://cppcheck.sourceforge.net/ http://cppcheck.sourceforge.net/
- pjmlp 12y ago> Clearly significant sections of the C++ community don't place a high value on the accuracy of these kinds of compiler warnings. This comes from the inherited C culture. After all lint was developed alongside the C compiler (in 1979). How many C developers care to use static analysis?