Live data from Hacker News

GCC 10.1 Released

gcc.gnu.org

121–130 of 145 posts

Re: GCC 10.1 Released

#121
post #99
post #83

Earlier quoted context omitted.

Clang has it although I've personally never tried it due to the horrible rigamarole of setting it up. In GCC it's a compiler flag. In LLVM it's a convoluted process automated by either an irritating perl/python script (The python one isn't included by default for some reason despite being far more common these days) or AN ENTIRE WEB SERVER TO OUTPUT TEXT (Which thankfully isn't included by default). I'm sure you coul…

> Clang has it although I've personally never tried it due to the horrible rigamarole of setting it up. -% scan-build10 make scan-build: Using '/usr/local/llvm10/bin/clang-10' for static analysis ... scan-build: No bugs found. What could ever have driven them to such a long and convoluted setup process?

Yep! Thanks for pointing out the perl script I mentioned. You appear to have completely ignored the rest of my post on them leaving important functionality to third party scripting languages.

Re: GCC 10.1 Released

#122
post #83

Earlier quoted context omitted.

Isn't it very similar to something Clang has had for years?

Clang has it although I've personally never tried it due to the horrible rigamarole of setting it up. In GCC it's a compiler flag. In LLVM it's a convoluted process automated by either an irritating perl/python script (The python one isn't included by default for some reason despite being far more common these days) or AN ENTIRE WEB SERVER TO OUTPUT TEXT (Which thankfully isn't included by default). I'm sure you coul…

Though scan-build is usually the simpler option, clang itself does have an --analyze flag which writes analysis results in various formats, including the same html reports that scan-build would generate. But to see this on standard out

   clang --analyze --analyzer-output text ...
Will print the entire analysis tree in the same format as regular diagnostics.

Re: GCC 10.1 Released

#123
post #122
post #83

Earlier quoted context omitted.

Clang has it although I've personally never tried it due to the horrible rigamarole of setting it up. In GCC it's a compiler flag. In LLVM it's a convoluted process automated by either an irritating perl/python script (The python one isn't included by default for some reason despite being far more common these days) or AN ENTIRE WEB SERVER TO OUTPUT TEXT (Which thankfully isn't included by default). I'm sure you coul…

Though scan-build is usually the simpler option, clang itself does have an --analyze flag which writes analysis results in various formats, including the same html reports that scan-build would generate. But to see this on standard out clang --analyze --analyzer-output text ... Will print the entire analysis tree in the same format as regular diagnostics.

The only problem is the CTU mess if you're analyzing more than one file, thus the aforementioned tools' necessity.

Hopefully in a future version the kinks are ironed out and we can just use the flag without any hassle. It's like if we needed to still manually link our files with ld before compiling them instead of clang auto doing it.

Re: GCC 10.1 Released

#124

wish gcc 10 was built into ubuntu 20.04

Compiling gcc is actually not so bad (and sometimes necessary if you want to e.g. use drd to debug openmp, so you can make libgomp use pthreads primitives that drd knows how to do deal with).

Re: GCC 10.1 Released

#125
post #99

Earlier quoted context omitted.

> Clang has it although I've personally never tried it due to the horrible rigamarole of setting it up. -% scan-build10 make scan-build: Using '/usr/local/llvm10/bin/clang-10' for static analysis ... scan-build: No bugs found. What could ever have driven them to such a long and convoluted setup process?

Yep! Thanks for pointing out the perl script I mentioned. You appear to have completely ignored the rest of my post on them leaving important functionality to third party scripting languages.

Yes, to highlight that this "horrible rigmarole" and "irritation" you describe is entirely on the basis of there being a Perl script involved. Something I suspect the majority would overlook without even really noticing.

Re: GCC 10.1 Released

#127

Earlier quoted context omitted.

I really disagree with the idea that math uses greek letters just to make things less accessible. If you have a better symbol than the large S for an integral, or Sigma for sums, I'd love to hear it.

People who complain about math notation and want something more verbose like programming usually don't fully understand the notation they're complaining about. In particular, there are fairly strong conventions for which letters get used for which purposes. Longer variable names that try to be more descriptive often aren't as necessary as they might seem, and in many cases would make an expression less generic than i…

It would be cool if more papers had a glossary for the symbols they use, though. If you're going to use a bunch of single character symbols, at least put somewhere what they are.

Re: GCC 10.1 Released

#128
post #84

> Extended characters in identifiers may now be specified directly in the input encoding (UTF-8, by default), in addition to the UCN syntax (\uNNNN or \UNNNNNNNN) that is already supported: static const int π = 3; int get_naïve_pi() { return π; } Lovely!

The next obfuscated code competition is sure gonna be interesting.

yup zero-width-space is going to a do a number on everyone.

Re: GCC 10.1 Released

#129
post #116

Earlier quoted context omitted.

Sadly, that's typical with static analyzers todays...

I like valgrind for this, combined with automated tests it gets decent coverage and finds actual (or at least probable) errors.

Valgrind is also prone to throwing up false positives. I find ASan much better.

Re: GCC 10.1 Released

#130

Earlier quoted context omitted.

People who complain about math notation and want something more verbose like programming usually don't fully understand the notation they're complaining about. In particular, there are fairly strong conventions for which letters get used for which purposes. Longer variable names that try to be more descriptive often aren't as necessary as they might seem, and in many cases would make an expression less generic than i…

It would be cool if more papers had a glossary for the symbols they use, though. If you're going to use a bunch of single character symbols, at least put somewhere what they are.

The abstract and introduction to a math paper usually does so, though sometimes they slip up and in then in the middle of the paper you find some strange symbol and have to manually binary search for it.
Post reply on HN