From: MERC::"uunet!WKUVX1.BITNET!MacroMan" 1-DEC-1992 19:17:50.24 To: gjc@mitech.com, , CC: Subj: Re: MEMBER_ALIGHMENT difficulties on ALPHA? In article <3865@mitech.com> you write: # #Since there is no vmsnet.alpha group yet, I figured the best audience to #post this one to is vmsnet.internals. # Well there is a mail list: alpha-ids@wkuvx1.bitnet # #Boy am I having problems with something like MEMBER_ALIGNMENT issues on Alpha, #and perhaps it has something to do with having in the list of #include files. # should not cause any difficulties aside from the fact that the stat structure needs to be surround with the following #pragma member_alignment save /* saves the current alignment state */ #pragma member_noalignment /* turns off alignment */ [ stat structure] #pragma member_alignment restore /* restores the alignment state */ # #Two files, OBJ_UTIL.C and PARSE.C both include the definition of #struct obj. But the structure is treated differently and looks differently #in the debugger inside each file. # # 904: op = (struct object *)palloc(sizeof(struct object)); # DBG> e op->o_u.KB # OBJ_UTIL\new_object\op->o_u.KB # cur_time: -100000000000.0000 # cur_value: 0.0000000000000000 # #But if you single step out of the procedure new_object into its caller #in a different file: # # stepped to PARSE\parse\parse_1\%LINE 7458+10 # 7458: op = new_object(O_KB); # DBG> s # stepped to PARSE\parse\parse_1\%LINE 7459 # DBG> e op->o_u.KB # PARSE\parse\op->o_u.KB # cur_time: 0.0000000000000000 # cur_value: -100000000000.0000 # # #It is as if the order of the slots has been reversed. So, probably this #has nothing to do with MEMBER_ALIGNMENT, and is some other problem. # Well it might, depends on what the previous 4 bytes in memory contain before -100000000000.0000. It would be very helpful to see the definition of the structure obj, also the see the function definition of new_object(). I am unable to tell what you are passing to new_object(). If it is a structure, then this is a known problem with the DEC C compiler. Also, to guarantee that both modules are including the same definition. # #I found that keeping out of the list of include files fixed #the problem for some files. # This should only affect it iff you are using the stat structure as part of the obj structure. -- Patrick L. Mahan --- TGV Window Washer ------------------------------- Mahan@TGV.COM --------- Waking a person unnecessarily should not be considered - Lazarus Long a capital crime. For a first offense, that is From the Notebooks of Lazarus Long