PlatformIO Community

Problem with AutoCompletion


#1

For some reason autocomplete is crashing with clang 3.9.0, Errors in the console are as follows:

In file included from :1:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266\Arduino.h:27:
In file included from C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:18:
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:185:36: error: C++ requires a type specifier for all declarations
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:185:44: error: C++ requires a type specifier for all declarations
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:187:36: error: C++ requires a type specifier for all declarations
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:187:45: error: C++ requires a type specifier for all declarations
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:189:20: error: C++ requires a type specifier for all declarations
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
^

clang-provider.coffee:45 C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:189:28: error: C++ requires a type specifier for all declarations
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:190:16: error: C++ requires a type specifier for all declarations
int _EXFNPTR(_close, (struct _reent *, _PTR));
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:190:25: error: C++ requires a type specifier for all declarations
int _EXFNPTR(_close, (struct _reent *, _PTR));
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:597:17: error: C++ requires a type specifier for all declarations
void _EXFNPTR(__cleanup, (struct _reent *));
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\sys/reent.h:597:29: error: C++ requires a type specifier for all declarations
void _EXFNPTR(__cleanup, (struct _reent *));
^

clang-provider.coffee:45 In file included from :1:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266\Arduino.h:36:
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/stdlib_noniso.h:29:5: error: conflicting types for 'atoi’
int atoi(const char *s);
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:70:12: note: previous declaration is here
int _EXFUN(atoi,(const char __nptr));
^
In file included from :1:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266\Arduino.h:36:
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/stdlib_noniso.h:31:6: error: conflicting types for 'atol’
long atol(const char
s);
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:72:13: note: previous declaration is here
long _EXFUN(atol,(const char __nptr));
^
In file included from :1:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266\Arduino.h:36:
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/stdlib_noniso.h:33:8: error: conflicting types for 'atof’
double atof(const char
s);
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:66:15: note: previous declaration is here
double _EXFUN(atof,(const char *__nptr));
^

clang-provider.coffee:45 In file included from :1:
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:192:5: error: conflicting types for 'atexit’
int atexit(void (func)()) attribute((weak));
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:65:12: note: previous declaration is here
int _EXFUN(atexit,(_VOID (
__func)(_VOID)));
^

clang-provider.coffee:45 In file included from :1:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:240:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\cores\esp8266/pgmspace.h:12:
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\tools\sdk\include\ets_sys.h:160:91: warning: unknown attribute ‘alloc_size’ ignored [-Wunknown-attributes]
void pvPortMalloc(size_t xWantedSize, const char file, int line) attribute((malloc, alloc_size(1)));
^
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\tools\sdk\include\ets_sys.h:161:95: warning: unknown attribute ‘alloc_size’ ignored [-Wunknown-attributes]

clang-provider.coffee:45 void pvPortRealloc(void ptr, size_t xWantedSize, const char* file, int line) attribute((alloc_size(2)));
^
C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\tools\sdk\include\ets_sys.h:168:5: error: conflicting types for 'atoi’
int atoi(const char *nptr);
^
C:\Users\huhlig.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\stdlib.h:70:12: note: previous declaration is here
int _EXFUN(atoi,(const char *__nptr));
^

clang-provider.coffee:45 In file included from :3:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src\ESP8266WiFi.h:34:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\functional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xfunctional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdlib:5:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h:7:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xkeycheck.h:250:5: error: The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
#error The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
^

clang-provider.coffee:45 In file included from :3:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src\ESP8266WiFi.h:34:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\functional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xfunctional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdlib:5:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\crtdefs.h:9:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h:45:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\sal.h:2381:1: error: unknown type name 'EMIT’
extern “C” {
^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xkeycheck.h:196:19: note: expanded from macro ‘extern’
#define extern EMIT WARNING C4005
^

clang-provider.coffee:45 In file included from :3:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src\ESP8266WiFi.h:34:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\functional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xfunctional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdlib:5:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\crtdefs.h:9:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h:45:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\sal.h:2381:1: error: expected ‘;’ after top level declarator
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xkeycheck.h:196:32: note: expanded from macro ‘extern’
#define extern EMIT WARNING C4005
^

clang-provider.coffee:45 In file included from :3:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src\ESP8266WiFi.h:34:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:
In file included from C:\Users\huhlig.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\functional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xfunctional:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdlib:5:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h:8:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\crtdefs.h:10:10: fatal error: ‘corecrt.h’ file not found
#include <corecrt.h>
^

clang-provider.coffee:45 2 warnings and 19 errors generated.


#2

Please switch to PlatformIO IDE for VSCode.