This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] warning about const multidimensional array as function parameter
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Martin Uecker <uecker at eecs dot berkeley dot edu>, gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 27 Oct 2014 14:46:51 +0000
- Subject: Re: [PATCH] warning about const multidimensional array as function parameter
- Authentication-results: sourceware.org; auth=none
- References: <20141025123245 dot 4ed09551 at lemur> <Pine dot LNX dot 4 dot 64 dot 1410271254470 dot 13536 at digraph dot polyomino dot org dot uk>
On 27 October 2014 13:10, Joseph S. Myers wrote:
> On Sat, 25 Oct 2014, Martin Uecker wrote:
>> Strictly speaking the C standard considers such pointers to be
>> incompatible. This seems to be an unintentional consequence
>> of how qualifiers are always attached to the element type.
>> (I am trying to get the standard revised too.) The new
>> behaviour should also be more compatible with C++.
> What is the exact difference in wording in the C++ standard that results
> in this difference in semantics?
See 4.4 [conv.qual] in https://isocpp.org/files/papers/N3797.pdf