https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92857
--- Comment #2 from Joshua Saxby <joshua.a.saxby at gmail dot com> --- (In reply to Richard Biener from comment #1) > I think the warning is about foo - bar being carried out in type 'int' due to > integer promotion and that converted to size_t which may turn the negative > result into a positive. That could be the issue, although I would expect the integer promotion to promote to an unsigned integer type rather than a signed one. Am I mistaken in this assumption? I don't know if it makes a difference, but if `MyUnsigned` is replaced with `unsigned`, then the warning diagnostic is not issued. Then again, to demonstrate if it is an issue with the integer promotion or not, probably it should be tested with `unsigned char` as well.