The last stable version 2.6.7 and unstable version 2.6.8 has the same compilation error in Keil MDK 5:
compiling usb_lld.c...
os\hal\platforms\STM32\OTGv1\usb_lld.c(539): warning: #111-D: statement is unreachable
__set_BASEPRI(0);
os\hal\platforms\STM32\OTGv1\usb_lld.c(1266): error: #268: declaration may not appear after executable statement in block
uint32_t pcnt = (isp->txsize + usbp->epc[ep]->in_maxsize - 1) /
os\hal\platforms\STM32\OTGv1\usb_lld.c: 1 warning, 1 error
NOTE: STM32_USB_OTGFIFO_FILL_BASEPRI was defined in mcuconf.h
"uint32_t pcnt" must be defined at the start of a function. (Its not a C++ code
Another issue is that __set_BASEPRI(0); is unreachable in the code and it (seems) to hang the system when STM32_USB_OTGFIFO_FILL_BASEPRI is not 0.