ESP8266 error with _min and _max macro in version 2.6.3

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:

#define _min(a,b) ((a)<(b)?(a):(b))
#define _max(a,b) ((a)>(b)?(a):(b))

Now in version 2.6.3 the definition is:

#define _min(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a < _b? _a : _b; })
#define _max(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a > _b? _a : _b; })

And the errors are:

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

#define _min(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a < _b? _a : _b; })

^

C:\Users\warner\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:255:53: note: in definition of macro '_max'

#define _max(a,b) ({ decltype(a) _a = (a); decltype(b) _b = (b); _a > _b? _a : _b; })

^
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 :

#ifdef ESP8266
#undef _min
#undef _max
//#define _min(a,b) ((a)<(b)?(a):(b))
//#define _max(a,b) ((a)>(b)?(a):(b))
#define _min(a,b) std::min(a,b)
#define _max(a,b) std::max(a,b)
#endif

Alternatively you can try alpha version 0.0.2 of this core that already has gcc9.3.