* Discriminant & interface not implemented by full type
@ 2009-03-09 17:21 Reto Buerki
2009-03-12 1:44 ` Adam Beneschan
2009-03-12 6:21 ` Per Sandberg
0 siblings, 2 replies; 4+ messages in thread
From: Reto Buerki @ 2009-03-09 17:21 UTC (permalink / raw)
Hi everyone,
I have the following simple test application:
package Full_View is
type Base_Type (Num : Integer) is tagged private;
type Base_Interface is interface;
type New_Type is new Base_Type (Num => 11) and
Base_Interface with private;
private
type Base_Type (Num : Integer) is tagged record
My_Number : Integer := Num;
end record;
type New_Type is new Base_Type (Num => 11) and
Base_Interface with null record;
end Full_View;
Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the
following error:
full_view.ads:7:09: interface "Base_Interface" not implemented by full
type (RM-2005 7.3 (7.3/2))
When removing the (Num => 11) discrimant initialization or the
Base_Interface interface from the New_Type type extension, the code
compiles fine.
Is this a compiler bug? Seems to me that the consistency check of the
partial and full view of a tagged type covering interfaces does not like
discriminants.
Thanks for your help.
- reto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Discriminant & interface not implemented by full type
2009-03-09 17:21 Discriminant & interface not implemented by full type Reto Buerki
@ 2009-03-12 1:44 ` Adam Beneschan
2009-03-12 6:21 ` Per Sandberg
1 sibling, 0 replies; 4+ messages in thread
From: Adam Beneschan @ 2009-03-12 1:44 UTC (permalink / raw)
On Mar 9, 10:21 am, Reto Buerki <r...@codelabs.ch> wrote:
> Hi everyone,
>
> I have the following simple test application:
>
> package Full_View is
>
> type Base_Type (Num : Integer) is tagged private;
>
> type Base_Interface is interface;
>
> type New_Type is new Base_Type (Num => 11) and
> Base_Interface with private;
>
> private
> type Base_Type (Num : Integer) is tagged record
> My_Number : Integer := Num;
> end record;
>
> type New_Type is new Base_Type (Num => 11) and
> Base_Interface with null record;
>
> end Full_View;
>
> Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the
> following error:
> full_view.ads:7:09: interface "Base_Interface" not implemented by full
> type (RM-2005 7.3 (7.3/2))
>
> When removing the (Num => 11) discrimant initialization or the
> Base_Interface interface from the New_Type type extension, the code
> compiles fine.
>
> Is this a compiler bug? Seems to me that the consistency check of the
> partial and full view of a tagged type covering interfaces does not like
> discriminants.
>
> Thanks for your help.
Sure looks like a compiler bug to me. The program definitely doesn't
violate the RM section paragraph that the error message refers to.
-- Adam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Discriminant & interface not implemented by full type
2009-03-09 17:21 Discriminant & interface not implemented by full type Reto Buerki
2009-03-12 1:44 ` Adam Beneschan
@ 2009-03-12 6:21 ` Per Sandberg
2009-03-12 13:07 ` Reto Buerki
1 sibling, 1 reply; 4+ messages in thread
From: Per Sandberg @ 2009-03-12 6:21 UTC (permalink / raw)
Compiles fine with GNATPro 6.2.1
/Per
Reto Buerki wrote:
> Hi everyone,
>
> I have the following simple test application:
>
> package Full_View is
>
> type Base_Type (Num : Integer) is tagged private;
>
> type Base_Interface is interface;
>
> type New_Type is new Base_Type (Num => 11) and
> Base_Interface with private;
>
> private
> type Base_Type (Num : Integer) is tagged record
> My_Number : Integer := Num;
> end record;
>
> type New_Type is new Base_Type (Num => 11) and
> Base_Interface with null record;
>
> end Full_View;
>
> Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the
> following error:
> full_view.ads:7:09: interface "Base_Interface" not implemented by full
> type (RM-2005 7.3 (7.3/2))
>
> When removing the (Num => 11) discrimant initialization or the
> Base_Interface interface from the New_Type type extension, the code
> compiles fine.
>
> Is this a compiler bug? Seems to me that the consistency check of the
> partial and full view of a tagged type covering interfaces does not like
> discriminants.
>
> Thanks for your help.
> - reto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Discriminant & interface not implemented by full type
2009-03-12 6:21 ` Per Sandberg
@ 2009-03-12 13:07 ` Reto Buerki
0 siblings, 0 replies; 4+ messages in thread
From: Reto Buerki @ 2009-03-12 13:07 UTC (permalink / raw)
Per Sandberg wrote:
> Compiles fine with GNATPro 6.2.1
> /Per
>
> Reto Buerki wrote:
>> Hi everyone,
>>
>> I have the following simple test application:
>>
>> package Full_View is
>>
>> type Base_Type (Num : Integer) is tagged private;
>>
>> type Base_Interface is interface;
>>
>> type New_Type is new Base_Type (Num => 11) and
>> Base_Interface with private;
>>
>> private
>> type Base_Type (Num : Integer) is tagged record
>> My_Number : Integer := Num;
>> end record;
>>
>> type New_Type is new Base_Type (Num => 11) and
>> Base_Interface with null record;
>>
>> end Full_View;
>>
>> Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the
>> following error:
>> full_view.ads:7:09: interface "Base_Interface" not implemented by full
>> type (RM-2005 7.3 (7.3/2))
>>
>> When removing the (Num => 11) discrimant initialization or the
>> Base_Interface interface from the New_Type type extension, the code
>> compiles fine.
>>
>> Is this a compiler bug? Seems to me that the consistency check of the
>> partial and full view of a tagged type covering interfaces does not like
>> discriminants.
Adam, Per thanks for your replies!
I filed a GCC bug report [1].
- reto
[1] - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39441
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-12 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 17:21 Discriminant & interface not implemented by full type Reto Buerki
2009-03-12 1:44 ` Adam Beneschan
2009-03-12 6:21 ` Per Sandberg
2009-03-12 13:07 ` Reto Buerki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox