News for hackers. Stuff that matters.
Re:Maximal Min() and Max() by wahern on Friday August 09, 2024 @12:28AM (#41198766)
Compound literals are especially pernicious[1] because GCC and (I think) clang support them in C++ mode, but they have expression lifetime like C++ temporary objects, not block lifetime as in C. That's a guaranteed recipe for dangling pointers and stack smashing/snooping.

[1] From a C++ is just a C superset perspective. In C compound literals are awesome.

There are no comments on this comment yet.