News for hackers. Stuff that matters.
Re:C, C++, x86/x64 assembly: The case of forgotten return by twodayslate on Friday December 14, 2018 @08:01PM (#18686322)
-Weverything if using clang
Re:C, C++, x86/x64 assembly: The case of forgotten return by spc476 on Friday December 14, 2018 @08:04PM (#18686339)
It's too noisy just by itself. First time I tried it, it complained about padding added to structures. When I packed them, it complained about packed structures.
Re:C, C++, x86/x64 assembly: The case of forgotten return by MaulingMonkey on Saturday December 15, 2018 @04:58AM (#18687818)
Manually pad them, and it'll complain about unused fields ;)

I've actually had some pieces of code where it was super useful to enable that padding warning as an error. Some complicated C++ types that needed to have identical memory layouts across compilers yet often weren't because of some really nasty shenanigans...

-Weverything is for people who really want to explicitly opt out of every warning they don't like.

Re:C, C++, x86/x64 assembly: The case of forgotten return by ndesaulniers on Friday December 14, 2018 @11:16PM (#18687005)
Not recommended. Particularly there are warnings for C++ now that are "mutually unsatisfy-able."
Re:C, C++, x86/x64 assembly: The case of forgotten return by jcelerier on Saturday December 15, 2018 @06:39AM (#18688035)
it's much better to start from -Weverything and add -Wno-whatever (e.g. -Wno-c++11-compat for instance which complains about C++11 features) than start from -Wall -Wextra etc...
Re:C, C++, x86/x64 assembly: The case of forgotten return by wmu on Sunday December 16, 2018 @01:37AM (#18692041)
Any examples?