Live data from Hacker News

GCC proves an uninitialized variable must be 0 and doesn't warn about it

lkml.org

1–10 of 67 posts

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#2
It look like a bug to me, since inode->i_nlink may be zero, and then ret is uninitialized (optimizing the final "return ret" to "return 0" should be safe (but is not necessarily worth it, depending on the target instruction set and ABI), although if warnings are enabled, it seem like the warning should still be displayed).

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#3
To summarize various replies in the thread:

This is a variation of an unfixed 2004 GCC bug. Clang detects the issue when the right warnings are enabled. Those warnings are disabled currently. A developer is auditing and fixing all such instances found by Clang so that they can reenable those warnings.

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#6

Unrelated, but it's interesting to see the "new" Linus: no cursing, and no calling people morons.

New Linus? He is a guy who sends dozens of mails every month and has cursed in a few handpicked ones. That doesn't make him especially "cursy". I'd say he's about average.

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#7

Unrelated, but it's interesting to see the "new" Linus: no cursing, and no calling people morons.

I was wondering this as well, as I haven't been following things for a few months. But indeed he's back maintaining the kernel and seems far more civil than previously.

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#8

To summarize various replies in the thread: This is a variation of an unfixed 2004 GCC bug. Clang detects the issue when the right warnings are enabled. Those warnings are disabled currently. A developer is auditing and fixing all such instances found by Clang so that they can reenable those warnings.

What are the right warnings?

Re: GCC proves an uninitialized variable must be 0 and doesn't warn about it

#10
post #6

Unrelated, but it's interesting to see the "new" Linus: no cursing, and no calling people morons.

New Linus? He is a guy who sends dozens of mails every month and has cursed in a few handpicked ones. That doesn't make him especially "cursy". I'd say he's about average.

And Howard Dean was a fairly soft-spoken politician until one particularly excited outburst at a single rally happened to have been captured on mic.

The "actual" frequency of the outbursts is somewhat secondary to the perception of frequency. Every time Linus writes a profanity-laced rant, even if it's email number 83/175 for the day, that particular piece is preserved, archived, and passed around the internet for giggles, further reinforcing whatever pre-existing conception the person referencing the email is arguing for.

Post reply on HN