FYI, I've tried this workaround without success.
Even though it does allow the firmware to compile without errors, the firmware image doesn't appear to work properly on the target hardware.
For the LPC54018 IoT Module, I can compile/load the Hello World project with Keil 5.29 and everything works great.
Then I open the same project with Keil 5.31, make the change as suggested (-x assembler-with-cpp) and compile without errors. But after flashing the firmware, it doesn't appear to be running on the target. I certainly don't get any data out the serial port.