The fact that safe language implementations have to think hard about how to handle null pointer exceptions safely should have been a warning sign that null pointers are a bad thing to have in a language. Sadly nearly always unheeded.
-
-
Functions can’t. Unless you pass a flag allowing it. Data symbols can’t either. Anything with a name has storage. Function pointers can, same way data points can.
-
I guess I never really thought of functions as having a type other than their pointer types. But I suppose it’s one of those “arrays decay into pointers” things, right?
- 1 more reply
New conversation -
-
-
Yes they can be null in c
-
Someone should tell GCC and clang https://godbolt.org/z/Ju2OaT
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
