| Deutsch English Français Italiano |
|
<86y0vc5k0u.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: That depends... (Was: Regarding assignment to struct) Date: Sun, 04 May 2025 11:05:21 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: <86y0vc5k0u.fsf@linuxsc.com> References: <vv338b$16oam$1@dont-email.me> <51ba1k5h5lkj75qvfuj0ferlddpb6bi0n8@4ax.com> <vv3art$2ku6u$1@news.xmission.com> <vv3qkc$2b7nd$1@dont-email.me> <20250502211854.795@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 04 May 2025 20:05:21 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f2e2a4892b4200c8deca4768c4473856"; logging-data="2660149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OxkY2zz3W+PL/dMKDZsbiLtWuTBr5OxM=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:juvyu6de0FX8YhdbVm2y0eSDv84= sha1:VEvlx/bZapr2FhWgzfJzjgqy/+g= Bytes: 1755 Kaz Kylheku <643-408-1753@kylheku.com> writes: > On 2025-05-03, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote: > >> If it is legal, then why isn't it used more often? Is it a readability/ >> maintainability issue, or is it something else? > > It's not used more often because > > - programmers are irrationallyafraid that there will be lots of > overhead when the structure gets large. > > (In fact, passing large structs by value is implemented > using a hidden pointer; a copy is not made unless the calee > modifies the parameter. It appears that this statement doesn't hold under gcc or clang.