Live data from Hacker News

GCC 10.1 Released

gcc.gnu.org

111–120 of 145 posts

Re: GCC 10.1 Released

#111
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.

Re: GCC 10.1 Released

#112

Earlier quoted context omitted.

> The "english-literate" world (emphasis on literate) is, or historically has been, very familiar with Greek glyphs. I would be shocked if even 1% of native English speakers could list the full Greek alphabet much less have a comprehensive familiarity with what each letter means across all branches of mathematics. I would be shocked if even 5% of native English speakers could tell you what theta generally means in ge…

Except for "full alphabet", all of that applies to the English alphabet as much as it does for the Greek alphabet. But both of you seem to disagree on what "literate", "very familiar" and "historically" really mean. Which is fine, language is not made to be precise - luckily we can use precise symbols where precise meaning matters, not English phrases. For example in math and physics.

> Except for "full alphabet", all of that applies to the English alphabet as much as it does for the Greek alphabet.

Native English-speakers are very familiar with the "English alphabet" but that's irrelevant because we're comparing English words (or phrases) with Greek symbols.

> But both of you seem to disagree on what "literate", "very familiar" and "historically" really mean.

Perhaps, but I'm using standard meanings available from any English dictionary.

> Which is fine, language is not made to be precise - luckily we can use precise symbols where precise meaning matters, not English phrases. For example in math and physics.

You can assign precise meaning to words or phrases as easily as you can to Greek symbols. The two approaches differ in that it's easier for (at least English-speaking) humans to remember words or phrases that relate to or approximate the precise meaning than a random Greek letter (I'm sure someone will demand evidence, but this is hardly an extraordinary claim compared to its inverse) while letters (Greek or otherwise) are more expedient to write by hand.

Re: GCC 10.1 Released

#113

Earlier quoted context omitted.

That's something that might be useful for one of those rare end-users who for some reason want to try to build something with a bleeding edge compiler. That is also mind-numbingly absurd to force upon the vast majority who couldn't care less about the bleeding edge and want a stable platform to act as a fixe target without risking random ABI breakages. I should not be forced to endure a brittle and fragile and overly…

The ABI (the itanium ABI) is fixed, but somtimes there are bug in the compiler and gcc deviates from the abi in some corner cases. When the bug is fixed the gcc abi version is bumped which most of the time doesn't matter but if the bug fix affects you (and very often it doesn't), you can 'roll it back' by selecting a specific ABI version. Not fixing the bug is not an option because it means that GCC would be incompat…

> ABI (the itanium ABI) is fixed,

That's irrelevant. The only aspect that is relevant is that the C++ standard does not define nor assume a standard or even fixed ABI, thus each compiler vendor just goes with the flow.

In some rare cases where a compiler vendor also controls the platform and essentially holds a vertically integrated monopoly, they are in a better position to not break the ABI all that often. Everyone else doing stuff in C++, whether writing programs or libraries or compilers or putting together OS distributions, just faces the music.

Re: GCC 10.1 Released

#114

Earlier quoted context omitted.

There are lots of other languages that support full UTF-8 in identifiers (e.g, Go) and the non-English-speaking world doesn't take advantage.

Some do: https://news.ycombinator.com/item?id=14276891

I've done a similar thing when I was writing a language (with generics) that compiled to Go and needed to implement name mangling. But in any case, this isn't an example of a non-native speaker using utf-8 to write in his native language. :)

Re: GCC 10.1 Released

#115
post #10
post #7

Earlier quoted context omitted.

Imagine if -fanalyze was like rusts borrow checker

You Rust borrow checker requires special annotations and restrictions put on the code to do its job. I don't think you could something like that automatically on a C or C++ full codebase without having to manually annotate and refactor it somewhat. There are many common (and safe) C and C++ patterns that would be outright rejected by Rust's borrow checker, for instance initializing a structure or array partially if y…

>You Rust borrow checker requires special annotations and restrictions put on the code to do its job. I don't think you could something like that automatically on a C or C++ full codebase without having to manually annotate and refactor it somewhat.

What about with a constrained (not necessarily general purpose) AI with the expertise of Scott Meyers, Andrei Alexandrescu, Herb Sutter and Alexander Stepanov?

Re: GCC 10.1 Released

#116
post #37

Earlier quoted context omitted.

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 po…

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.

Re: GCC 10.1 Released

#117
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…

Lest other people get the wrong impression from someone who's admitted not even trying it, running Clang's static analyzer is as simple as switching cc with scan-build. You can even drive it from clang-tidy. No Perl or Python setup in my experience.

You appear to have it installed somewhere. Open up scan-build in your favorite text editor if you don't believe me.

Re: GCC 10.1 Released

#118

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.

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.

Re: GCC 10.1 Released

#119
post #62

Earlier quoted context omitted.

Yep, writing non english keywords in C++ is like having prolog code inside c++ :-) (but as a non english person, I find it very helpful to be able to have unicode in strings)

that's fine, keep using english. But do not expect people that do not speak english to learn it if there's an alternative. Someday we might have multilingual frameworks and not restrict programming to the privileged few that could learn a second language. Entitled programers are so into their broculture they can't see their own problems as being socially constructed. On one hand they complain "reading mixed language…

I believe that Archimedes used Greek because it was the only language he knew...

Re: GCC 10.1 Released

#120

Earlier quoted context omitted.

that's fine, keep using english. But do not expect people that do not speak english to learn it if there's an alternative. Someday we might have multilingual frameworks and not restrict programming to the privileged few that could learn a second language. Entitled programers are so into their broculture they can't see their own problems as being socially constructed. On one hand they complain "reading mixed language…

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 it really is.

And then there's the fact that what's easy to type on a standard keyboard without a specialized IME has little bearing on what notation is most effective for the reader, or for someone writing on paper or blackboard.

Post reply on HN