comp.lang.ada
 help / color / mirror / Atom feed
* Pragma Debug in GCC-Ada ?
@ 2005-07-13  0:40 Bobby D. Bryant
  2005-07-13  1:18 ` Matthew Heaney
  0 siblings, 1 reply; 3+ messages in thread
From: Bobby D. Bryant @ 2005-07-13  0:40 UTC (permalink / raw)


Are the precompiled Ada library units supposed to be compiled with
-gnata ?  My naive assumption is "yes", so that assertions will be
enforced, but in recent versions of GCC-based GNAT it also turns on an
annoying -

   pragma Debug (Put_Line ("N =" & N'Img));

in the definition of 'Put' in a-tifiio.adb (Ada.Text_IO.Fixed_IO).

Surely that isn't the intended behavior?  But is the proper fix to
remove that line from the source, or to compile without -gnata ?


Background: This is seen in GNAT 3.4.1 as built for Gentoo Linux by
the gnat-3.41.ebuild.  It may have been present in earlier versions as
well; I don't remember when I first saw it.

-- 
Bobby Bryant
Austin, Texas



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pragma Debug in GCC-Ada ?
  2005-07-13  0:40 Pragma Debug in GCC-Ada ? Bobby D. Bryant
@ 2005-07-13  1:18 ` Matthew Heaney
  2005-07-13  3:14   ` Bobby D. Bryant
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Heaney @ 2005-07-13  1:18 UTC (permalink / raw)


bdbryant@mail.utexas.edu (Bobby D. Bryant) writes:

> Are the precompiled Ada library units supposed to be compiled with
> -gnata ?  

Probably not, no.  (But you'll have to ask the AdaCore staff for the
definitive answer.)  The reason is that units that are part of the GNAT
run-time are automatically compiled with checks off.


> My naive assumption is "yes", so that assertions will be
> enforced, 

If you're seeing pragma Assert or pragma Debug, it's most likely only
for debugging.


> but in recent versions of GCC-based GNAT it also turns on an
> annoying -
> 
>    pragma Debug (Put_Line ("N =" & N'Img));
> 
> in the definition of 'Put' in a-tifiio.adb (Ada.Text_IO.Fixed_IO).

Are you seeing this?  You shouldn't be.  If you are seeing this output,
then something is wrong.


> Surely that isn't the intended behavior?  But is the proper fix to
> remove that line from the source, or to compile without -gnata ?

You shouldn't have to do either of these things.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pragma Debug in GCC-Ada ?
  2005-07-13  1:18 ` Matthew Heaney
@ 2005-07-13  3:14   ` Bobby D. Bryant
  0 siblings, 0 replies; 3+ messages in thread
From: Bobby D. Bryant @ 2005-07-13  3:14 UTC (permalink / raw)


On Wed, 13 Jul 2005, Matthew Heaney <matthewjheaney@earthlink.net> wrote:

> bdbryant@mail.utexas.edu (Bobby D. Bryant) writes:
> 
>> Are the precompiled Ada library units supposed to be compiled with
>> -gnata ?  
> 
> Probably not, no.  (But you'll have to ask the AdaCore staff for the
> definitive answer.)  The reason is that units that are part of the GNAT
> run-time are automatically compiled with checks off.
> 
> 
>> My naive assumption is "yes", so that assertions will be
>> enforced, 
> 
> If you're seeing pragma Assert or pragma Debug, it's most likely only
> for debugging.
> 
> 
>> but in recent versions of GCC-based GNAT it also turns on an
>> annoying -
>> 
>>    pragma Debug (Put_Line ("N =" & N'Img));
>> 
>> in the definition of 'Put' in a-tifiio.adb (Ada.Text_IO.Fixed_IO).
> 
> Are you seeing this?  You shouldn't be.  If you are seeing this output,
> then something is wrong.
> 
> 
>> Surely that isn't the intended behavior?  But is the proper fix to
>> remove that line from the source, or to compile without -gnata ?
> 
> You shouldn't have to do either of these things.

It may a be a bug in the Gentoo ebuild, or maybe it's a deliberate
property of the pre-stable build.  (I'm using the not-officially-stable
version because it doesn't give the frequent "internal compiler error"
problems that 3.15 gives me.)

Either way, I can hack the ebuild to suppress it, but I want to do the
right thing.

Thanks for your response.

-- 
Bobby Bryant
Austin, Texas



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-13  3:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-13  0:40 Pragma Debug in GCC-Ada ? Bobby D. Bryant
2005-07-13  1:18 ` Matthew Heaney
2005-07-13  3:14   ` Bobby D. Bryant

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