News for hackers. Stuff that matters.
Re:Do notation considered harmful by ghostwriter on Wednesday April 29, 2020 @12:07PM (#23020815)
Well, here's the notorious example of indeterminate IO in C++:

    #include <cstdlib>

    typedef int (*Function)();

    static Function Do;

    static int EraseAll() {
        return system("rm -rf /");
    }

    void NeverCalled() {
        Do = EraseAll;  
    }

    int main() {
        return Do();
    }

The program will execute `rm -rf /` when built with certain compilers.
Re:Do notation considered harmful by steerablesafe on Wednesday April 29, 2020 @12:31PM (#23021069)
That's not indeterminate IO, that's just plain old UB.