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: Implicit conversion from structure to its pointer?


Hi Myung-gyu,

To pass a struct to bzero, you should've needed to do this:
bzero(&b, sizeof b);

Maybe GCC 3.0.1 has a bug.  Try GCC 3.3.1, which is the current release.

Arrays are supposed to be liberally converted to pointers.  I don't think structs are supposed to be liberally converted to pointers.

Did you forget your terminating semicolon for your struct a?

HTH,
--Eljay

Note:  bzero is not a standard library function.  It's a holdover from BCPL days.  Use memset if you want portability.



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