If you use a microcontroller with 4kb of ram you should know the length of all buffers you use so you don't need to store it. For NES programming, which has 2kb you don't program C at all...much less wasting cycles doing things like strlen. It's tedious but rom is bigger and you can "store" the length of things in the instruction themselves (ie., hardcoded lengths), whereas ram is saved for more important things like position of sprites or whatever.
I really hope people aren't seriously doing string parsing on microcontrollers.
But I thought we were talking about compilers here, and defining what a compiler should do when it comes across a string literal, and not about what people should or shouldn’t do with strings on 4KB RAM MCUs.
String parsing is sometimes necessary, and it could be as simple as formatting and sending logs lines through an UART.
The 4KB of RAM in my microcontroller would appreciate those extra 4 bytes (or 3) used for every string.