I would agree if implementations did this because of pedantry, just because. But the problem is if further down in the compiler pipeline, the P <= P _expression_ produces some intermediate code that becomes equal to code the optimizer should rightfully optimize away (or replace by the equivalent of __builtin_unreachable).
Gnulib should lead by example and follow the standard (on systems that implement the standard. I like Example 2 on this page [1] very much. It shows that well-justified optimizations can easily lead to consequences of UB that make the compiler look evil (or pedantic). We cannot circumvent the principle of explosion ([2]).
Thanks,
Marc
--