GCC and long double

Started by Stan Duraham, June 18, 2026, 08:20:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stan Duraham

For those using GCC to code, or build a compiler, might come across  this. There's a problem with 'long double' type and fprintf. Not sure about sprint.

Put this before includes to get it to work right.
#define __USE_MINGW_ANSI_STDIO 1  // <-- Add this before <stdio.h>

The other option is to cast it to a double and print it as a double.

Consult Google Gemimi for more information. DeepSeek couldn't figure this one out. On another subject, it was the other way around.
Added Note: I'm using the free version of DeepSeek, not the latest.
  •