[C++-sig] Bug: Pyste and pure virtual functions.

Nicodemus nicodemus at globalite.com.br
Sat Aug 16 20:46:21 CEST 2003

Hi Prabhu!

Prabhu Ramachandran wrote:

>>>>>>"PR" == Prabhu Ramachandran <prabhu at aero.iitm.ernet.in> writes:
>>>>>>"N" == nicodemus  <nicodemus at globalite.com.br> writes:
>    N> My first version was like yours, but the missing return
>    N> generates warnings with Intel 6, so I added it. I didn't know
>    N> it would generate an error in gcc, thought 8/ Any suggestions?
>    PR> Well, it will generate errors under Intel 6 also if the
>    PR> returned class has no nullary constructor.  I'm not sure if
>    PR> 'return unsigned int();' will also compile correctly.
>    PR> One alternative is that for standard types (int, float etc.)
>    PR> the brackets are removed but the return value is there.  For
>    PR> classes/structures that are returned we add the brackets or
>    PR> alternatively dont return anything and live with the warnings.
>    PR> It would be nice if there were a better way.
>I just found an obvious way to get around this -- simply call the
>wrapped function (afterall this is only to satisfy the compiler).
>Attached is a patch to fix the problem with Pyste from CVS.  This
>works fine for me.

I tried this approach too, but then it doesn't link: it complains about 
the abstract function being referenced inside the default_() method and 
is unable to resolve find it (I'm using Intel 6 on Windows). 8/
Anyone got other ideas?


More information about the Cplusplus-sig mailing list