comp.lang.ada
 help / color / mirror / Atom feed
* Controlled and funny GNAT warning
@ 2007-01-22  9:34 Maciej Sobczak
  2007-01-22  9:46 ` Duncan Sands
  2007-01-22 10:09 ` Georg Bauhaus
  0 siblings, 2 replies; 3+ messages in thread
From: Maciej Sobczak @ 2007-01-22  9:34 UTC (permalink / raw)


Hi,

Consider:

--  p.ads
with Ada.Finalization;
package P is
    type T is new Ada.Finalization.Controlled with null record;
end P;

Just specification. Let's compile it:

$ gnatmake -gnatv -gnatwd -c p
gnatgcc -c -gnatv -gnatwd p.ads

GNAT GPL 2005 (20050729)
Copyright 1992-2005 Free Software Foundation, Inc.

Compiling: p.ads (source file time stamp: 2007-01-20 20:09:07)

      3.    type T is new Ada.Finalization.Controlled with null record;
                 |
         >>> warning: implicit dereference

  4 lines: No errors, 1 warning


What's more funny, there is no problem with Limited_Controlled.

Am I just unlucky while trying to learn Ada? :-)

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



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

* Re: Controlled and funny GNAT warning
  2007-01-22  9:34 Controlled and funny GNAT warning Maciej Sobczak
@ 2007-01-22  9:46 ` Duncan Sands
  2007-01-22 10:09 ` Georg Bauhaus
  1 sibling, 0 replies; 3+ messages in thread
From: Duncan Sands @ 2007-01-22  9:46 UTC (permalink / raw)
  To: comp.lang.ada; +Cc: Maciej Sobczak

>       3.    type T is new Ada.Finalization.Controlled with null record;
>                  |
>          >>> warning: implicit dereference

I don't get this with GNAT 4.1.2 or with GNAT Pro 5.05w.

Ciao,

Duncan.



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

* Re: Controlled and funny GNAT warning
  2007-01-22  9:34 Controlled and funny GNAT warning Maciej Sobczak
  2007-01-22  9:46 ` Duncan Sands
@ 2007-01-22 10:09 ` Georg Bauhaus
  1 sibling, 0 replies; 3+ messages in thread
From: Georg Bauhaus @ 2007-01-22 10:09 UTC (permalink / raw)


On Mon, 2007-01-22 at 10:34 +0100, Maciej Sobczak wrote:
> Hi,
> 
> Consider:
> 
> --  p.ads
> with Ada.Finalization;
> package P is
>     type T is new Ada.Finalization.Controlled with null record;
> end P;
> 
> Just specification. Let's compile it:

$ gnatmake -gnatv -gnatwd p.ads
gcc -c -gnatv -gnatwd p.ads

GNAT GPL 2006 (20060522-34)
Copyright 1992-2006, Free Software Foundation, Inc.

Compiling: p.ads (source file time stamp: 2007-01-22 10:07:43)
 4 lines: No errors

> $ gnatmake -gnatv -gnatwd -c p
> gnatgcc -c -gnatv -gnatwd p.ads
> 
> GNAT GPL 2005 (20050729)
> Copyright 1992-2005 Free Software Foundation, Inc.
> 
> Compiling: p.ads (source file time stamp: 2007-01-20 20:09:07)
> 
>       3.    type T is new Ada.Finalization.Controlled with null record;
>                  |
>          >>> warning: implicit dereference
> 
>   4 lines: No errors, 1 warning
> 
> 
> What's more funny, there is no problem with Limited_Controlled.
> 
> Am I just unlucky while trying to learn Ada? :-)
> 




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

end of thread, other threads:[~2007-01-22 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-22  9:34 Controlled and funny GNAT warning Maciej Sobczak
2007-01-22  9:46 ` Duncan Sands
2007-01-22 10:09 ` Georg Bauhaus

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