It should not as string are constant in Python so g++ may/should notice that it can refer always the same pointer.