(Moved from #1753: Option to drop all legacy OpenGL).
I see it as a subtask of a general problem:
restrict function/enums usage based on their GL version
This can be used for cutting of deprecated features and preventing usage of others whose requirements are not met (e.g. TransformFeedback core requires GL-3.1).
I have no idea how this can be implemented ATM.
As a possible solution to my request:
Insert an assertion (at the beginning of each function) (only for debug mode) with a version check.
The version required by the function is known at compile time. The version of the context should be known as well as user requests it in the run-time.