What are the possible effects of modifying an existing header file,
which includes bunch of defines, function prototypes and some struct
definitions. The structure of the header file looks something like
this
//Start of header
Define
Define
Define
Define
….
Define
Function prototype
Function prototype
….
Define
…
Struct abc {
Int m1
Int m2
};
define
define
//End of header
This header file is shared between multiple C files, which are
compiled into separate executables. However, these separate
executables run on the same machine and work in conjunction with each
other.
Let say one of the C file is changed along with the header file, where
some defines and function prototypes were added in the middle of the
file as opposed to the end of the file. After compiling the
executable that uses the modified C file, what are the chances that
the new executable will cause problems when ran with the executables
compiled with older version of the h file.
I guess the best way to go is to add them at the end of the h file.
But I am wondering what kind changes in the middle of h will not cause
major headaches granted that the members in the struct are not
changed.
I realize that this is a very general question but the code is too big
for posting. Sorry for that. Thanks in advance to anyone who can
shed some light on this.
In the case that this is not the right place to post this question,
can somebody suggest a different group
-Sujan