Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4157

General • Re: How to report compile time values ?

$
0
0
I sometimes use this old trick to find the size of a complex structure at compile time:

Code:

// Trick to find struct size at compile time:char (*__kaboom)[sizeof(my_t)] = 1; // warning: initialization of 'char (*)[132]' from 'int' makes ...
Maybe you could use a variation of that?

Statistics: Posted by carlk3 — Sun Mar 24, 2024 8:18 pm



Viewing all articles
Browse latest Browse all 4157

Trending Articles