Post #2027340
2026-05-05 11:06 UTC
@thephd that looks cool! But I transcribed the initial example from my blog post into it, added identifiers that I'd have expected to fix the compile failure, and got some very strange error messages:
https://godbolt.org/z/6o77aGWE9
"'foo' declared as a pointer to a reference of type 'const char &'"? That looks like a weirdly C++ish error message for a compiler in C mode. Unless C++-style references are coming in C2y and I haven't heard? But even if that were true, it's not obvious to me how I accidentally introduced one in this code example.
Replies (1)
-
@thephd@pony.social 2026-05-10 18:51
@simontatham@hachyderm.io Yeah, that was a weirdly C++-ish error message; thanks for reporting. Seems like something got crossed in the parsing bit; I pushed a fix to the thephd.dev branch and it'll eventually reflect there. (Probably gotta wait until Monday midday to test again on Godbolt.) On the bright side, on my local branch it worked out just fine when I tested your code against the modified patch so that was nice.