I have code which uses the _max and the _min macro. They are in the Arduino.h library.
That compiles ok with version 2.4.0 of the library where the definition of the maro's is:
C:\Users\warner\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:254:85: internal compiler error: in cp_parser_abort_tentative_parse, at cp/parser.c:23793
^
What can be done to get rid of this error (I compile now on a pc which is on version 2.4.0)?
I am running Windows10, Arduino version 1.8.12.
copying the 2.4.0 version into the 2.6.3 file solves the problem.
This is a board manager install, not a manual one right? (if it is manual install, recheck that you don't also need to pull in new toolchain version or something)
This should go to the ESP library forums/support (assuming googling for it doesn't get you an answer), if code that previously compiled now causes an internal compiler error, that's a bug in the core (I mean, they have control over which compiler version gets pulled in!). Be sure to post sketch that demonstrates issue when you do that.
It looks like that was done to address some sort of ugly type safety stuff... but for some reason it's causing the compiler to choke and die. I wouldn't be surprised if it only manifested depending on the types passed to those macros or something (at least if other people aren't stumbling over it right and left)
answer on github:
The new code in 2.6.3 is better than before (macro arguments can be reevaluated and this is bad).
You can replace these macro by std::min and std::max but they may not be usable in other arduino archs.
An internal compiler error is hard to reproduce.
Until we have gcc9.3, I suggest you add this in your code :