
C++17 Compiler Bug Hunt - jjuhl
http://ithare.com/c17-compiler-bug-hunt-very-first-results-12-bugs-reported-3-already-fixed/
======
userbinator
Basically compiler fuzzing. I'm not surprised that bugs were found.

 _Recently, I have run into quite a few issues with different C++17 compilers
(actually, I found that none of the compilers-I-tried is really C++17
compliant yet);_

IMHO the fact that the spec is so complex that it is near impossible to
implement it correctly should be a big hint, yet people seem very eager to
continually stuff more features into the language, which can interact with all
the other features in complex ways.

~~~
blattimwind
In a recent project the juniors pushed for C++17 use; I've never seen so many
code comments about compiler bugs in a single project that size. It targets
only two platforms using GCC and clang.

This is not to say that compiler developers do a bad job; however, don't
expect complex language revisions to be production grade from the get-go.

~~~
ahartmetz
Don't go too far, or you'll get...

auto i = { 1 };

~~~
loup-vaillant
Wait, is that an integer, or an array? Serious question, with initialiser
lists I'm not sure any more.

~~~
claudius

        auto i = {5};
    

is a std::initializer_list<int>, whereas

    
    
        auto i{5};
    

is an int (as of C++17):
[https://godbolt.org/g/eXXN3o](https://godbolt.org/g/eXXN3o)

See also [https://stackoverflow.com/questions/25612262/why-does-
auto-x...](https://stackoverflow.com/questions/25612262/why-does-
auto-x3-deduce-an-initializer-list) .

~~~
ddavis
If you change the compiler version (to e.g. gcc7) your blurb compiles in
C++14.

------
wyldfire
This article is interesting, but its links to the GH project [1] appear to be
mishandled somehow because they link to the article itself.

[1] [https://github.com/ITHare/kscope](https://github.com/ITHare/kscope)

------
0xFFC
One genuine question, is it possible for C++ committe to push for a simpler
language by depracating features? Or this policy would have disastrous effect
on the community?

~~~
tlb
Tools for automatically updating source code would be a good thing. It'd allow
removing old compatibility features, and save time modernizing code bases.
Python did it with 2to3.

~~~
atso
You have clang-tidy:

[https://www.kdab.com/clang-tidy-part-1-modernize-source-
code...](https://www.kdab.com/clang-tidy-part-1-modernize-source-code-
using-c11c14/)

------
friendlydude12
What did I just read?

~~~
lysium
I had a hard time understanding the post, too.

AFAICS, kaleidoscope produces random code (which does nothing meaningful) that
should compile. Then, they feed the random code into the C++ compilers Clang,
gcc, and MSVC. The random code triggers bugs in the compilers, which are
summarized in the post.

Actually, they don't feed the random code, but kaleidoscope uses the template
system to "directly" produce randome code.

~~~
friendlydude12
I wish there were more technical details on kaleidoscope. Just seems like lots
and lots of borderline-meaningless high-level overview.

------
pubby
I recall being impressed the last few times I submitted bug reports to GCC.
They were really on top of their game.

------
stinos
While this is a fairly interesting article and that code is an interesting
piece of work as well, I found it a hard read solely because of the way it's
presented. The bunnies, the big bold text in between the other text, the oh-
so-slight difference in font size to indicate different headings (I think?),
nested bullet points with sometimes only one entry in a level, making me
wonder why there even is a bullet. Oh and I like humor, but those Job
title/Hobbies entries, the <wink/sadface/whatever/>, I don't know, it's like
everything but funny to me? Mainly distracting.

~~~
gameswithgo
It is pretty normal that people will bikeshed about blog format on the
internet, because people often don't have the technical chops to talk about
the content, but why is it that these bikeshed comments get upvoted here?

~~~
stinos
I'm fairly sure I do have the technical chops to talk about the content, being
very used to C++ in all it's glory, but I don't have much to add to the
article: once broken down to it's intent/meaning, it's clear to me what it's
about and why the code is useful. Which is why I said it's an interesting
article. And why I upvoted the post.

That being said, to address your concern: this is HN, where in my experience
pretty much anything can get discussed, and not-so-topnotch blog formats is
one of those things. Upvotes in this case simply mean others have the same
feeling with regards to the general readability of the article. Also note
that, as far as I recall, there has been more than one post - not just comment
- on HN exactly about this: conveying information in a proper manner is an
important aspect of the internet in general. Not just bikeshedding. Even more
so for technical stuff, imo.

------
dmead
Is this a stand up fight sir?

