On 6/29/22, Ozkan Sezer <[email protected]> wrote: > On 6/29/22, LIU Hao <[email protected]> wrote: >> I have been aware of this too. The asm statement is passed an indirection >> by >> a constant offset in >> the FS/GS segment, which itself is valid, but GCC thinks it was about the >> default DS segment and >> fails to calculate its size. >> >> >> This may be solved for GCC by casting the input offset to a pointer to an >> array of unknown bound. So >> instead of writing >> >> [offset] "m" ((*(y *) (size_t) Offset)) >> >> we write >> >> [offset] "m" ((*(y (*)[]) (size_t) Offset)) >> >> >> Unfortunately Clang does not like this: >> >> test.c:5:53: error: dereference of pointer to incomplete type >> 'unsigned >> long[]' >> >> Probably some conditional macros are necessary. > > Well, I'm not proficient with gcc inline asm. > So, whatever you guys think is best.
Also: is this not actually a gcc bug? Are they aware of it? _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
