News for hackers. Stuff that matters.
Re:Pointer Free Programming and the Future of Nim by jstimpfle on Friday October 20, 2017 @06:28PM (#15519534)
Better try instead of reading standards (and inevitably misreading, or reading differently than compiler authors)...

    #include <stdio.h>
    void test(int& x)
    {
        printf("Hello, world\n"); fflush(stdout);
        printf("and the number is: %d\n", x);
    }
    int main(void)
    {
        int *x = NULL;
        test(*x);
        return 0;
    }
It's just a syntactic discipline. Null references are undefined in C++, just as NULL dereferences are undefined in C.

There are no comments on this comment yet.