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

Our Favourite Apps for Ubuntu

We enjoy using Ubuntu mainly for gaming, writing, listening to music and browsing the web. (Lots and lots of browsing the web.) There are other apps that we would love to have on Ubuntu like Affinity Photo, a stunning image editor that’s on par with Adobe’s Photoshop that’s available on Windows and Mac as well as Bear, a beautifully designed note taking app that we do most of our writing on that’s only available for macOS. However, the Ubuntu platform has moved forward in leaps and bounds in recent years when it comes to the official availability of popular apps and we are confident that this trend will continue. What’s your favourite Ubuntu apps? Read more

Kernel Space: Plans for Linux 4.16, 4.15 Likely Out Shortly

Some FreeBSD Users Are Still Running Into Random Lock-Ups With Ryzen

While Linux has been playing happily with Ryzen CPUs as long as you weren't affected by the performance marginality problem where you had to swap out for a newer CPU (and Threadripper and EPYC CPUs have been running splendid in all of my testing with not having any worries), it seems the BSDs (at least FreeBSD) are still having some quirks to address. This week on the FreeBSD mailing list has been another thread about Ryzen issues on FreeBSD. Some users are still encountering random lockups that do not correspond to any apparent load/activity on the system. Read more

PC desktop build, Intel, spectre issues etc.

Apart from the initial system bought, most of my systems when being changed were in the INR 20-25k/- budget including all and any accessories I bought later. The only real expensive parts I purchased have been external hdd ( 1 TB WD passport) and then a Viewsonic 17″ LCD which together sent me back by around INR 10k/- but both seem to give me adequate performance (both have outlived the warranty years) with the monitor being used almost 24×7 over 6 years or so, of course over GNU/Linux specifically Debian. Both have been extremely well value for the money. As I had been exposed to both the motherboards I had been following those and other motherboards as well. What was and has been interesting to observe what Asus did later was to focus more on the high-end gaming market while Gigabyte continued to dilute it energy both in the mid and high-end motherboards. Read more