[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#357900: gcc-4.0: Please detect and warn about 2 argument mode() called with O_CREAT



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.



Reply to: