Skip to content

Zero min() and max functions don't compile #10

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

Closed
wholder opened this issue Jun 21, 2015 · 2 comments
Closed

Zero min() and max functions don't compile #10

wholder opened this issue Jun 21, 2015 · 2 comments
Milestone

Comments

@wholder
Copy link

wholder commented Jun 21, 2015

Trying to compile code like this on the Zero:

int test = min(1,2);

results in "error: 'min' was not declared in this scope
'min' was not declared in this scope". Same problem for max().

Note: tested on 1.6.5 running on OS X.

cmaglie added a commit to cmaglie/ArduinoCore-samd that referenced this issue Jun 22, 2015
It seems that

   #include <stdint.h>

is able to undef "min" and "max" previously defined. With this
commit we make sure that they are defined as last.

Fix arduino#10
@cmaglie
Copy link
Member

cmaglie commented Jun 22, 2015

There is indeed a problem with min and max, in #12 there is a possible solution.

@wholder
Copy link
Author

wholder commented Jun 22, 2015

Since this issue seems to resides in code now managed by the Boards Manager, what steps will be needed to update once the changes make their way into an hourly build? Will just getting the correct hourly build take care of it, or will I additionally need to use the Boards Manager to update the same core code?

Wayne

cmaglie added a commit to cmaglie/ArduinoCore-samd that referenced this issue Jun 24, 2015
It seems that

   #include <stdint.h>

is able to undef "min" and "max" previously defined. With this
commit we make sure that they are defined as last.

Fix arduino#10
@cmaglie cmaglie modified the milestone: Release 1.6.1 Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants