Skip to content

Commit

Permalink
sys: util: Document limitation of IS_EMPTY macro
Browse files Browse the repository at this point in the history
IS_EMPTY macro does not accept all type of arguments.
Added clarification.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
  • Loading branch information
nordic-krch authored and nashif committed Jul 9, 2020
1 parent fea4774 commit 16fa712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/sys/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,11 @@ uint8_t u8_to_dec(char *buf, uint8_t buflen, uint8_t value);
* to replacement lists being empty or containing numbers or macro name
* like tokens.
*
* @note Not all arguments are accepted by this macro and compilation will fail
* if argument cannot be concatenated with literal constant. That will
* happen if argument does not start with letter or number. Example
* arguments that will fail during compilation: .arg, (arg), "arg", {arg}.
*
* Example:
*
* #define EMPTY
Expand Down

0 comments on commit 16fa712

Please sign in to comment.