News for hackers. Stuff that matters.
Re:GCC 13 Supports New C2x Features, Including Nullptr, Enha... by haileys on Monday May 15, 2023 @07:26PM (#35955917)
> Nullptr is needed in C++ because `0` is the only definition of `NULL` that works with the type system, due to the lack of implicit `void` conversions.*

> C doesn't have this problem.

Except for conversions between data pointers and function pointers ;)

Initialization seems to be a special case, but with `-pedantic` the following code will show a warning on the initialization of `fp2`:

    void* return_null() {
        return 0;
    }
    
    int main() {
        void(*fp1)() = 0;
        void(*fp2)() = return_null();
    
        return 0;
    }
Re:GCC 13 Supports New C2x Features, Including Nullptr, Enha... by saagarjha on Monday May 15, 2023 @07:41PM (#35956034)
POSIX requires this to be supported as well.