Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "#define assert(exp) ((void) 0)" do?

Tags:

c

assert

I came across this preprocessor definition while reading the source code in Windows Research Kernel (WRK) 1.2:

#define assert(exp) ((void) 0)

What does this code do? Why is it defined?

like image 528
Porco Avatar asked May 20 '09 03:05

Porco


People also ask

What does the fox say Meaning?

Speaking of the meaning of the song, Vegard characterizes it as coming from "a genuine wonder of what the fox says, because we didn't know". Although interpreted by some commentators as a reference to the furry fandom, the brothers have stated they did not know about its existence when producing "The Fox".

What does a real fox say?

One of the most common fox vocalizations is a raspy bark. Scientists believe foxes use this barking sound to identify themselves and communicate with other foxes. Another eerie fox vocalization is a type of high-pitched howl that's almost like a scream.

How can I identify a song by sound?

On your phone, touch and hold the Home button or say "Hey Google." Ask "What's this song?" Play a song or hum, whistle, or sing the melody of a song. Hum, whistle, or sing: Google Assistant will identify potential matches for the song.


1 Answers

It defines the expression assert(anything) to do nothing.

Presumably, the environment being used does not support the ANSI C assert statement, or the programmer was unaware of the fact that it could be disabled by defining NDEBUG.

like image 166
bdonlan Avatar answered Sep 22 '22 10:09

bdonlan