Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.std.c > #6648

Re: May a string span multiple, independent objects?

From Vincent Lefevre <vincent-news@vinc17.net>
Newsgroups comp.std.c
Subject Re: May a string span multiple, independent objects?
Date 2024-07-03 15:37 +0000
Organization a training zoo
Message-ID <20240703153109$26d4@vinc17.org> (permalink)
References <20240703141500$00ed@vinc17.org> <lel8ndF7f8iU1@mid.dfncis.de>

Show all headers | View raw


In article <lel8ndF7f8iU1@mid.dfncis.de>,
  Hans-Bernhard Bröker <HBBroeker@gmail.com> wrote:

> Comparing pointers pointing at distinct objects is already invalid (for 
> some interpretation of "invalid"), so: no.  Yes, that means the 
> implementation of a function like memmove() cannot be fully portable C.

This is valid in C17 (6.5.9p6). If this is no longer valid, this
is really bad. GMP and MPFR fully rely on comparison of pointers
that may point to unrelated objects (to know whether arguments
are pointers to identical or different objects), and I think
that one cannot do differently to avoid useless copies of input
objects.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Back to comp.std.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

May a string span multiple, independent objects? Vincent Lefevre <vincent-news@vinc17.net> - 2024-07-03 14:31 +0000
  Re: May a string span multiple, independent objects? Hans-Bernhard Bröker <HBBroeker@gmail.com> - 2024-07-03 17:23 +0200
    Re: May a string span multiple, independent objects? Vincent Lefevre <vincent-news@vinc17.net> - 2024-07-03 15:37 +0000
    Re: May a string span multiple, independent objects? James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-03 12:11 -0400
    Re: May a string span multiple, independent objects? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-08 08:51 -0700
  Re: May a string span multiple, independent objects? James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-03 11:59 -0400
    Re: May a string span multiple, independent objects? Ben Bacarisse <ben@bsb.me.uk> - 2024-07-03 22:08 +0100
      Re: May a string span multiple, independent objects? James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-03 17:36 -0400
      Re: May a string span multiple, independent objects? Vincent Lefevre <vincent-news@vinc17.net> - 2024-07-04 13:22 +0000
        Re: May a string span multiple, independent objects? Ben Bacarisse <ben@bsb.me.uk> - 2024-07-05 05:14 +0100
        Re: May a string span multiple, independent objects? James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-05 01:37 -0400
        Re: May a string span multiple, independent objects? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-08 08:35 -0700
  Re: May a string span multiple, independent objects? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-07-05 07:14 +0000

csiph-web