pfalcon / esp-open-sdk

Free and open (as much as possible) integrated SDK for ESP8266/ESP8285 chips
1.97k stars 623 forks source link

SCN macros are wrong #297

Open markrages opened 6 years ago

markrages commented 6 years ago

SCN macros (http://pubs.opengroup.org/onlinepubs/009695399/basedefs/inttypes.h.html) are wrong. This is causing annoying warnings in my scanf()s.

markrages@qountdown:~$ cat test.c
#include <inttypes.h>

#pragma message "SCNi32 = " SCNi32
markrages@qountdown:~$ xtensa-lx106-elf-gcc -c test.c
test.c:3:9: note: #pragma message: SCNi32 = li
 #pragma message "SCNi32 = " SCNi32
         ^

"li" means long int, which is 64 bits.

pfalcon commented 6 years ago

Did you see https://github.com/pfalcon/esp-open-sdk/issues/101 ?