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

Embedded NUC SBC expands upon quad-core -A53 Snapdragon

Seco announced a wireless-ready “SBC-B47-eNUC” SBC that complies with the 4×4-inch eNUC form factor, and runs Linux or Android on a Snapdragon 410E. Seco is prepping its first SBC based on the 101.6 x 101.6mm (4.0 x 4.0-inch) Embedded NUC (eNUC) SBC standard from the Standardization Group for Embedded Technologies (SGET). The eNUC form factor offers superior industrial grade characteristics, long term support, and efficient heat dissipation, claims Seco. The Linux- and Android-supported board supports applications including IoT gateways, home automation, robotics, digital signage, and HMI. Read more

netOS Server 10.65.1 Released, Based on Ubuntu 16.04 LTS and Xfce 4.12 Desktop

Black Lab Software CEO Roberto J. Dohnert is informing Softpedia today about the release and general availability of the netOS Server 10.65.1 server-oriented and open-source operating system. Read more

Ubuntu GNOME 17.04 Final Beta Features GNOME 3.24 with Night Light, Flatpak 0.8

As part of yesterday's Ubuntu 17.04 Final Beta release, the Ubuntu GNOME 17.04 operating system got its second Beta milestone bringing with it the latest development version of the recently released GNOME 3.24 desktop environment. Read more Also: Kubuntu 17.04 Beta 2 Includes KDE Plasma 5.9 Desktop, KDE Applications 16.12.3 Ubuntu Budgie 17.04 Beta 2 Brings Latest GNOME 3.24 Apps, Budgie 10.2.9 Desktop

SAS, Canonical turn silly over open source

Zemlin's job, in other words, isn't to convince companies to adopt open source, but rather to provide a home for the nurturing of open source projects, so they're worthy of adoption. Similarly, Canonical can focus on contributing code rather than spooking enterprises into adopting more. And SAS? Well, it should probably start with 40 percent open source adoption and grow from there. Read more