CF g++17 32 bit vs 64 bit Strange Behvaiour

Revision en2, by ExplodingFreeze, 2021-03-06 21:01:39

First of all apologies if this is something that has been asked before, my searching ability appears to have failed me then.

While using printf with formatting for zero padding on CF (including custom invocation), I encountered this strange behavior:

WA — 109283810

AC — 109284812

The only difference between these two submissions in the language chosen (32bit vs 64bit C++17). Somehow in the 32-bit version, the second argument is always processed as zero.

In the 32-bit C++17 version, splitting the printf into 2 printfs also causes it to get AC — 109284259

  1. Does CF use a different compiler / environment for 64 bit that could explain this difference in behavior?

  2. Is there some undefined behavior in my code that is the source of this inconsistency?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ExplodingFreeze 2021-03-06 21:01:39 80
en1 English ExplodingFreeze 2021-03-06 21:00:45 800 Initial revision (published)