Red Hat Bugzilla – Bug 21362
RH 7 compiler rejects fpos_t assignments (RH6.2 worked)
Last modified: 2016-11-24 10:02:03 EST
In Red Hat 6.2, I could declare & assign fpos_t as follows:
loc = 0;
In Red Hat 7, the same code generates a compiler error:
"incompatible types in assignment"
Please help - This was an experiment to convince my bosses to switch from
NT to Linux.
fpos_t is no longer a scalar type, there is nothing in the standards
which demand this to be a scalar btw. This is so that proper wide
stream support could be added.
As I have no idea what you wanted to achieve, I cannot suggest
what you should do instead, but one hint could be that fpos_t used
to be the same as off_t (resp. off64_t for fpos64_t), so you could
maybe use those types instead.
This is not related to gcc at all, the change happened in glibc