Article View: comp.windows.ms.programmer
Article #2826Re: -Zp Option Problem
From: Richard Brosseau
Date: Thu, 23 May 1991 18:11
Date: Thu, 23 May 1991 18:11
29 lines
1439 bytes
1439 bytes
In article <RLUZZI.91May22123346@greco.dit.upm.es> 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
Technical Details
Message-ID:
<9665@cognos.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews2!cunews!cognos!richardbReferences:
<RLUZZI.91May22123346@greco.dit.upm.es>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <RLUZZI.91May22123346@greco.dit.upm.es> Reply-To: richardb@cognos.UUCP (Richard Brosseau) Distribution: comp Organization: Cognos Inc., Ottawa, Canada Lines: 29