It is not intended to change behaviour of global variables.
It is intended to give the user a hint, what a global variable is and what the developer intended.
For example if you open the codeblocks project with a fresh installation the user is asked for two global variables: cb and wx31 (or whatever)
But the user has absolute no clue what to do with this variables or even with this dialog.
With this patch (this is only part one of a series of patches) the developer can store some information in the project file. For example it could store for the cb variable in the description field:
This variable is used to pass additional compiler flags to the build process of codeblocks. For example if you want to build a fast codeblocks installation pass -O3, but if you want build with debug information pass a -g to this variable
Now when the user opens the project file and codeblocks can not find the global variable 'cb' it will open a dialog with the description the developer provided.
If the variable is already defined nothing would happen. (Note that this described dialog is not part of this patch, i am currently working on it. This patch adds only the possibility for the developer to store additional description information to the project file)
If the developer passes a default value this value will be suggested to the user. For the 'cb' variable the dev would provide -O3 and in the ask dialog -O3 would be provided. For the wx31 variable it would not make any sense to provide a default value, but you could provide a description what is like:
Point this path to installation directory of your wxWidgets 3.1 installation
[edit:]
Additionally it introduces ambiguity and unexpected behaviour.
Can you describe this a bit more? I can not find any ambiguity or unexpected behaviour