comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: -fdump-ada-spec
Date: Mon, 06 Oct 2014 18:45:12 +0100
Date: 2014-10-06T18:45:12+01:00	[thread overview]
Message-ID: <ly61fxay8n.fsf@pushface.org> (raw)

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;


             reply	other threads:[~2014-10-06 17:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 17:45 Simon Wright [this message]
2014-10-07 14:08 ` -fdump-ada-spec Stephen Leake
2014-10-07 16:05   ` -fdump-ada-spec Simon Wright
2014-10-07 15:12 ` -fdump-ada-spec Markus Schöpflin
2014-10-07 16:05   ` -fdump-ada-spec Simon Wright
2014-10-10 10:06 ` -fdump-ada-spec Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2014-10-06 22:42 Newcomers to comp.lang.ada: welcome and how did you end up here ? Simon Clubley
2014-10-07  8:10 ` Gour
2014-10-07 10:49   ` Luke A. Guest
2014-10-08  7:23     ` Gour
2014-10-08  8:35       ` Brian Drummond
2014-10-08  9:15         ` Simon Wright
2014-10-08 19:14           ` -fdump-ada-spec (was: Newcomers to comp.lang.ada: welcome and how did you end up here ?) Ludovic Brenta
2014-10-08 19:48             ` -fdump-ada-spec Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox