Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: How to retu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 20 Topic 5632 of 5831
Post > Topic >>

Re: How to return an empty aggregate

by Maciej Sobczak <see.my.homepage@[EMAIL PROTECTED] > Apr 2, 2008 at 12:16 AM

On 1 Kwi, 19:18, Adam Beneschan <a...@[EMAIL PROTECTED]
> wrote:

> As far as I can tell, what Maciej is trying to do is perfectly fine,
> there aren't any language corners that would cause a problem, and the
> compiler is misbehaving.

Looks like this is related to my previous bug re****t. The smallest
test case I've found is:

procedure A is

   type Base_1 is interface;
   type Base_2 is interface;
   type Middle is Interface and Base_1 and Base_2;

   type Derived is new Middle with null record;

   function Make_Derived return Derived is
   begin
      return Derived' (others => <>);
   end Make_Derived;

   D : Base_1'Class := Make_Derived;

begin
   null;
end;

This compiles and runs fine.
After changing the order of progenitors in the definition of Middle
(or changing the type of D to Base_2'Class) the program still
compiles, but fails with segfault at runtime - this, however, takes a
couple of seconds.

Time for another entry in bugzilla.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
 




 20 Posts in Topic:
How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-01 04:58:06 
Re: How to return an empty aggregate
Anh Vo <anhvofrcaus@[E  2008-04-01 05:54:00 
Re: How to return an empty aggregate
"Dmitry A. Kazakov&q  2008-04-01 15:34:04 
Re: How to return an empty aggregate
Robert A Duff <bobduff  2008-04-01 11:00:19 
Re: How to return an empty aggregate
Adam Beneschan <adam@[  2008-04-01 10:18:23 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-02 00:16:40 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-02 00:19:00 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-02 22:02:37 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-03 02:09:11 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-04 08:38:52 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-04 13:35:19 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-04 16:58:36 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-05 06:48:36 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-05 09:04:29 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-05 14:14:04 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-05 15:36:36 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-06 00:00:18 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-06 12:53:11 
Re: How to return an empty aggregate
Maciej Sobczak <see.my  2008-04-06 13:04:55 
Re: How to return an empty aggregate
george.priv@[EMAIL PROTEC  2008-04-07 13:23:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:55:01 CDT 2008.