Quantcast
Channel: Is &*NULL well-defined in C? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by ad absurdum for Is &*NULL well-defined in C?

While attempts to dereference a null pointer cause undefined behavior, so *nullPtr is illegal, &*nullPtr is perfectly well-defined. According to footnote 102 in the C11 Draft Standard:Thus, &*E...

View Article


Is &*NULL well-defined in C?

In what version(s) of the C standards (if any) is the following well-defined?void foo(void) { char *nullPtr = NULL;&*nullPtr;}Note that I am not assigning the result to anything - the second line...

View Article
Browsing latest articles
Browse All 2 View Live