Nitpick: (scoped) const variables in C can be
initialized from run-time values, not
assigned.
RAAI: Really, assignment ain't initialization.
A file scope const object in C can have a value which is not known at the point of declaration.
extern const int var;
This one is not known until either a definition is supplied later in the same translation unit, or else not until linkage with another translation unit which supplies a definition.
static const int var;
In this case, the value is not determined until either a definition is seen which provides an initializer, or else the the end of the translation unit is reached (whereupon the tentative definition becomes actual, with a value of zero).
In this situation, though, the static value can be propagated as a true literal constant into code which precedes the point where the value is known. Just not in a "one-pass compiler".
This is also the case when a block-scoped const is initialized with a literal constant:
{ const int x = 5; /* almost "true" constant */ ... }
In C, x isn't considered a constant expression, but
de facto it is, which is good enough for optimizing.