Sujet : Re: relearning C: why does an in-place change to a char* segfault?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 03. Aug 2024, 02:31:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8k194$33ib3$3@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.159 (Vovchansk; )
On Fri, 2 Aug 2024 14:19:49 -0400, James Kuyper wrote:
I've heard that in some other
languages, if you call foo(3), and foo() changes the value of it's
argument to 2, then subsequent calls to bar(3) will pass a value of 2 to
bar(). That sounds like such a ridiculous mis-feature that I hesitate to
identify which languages I had heard accused of having that feature ...
I heard that, too. I think it was on some early FORTRAN compilers, on
early machine architectures, without stacks or reentrancy. And with the
weird FORTRAN argument-passing conventions.