On Tue, 20 May 2025, Florian Weimer via Gcc-help wrote: > Is there a concise way to convert X to a value Y of type int, so that > > X == (unsigned int) Y > > (assuming that X is of type unsigned int to start with)? GCC supports > this as an extension, using Y = (int) X, but this extension is > apparently unavailable if UBSAN is active. Can you give a specific compilable example? Neither GCC nor Clang instruments int f(unsigned x) { return x; } under -fsanitize=undefined. Alexander