http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45998
Summary: libgfortran/io/write.c: warning: discards 'const'
qualifier from pointer target
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Reported for MinGW64 in #gfortran:
< NightStrike_> ../../../../../build/gcc/src/libgfortran/io/write.c:394:8:
warning: passing argument 2 of 'write_default_char4' discards 'const' qualifier
from pointer target type [enabled by default]
That's the line
write_default_char4 (dtp, crlf, 2, 0);
where
const gfc_char4_t crlf[] = {0x000d,0x000a};
and
write_default_char4 (st_parameter_dt *dtp, gfc_char4_t *source,
int src_len, int w_len)
I wonder whether one shouldn't simply make the second parameter of
write_default_char4 "const".