This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28379D: printf 'z' specifier doesn't work with size_t

Part Number: TMS320F28379D


Tool/software: TI C/C++ Compiler

The following code outputs a 'u' instead of the correct size:

size_t numOctets = (sizeof(MACAddress)/sizeof(uint16_t));
printf("numOctets = %zu\n", numOctets);

I believe this is the correct method to output a size_t type via printf.

Kindly,

Graham