This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31887] bad warning converting qualified void* to qualified array pointer
- From: "raeburn at raeburn dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2007 06:03:18 -0000
- Subject: [Bug c/31887] bad warning converting qualified void* to qualified array pointer
- References: <bug-31887-11337@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from raeburn at raeburn dot org 2007-08-15 06:03 -------
Section 6.7.3 says: "If the specification of an array type includes any type
qualifiers, the element type is so-qualified, not the array type." The more I
think about it, the more I think the compiler is technically correct, though I
think this is probably a bug in the standard.
I brought this up on comp.std.c a couple weeks or so ago, though, and while
Doug Gwyn, whose interpretation on these things I generally respect, seemed to
indicate that my current interpretation is wrong (and that it should indeed be
"const array of 8 chars"), he didn't provide references to that effect, so I'm
not sure where that interpretation comes from.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31887