From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,8cb93c25750499fe,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,8cb93c25750499fe,start X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,8cb93c25750499fe,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-29 16:58:56 PST Xref: gmd.de comp.unix.osf.osf1:2720 comp.unix.questions:30526 comp.unix.programmer:13473 Newsgroups: comp.unix.osf.osf1,comp.unix.questions,comp.unix.programmer Path: gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!gatekeeper.us.oracle.com!decwrl!portal.com!portal!sdr From: sdr@shell.portal.com (Stephen Reagan) Subject: Using #pragma pack(n) Message-ID: Sender: news@unix.portal.com Nntp-Posting-Host: jobe Organization: Portal Communications Company X-Newsreader: TIN [version 1.2 PL2] Date: Wed, 30 Mar 1994 00:58:56 GMT We have tried using the pack pragma on DEC Alpha OSF v1.3, but have so far been unsuccessful. We have some structures which contain both bit fields and floats; sometimes the C compiler does not seem to align the structure members as we wish, hence the attempt to use this pragma. In every case using this pragma with an argument less than 8, we get a "strange" compiler error if a float is referenced in any way using a structure pointer. I cannot find ANY useful documentation anywhere which gives any meaningful insight or direction in terms of solving this problem... Help! --Steve Here is an example: Script started on Mon Mar 28 19:44:11 1994 (sreagan@sc01 1046) nl foo.c 1 #include 2 #pragma pack(1) 3 main() 4 { 5 struct balloon 6 { 7 float raft; 8 } bubble; 9 10 struct balloon *bubble_jet = &bubble; 11 12 printf("Hello world\n"); 13 14 bubble.raft = 0.0; 15 bubble_jet->raft = 0.0; 16 17 } (sreagan@sc01 1047) make foo cc foo.c -o foo ugen: internal : line 15 : ../../../../../../src/usr/ccs/bin/ugen/eval.p, line 2284 can't do unaligned float iloads/istores *** Exit 1 Stop. (sreagan@sc01 1048) script done on Mon Mar 28 19:44:41 1994