[committed, libgfortran]

FX fxcoudert@gmail.com
Mon Dec 19 13:41:00 GMT 2016


In the case where CHMOD is called with a numeric mode, the current code assumes that “mode_t” corresponds to an unsigned int. This is true on linux/glibc, but not true on macOS (where mode_t is an unsigned short) and thus creates a warning and possibly a runtime error. This had been spotted earlier on Windows and was corrected, but behind a __MINWG32__ check, although the fixed code is actually correct for all platforms.

I have thus committed the attached fix (revision 243796), removing the target-specific branch. Will work on all platforms now.

FX

-------------- next part --------------
A non-text attachment was scrubbed...
Name: chmod.ChangeLog
Type: application/octet-stream
Size: 158 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161219/8c2e8013/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chmod.diff
Type: application/octet-stream
Size: 624 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161219/8c2e8013/attachment-0001.obj>


More information about the Fortran mailing list