]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Replace ALLOC_STRUCT with specialized macros.
authorNick Bowler <nbowler@draconx.ca>
Mon, 24 Jul 2023 23:57:56 +0000 (19:57 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 28 Jul 2023 04:20:58 +0000 (00:20 -0400)
While there is some appeal to this generic "do everything" macro,
it depends on a bunch of modern C syntax (variadic macros, compound
literals, designated initializers) which is not always correctly
implemented.  We've already had to work around at least one compiler
bug in the code directly related to this macro.

Using specialized macros for each kind of allocation works better
on older implementations, and moreover we seem to get more compact
code out of modern ones too, probably because compound literals
initialize all members and we don't always need that.


No differences found