Re: [PATCH] support ptrdiff_t if it has the same storage size as int, but does not alias it

Neil Hodgson <[email protected]> Fri, 24 Oct 2025 08:16:24 +1100
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <CACWkrTiuZEnEJ4Df1-7tVvo8e-4H4AQ6RFTnBhRamWCtK8HuqQ@mail.gmail.com>
Robin:

> I disagree. NetBSD and Haiku aren't violating the C/C++ standards. Also,
> authors of future libcs/platforms might well not be aware that you think that
> ptrdiff_t should alias int under certain conditions and cause the same issue.

   The standards allow lots of weird choices like defining NULL to not
be all 0 bits. Platforms that behave differently to the big 3 get to
live with the consequences of their choices.

   32-bit systems are becoming quite rare. On macOS, Scintilla went
64-bit only in 2014 and support effort would be decreased by only
supporting 64-bit platforms.

> So I prepared another version of my patch that introduces
> PTRDIFF_DOESNT_ALIAS_INT, which you may have to pass in via CXXFLAGS.

   Compile-time options should be listed in the table in the "Building
Scintilla" section at the end of doc/ScintillaDoc.html.

   Neil

-- 
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/CACWkrTiuZEnEJ4Df1-7tVvo8e-4H4AQ6RFTnBhRamWCtK8HuqQ%40mail.gmail.com.