Language Selection

English French German Italian Portuguese Spanish

GCC, Useful Versus Useless Warnings

Filed under
Linux

Linux creator Linus Torvalds proclaimed, "friends don't let friends use '-W'," in a thread discussing GCC's handling of warnings. The thread began with a patch to remove an unnecessary comparison of an unsigned variable which resulted in a GCC warning, "comparison of unsigned expression < 0 is always false". Linus suggested it is better to write readable and obvious code, "without having to carry stupid context around in our heads". He went on to add, "if the compiler (whose _job_ it is to carry all that context and use it to generate good code) notices that the fact that 'x' is unsigned means that one of the tests is unnecessary, that does not make it wrong." As has been noted in several earlier lkml discussions [story], Linus concluded, "Gcc warns for a lot of wrong things. This is one of them."

Later in the thread, Linus pointed out that GCC also offers plenty of useful warnings as well.

Full Story.

More in Tux Machines

Daily Builds Of Wayland & Weston For Ubuntu Linux

While Canonical may be set on making Mir the default display server across all Ubuntu platforms by this time next year, this isn't stopping others from using Ubuntu for Wayland development and using it as an alternative to Mir or the X.Org Server. Read more Also: Ubuntu Online Summit 15.05 to Start in May

72 Applications ported to Kde Frameworks 5 (KDE Applications 15.04)

Great news for Kde fanatics since this is a month full of great releases. In fact, after the stable release of KDE Frameworks 5.9 and the up-and-coming beta of Plasma 5.3 there’s another important step for the Kde development: KDE Applications 15.04. With this new release of KDE Applications 15.04 we have the full porting of 72 applications to KDE Frameworks 5 and consequently to Qt5. Read more

Linux Kernel 3.14.39 LTS Is Now Available for Download

After releasing the Linux kernels 3.19.5 and 3.10.75 LTS, Greg Kroah-Hartman had the pleasure of announcing the immediate availability of Linux kernel 3.14.39, an LTS (Long Term Support) version that is currently maintained for a couple of years with security patches, drivers updates, and bugfixes. Read more

Open human augmentation at Penguicon 2015

Want to learn and do technical programming the fun way? Penguicon is more than your typical tech conference. For the past 13 years, Penguicon has been a community event; all 500+ hours of programming is done in the community, by the community. And it's not just for those who are heavily involved in tech, Penguicon is a mashup of a variety of nerd cultures: science fiction, literary, cosplay, food, whiskey, beer, anime, films, nerdcore/chiptunes, filk... the list goes on. If you're a nerd of any variety, chances are Penguicon has some programming for you—and if we don't, we encourage you to share your interests with us to we can learn and grow! Read more