Re: memcopy, memmove Implementation

Discussion in 'C Programming' started by Dan Pop, Jun 24, 2003.

  1. Dan Pop

    Dan Pop Guest

    In <> Richard Heathfield <> writes:

    >Dan Pop wrote:
    >>
    >> In <> Richard Heathfield <> writes:
    >>
    >> >const void *s2 means that s2 points to an unknown object whose value must
    >> >not be changed through this pointer.

    >>
    >> Which is kinda redundant: being a void pointer, you can't dereference
    >> it at all ;-)

    >
    >Of course. Nevertheless, you can't even (legitimately) change it through
    >this pointer /value/, once that value has been "const-poisoned".
    >
    >I'm using the term "value" rather loosely here, I know.


    Very loosely, I'd say.

    >What I am
    >getting at is that casting away the constness doesn't help you, in terms
    >of the "definedness" of the code.


    The "definedness" of the code is *entirely* determined by the way the
    function was called.

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
    Dan Pop, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Pop

    Re: memcopy, memmove Implementation

    Dan Pop, Jun 24, 2003, in forum: C Programming
    Replies:
    1
    Views:
    2,493
  2. Micah Cowan

    Re: memcopy, memmove Implementation

    Micah Cowan, Jun 26, 2003, in forum: C Programming
    Replies:
    0
    Views:
    829
    Micah Cowan
    Jun 26, 2003
  3. Trewth Seeker

    Re: memcopy, memmove Implementation

    Trewth Seeker, Jul 14, 2003, in forum: C Programming
    Replies:
    0
    Views:
    512
    Trewth Seeker
    Jul 14, 2003
  4. Replies:
    15
    Views:
    636
    Jorgen Grahn
    Feb 1, 2007
  5. JeanDean
    Replies:
    2
    Views:
    323
    Grizlyk
    Feb 13, 2007
Loading...

Share This Page