Skip to content
Commit eb7848a1 authored by Thiago Macieira's avatar Thiago Macieira Committed by Andrew Boie
Browse files

libc: Make no-debug assert() conform to C requirements



The C standard requires assert() to be a void result, so you
could write something like:

  return assert(x), x;

From the C11 standard (7.2 Diagnostic <assert.h>):
> If NDEBUG is defined as a macro name at the point in the source file
> where <assert.h> is included, the assert macro is defined simply as
>    #define assert(ignore) ((void)0)

Signed-off-by: default avatarThiago Macieira <thiago.macieira@intel.com>
parent f677caef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment