Thanks, Andrew. I'll look into this. worst case is we delete the  
second argument.
Jerry

On Jan 3, 2009, at 3:09 AM, Andrew Ross wrote:

>
> Jerry,
>
> The commit below breaks ada support for me. It looks like this form of
> the ada warnings pragma is only available in recent versions of gnat.
> With gnat 4.2.4 I get errors like
>   plplot.ads:72:26: second argument of pragma "Warnings" must be  
> entity
>   name
>
> According to the documentation only the forms
>      pragma Warnings (On | Off [, local_NAME]);
>      pragma Warnings (static_string_EXPRESSION);
> are supported in gcc 4.2.4.
>
> Andrew
>
> On Fri, Jan 02, 2009 at 10:54:32AM +0000,  
> jba...@users.sourceforge.net wrote:
>> Revision: 9242
>>           http://plplot.svn.sourceforge.net/plplot/?rev=9242&view=rev
>> Author:   jbauck
>> Date:     2009-01-02 10:54:32 +0000 (Fri, 02 Jan 2009)
>>
>> Log Message:
>> -----------
>> Added pragmas to selectively disable warning messages that were  
>> being generated during compilation of the Ada bindings and Ada  
>> Examples 21. Building should now proceed without these specific  
>> warnings but other warnings can still be generated as they arise.
>>
>> Modified Paths:
>> --------------
>>     trunk/bindings/ada/plplot.ads.cmake
>>     trunk/bindings/ada/plplot_traditional.ads.cmake
>>     trunk/doc/docbook/src/ada.xml
>>     trunk/examples/ada/x20a.adb.cmake
>>     trunk/examples/ada/xthick20a.adb.cmake
>>
>> Modified: trunk/bindings/ada/plplot.ads.cmake
>> ===================================================================
>> --- trunk/bindings/ada/plplot.ads.cmake      2009-01-02 10:17:24 UTC  
>> (rev 9241)
>> +++ trunk/bindings/ada/plplot.ads.cmake      2009-01-02 10:54:32 UTC  
>> (rev 9242)
>> @@ -69,7 +69,13 @@
>>      -- from this package (PLplot_Traditional) can't be used.  
>> Thus, this also
>>      -- overloads the name Fill_Polygon. It might never occur to  
>> the Ada programmer
>>      -- that this is happening, which is good.
>> +    pragma Warnings(Off, "foreign caller must pass bounds  
>> explicitly");
>> +    pragma Warnings(Off, "type of argument ""Fill_Polygon.x"" is  
>> unconstrained array");
>> +    pragma Warnings(Off, "type of argument ""Fill_Polygon.y"" is  
>> unconstrained array");
>>      procedure Fill_Polygon(length : Integer; x, y : Real_Vector)  
>> renames PLplot_Thin.plfill;
>> +    pragma Warnings(On, "foreign caller must pass bounds  
>> explicitly");
>> +    pragma Warnings(On, "type of argument ""Fill_Polygon.x"" is  
>> unconstrained array");
>> +    pragma Warnings(On, "type of argument ""Fill_Polygon.y"" is  
>> unconstrained array");
>>
>>      -- Make Mask_Function_Pointer_Type available to the user so  
>> that s/he doesn't
>>      -- have to "with" PLplot_Thin. Note that it is also used herein.
>>
>> Modified: trunk/bindings/ada/plplot_traditional.ads.cmake
>> ===================================================================
>> --- trunk/bindings/ada/plplot_traditional.ads.cmake  2009-01-02  
>> 10:17:24 UTC (rev 9241)
>> +++ trunk/bindings/ada/plplot_traditional.ads.cmake  2009-01-02  
>> 10:54:32 UTC (rev 9242)
>> @@ -69,7 +69,13 @@
>>      -- from this package (PLplot_Traditional) can't be used.  
>> Thus, this also
>>      -- overloads the name plfill. It might never occur to the Ada  
>> programmer
>>      -- that this is happening, which is good.
>> +    pragma Warnings(Off, "foreign caller must pass bounds  
>> explicitly");
>> +    pragma Warnings(Off, "type of argument ""plfill.x"" is  
>> unconstrained array");
>> +    pragma Warnings(Off, "type of argument ""plfill.y"" is  
>> unconstrained array");
>>      procedure plfill(length : Integer; x, y : Real_Vector)  
>> renames PLplot_Thin.plfill;
>> +    pragma Warnings(On, "foreign caller must pass bounds  
>> explicitly");
>> +    pragma Warnings(On, "type of argument ""plfill.x"" is  
>> unconstrained array");
>> +    pragma Warnings(On, "type of argument ""plfill.y"" is  
>> unconstrained array");
>>
>>      -- Make Mask_Function_Pointer_Type available to the user so  
>> that s/he doesn't
>>      -- have to "with" PLplot_Thin. Note that it is also used herein.
>>
>> Modified: trunk/doc/docbook/src/ada.xml
>> ===================================================================
>> --- trunk/doc/docbook/src/ada.xml    2009-01-02 10:17:24 UTC (rev 9241)
>> +++ trunk/doc/docbook/src/ada.xml    2009-01-02 10:54:32 UTC (rev 9242)
>> @@ -304,12 +304,7 @@
>>      <para>          As discussed in Section 6.1, the bindings are  
>> made to work with Ada 95 but to also take advantage of the Annex G. 
>> 3 (vector-matrix) features of Ada 2005. Actually, this adaptation  
>> takes place during the PLplot build process when  
>> <literal>DHAVE_ADA_2007=OFF</literal> or  
>> <literal>DHAVE_ADA_2007=ON</literal> is chosen; the appropriate  
>> binding source files are generated automatically. User programs  
>> will work with either compiler type without modification.</para>
>>      <para><emphasis role="bold">    10.2    GNAT Dependence</emphasis></ 
>> para>
>>      <para>          There is a slight but significant dependence  
>> on the GNAT version of Ada. This is discussed more fully in  
>> Section 6.2</para>
>> -    <para><emphasis role="bold">    10.3    Compiler Warnings</ 
>> emphasis></para>
>> -    <para>          During normal compilation of the Ada bindings,  
>> approximately a dozen warnings are generated, in pairs, of the  
>> following form:</para>
>> -    <para>  <literal>bar.adb:46: warning: type of argument "foo"  
>> is unconstrained array</literal></para>
>> -    <para>  <literal>bar.adb:46: warning: foreign caller must pass  
>> bounds explicitly</literal></para>
>> -    <para>  These are normal and an unavoidable consequence of  
>> some of the callback routines interacting with the underlying C  
>> code.</para>
>> -    <para><emphasis role="bold">    10.4    PLplot_Auxiliary</ 
>> emphasis></para>
>> +    <para><emphasis role="bold">    10.3    PLplot_Auxiliary</ 
>> emphasis></para>
>>      <para>          The bindings include files  
>> <literal>PLplot_Auxiliary.ads</literal> and  
>> <literal>PLplot_Auxiliary.adb</literal>. These files are currently  
>> used to provide a few convenience subprograms that are used in the  
>> examples. However, they are also very tightly associated with the  
>> above-mentioned facility to accommodate either Ada 95 or Ada 2005  
>> compilers. The current situation is such that if the user is using  
>> an Ada 95 compiler <emphasis>and</emphasis> requires the  
>> Real_Vector or Real_Matrix type definitions, then he/she should  
>> <literal>with</literal> <literal>PLplot_Auxiliary</literal>. If in  
>> doubt, <literal>PLplot_Auxiliary</literal> can always be  
>> <literal>with</literal>-ed without harm. In the future, this  
>> confusion might be removed and the need for  
>> <literal>PLplot_Auxiliary</literal> removed. (However, user  
>> programs that with it should still work without change.)</para>
>>
>>    </sect1>
>>
>> Modified: trunk/examples/ada/x20a.adb.cmake
>> ===================================================================
>> --- trunk/examples/ada/x20a.adb.cmake        2009-01-02 10:17:24 UTC (rev  
>> 9241)
>> +++ trunk/examples/ada/x20a.adb.cmake        2009-01-02 10:54:32 UTC (rev  
>> 9242)
>> @@ -142,7 +142,11 @@
>>                      xxi := gin.wX;
>>                      yyi := gin.wY;
>>                      if start /= 0 then
>> +                        pragma Warnings(Off, """sx"" may be  
>> referenced before it has a value");
>> +                        pragma Warnings(Off, """sy"" may be  
>> referenced before it has a value");
>>                          plline(sx, sy); -- Clear previous rectangle.
>> +                        pragma Warnings(On, """sx"" may be  
>> referenced before it has a value");
>> +                        pragma Warnings(On, """sy"" may be  
>> referenced before it has a value");
>>                      end if;
>>
>>                      start := 0;
>>
>> Modified: trunk/examples/ada/xthick20a.adb.cmake
>> ===================================================================
>> --- trunk/examples/ada/xthick20a.adb.cmake   2009-01-02 10:17:24 UTC  
>> (rev 9241)
>> +++ trunk/examples/ada/xthick20a.adb.cmake   2009-01-02 10:54:32 UTC  
>> (rev 9242)
>> @@ -142,7 +142,11 @@
>>                      xxi := gin.wX;
>>                      yyi := gin.wY;
>>                      if start /= 0 then
>> +                        pragma Warnings(Off, """sx"" may be  
>> referenced before it has a value");
>> +                        pragma Warnings(Off, """sy"" may be  
>> referenced before it has a value");
>>                          Draw_Curve(sx, sy); -- Clear previous  
>> rectangle.
>> +                        pragma Warnings(On, """sx"" may be  
>> referenced before it has a value");
>> +                        pragma Warnings(On, """sy"" may be  
>> referenced before it has a value");
>>                      end if;
>>
>>                      start := 0;
>>
>>
>> This was sent by the SourceForge.net collaborative development  
>> platform, the world's largest Open Source development site.
>>
>> --------------------------------------------------------------------- 
>> ---------
>> _______________________________________________
>> Plplot-cvs mailing list
>> plplot-...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plplot-cvs
>>
>


------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to