Live data from Hacker News

GCC 5.1 released

gcc.gnu.org

31–40 of 54 posts

Re: GCC 5.1 released

#32
post #15

Earlier quoted context omitted.

Clang's -Weverything isn't really as useful as it sounds; since it includes fairly-to-completely useless warnings like -Wc++98-compat, -Wpadded, or -Wweak-vtables, you'll end up spending so much time playing warning whack-a-mole that you might as well have not enabled the thing in the first place. At least that's been my experience.

I completely disagree. It's true that some of the warnings it enables aren't terribly useful, but being able to enable all warnings is very helpful instead of having to manually list ~40 flags. Additionally, -Wpadded and the like are actually helpful for optimizations. Plus, writing code (in C, I cannot speak for Cxx) which results in no warning output from `-Weverything` is actually not that difficult to do, and gen…

The -Wmaybe-uninitialized flag can produce loads of false positives, and may not be very useful (depending on your code). The really interesting part is that a compiler that gives 100% correct warnings about using uninitialized variables can be proven to be able to solve the halting problem, thus it cannot exist.

Re: GCC 5.1 released

#33
post #28

Earlier quoted context omitted.

The only problem I have with keeping `-Wall` is that it's misleading. But, other than that, I don't mind keeping it around so long as there is an option that enables all warnings. And since 5.1 includes a few more fancy new warnings, it'd be great to see those added into this hypothetical `-Weverything` as well. But, the issue on their bugtracker for inclusion of this feature was opened during 4.8 and still hasn't be…

Misleading options and unnecessary inconsistencies should be frowned upon. They make it harder to learn a system and learning a system should be made as easy as possible. I'd consider consistency in regards to option availability, effect and syntax a top priority.

[deleted]

Re: GCC 5.1 released

#34
post #19

It is so close to full C11 support. I think just threads.h are missing now.

I haven't really heard much buzz about C11 since its release. I don't mean to sound snarky (I'm really curious): does anyone really use C11 at all?

I use C++11 and it's awesome. It's expressive like python but still maintains strict type safety. I built a (still young) curl wrapper using C++11: https://github.com/whoshuu/cpr

Edit: Misread the parent posts and thought they were referring to C++11. Today I learned C11 is a separate standard.

Re: GCC 5.1 released

#36
post #34

Earlier quoted context omitted.

I haven't really heard much buzz about C11 since its release. I don't mean to sound snarky (I'm really curious): does anyone really use C11 at all?

I use C++11 and it's awesome. It's expressive like python but still maintains strict type safety. I built a (still young) curl wrapper using C++11: https://github.com/whoshuu/cpr Edit: Misread the parent posts and thought they were referring to C++11. Today I learned C11 is a separate standard.

Isn't that C++11?

Re: GCC 5.1 released

#37

Earlier quoted context omitted.

I completely disagree. It's true that some of the warnings it enables aren't terribly useful, but being able to enable all warnings is very helpful instead of having to manually list ~40 flags. Additionally, -Wpadded and the like are actually helpful for optimizations. Plus, writing code (in C, I cannot speak for Cxx) which results in no warning output from `-Weverything` is actually not that difficult to do, and gen…

The -Wmaybe-uninitialized flag can produce loads of false positives, and may not be very useful (depending on your code). The really interesting part is that a compiler that gives 100% correct warnings about using uninitialized variables can be proven to be able to solve the halting problem, thus it cannot exist.

Then again, if you construct your code such that determining whether a variable is initialized requires solving the halting problem, somebody should probably take your keyboard away :-).

In practice, if your initialization isn't sufficiently transparent, you're just busy making bugs.

Re: GCC 5.1 released

#38
post #34

Earlier quoted context omitted.

I haven't really heard much buzz about C11 since its release. I don't mean to sound snarky (I'm really curious): does anyone really use C11 at all?

I use C++11 and it's awesome. It's expressive like python but still maintains strict type safety. I built a (still young) curl wrapper using C++11: https://github.com/whoshuu/cpr Edit: Misread the parent posts and thought they were referring to C++11. Today I learned C11 is a separate standard.

that looks like a c++ project that uses c++11 not c11

Re: GCC 5.1 released

#39
I'm troubled that 'write-only variables are ... optimized out'. That means, no more embedded trace buffers in memory dumps? I've used that for decades to debug intermittent problems. Maybe there's some way to tag necessary write-only variables...

Re: GCC 5.1 released

#40

I'm troubled that 'write-only variables are ... optimized out'. That means, no more embedded trace buffers in memory dumps? I've used that for decades to debug intermittent problems. Maybe there's some way to tag necessary write-only variables...

volatile works, asm works, and it's usually not hard to trick the optimizer.
Post reply on HN