the recent versions of SDCC report this warning and looks like it cancel the __banked calling convention:
../../src/core/vm.c:95: warning 134: Both banked and nonbanked attributes used. nonbanked wins.
i kindly ask you not do so, because __banked and __nonbanked are different attributes, and declaring both for the function make sense. while __banked defines the calling CONVENTION, __nonbanked is a STORAGE attribute. "the whale and the elephant fought and whale won": why they fought, they even could have never face in battle!
the practical usage:
in GBStudio there is a virtual machine that need to call the functions which are defined in the differenmt banks "in the unified way", but some of those functions, which manipulate the banks, must be located in the nonbanked area. that's why putting both attributes make sense!
of course there are workarounds which either difficult (assembly-only implementation), or very slow (wrappers), or ugly (dummy argumets which are different for the different targets) but i don't see why not to revert to the old behavior.
this works, but very ugly:
#if defined(NINTENDO)
#define VM_CALL OLDCALL BANKED
#define STEP_FUNC_ATTR
typedef UWORD DUMMY0_t;
typedef UWORD DUMMY1_t;
#define VM_CALL_NONBANKED OLDCALL NONBANKED
#elif defined(SEGA)
#define VM_CALL OLDCALL BANKED
#define STEP_FUNC_ATTR Z88DK_FASTCALL
typedef UBYTE DUMMY0_t;
typedef UWORD DUMMY1_t;
#define VM_CALL_NONBANKED OLDCALL NONBANKED
#endif
...
void vm_beginthread(DUMMY0_t dummy0, DUMMY1_t dummy1, SCRIPT_CTX * THIS, UBYTE bank, UBYTE * pc, INT16 idx, UBYTE nargs) VM_CALL_NONBANKED;
...
so i suggest either revert to the old behavior or introduce the separate storage attribute for the functions across all the targets.