Q:

Strings in static memory instances count

As I know compiletime C-like strings are kept in static memory as only one instance. For instance I got both true on gcc 4.6 running example below. But I wonder is it always true and can be portable. Behavior on both C and C++ is interesting.
#include <iostream>

bool amIportable(const char* value) {
  const char* slocal = "Hello";
  return (slocal==value);
}

int main() {
  const char* s = "Hello";
  std::cout << std::boolalpha 
            << amIportable(s) << '\n'
            << amIportable("Hello") << '\n';
}

A:

No, this is not always true, nor is it portable.
Merging identical string literals is an optimization that is performed by the compiler and the linker working together. Recent versions of both GCC and Microsoft's compiler both support it, but only when certain optimization switches are set.
And it's not just an "on" or "off" feature. Different compilers and different optimization settings will also affect how aggressively this is performed. For example, sometimes string literals are pooled only within the scope of an individual function, other times it happens at the level of the translation unit, and still other times the linker might get involved to do it across multiple translation units.
This is allowed because the C and C++ standards leave this behavior as implementation-dependent.

A:

No, it's implementation dependent for both C and C++.
C11 §6.4.5/7 String literals

It is unspecified whether these arrays are distinct provided their elements have the appropriate values. If the program attempts to modify such an array, the behavior is undefined.

C++11 §2.14.5/12 String literals

Whether all string literals are distinct (that is, are stored in nonoverlapping objects) is implementation-defined. The effect of attempting to modify a string literal is undefined.

