This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47143] warning about const multidimensional array as function parameter
- From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 1 Jan 2011 15:06:36 +0000
- Subject: [Bug c/47143] warning about const multidimensional array as function parameter
- Auto-submitted: auto-generated
- References: <bug-47143-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47143
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #4 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2011-01-01 15:06:34 UTC ---
If you want to use const here only on the callee side then you will need to use
casts. I meant what I said: you are passing "pointer to array[4] of double",
with no const in there, to a function expecting "pointer to array[4] of const
double", and this is not a case permitted by C99 6.5.16.1#1. C does not have a
type "pointer to const array[4] of double".