Menu

#PointEr

72 posts

Feed·
20 of 72 posts
📰
0

Type Punning in C and C++

Personal Workflow Blog·Steve SCHNEPP·14 days ago
#jOhbkBak
#type#union#float#pointer#types#article

I had a bug that took me a while to track down. The problem was type punning. A pointer cast worked fine at -O0 and silently broke at -O2. The C vs C++ distinction here is genuinely treacherous, and most blog posts on the topic get it wrong.

15s
Read More
A generic dynamic array in C that stores no capacity and needs no struct
📰
21

A generic dynamic array in C that stores no capacity and needs no struct

Hacker News·4 months ago
#daGtYxsC
#gist#array#length#dynamic#pointer#power

A generic dynamic array in C that stores no capacity and needs no struct - README.md

15s
Read More