Bug#357900: gcc-4.0: Please detect and warn about 2 argument mode() called with O_CREAT
Justin Pryzby writes:
> 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.
I doubt that would be something to be considerd. Would you mind
forwarding that upstream?