Path: utzoo!utgpu!cunews2!cunews!cognos!richardb From: richardb@cognos.UUCP (Richard Brosseau) Newsgroups: comp.windows.ms.programmer Subject: Re: -Zp Option Problem Message-ID: <9665@cognos.UUCP> Date: 23 May 91 18:11:27 GMT References: Reply-To: richardb@cognos.UUCP (Richard Brosseau) Distribution: comp Organization: Cognos Inc., Ottawa, Canada Lines: 29 In article rluzzi@dit.upm.es (Roman Roberto Luzzi) writes: + + + +Hello: + + I have problems with the package option -Zp of the Microsoft C 6.0 +Compiler when I pass structures to functions as value parameters. +When the structures have odd size, in the calling to the function +the compiler puts in the stack the structure correctly (with odd size), +but the compiler defines the target function parameters with even size +(it doesn't pack the parameters in byte boundaries). +The simple code below is an example of the problem: [Code deleted] +Has anyone had this problem prior? Thanks in advance. + + Roman Luzzi.(rluzzi@dit.upm.es) Yes, I've had this problem. It appears to be a C600 compiler bug. A solution would be to pad the structure to an even number of bytes or just pass a pointer to the struct instead. -- Richard Brosseau ccs.carleton.ca!cognos.uucp!richardb I think a burp died trying to get out of my mouth - Calvin