News for hackers. Stuff that matters.
Re:Fixing C Strings by __d on Sunday December 22, 2024 @03:06PM (#42488703)
String literals are one place where the compiler implements the null-termination, so it is built-in in that sense.

As per the OP’s example, a wrapper macro like their STR can work around this.

Re:Fixing C Strings by Quis_sum on Sunday December 22, 2024 @10:08PM (#42491382)
I don't have an issue with the OP's example, which is quite nifty indeed, despite the penalties incurred.