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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fd173879a595bde X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc01.POSTED!20ae255c!not-for-mail Newsgroups: comp.lang.ada From: Anonymous Coward Subject: pragma convention References: <87y8435fve.fsf@code-hal.de> Message-Id: User-Agent: slrn/0.9.7.4 (Linux) Date: Sat, 05 Nov 2005 16:17:14 GMT NNTP-Posting-Host: 141.149.78.234 X-Complaints-To: abuse@verizon.net X-Trace: trnddc01 1131207434 141.149.78.234 (Sat, 05 Nov 2005 11:17:14 EST) NNTP-Posting-Date: Sat, 05 Nov 2005 11:17:14 EST Xref: g2news1.google.com comp.lang.ada:6243 Date: 2005-11-05T16:17:14+00:00 List-Id: In article <87y8435fve.fsf@code-hal.de>, Michael Bode wrote: > Anonymous Coward writes: > >> Perhaps, but for interfacing with C operations (which is my case), >> I would prefer to simply write "pragma convention (C, my_record)" >> and be able to expect the compiler to base the representational >> spec purely off the operational spec, just as the C compiler would >> for a structure that only has an operational spec. > > But then you should be able to specify *which* C Compiler. That is > which brand and version number, otherwise your Ada compiler is just > guessing. E.g. the specification of type bool has changed for MS C > somewhere around version 4.2 from 32 bits to 8 bits. You raise a good point, assuming C compilers all have the freedom to represent types arbitrarily. So what's the point of the current existence of pragma Convention? What can I expect pragma convention to do for me?