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

Can Jolla Deliver the First Open Source Tablet?

Some dreams die hard. After the KDE-based Vivaldi tablet failed to appear after three years of anticipation, Jolla is planning a free software tablet of its own. The product is off to a roaring start, having just raised $1,824,055 in its crowdfunding campaign-- almost five times the original target. So, this time, we might actually see some hardware. Mind you, whether the tablet will satisfy everyone remains open to doubt. Although Jolla is talking loudly about being "people powered" and listening to want users want, some requests, especially for hardware, may be impossible to fulfill. The manufacturing capacity of advanced features is limited world-wide, and monopolized by large companies like Apple and Samsung. More importantly, exactly how free the tablet will be has yet to be announced. Read more

First Ubuntu Phone Will Launch In Europe This February

The first Ubuntu Phone will go on sale in Europe in the second week of February. Read more

Sandia looks to open-source robot tech

Researchers at federal defense and energy laboratories are open sourcing some of the electronics and software for two advanced ambulatory robots in hopes of boosting their ability to handle perilous situations. In a Dec. 16 announcement, the Energy Department's Sandia National Laboratories said it is developing more energy-efficient motors to dramatically improve the endurance of legged robots performing the types of motions that are crucial in disaster response situations. The project is supported by the Defense Advanced Research Projects Agency. Read more

Google releases open-source Java SDK for Cloud Dataflow service to form data pipelines

It’s been a long, long time since Google came up with the foundational technologies for storing and processing big data. This year, the company developed a new tool for working with data as it comes in, and now Google is keen to see people use it. Read more