‹ BackHN Continuity

Thread

Type Punning in C and C++

36 points · 23 comments · ingve

  1. eqvinox · · focus · HN ↗
    The example included below "Why C and C++ Differ" is UB in both C and C++ (and says nothing about "why" C & C++ differ). The article isn't overall wrong but that bit is just...

    (Feels a bit like LLM junk, but honestly not sure.)

    1. LoganDark · · focus · HN ↗
      > A pointer cast worked fine at -O0 and silently broke at -O2.

      Feels like LLM to me. I looked at some of the rest of the article and... pretty much certain now.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.