126
11
127
12
6 usability improvements in GCC 15 (developers.redhat.com)
submitted 1 year ago by cm0002@lemmy.world to c/cpp@programming.dev

I work at Red Hat on GCC, the GNU Compiler Collection. I spent most of the past year working on how GCC emits diagnostics (errors and warnings) in the hope of making it easier to use. Let's take a look at 6 improvements to look forward to in the upcoming GCC 15.

  1. Prettier execution paths
  2. A new look for C++ template errors
  3. Machine-readable diagnostics
  4. An easier transition to C23
  5. A revamped color scheme
  6. libgdiagnostics
128
11
submitted 1 year ago by uridl@feddit.org to c/cpp@programming.dev

I am trying to calculate a motor position from an encoder, however that does not really matter. I just checked godbolt.org to see if my inline function compiled into a single multiplication and was pretty disappointed that it didn't. I used -O3 for maximum optimization.

Does somebody know why it does not compile into a single function, or what I had to change to achieve that? You can find my code here: https://godbolt.org/z/qT9srfPT1 .

I know that it does not really matter, but I am curious.

129
10

The most important security benefit of software memory safety is easy to state: for C and C++ software, attackers can exploit most bugs and vulnerabilities to gain full, unfettered control of software behavior, whereas this is not true for most bugs in memory-safe software—just a few

130
9

This is a status update on improvements currently in progress for hardening and securing our C++ software.

131
6
132
8
133
7
First Look at Hazard Pointers (2021) (melodiessim.netlify.app)
134
37

Bjarne Stroustrup, creator of C++, has issued a call for the C++ community to defend the programming language, which has been shunned by cybersecurity agencies and technical experts in recent years for its memory safety shortcomings.

135
8

On Saturday, the ISO C++ committee completed the second-last design meeting of C++26, held in Hagenberg, Austria. There is just one meeting left before the C++26 feature set is finalized in June 2025 and draft C++26 is sent out for its international comment ballot (aka “Committee Draft” or “CD”), and C++26 is on track to be technically finalized two more meetings after that in early 2026.

136
8
137
6

It is now 45+ years since C++ was first conceived. As planned, it evolved to meet challenges, but many developers use C++ as if it was still the previous millennium. This is suboptimal from the perspective of ease of expressing ideas, performance, reliability, and maintainability. Here, I present the key concepts on which performant, type safe, and flexible C++ software can be built: resource management, life-time management, error-handling, modularity, and generic programming. At the end, I present ways to ensure that code is contemporary, rather than relying on outdated, unsafe, and hard-to-maintain techniques: guidelines and profiles.

138
8
submitted 2 years ago* (last edited 2 years ago) by Emperor@reddthat.com to c/cpp@programming.dev

I've tried a few tools like cloc to count the lines of code within my cpp project.

However, they are pretty surface level and just count the lines.

Is there anything that is able to show how many lines are for classe, imports, simple aliases, typedefs, and more detailed info like that.

My codebase is using C++ 20 modules and a lot of it is just imports and namespace aliases, so just counting the lines is pretty inaccurate. A lot of the files are simply just 10-20 lines at the header for imports, etc, and then just a small child class with constructors.

Which is to say that it's >50% "filler" in a lot of files.

If anyone knows any tools for this, ideally FOSS, please let me know. Thanks!

139
9

With P2900, we propose to add contract assertions to the C++ language. This proposal is in the final stages of wording review before being included in the draft Standard for C++26.

140
5
C++ Working Draft Search (wg21.cmeerw.net)

Full-text search engine for the C++ Working Draft (and older versions from Tim Song's repository)

141
15
Why I’m learning C++ (oldmoney.pattmayne.com)
142
1

(Only half joking with the poll options, too.)

143
9

On Saturday, the ISO C++ committee completed the third-last design meeting of C++26, held in Wrocław, Poland. There are just two meetings left before the C++26 feature freeze in June 2025, and C++26 is on track to be completed two more meetings after that in early 2026. Implementations are closely tracking draft C++26; GCC and Clang already support about two-thirds of C++26 features right now.

144
-10
submitted 2 years ago by Busyvar@jlai.lu to c/cpp@programming.dev

Hello C++ folks, i read this article about interoperability of those languages and wonder what is your opinion about interoperability initiatives.

Do you think it's a good opportunity to acquire Rust libraries and promote use of Cpp ones to a larger audience?

Or instead you think it's a crab conspiracy to promote RIIR (Rewrite It In Rust) strategy?

Thanks in advance

145
15
submitted 2 years ago* (last edited 2 years ago) by bunitor@lemmy.eco.br to c/cpp@programming.dev

i've been playing with cppfront for a few minutes now and it's been a surprisingly pleasant experience so far. i'm tempted to try it out at work to see what happens, but i wanna know if anyone tried to use it in production and what your experiences are

for those who haven't heard of it, cppfront is a cpp2 to c++ compiler, a bit like coffeescript for js. cpp2 is herb sutter's proposal of a new and cleaner c++ syntax with better ergonomics, better orthogonality, and better defaults

146
9
Cpplint 2.0.0 (github.com)

First release of the checker against Google's style guide in over 2 years. Python 2 and 3.7 are no longer supported. Python 3.12 support was added along with fixed CI for 3.8. See CHANGELOG.rst for a full changelog, including quite a bit of features not mentioned here.

147
2
148
7
149
5
150
2
view more: ‹ prev next ›

C++

2365 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 3 years ago
MODERATORS