in reply to XS generation error, function returning list

The section name should be PPCODE:, with two P's instead of PCODE: as you wrote. I think that Perl/xsubpp leaves PCODE: alone and the C compiler interprets this as a label instead of a special XS section.

Replies are listed 'Best First'.
Re^2: XS generation error, function returning list
by Cacadril (Novice) on Jul 21, 2016 at 22:37 UTC

    Confirmed, thanks. I should have written PPCODE with two P's. Now it compiles. The generated C code is now PUTBACK; return; at the position of the PPCODE.

    I can only speculate that the generated call "statfs(buf)" at the end of the function has some cause related to the fact that with the PCODE being interpreted as a label, all the code was in the INIT secion.