T.I.L.: Literals comparison in C thru pointer equality

While analyzing the Zephyr OS source code I found the following routine:

Which do device binding using device’s name (in string format) as parameter, and it’s interesting because it first tries to find a match comparing the string’s addresses, only in the case of no matching it does the classic strcmp approach as fallback.

This is clever because it assumes that if the two strings are literals (I.E. compiler-time defined) the compiler will allocate it only one time in ROM (even if the string was defined multiple times in code) and the address comparison will be valid (although this behavior is not language defined and could not be optimized by the compiler, today this is standard in every major compiler like GCC).

Additional information and discussion:
https://stackoverflow.com/questions/11144118/c-compare-two-string-literals
https://stackoverflow.com/questions/3289354/output-difference-in-gcc-and-turbo-c