This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/47143] warning about const multidimensional array as function parameter


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 #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2011-01-01 12:02:28 UTC ---
Not a bug.  The function parameters are of type "pointer to array[4] of const
double" because const on an array type applies to the element type,
recursively, and then the outermost array type, only, of a parameter of array
type decays to a pointer, and the arguments passed are of type "pointer to
array[4] of double" after array-to-pointer decay, and the only case where
qualifiers are permitted to be added in assignment, argument passing etc. is
qualifiers on the immediate pointer target, not those nested more deeply.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]