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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,71b4c0131a8a22a4 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: pragma License ? Reply-To: anon@anon.org (anon) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 15 Jun 2007 09:10:33 GMT NNTP-Posting-Host: 12.65.96.121 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1181898633 12.65.96.121 (Fri, 15 Jun 2007 09:10:33 GMT) NNTP-Posting-Date: Fri, 15 Jun 2007 09:10:33 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:16196 Date: 2007-06-15T09:10:33+00:00 List-Id: 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 , Michael Bode 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