> Le 26 mars 2018 à 14:48, Oleg Nesterov <o...@redhat.com> a écrit :
> 
> On 03/24, Yann Orlarey wrote:
>> 
>> Hi,
>> 
>> The problem has been fixed in version 2.5.26. The compiler now reports
>> an error instead of an exception.
> 
> and the fix is much better than I tried to suggest, thanks.
> 
> OK, let me report another minor/trivial problem. Again, I'm not sure I 
> understand
> this code correctly, but I think that InstructionsCompiler::generateFFun() 
> should
> check 'fun_type' before it calls genDeclareFunInst(). This code
> 
>       process = ffunction(int   func(), "",""),
>                 ffunction(float func(), "","");
> 
> obviously crashes faust (triggers assert in DeclareFunInst::DeclareFunInst()).
> 
> OTOH, faust happily translates this code
> 
>       process = ffunction(int func(),      "",""),
>                 ffunction(int func(float), "","");
> 
> into
> 
>       output0[i] = FAUSTFLOAT(int(func()));
>       output1[i] = FAUSTFLOAT(int(func(float(float(input0[i])))));
> 
> probably because nerateFFun() generates the new args_types/args_value every 
> time
> without any check. This is not that bad, but perhaps not right anyway.
> 
> Oleg.


The DeclareFunInst causes this assert if functions with the same name but 
different prototypes are used. This is probably not correct !?

Yann are we supposed to be able to use several « foreign functions with the 
same name but different prototypes » ? Or at least coming from different header 
files? If not then I guess this could/should be checked before the FIR 
generation step and the use of DeclareFunInst.

Stéphane 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to