> Freddy wrote in message > news:3ABE6443.4119AB52@t-online.de... > > Thanks. I've tried it, but at runtime I always get a constraint_error > > (GNAT seems to check the passing of "null" values). > > Yes -- as any correct Ada compiler must do! > > The value "null" just does not exist for the type of the parameter. > > Now, you might be able use "pragma Suppress (Access_Check)" to defeat this. I don't agree. I don't use the value "null". I use a variable which pretends to be at address zero. The following example works with GNAT 3.15w (20010305) on Sun Solaris. But, again, this is a hack, unsupported non-standard Ada. $ cat tnull.adb with System; procedure Tnull is Null_Access : aliased Integer; for Null_Access'Address use System.Null_Address; procedure Tnull_C (X : access Integer); pragma Import (C, Tnull_C, "tnull_c"); begin Tnull_C (Null_Access'Access); end Tnull; $ $ cat tnull_c.c #include void tnull_c (int *x) { printf ("x add = %08X\n", x); } $ $ gcc -c tnull_c.c $ gnatmake tnull -largs tnull_c.o gcc -c tnull.adb gnatbind -x tnull.ali gnatlink tnull_c.o tnull.ali $ tnull x add = 00000000 $ -Thierry ____________________________________________________________________________ Thierry Lelegard, "The Jazzing Troll", Email: thierry.lelegard@canal-plus.fr CANAL+ Technologies, 34 place Raoul Dautry, 75516 Paris Cedex 15, France Tel: +33 1 71 71 54 30 Fax: +33 1 71 71 52 08 Mobile: +33 6 03 00 65 75 ____________________________________________________________________________