comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Ada extension information
Date: Sat, 30 May 2009 07:13:54 GMT
Date: 2009-05-30T07:13:54+00:00	[thread overview]
Message-ID: <S05Ul.299730$4m1.68755@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: d784432e-fa9d-4bc9-b849-ecb2208afc73@c9g2000yqm.googlegroups.com

The problem is, those extra routines that make use of the "C like conditional 
compiling statements" are define in the body and referenced in the private 
sections of "Ada.Text_IO" and "Ada.Wide_Text_IO" packages. The comments 
state that they are for a sub-package "Ada.Text_IO.Wide_Text_IO" that is not 
present in the source. In scanning all 2850 plus files in the 2009 GNAT, the 
only references to this sub-package is in comments from the following 3 files:

  Ada.Text_IO 
  Ada.Wide_Text_IO
and 
  System.WCh_WtS

So, why are these routines in the two Text IO packages, and where is that 
child package "Ada.Text_IO.Wide_Text_IO"?  

Now, if these routines are defined and reference only with-in the package 
they are defined, then why are these routines references in the specification 
private area, they should be at the top of the body, hidden from the 
specification side. Keeping the Ada Text packages more precise to the Ada 
language, instead of junking it up with references that are not used outside 
ofthat package.   

Or is this somewhat of an advance copy of 2010/2011 version of 
Ada.Text_IO and a new "Ada.Text_IO.Wide_Text_IO" package.


And there is no reference in the documentation of the "C like conditional 
compiling statements".

From RM 1.1.3 "Conformity of an Implementation with the Standard" 

    6  Contain no variations except those explicitly permitted by this
       International Standard, or those that are impossible or
       impractical to avoid given the implementation's execution
       environment;

    7  Specify all such variations in the manner prescribed by this
       International Standard.


No True Ada programmer wants "Language extensions" without references.  
And most would prefer some simple references that is stated with-in the RM, 
not just hinted to by the RM, like having a RM section on what type 
"conditional compiling statements" would be acceptable with a few examples. 

So where is the documentation that is requred by RM 1.1.3 ( 7 ). Plus, 
I have not found where "conditional compiling statements" are allow 
in Ada RM 1.1.3 ( 6 ). And in some cases "conditional compiling 
statements" kills the need for generic package.

Plus, there is another Adacore pragma ( sample located in body of 
Ada.Sequential_IO ). This seams to bypass the requirement to use 
"-gnatX". 

      pragma Extensions_Allowed ( On | Off ) ;

with no documentation in the GNAT Documentation User's Guide ( GNAT_UGN ) 
or the GNAT Reference Manual ( GNAT_RM ).

Plus, if Adacore want to extend Ada, they normally use a child package 
with-in the GNAT package structure to test the idea before forcing the 
changes into the the Ada package structure. 

And finally what other changes have been made and how to disable them. Aka 
to turn off all "conditional expressions"? And for that reason the "C like 
conditional compiling statements" should never be in the core Ada or core 
System packages that are define in the RM.




In <d784432e-fa9d-4bc9-b849-ecb2208afc73@c9g2000yqm.googlegroups.com>, info@midoan.com writes:
>Hello,
>a-textio.adb released with GNAT 2009 GPL for windows, contains:
>
>Item :=
>              (if not Is_Start_Of_Encoding (Character'Val (ch),
>File.WC_Method)
>               then Character'Val (ch)
>               else Get_Upper_Half_Char_Immed (Character'Val (ch),
>File));
>
>which is easy enough to understand but is not standard Ada.
>
>GNAT 2009 tells me :
>
>try.adb:5:09: conditional expression is an Ada extension
>try.adb:5:09: use -gnatX switch to compile this unit
>
>http://www.adacore.com/2009/03/29/NF-63-I317-009-gnat/ discusses
>this.
>
>Is it not jumping the gun a little to use these extensions to document
>standard libraries before they become official, or even documented?
>
>More specifically where are these Ada extensions formally documented?
>(Ada Conformity Assessment Authority seem to have discussion about
>this up to 15th March 2009 !)
>
>PS In the meantime Mika is broken if you use a-textio as distributed
>with GNAT GPL  2009.
>
>Sincerely,
>http://www.midoan.com




  parent reply	other threads:[~2009-05-30  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 18:26 Ada extension information info
2009-05-28 18:30 ` Martin
2009-05-30  0:25   ` Randy Brukardt
2009-05-28 21:22 ` Georg Bauhaus
2009-05-28 21:31   ` Georg Bauhaus
2009-05-28 22:06   ` Adam Beneschan
2009-05-30  7:13 ` anon [this message]
2009-05-30 10:13   ` info
replies disabled

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