Deutsch   English   Français   Italiano  
<v8k194$33ib3$3@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.c
Subject: Re: relearning C: why does an in-place change to a char* segfault?
Date: Sat, 3 Aug 2024 01:31:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <v8k194$33ib3$3@dont-email.me>
References: <IoGcndcJ1Zm83zb7nZ2dnZfqnPWdnZ2d@brightview.co.uk>
	<v8fhhl$232oi$1@dont-email.me> <v8fn2u$243nb$1@dont-email.me>
	<87jzh0gdru.fsf@nosuchdomain.example.com> <v8gte2$2ceis$2@dont-email.me>
	<20240801174256.890@kylheku.com> <v8i9o8$2oof8$1@dont-email.me>
	<v8j808$2us0r$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 03 Aug 2024 03:31:17 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="461a22efc661e416b053d4dcc2a44527";
	logging-data="3262819"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18p30jcLMWLqREfF2bhf84K"
User-Agent: Pan/0.159 (Vovchansk; )
Cancel-Lock: sha1:6TkUqduwryEsS8zCUSxNIFZcgzo=
Bytes: 1806

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.