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

Games: RUINER, xoEl Empire, Outlast Deluxe Edition, Albion Online and Auto Age: Standoff

Java JDK 9 Finally Reaches General Availability

Java 9 (JDK 9) has finally reached general availability! Following setbacks, Java 9 is officially available as well as Java EE 8. Read more

What Is DNF Package Manager And How To Use It

​A package file is an archive which contains the binaries and other resources that make software and the pre and post installation scripts. They also provide the information regarding dependencies and other packages required for the installation and running of the software. Read
more

FSFE: ‘German public sector a digital laggard’

With their lacklustre approach to free software, German public services remain behind other European member states, says the Free Software Foundation Europe (FSFE). When asked, the current governing parties’ say they support free software, but their statements are contradicted by the lack of action, the advocacy group says. In early September, the FSFE published its analysis of the free software policies put forward by the main political parties on the ballot, in preparation for Germany’s parliamentary elections on 24 September. This analysis (in German) is far more detailed than an earlier report generated by the Digital-O-Mat, a web portal set up to focus on political parties’ positions on 12 digital topics. Read more New release: ISA² interoperability test bed software v1.1.0