top | item 23103580

GCC 10.1 Released

323 points| nrgc | 5 years ago |gcc.gnu.org

139 comments

order

DyslexicAtheist|5 years ago

I love the built-in static analyzer -fanalyzer option in gcc-10.

[1] https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.h...

rwmj|5 years ago

Really? I tried to use it but I got a lot of false positives - in fact, every one of the errors in my medium-sized codebase was I believe a false positive. I spent a few hours last night looking at all of them and while I found a missing free, it was not one picked up by this analysis, but it happened to be in the same code that the analyzer flagged. Also the error messages are enormous in some cases.

It does show potential, and I hope it improves in future. Be nice to have a libre version of coverity one day.

Edit: Output from compiling nbdkit upstream with -fanalyzer: https://paste.centos.org/view/8381f926

qalmakka|5 years ago

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

ufo|5 years ago

What do you love the most about the new analyzer pass? I haven't had a chance to try it out for myself yet but I'm looking forward to it.

cozzyd|5 years ago

Excited for this to come to gcc-arm-eabi-none

glouwbug|5 years ago

Imagine if -fanalyze was like rusts borrow checker

MauranKilom|5 years ago

> 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!

hinkley|5 years ago

The next obfuscated code competition is sure gonna be interesting.

asjw|5 years ago

For what is worth being able to enforce conventions like

    present?(p) // return bool
    get!(g) // throw if not found
a-la ruby/elixir could be good

q92z8oeif|5 years ago

i don't know if you are being ironic or not, but the non-english speaking world will love it.

greendave|5 years ago

> Several C++20 features have been implemented: > P0912R5, Coroutines (requires -fcoroutines)

Nice to see a bunch of C++20 features making it in. Coroutines seems like a big one!

vmchale|5 years ago

Lovely! Time to see my code go even faster, for free :)

FullyFunctional|5 years ago

memory.c: In function ‘mk_entry’: memory.c:116:12: internal compiler error: in saved_diagnostic, at analyzer/diagnostic-manager.cc:84 116 | return (struct entry) {safe_calloc(end - start, 1), start, end}; | ^ Please submit a full bug report,

Goes to look at README.Bugs. Holy cow, I don't have time to to check all those places to see if it has been reported already.

canarypilot|5 years ago

The GCC community is normally very good (if blunt) at picking up duplicate bugs and linking them to the right place. https://gcc.gnu.org/bugzilla/ Is all you need. Just don’t feel bad if your bug is closed!

userbinator|5 years ago

Every time I look at GCC's bugtracker, I feel a mix of disgust and astonishment at the state of such a foundational piece of software. I'm amazed it works as well as it does.

wiz21c|5 years ago

(side note for RMS, I still have a "RUNGCC" sticker on my car (it's been 5 years !!!))

liquidify|5 years ago

wish gcc 10 was built into ubuntu 20.04

Twirrim|5 years ago

You want a bleeding edge release in your non-bleeding edge LTS distribution?

throwawayanss21|5 years ago

It is available in the repos it just isn't the default

cozzyd|5 years ago

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).

wyldfire|5 years ago

It's nice when they're built in, sure. But gcc is pretty easy to build on its own.

loeg|5 years ago

If you want the newest version of software, Ubuntu does not cater to that.

umvi|5 years ago

Just use docker and you can have any toolchain you want any time you want

SomeoneFromCA|5 years ago

They still may have a snap for it....

unixhero|5 years ago

just add it in as a ppa!

super_mario|5 years ago

It doesn't seem to be available on the main site or any of the mirrors I tried.

chrisseaton|5 years ago

> It doesn't seem to be available on the main site

Surely it's available from here at the very least?

https://gcc.gnu.org/git.html

> or any of the mirrors I tried

Seems to be to me?

ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-10.1.0/