When consolidating duplicate literals, will a C compiler look in the middle of a string?

cle*_*ong 7 c compiler-optimization

I have a lot of literal strings in my source code that are otherwise identical except for leading white-spaces (due to a desire to maintain correct indentation). Are compilers smart enough to see that it can reuse the space in memory for both, just offsetting one string by a couple bytes?

The*_*One -4

简单的回答:不。我不知道有哪个编译器这样做。

  • 你应该对此发表评论,因为这不是真正的答案 (3认同)