reactos/sdk/include
Hermès Bélusca-Maïto de81021bab
[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.
But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
2022-11-24 01:18:16 +01:00
..
asm [NTOS] Add MxCsr handling to trap handlers 2022-08-22 11:22:08 +02:00
c++ [GITHUB] Add MSVC ARM64 builder 2022-05-25 21:10:17 +03:00
crt [CRT] Fix amd64 floating point control functions 2022-08-22 11:22:08 +02:00
ddk [INCLUDE] immdev.h: Adapt INPUTCONTEXTDX to C++ 2022-10-15 08:13:22 +09:00
dxsdk [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
GL [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
host [SDK] Fix definition of IMAGE_NT_HEADERS64 in host tools 2021-04-28 13:10:23 +02:00
ndk [NTOS:IO][NDK] Add the exported IoDeleteDriver to the NDK headers. 2022-11-18 18:11:26 +01:00
psdk [PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity. 2022-11-24 01:18:16 +01:00
reactos [LIBXML2] Update to version 2.9.14. CORE-17766 2022-11-21 19:46:12 -05:00
wdf/kmdf/1.17 [KMDF] Make KMDF headers compatible with our SDK and compilers 2020-11-03 00:06:25 +03:00
xdk [REACTOS] Finally get some ARM64 applications building (#4517) 2022-05-25 17:06:32 +03:00