This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33076] Warning when passing a pointer to a const array to a function that expects a pointer to a non-cast one
- From: "jozef dot behran at krs dot sk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2007 12:06:29 -0000
- Subject: [Bug c/33076] Warning when passing a pointer to a const array to a function that expects a pointer to a non-cast one
- References: <bug-33076-14983@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jozef dot behran at krs dot sk 2007-09-26 12:06 -------
> Neither C nor C++ have qualified array types, only arrays of qualified
> element types, but C++ has different rules from C regarding conversions
> involving qualifiers, which allow some conversions (involving arrays or
> pointers to pointers) not allowed in C.
Could you give me reference in the C standard where this is stated ? The
section 6.7.3, paragraph 8, says nothing about C/C++ not having qualified array
types, it only says that a qualifier applied to an array type holds for the
element type of the array type (these two are not the same things, see bug
16602 for more discussion about the topic).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33076