This is the mail archive of the gcc-help@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]

Re: Explanation for warning when passing two-dimensional array


Hi Steve,

int array[6];
typedef int two[2];
two beray[3]; // just like: int beray[2][3]

Due to C behavior, the variable name array is promiscuously, intrinsically
considered as an standin for an int*.

Also due to C behavior, the variable name beray is promiscuously,
intrinsically considered as a standin for two*.  Is two an int?  Nope.

Sincerely,
--Eljay


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