-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Error with _min and _max macro #7244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The new code in 2.6.3 is better than before (macro arguments can be reevaluated and this is bad). Until we have gcc9.3, I suggest you add this in your code :
Alternatively you can try alpha version 0.0.2 of this core that already has gcc9.3. |
thanks, I'll try |
For user code, it is strongly advised to use std::max/std::min, and not the macros. |
@warnerthuis did you try the std min/max? |
sorry for not mentioning that I used successfully the std min/max aproach. I was too busy with other projects (node-red). It works now in the new version. |
Wanted to leave a comment to follow-up here. Oddly enough there is a comment saying that 'min' may fail so they used _min instead. pionting to this issue #263 At this point in time with 3.0.2 version of the esp8266 code I get So I modified the code in the DMXInputNeoPixel demo to use 'min' instead of '_min' and it compiles fine. |
Basic Infos
Platform
Settings in IDE
Error with _min and _max macro
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:
Now in version 2.6.3 the definition is:
And the errors are:
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: