forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toolchain: Add single arguments evaluation macros for min and max
MAX() and MIN() were evaluating arguments twice. If arguments are functions they were called twice which resulted in bigger code and potential misbehavior. Added alternative macros (Z_MAX, Z_MIN) which can be used instead. Macros have usage limitations thus they are not replacements. They are also relying on GCC extension thus placed in gcc.h Signed-off-by: Krzysztof Chruscinski <[email protected]>
- Loading branch information
1 parent
6768148
commit bea966d
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters