https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80265
--- Comment #7 from Pedro Alves <palves at redhat dot com> --- TBH, though I do think being able to use different algorithms for compile/runtime is useful and a good idea, making the __builtin_strlen etc. builtins works OOTB would of course be great. I'm merely suggesting the __builtin_constant_p idea here, in case it has a better chance of having P0426R1 addressed in GCC7. Also, AFAICS, GCC doesn't have __builtin_wcslen (and equivalents for char16_t/char32_t), etc. yet. The separate compile/runtime paths approach allows calling into the C runtime's optimized wcslen (etc.) when not in a compile-time context without having to depend on adding the built-ins.