https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80777
Julian Rose <jrose.manila at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|gdb reports incorrect |gdb sizeof(long int)=4 but |sizeof(long int) on |gcc sizeof(long int)=8 on |x86_64-pc-cygwin |x86_64-pc-cygwin --- Comment #4 from Julian Rose <jrose.manila at gmail dot com> --- https://software.intel.com/en-us/articles/size-of-long-integer-type-on-different-architecture-and-os states sizeof long int varies between architectures and operating systems; in particular sizeof(long) on IA-64 in Linux is 8 whereas in windows it is 4. Under Cygwin it appears gcc has been built with the "Linux" memory model, and gdb has been built with the "Windows" model. Obviously consistency between gcc and gdb is required for any given platform. But as cygwin runs on a windows platform, it is not clear if the compiler or the debugger is "wrong". Either way, perhaps a solution may be found in the specs configuration given to the compiler for the x86_64-pc-cygwin platform.