Package: gcc-4.0
Version: 4.0.3-1
Severity: wishlist
Tags: upstream
mode(2) reads:
mode must be specified when O_CREAT is in the flags, and is
ignored otherwise.
I straced the result of
open(buf, O_RDWR|O_CREAT|O_EXCL);
and the effective value of the third parameter was garbage (this open
was in a loop, and the third parameter was equal to my loop variable).
I wonder if gcc could detect this error.