Author Topic: Windows 11: pointer size varies depending on computer  (Read 98 times)

Offline alfredo

  • Single posting newcomer
  • *
  • Posts: 1
Hi,
I have a strange, at least for me, behavior with windows 11 25H2 64 bit, codeblock 25.03 with gcc 14.2.0 64 bit compiler and pointer.
The code is very simple:

Code
#include <iostream>

using namespace std;

int main()
{
    cout << sizeof(int *) << endl;

    return 0;
}

The output is 4 byte on i5-10400 CPU that is wrong whereas is 8 byte on i5-11400 and various ryzen CPUs that is correct.
I tried to copy the same project into the different machines and I had problem only with the first one.
If I manually force -m 64 on the first machine, I get sorry, unimplemented: 64-bit mode not compiled in.. Then I have to manually set on build option minGW64 compiler instead of GCC and it works with -m 64, but it does with default settings.
What could be the reason for this?
Thank you

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1787
Re: Windows 11: pointer size varies depending on computer
« Reply #1 on: Today at 01:10:14 pm »
Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.