Re: [PATCH] support ptrdiff_t if it has the same storage size as int, but does not alias it
"'Robin Haberkorn' via scintilla-interest" <[email protected]> Fri, 03 Oct 2025 10:29:32 +0000
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu Oct 2, 2025 at 03:05:04 GMT +03, Neil Hodgson wrote: > It's complicated by being in multiple headers and configs but "Go To > Definition" in the IDE shows this (elided), where __int64 is a > built-in. > > _WIN64 is defined for x64 target and not for x86 target. > > #ifdef _WIN64 > typedef __int64 ptrdiff_t; > #else > typedef int ptrdiff_t; > #endif > So the warnings are generated for the x86 target (_WIN64 is not defined). Actually not really surprising since long long could be degraded into int. I wonder why this doesn't cause warnings on Clang/GCC. But I don't see how we could work around this, except by adding static casts in all relevant places to silence the warnings. Preprocessor #ifs cannot really be used to take out the unnecessary template instantiations. What if we just switched to dynamic instantiation for RunStyles? Best regards, Robin -- You received this message because you are subscribed to the Google Groups "scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/DD8M7WGMP9LC.GGQQ3PZCSJUY%40googlemail.com.
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEB/6AD3js1eGB4raKarMDYY4q6voFAmjfpY4ACgkQarMDYY4q 6vp6AQf/YWCtVHBI1/nUbmtgFkrPNxV29632b+HUJnxYBRsMbSeVW2JMW/0BM7bi W7uR0lT9HlkrjRoWJuzsjDVfIESEMBJpagcxD3kL5CVyXHl84VE3EKLvoBz/50I2 muavBFfHQkIBxLJfOCdpdNPRhIlR9ag0fkc9y4JY1HXjXBDCuVie+33jviyC7+nZ GhK76zk72/QIoc8Ea+bWwu3XeBmES9fkSBJAdY2QtPK45fdFlpDzbPDVLCE5xD6W nKZUjXhnq1xVkSQWrenU9wwxQomaZyF0X/dW+kgJ9a5/YfuLl+3FTXVjyMtqFMXK um23xi2T/cRfTbmghQ5BFewIBfD/gQ== =4Ma5 -----END PGP SIGNATURE-----