this file causes a compile-error if you try to include it
packages\esp32\hardware\esp32\2.0.16\cores\esp32/core_version.h:2:32: error: too many decimal points in number
same file same error in the core_version.h for ESP8266
How should it cause problems if the file is not even compilable as an include-file?
The only reason I can think of that this could happen would be that the build tool uses a header-file for some completely different purpose than source-code!
Something like the toolchain is reading in this file not for compiling but for using the number with decimal points for a different purpose. And then why for heavens sake Why does it have to have the file extension .h ?
I see this as a misuse of the file-extension *.h
The code compiled with the modification adding double-hyphens.
#define ARDUINO_ESP8266_VERSION "3.1.2"
If this is causing any failure at runtime it is even worse
Of course it can be compiled, it contains valid #define macros. I should have asked ... is that macro used in any other files as part of a conditional compilation sequence??? You'll find that frequently with the "__cplusplus" macro that defines the version of C++ being compiled. Lot's files contain constructs such as:
So, the code in between will only be compiled you're using C++ 2011 or later.
I don't know if that's the case with your ARDUINO_ESP32_RELEASE macro. But, my point was that if you don't know, you shouldn't mess with it by redefining is.
C:\Arduino-Pure-Portable\arduino-1.8.19\portable\packages\esp32\hardware\esp32\2.0.16\cores\esp32/
core_version.h:2:32: error: too many decimal points in number
#define ARDUINO_ESP32_GIT_DESC 2.0.16
^~~~~~
C:\Arduino-Pure-Portable\arduino-1.8.19\portable\sketchbook\ESP32-S3-ESPUI-WebSPro-elOTA-UDP-Msg-Para-006\
ESP32-S3-ESPUI-WebSPro-elOTA-UDP-Msg-Para-006.ino:206:18: note: in expansion of macro 'ARDUINO_ESP32_GIT_DESC'
FileInfo_SS += ARDUINO_ESP32_GIT_DESC;
So it seems that the SafeString-library or the compiler interprets the character-sequence 2.0.16 as a float and then complains about too many decimal-points.