L
Leo
Hi @ all.
I looked up the implementation of the assert macro of my compiler
(MinGW), because I wanna write my own assert.
I found this:
#define assert(x) ((void)0)
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
My question is: Do the outer brackets have any reason? If yes, which?
Is this not equivalent to the above code?:
#define assert(x) (void)0
#define assert(e) (e) ? (void)0 : _assert(#e, __FILE__, __LINE__)
I looked up the implementation of the assert macro of my compiler
(MinGW), because I wanna write my own assert.
I found this:
#define assert(x) ((void)0)
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
My question is: Do the outer brackets have any reason? If yes, which?
Is this not equivalent to the above code?:
#define assert(x) (void)0
#define assert(e) (e) ? (void)0 : _assert(#e, __FILE__, __LINE__)