Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!helios!inetg1!dprrhb From: dprrhb@inetg1.ARCO.COM (Reginald H. Beardsley) Newsgroups: comp.os.minix Subject: Re: #! in MM -- take 2 Message-ID: <1991May28.134409.7210@Arco.COM> Date: 28 May 91 13:44:09 GMT References: <10033@star.cs.vu.nl> <10055@star.cs.vu.nl> <1991May24.164952.22295@Arco.COM> <819@philica.ica.philips.nl> Sender: dprrhb@inetg1 (Reginald H. Beardsley) Organization: ARCO Oil & Gas Company Lines: 22 The problem usually arises in data structure declarations which are not aligned and padded properly. Sun warns of this in their documentation. Certainly the compiler should pad the strings out correctly. I had to write a long routine which did byte copies out of a several hundred entry data structure because the original design was implemented on an IBM 360/370 series machine and didn't care. (An odd number of shorts were declared in the structure which caused accesses to the full words following to core dump :-( ) I'd be curious to know what would happen to the gcc example if you inserted a declaration of a fullword value (int or float) in your list of string declarations, say after "char string[]="a";". BTW the data structure referred to previously was done in FORTRAN with equivalences. -- Reginald H. Beardsley ARCO Information Services Plano, TX 75075 Phone: (214)-754-6785 Internet: dprrhb@arco.com