duplicate FILE typedef, stdio.h and wchar.h
Thu Mar 5 21:29:00 GMT 2015
On Mar 5 11:04, Craig Howland wrote:
> On 03/05/2015 07:19 AM, Corinna Vinschen wrote:
> >On Mar 4 11:35, Craig Howland wrote:
> >>On 03/04/2015 05:07 AM, Corinna Vinschen wrote:
> >>>I'm rather puzzled by this observation. As you may imagine, these files
> >>>are used for a long time in packages in the Cygwin distro, and if GCC
> >>>would error out in this simple case, we had a lot of complaints from
> >>>Cygwin package maintainers. So the first question is, in which scenario
> >>>do you see this problem? I created an STC:
> >>>and gcc -c -g -O2 -Wall does not error out, nor does it even produce
> >>>a warning. Same when reordering the includes. Not even with -ansi.
> >>I was quite surprised, too, but it's doing it (gcc 4.4.7 under RHEL6). I
> >>fiddled with options a little to no avail, but decided it was easier to just
> >>fix it.
> >Does the above testcase fail the same way with this gcc? If not,
> >it might be some different problem. I wouldn't want to apply a
> >fix which just covers another problem, if possible.
> Of primary importance, the duplicate typedefs are not permitted by the
> C standard, even if they don't make a compiler error out.
> In summary, the patch to avoid the duplicate typedef should be applied
> since the present case is in violation of the C standard, even if it can
> in some cases get by the compiler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Newlib