(e-mail address removed) writes: [...]
One of the key issues for C1X is what new meaning can we come up with
for static?
Oh, easy one:
int *static p; // p may point only to objects with static
// or automatic storage duration [1], not to
// objects with allocated storage duration
Of course, we would then also need:
int *!static q; // q may point only to objects with allocated
// storage duration
The benefits to making it easier to know which pointers to
free should be obvious.
[1] Of course not just static storage duration, that would
be too consistent; the other possibilities would be,
int *static !auto x; // for static-only
int *auto y; // for auto only
int * !auto z; // for static or allocated
int * auto !static v; // for automatic or allocated
int * !static !auto w; // pointer may only be NULL