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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: -fdump-ada-spec Date: Mon, 06 Oct 2014 18:45:12 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="865ecc8333c04b7dc8d5f87fc772110b"; logging-data="11549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s8nuB5TGOsrNsskKyT3v0sp4kM36gcXo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:S3FEc4BqW6hDHZqZ0tJ6WAe84J8= sha1:rfcTOUQ8nMwT4PjvvC29eRvdVDY= Xref: number.nntp.giganews.com comp.lang.ada:189453 Date: 2014-10-06T18:45:12+01:00 List-Id: Does anyone know where this is implemented in the GCC sources? I'm having trouble with some of the system headers: on Mac OS X, with all the GNATs and GCCs I have, dumping /usr/include/wchar.h uses 'limited with' in a way that doesn't work, whereas on Debian (wheezy, gcc-4.7) there's no 'limited with'. Of course, wchar.h is different! I _think_ that -fdump-ada-spec sees that a particular type (eg FILE) is always accessed via a pointer, and decides that 'limited with' is OK; but for some reason this ends up being unacceptable. The ARM (and AI95-0217) didn't help a lot here. I think the problem is that the original code is like typedef struct Blah { int x; } FILE; and the generated code is like package Stdio is type Blah is record X : Integer; end record; subtype FILE is Blah; end Stdio; limited with Stdio; package Wchar is procedure Foo (F : access Stdio.FILE); end Wchar; and the 'limited with' magic only works for _types_, so you get the error '"FILE" not declared in "Stdio"'. Stdio.FILE should be declared as type FILE is new Blah;