6 ms·
GCC 16 considering changing default to C++20
- jjmarr 1y agoGood. Let me use modules!
- 1718627440 1y agoYou can always specify the language version in your compiler invocation.
- albertzeyer 1y ago> Presumably we still wouldn't enable Modules by default.
- whobre 1y agoSeriously, why? They are broken. https://vector-of-bool.github.io/2019/01/27/modules-doa.html https://vector-of-bool.github.io/2019/01/27/modules-doa.html
- suby 1y agoThis is from 2019, prior to the finalization of modules in the standard. I'd be interested in how many of these issues were unaddressed in the final version shipped.
- Maxatar 1y agoThere isn't much of a final version shipped. It's pretty well understood that modules are underspecified and their implementation across MSVC, clang, and GCC is mostly just ad-hoc based on an informal understanding among the people involved in their implementation. Even ignoring the usual complexity and ambiguity of the C++ standard, modules are on a whole different level in terms of lacking a suitable formal specification that could be used to come close to independently implementing the feature. And this is ignoring the fact that none of GCC, clang, or MSVC have a remotely good implementation of modules that would be worth using for anything outside of a hobby project. I agree with the other commenter who said modules are a failure of a feature, the only question left is whether the standards committee will learn from this mistake and refrain from ever standardizing a feature without a solid proof of concept and tangible use cases.
- pjmlp 1y agoToday I learnt that Office is an hobby project.
- Maxatar 1y agoYou learned nothing because the extent of your knowledge tends to be rather superficial when it comes to C++. Office does not use C++ modules, what Office did was make use of a non-standard MSVC feature [1] which reinterprets #include preprocessor directives as header units. Absolutely no changes to source code is needed to make use of this compiler feature. This is not the same as using C++20 modules which would require an absolutely astronomical amount of effort to do. In the future, read more than just the headline of a blog post if you wish to actually understand a topic well enough to converse in it. [1] https://learn.microsoft.com/en-us/cpp/build/reference/translateinclude?view=msvc-170 https://learn.microsoft.com/en-us/cpp/build/reference/transl...
- pjmlp 1y agoMy dear, I have written more C++20 modules code than you ever will. Feel free to roam around on my Github account. Also go read the C++ mailings regarding what is standard or not in modules.
- CyberDildonics 1y agoYou should get in there and put all your expertise to work.
- Maxatar 1y agoI did prior to 2017. I realized the committee was 75% politics and people with a lot of time and devotion pushing their pet projects, and about 25% about addressing actual issues faced by professional engineers and decided it was no longer worth the time and effort and money. The committee is full of very smart and talented people, no dispute about that, but it's also very silo'd where people just work on one particular niche or another based on their personal interests, and then they trade support with each other. In discussions it's almost never the case that features are added with any consideration towards the broader C++ audience.
- forrestthewoods 1y agoModules will never been commonly used in C++. It’s a failed feature.
- dmix 1y agoThat anime gating is very jarring, thought I clicked on the wrong link and clicked back.
- NegativeK 1y agoAnubis has been around for almost a year now, but it's also not particularly relevant to the content of the email thread.
- veltas 1y agoIt's particularly jarring to basically every site I've seen it on which is usually some serious and professional looking open source site. I wonder why nobody configures this, is this not something that they can configure themselves to a more relevant image, like the GCC logo or something?
- 3836293648 1y agoBecause that's the difference between the paid and free versions
- 1718627440 1y agoI think they might also want to bring attention to the problem and advertise for an open-source solution.
- maleldil 1y agoAnubis is open-source (MIT).
- Tyr42 1y agoThat's the paid upgrade for "enterprise" level quality.
- andsoitis 1y agoAnubis asks that you don’t change the logo and if you want to, pay them: https://anubis.techaro.lol/docs/funding/ https://anubis.techaro.lol/docs/funding/
- withzombies 1y agoShouldn't the compilers be on the bleeding edge of the standards? What is the downside of switching to the newest standard when it's properly supported? It's the type of dog fooding they should be doing! It's one reason why people care so much about self-hosted compilers, it's a demonstration of maturity of the language/compiler.
- unclad5968 1y agoWell there are still some c++20 items that aren't fully supported, at least according to cppref. https://en.cppreference.com/w/cpp/compiler_support/20.html https://en.cppreference.com/w/cpp/compiler_support/20.html
- withzombies 1y agoYeah, I think it's because none of the compilers are obligated to support the standard and things get added that never get implemented. A good example is the C++11 standard garbage collection! It was explicitly optional but afiak no one implemented it. https://isocpp.org/wiki/faq/cpp11-library#gc-abi https://isocpp.org/wiki/faq/cpp11-library#gc-abi
- cogman10 1y agoThere's a bootstrapping process that has to happen to compile the compiler. Moving up the language standard chain requires that compilers compiling the compiler need to also migrate up the chain. So you can never be perfectly bleeding edge as it'd keep you from being able to build your compiler with an older compiler that doesn't support those bleeding edge features. Imagine, for example, that you are debian and you want to prep for the next stable version. It's reasonable that for the next release you'd bootstrap with the prior releases toolset. That allows you to have a stable starting point.
- rmu09 1y agoAren't they talking about the c++ dialect the compiler expects without any further -std=... arguments? How does that affect the bootstrapping process? This https://gcc.gnu.org/codingconventions.html https://gcc.gnu.org/codingconventions.html should define what C/C++ standard is acceptable in the GCC.
- secondcoming 1y agoThe coroutine convo is interesting. Does it mean that for example, a GCC program may not run correctly when linked to a clang binary and both use coroutines?
- cardiffspaceman 1y agoIn the last “big” shop I worked in, we were cross-compiling all production code. Each target device had an SDK that came with a GCC and a kernel tarball, inter alia. We had a standard way to set these up. We used C++03 for years. We decided to try C++11 for userland. All the compilers supported that and after some validation, we changed permanently. Neither before the change nor after, did we rely on the absence of a “—-std=“ command line option as the means of choosing the standard for C++ or even C. Of course we were all ADHD pedantic nerds so take this with a grain of salt.
- johnisgood 1y agoAnd I will continue using "-std=c99 -pedantic -Wall -Wextra" at all times (among other flags). :D