M
Mister B
I have come across some code that has been working for years, in which
function A calls function B and passes a parameter, but function B
does not expect any parameters!
(Obviously there was no prototype for B, an oversight which is being
corrected. With full warnings on, gcc warns of "implicit declaration"
which was the clue).
Anyway, my question is: what type of problems might this have been
causing?
I know, I know, you'll tell me nasal daemons and anything at all etc
etc, but thnking about some typical implementations, might there be
some data hanging around on a stack or something that could get future
data out of sync, or would anything get cleared on exit from B?
TIA
Mark
(P.S. Apologies if this appears twice, I seemed to crash during 1st
posting)
function A calls function B and passes a parameter, but function B
does not expect any parameters!
(Obviously there was no prototype for B, an oversight which is being
corrected. With full warnings on, gcc warns of "implicit declaration"
which was the clue).
Anyway, my question is: what type of problems might this have been
causing?
I know, I know, you'll tell me nasal daemons and anything at all etc
etc, but thnking about some typical implementations, might there be
some data hanging around on a stack or something that could get future
data out of sync, or would anything get cleared on exit from B?
TIA
Mark
(P.S. Apologies if this appears twice, I seemed to crash during 1st
posting)