You are reading a single comment by @Kolban and its replies. Click here to read the full conversation.
  • I had hashes and underscores .... but the forum ate them ... :-) However ... here is exactly the error I get without guarding:

    xtensa-lx106-elf-gcc -Wall -Wextra -Wconversion -Werror=implicit-function-declaration -std=gnu99 -fno-builtin -Wno-maybe-uninitialized -Wno-old-style-declaration -Wno-conversion -Wno-unused-variable -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-discarded-qualifiers -Wno-float-conversion -Wno-parentheses -fno-strict-aliasing -Wno-type-limits -Wno-unused-function -Wno-unused-value -Wno-implicit-function-declaration -Wpointer-arith -Wundef -Werror -Wl,EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ETS__ -DICACHE_FLASH -Os -c -DUSE_MATH -DEMBEDDED -DXTENSA -IC:/Git/esp8266-espurino/espruino -IC:/Git/esp8266-espurino/espruino/targets -IC:/Git/esp8266-espurino/espruino/src -IC:/Git/esp8266-espurino/espruino/gen -IC:/Git/esp8266-espurino/espruino/libs/math -IC:/Users/IBM_ADMIN/Documents/RaspberryPi/ESP8266/libs/esp_iot_sdk_v1.3.0_15_08_08/esp_iot_sdk_v1.3.0/include -IC:/Git/esp8266-espurino/espruino/targets/esp8266 -IC:/Git/esp8266-espurino/espruino/libs/network/ESP8266WiFi -DUSE_MATH -DEMBEDDED -DXTENSA src/jsnative.c -o src/jsnative.o
    src/jsnative.c: In function 'jsnCallFunction':
    src/jsnative.c:93:5: error: "__WORDSIZE" is not defined [-Werror=undef]
     [#if](https://forum.espruino.com/search/?q=%23if) __WORDSIZE == 64
         ^
    cc1.exe: all warnings being treated as errors
    Makefile:1348: recipe for target 'src/jsnative.o' failed
    mingw32-make: *** [src/jsnative.o] Error 1
    

    Note that the forum is "eating" the "#if"

    I also just noticed ... that we can probably choose how "undef" conditions are handled ... so the question probably becomes not one of "which is correct" rather "what levels of compliance to the language" do we wish to have the compiler compile to.

    See also:
    http://stackoverflow.com/questions/25379300/preventing-undefined-macro

About

Avatar for Kolban @Kolban started