Language Selection

English French German Italian Portuguese Spanish

GCC, Useful Versus Useless Warnings

Filed under

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

KDBUS Continues Maturing, But Will We See It For Linux 4.4?

New KDBUS patches continue being published for this in-kernel IPC mechanism based on D-Bus, but it hasn't been communicated yet whether Linux 4.4 is the next target for hoping to mainline this controversial code. Just yesterday was a set of 44 patches in attempting to cleanup the KDBUS code further. There's also been an assortment of other KDBUS patches floating around the kernel mailing list. Read more

Bodhi: Detour and Forum Themes now Moksha Compatible

Today I am happy to announce we have completed work on the first couple of themes we are updating to be compatible with Moksha. Read more

Science on Android

I have covered a lot of different scientific packages that are available under Linux in this space, but the focus has been on Linux running on desktop machines. This has been rather short-sighted, however, as lots of other platforms have Linux available and shouldn't be neglected. So in this article, I start looking at the type of science you can do on the Android platform. For my next several articles, I plan to include occasional Android applications that you may find useful. Read more

Linksys WRT router gains faster SoC, more RAM, OpenWrt

Linksys has launched a “WRT1900ACS” router that updates the AC version with a faster dual-core, 1.6GHz SoC, twice the RAM (at 512MB), and OpenWrt support. In early 2014 when Linksys resurrected the hackable Linksys WRT54G WiFi router in a new WRT1900AC model, the Belkin subsidiary said the the Linux-based router would also support the lightweight, networking-focused OpenWrt Linux distribution. With the new WRT1900ACS, Linksys is making life easier for OpenWrt lovers by providing full, open source OpenWrt support out of the box. Read more