On Tue Jun 06 07:40:55 2006, leo wrote:
> It's easy to add 'invalide' code to .pmc files. E.g. I had defined:
> 
>     METHOD parent() {
>         return PMC_pmc_val(SELF) ? PMC_pmc_val(SELF) : PMCNULL;
>     }
> 
> Due to the absence of a return value, the PMC compiler just ignores this 
> 'method' without further notice.

While I think this particular example is now valid with the new calling
conventions, you can get a similar effect with:

METHOD BORK BORK parent() {
  /* nothing to see here*/
}

As leo notes, this should either complain when the .c file is generated,
or when it's compiled. Ignoring it isn't the right answer.

> This also is happening, if there's just a whitespace before the '*':
> 
>     METHOD PMC *parent() {
>         return PMC_pmc_val(SELF) ? PMC_pmc_val(SELF) : PMCNULL;
>     }
> 
> This totally valid C type declaration is just ignored.

This appears to be resolved in recent parrot. Patrick's guess about this
getting fixed during the addition of PCC calling conventions is a good one.

> Fixes welcome,
> leo





-- 
Will "Coke" Coleda

Reply via email to