Although I would have bet money that I had selected the floating point printf option when I created the project, I created a new project, making doubly sure to select floating point printf, then copied and pasted all the old code into the new project. The compiler errors disappeared, and the program runs and prints floats just fine.
For anyone else reading this to fix a similar problem, I should have mentioned that I am using redlib. I've come to the conclusion that there is some piece of MCUxpresso that controls the use of floats, that is not changed by messing with the pre-processor list. Whatever it is is only set by ticking the box for floating point printf at project creation time. I haven't used neolib, it may be completely different.
Thanks for your help, Erich. I'd say stay safe, but judging by Switzerland's Covid-19 stats, that won't be a problem.