3 ms·
Can you assure that your preprocessor tricks always generate compliant code? For me writing embedded code is the ultimate test for your programming skills, sin
by xondono 7y ago
Can you assure that your preprocessor tricks always generate compliant code?
For me writing embedded code is the ultimate test for your programming skills, since a lot of C toolchains for embedded devices (as in bare metal embedded) are unstable, only almost compliant and full of weird behaviors and hacks.
- cperciva 7y agoHere's an example: https://github.com/Tarsnap/libcperciva/blob/master/datastruct/elasticarray.h https://github.com/Tarsnap/libcperciva/blob/master/datastruc... As long as you invoke use it properly, e.g. ELASTICARRAY_DECL(PTRLIST, ptrlist, void *); there's no way it will create non-compliant code.