Search:

Type: Posts; User: grumpy

Search: Search took 0.12 seconds.

  1. Depends what you consider a "reasonable...

    Depends what you consider a "reasonable expectation".

    In the end, avoiding undefined behaviour comes down to the programmer technique, not to programmer reading material.

    A language lawyer,...
  2. That's part of it. Some instances of...

    That's part of it. Some instances of undefined behaviour are to allow implementation freedoms. Some instances of undefined behaviour reflect the fact that what works on one system can be...
  3. It is one thing for a particular compiler vendor...

    It is one thing for a particular compiler vendor to make such a choice for their compiler. Something else for a standard to mandate it for all possible compilers.

    Undefined behaviour allows...
  4. Yes, indeed, my description was incomplete. ...

    Yes, indeed, my description was incomplete.


    That's the point you're missing. It is not only the ordinality that is undefined. Even the attempt to compare the results (in specified ways)...
  5. There are many other instances of undefined...

    There are many other instances of undefined behaviour in the standard, including things you can do to pointers that invoke undefined behaviour. This is just one.



    That question is meaningless,...
  6. No. In C, the type of every pointer is...

    No. In C, the type of every pointer is defined.


    There is no conversion involved (except that of converting the name of an array into a pointer). It is simply a case where the results of...
  7. No. A pointer can hold any value which...

    No. A pointer can hold any value which represents a valid address in memory. If the assignment compiles (i.e. p1 and p2 are of compatible types) the result of the assignment is defines. Of...
  8. No it is not. The act of comparison itself has...

    No it is not. The act of comparison itself has undefined behaviour.

    The standard does that, so I understand, because not all machine architectures allow comparison of pointers that point into...
Results 1 to 8 of 8