Le 13/08/2015 12:56, Mikael Morin a écrit :
Still, implementation-defined behavior is a progress over undefined behaviour. Even if it's not set in stone, the good thing about implementation-defined behaviour is that it's known to be non-random. So it can be checked, either with autoconf, or with a macro. Would it be acceptable to have both variants of the code and decide among them with such a check? It feels a bit overkill for such a little function, but it is the only way that I see to achieve both need for speed and for well-defined-ness. I guess it won't kill the bootstrap-ubsan errors though.
Sorry Richi, I didn't see your answer before posting. I will prepare something tomorrow. Mikael