------- Comment #8 from joseph at codesourcery dot com  2007-09-26 12:38 -------
Subject: Re:  Warning when passing a pointer to a const array
 to a function that expects a pointer to a non-cast one

On Wed, 26 Sep 2007, jozef dot behran at krs dot sk wrote:

> 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).

That which you quote means there is no way to put a qualifier on the array 
type because any attempt to do so puts it on the element type instead.  
That there are no qualified array types is simply the logical conclusion 
from there being no C syntax to write one.  Note "not the array type" in 
that paragraph.

The question of whether abstractly one might imagine a qualified array 
type in C despite the lack of syntax to describe one, and how such a type 
(notwithstanding the lack of syntax to describe it) would behave if it 
were to exist, is not an interesting one in the absence of implementation 
extensions to define such a type.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33076

Reply via email to