News for hackers. Stuff that matters.
Re:Scandalous Weird Old Things About The C Preprocessor (2015) by rwmj on Tuesday May 30, 2017 @09:23AM (#14445133)
[The scandal isn't that we're still using it?]

I actually used the fact that:

    #define return(r) ...
only expands for:

    return (something);
and not for:

    return something;
in a (non-serious non-production) program I wrote. I felt slightly dirty, but it made sense in the context -- tracking stack frames in order to do precise garbage collection of C code.
Re:Scandalous Weird Old Things About The C Preprocessor (2015) by naasking on Tuesday May 30, 2017 @10:27AM (#14445596)
That sounds interesting. Any links or a further description?
Re:Scandalous Weird Old Things About The C Preprocessor (2015) by rwmj on Tuesday May 30, 2017 @11:08AM (#14445876)
Not anything released yet, but the idea is not new. I stole it from OCaml (possibly it came from elsewhere before that): https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html#sec42...
Re:Scandalous Weird Old Things About The C Preprocessor (2015) by naasking on Wednesday May 31, 2017 @11:41AM (#14453356)
Ah, I was thinking it might be a more complex series of tricks to integrate GC more easily with C. For instance, redefining some C keywords, like 'return', to inject a prologue for freeing tagged locals or something.