From: anon@anon.org (anon)
Subject: Re: pragma License ?
Date: Fri, 15 Jun 2007 09:10:33 GMT
Date: 2007-06-15T09:10:33+00:00 [thread overview]
Message-ID: <dIsci.164303$p47.84627@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: f4rsv5$6g9$1@online.de
Try this example ( 5 files ) :
Note: I like spaces so I know it will generate Style warning if compile
with that option turn on.
--
-- File p.adb
--
package body p is
work : integer := 255 ;
function get_work return integer is
begin
return work ;
end ;
end p ;
--
-- File p.ads
--
pragma License ( GPL ) ;
package p is
function get_work return integer ;
end p ;
--
-- File b.adb
--
package body b is
function add ( f : integer ; s : integer ) return integer is
begin
return ( f + s ) ;
end ;
end b ;
--
-- File b.adb
--
pragma License ( Restricted ) ;
package b is
function add ( f : integer ; s : integer ) return integer ;
end b ;
--
-- c.adb : Main program
--
-- Does not matter which one is uncommented. Either will generate
-- an warning on the other license package. But removing or
-- commenting out both pragma License statement in main
-- program will stop the warning message.
--
--
pragma License ( Restricted ) ;
-- pragma License ( GPL ) ;
with p ;
with b ;
procedure c is
use b ;
x : integer ;
z : integer ;
begin
x := p.get_work ;
z := add ( x, 5 ) ;
end c ;
n <f4rsv5$6g9$1@online.de>, Michael Bode <m.g.bode@web.de> writes:
>Gnat has this nice feature called pragma License (unrestriced | GPL
>....); Is this used somewhere in the Adacore universe?
>
>I tried today to compile a package with 'pragma License (Restricted);' in
>the package body. The package withs some GtkAda packages. First try
>with Gnat 3.15p and the related ancient GtkAda 2.4 package. As
>expected there was no warning. Then I tried the same on Debian Etch
>with GtkAda 2.8. Again no warning.
>
>What good is an implementation defined pragma, if even said
>implementation doesn't use it?
>
>--
>No intelligent man has any respect for an unjust law.
>He simply follows the eleventh commandment.
>-- R.A. Heinlein
next prev parent reply other threads:[~2007-06-15 9:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 17:13 pragma License ? Michael Bode
2007-06-15 9:10 ` anon [this message]
2007-06-15 18:12 ` Michael Bode
2007-06-17 7:21 ` Corrected version " anon
2007-06-17 10:33 ` Michael Bode
2007-06-18 9:07 ` anon
2007-06-18 9:58 ` Dirk Heinrichs
2007-06-20 10:38 ` anon
2007-06-20 12:09 ` Georg Bauhaus
2007-06-20 12:28 ` Dirk Heinrichs
2007-06-20 13:40 ` Markus E Leypold
2007-06-20 13:43 ` Markus E Leypold
2007-06-22 6:30 ` Harald Korneliussen
2007-06-22 10:36 ` Markus E Leypold
2007-06-22 10:55 ` Markus E Leypold
2007-06-22 11:16 ` Ludovic Brenta
2007-06-22 14:30 ` Markus E Leypold
2007-06-22 14:31 ` Markus E Leypold
2007-06-22 11:37 ` anon
2007-06-22 12:10 ` Dirk Heinrichs
2007-06-22 17:48 ` Georg Bauhaus
2007-06-22 18:05 ` Markus E Leypold
2007-06-22 14:27 ` Markus E Leypold
2007-06-22 17:58 ` Georg Bauhaus
2007-06-22 18:00 ` Michael Bode
2007-06-22 18:14 ` Markus E Leypold
2007-06-22 18:44 ` Georg Bauhaus
2007-06-22 19:02 ` Michael Bode
2007-06-22 20:42 ` Markus E Leypold
2007-06-22 18:11 ` Markus E Leypold
2007-06-18 15:08 ` Georg Bauhaus
2007-06-17 10:47 ` Markus E Leypold
2007-06-18 7:33 ` Dirk Heinrichs
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox