From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,976a050e0f89277c X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Urgent question: malloc and ada... Date: 1998/05/03 Message-ID: #1/1 X-Deja-AN: 349923828 References: <352A79C2.15FB7483@nathan.gmd.de> <6hvm8k$t3l$1@news.hal-pc.org> <1998Apr30.180141.1@eisner> <6ifdou$io3$1@news.hal-pc.org> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 894232772 1082 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-05-03T00:00:00+00:00 List-Id: Jonathan says <> I was using calling sequence quite generally here. The alignment of structs is most CERTAINLY included, since part of what one does on a call is to pass references to various kinds of data, and of course the alignment and layout of this data must be clearly understood between callee and caller. So most definitely the convention in the ADa sense *does* cover alignment of structs. If two compilers differed in this respect, and an Ada compiler wished to interface to both, then it would have to provide for this, either by using separate calling conventions, or by using special pragmas. THe use of separate calling conventions is preferable, since it avoids the use of potentially non-portable pragmas. We still have not managed to coax out of Joe even one example of problems in interfacing in a portable manner, but clearly if this is a goal (and it was indeed a goal of the Ada 95 design), then it is better to stick to the mechanisms provided in the RM. We deviated from this in GNAT/VMS (providing the pragma Component_Alignment) since in this case, compatibility with DEC Ada 83 is much more of an issue than compatibility with other Ada 95 compilers, and indeed one would expect other Ada 985 compilers for VMS to be driven by the same considerations in any case.