Hello
In ANSI C there is no guarantee at all that the variables will be allocated in the sequence in which they are defined,
The linker can decide to allocate them in any order.
If you need the different values to be allocated in a specific sequence, you can define them in a structure and then access the various fields inside of the structure using macros.
For example:
__declspecc(version ) const struct {
UI16 major;
UI16 minor;
UI16 build;
UI16 revision
} fw_version_nbr = {SOFTWARE_VERSION_MAJOR, SOFTWARE_VERSION_MINOR, SOFTWARE_VERSION_BUILD, SOFTWARE_VERSION_REVISION};
#define fwMajor fw_version_nbr.major
#define fwMinor fw_version_nbr.minor
#define fwBuild fw_version_nbr.build
#define fwRevision fw_version_nbr.revision
This should be equivalent and should keep the existing code compatible,
CrasyCat