Veckans Kodsnack är här: Tobias diskuterar en tillräckligt mystisk bugg han jagat ifatt, och berättar på vägen om register och vektorisering.
https://kodsnack.se/655/, och överallt där poddar finns. #podcast #llvm #clang #kompilator
Very interesting video about UB (undefined behavior) in low level languages, C++, C, Rust,...
It is not black and white if you want to have performance.
Interesting viewpoint: optimizers are key to write expressive code, i.e. readable code, that produces fast binaries. But: then the compiler's optimizer requires assumptions. This leads to UB.
#DevLog: #Anklang Binding Migration
Trying to base the C++ <-> JSON bindings on `#clang -extract-api` instead of castxml
Have prototype code for #JSON call dispatching
Atm fighting #CPlusPlus template specializations for member func with and w/o const
The ultimate goal is to make the bindings type safe with #Typescript wrappers
I have just set the first video public from our #LLVM #Meetup in #Darmstadt.
Expect to see more and more videos coming online as we bring online all our recordings.
Check it out: Sebastian Kreutzer - Selective Instrumentation with XRay [LLVM Meetup Darmstadt]
https://youtu.be/bgWWzA3n3Jk
CLion 2025.2 Is Here: Better CLion Nova, Smarter Embedded Development
#Clang #CLion #News #Releases #Aiassistant #Clionnova #Debugservers #Esp32 #Livewatches #Release
https://blog.jetbrains.com/clion/2025/08/clion-2025-2-release/
Optimization in action!
After fine-tuning core layers in MocaccinoOS (with selective -O3, clang, LTO, and --gc-sections), Geekbench scores improved significantly on my Ryzen 5 5600:
Single-core: +7.1%
Multi-core: +7.6%
From 2026 → 2169
From 8877 → 9552
Not bad for just smarter builds!
#Linux #Gentoo #MocaccinoOS #Optimization #Geekbench #clang #LTO
And I'm not done yet.
"C is a high level language based on an earlier language called B...It is designed to run under the Unix operating system (also designed and written by these people)" BYTE from Oct 1977 introduced readers to the C programming language
#Clang
Via @unix_byte
[RFC] 編譯器強化模式 - Clang 前端
➤ 為了更安全的 C/C++ 程式碼:Clang 編譯器強化模式構想
✤ https://discourse.llvm.org/t/rfc-hardening-mode-for-the-compiler/87660
本文提出在 Clang 編譯器中引入一個「強化模式」,旨在整合並簡化現有的多項安全與資安相關設定,以提升 C/C++ 程式的安全性。作者認為現有強化機制分散且文件不足,難以被使用者有效利用。新的強化模式將統一啟用多種編譯選項(如 -f, -m, -W 旗標)及預定義巨集,並可能要求使用較新的語言標準。文中探討了幾種實施方式,包括透過設定檔、新的驅動模式或單一綜合旗標,並尋求社羣對方向的建議。
+ 這個提議太棒了!長久以來都覺得 Clang 的安全設定很分散,希望這個強化模式能讓大家更容易寫出安全的程式碼。
+ 我比較擔心「使用者預期」的部分。如果啟用強化模式導致原本能編譯的程式碼突然不能編譯,使用者會不會有很大的意見?不過為了資安,這或許是必要的取捨。
#編譯器 #安全 #C++ #Clang #LLVM
Okay, pet used #clang. But how about #gcc ? Will #stringzilla show its full potential given that warnings were related to GCC options?
Nope! Well, it's better now, only 0.068s vs 0.1s but the standard library is still superior: 0.02s.
Never trust humans who say their product is 10x faster.
Why 10? Not 9 nor 11?
Because 10 sells best.
I like to think of Arch Linux in the same way the C programming language gives you the freedom to royally screw things up if you don't know what you're doing, and NixOS in the same way that the Rust programming language provides safety to prevent you from easily making stupid mistakes.
Tính năng 'Phân tích An toàn Vòng đời' (Lifetime Safety Analysis) thử nghiệm ban đầu cho C++ đã được triển khai (-Wexpe). Điều này hứa hẹn sẽ giúp các lập trình viên C++ tránh được nhiều lỗi phổ biến liên quan đến quản lý bộ nhớ và con trỏ, làm cho mã nguồn an toàn và đáng tin cậy hơn.
#Cplusplus #Programming #Safety #SoftwareDevelopment #LLVM #Clang
#LậpTrình #NgônNgữCộngCộng #AnToànPhầnMềm #PhânTíchMã
https://discourse.llvm.org/t/announcing-the-lifetime-safety-breakout-group/87333
What I want vs what clang-format produces T_T
(No this can't be fixed, none of the 1000000 config options covers useful things, this is a whining post not a request for help. Unless you're a developer on clang-format you can't help me configure it, many have tried)
What do OpenBSD people use for static analysis of C code?
Valgrind was available for a while but it seems to have been removed now
Apparently there is something called the "Clang Static Analyzer", but I'm not sure how to actually use it (it seems you have to compile your program with specific Clang flags?)
I know there are countless other bugs in my code, but its nice to see "no leaks detected" when I do some stupid shit with void pointers :)
c/c++ devs of fediverse, what does your debugging workflow look like? I've used gdb manually a bit but it's quite laborious to set up each session. I need to be able to do step-through debugging with variable inspection.
[VS]Code and studio are very good for step through debugging once they're set up, but I'd rather avoid them altogether if possible, especially since you have to jump through a series of flaming hoops to get c debugging working in the non-telemetry open source version of code.
Any/all suggestions appreciated, other than 'use rust' #programming #clang #cpp