Post AjvuVwcHk8TPAMoRPs by leonerd@fosstodon.org
(DIR) More posts by leonerd@fosstodon.org
(DIR) Post #AjvuVwcHk8TPAMoRPs by leonerd@fosstodon.org
2024-07-14T20:50:37Z
0 likes, 0 repeats
In a #C function, empty statements are valid. So it's allowable to have a macro that expands to simply `;` if it shouldn't do anything. Are there equivalent things for struct members and initialisers?I want a macro that puts extra information into structs for debug purposes, but if debugging is disabled it should do nothing. That means the macro will be empty. But what empty thing can I put in the struct so the macro can still be followed by a semicolon or comma..?
(DIR) Post #AjvuVy2CTGnTZ1weRs by i@declin.eu
2024-07-14T20:59:04.085904Z
0 likes, 0 repeats
@leonerd whitespace, define a macro with no text, or nest macros and check with ifdef