Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: isspace() behaviour



    Date:        Thu, 19 Dec 2024 09:10:42 +0000
    From:        Patrick Welche <prlw1%welche.eu@localhost>
    Message-ID:  <Z2PjEk9AhK7MLpQg%mail.welche.eu@localhost>

  | The problem was that it was stored in an unsigned int.
  |
  | uint32_t c = EOF;
  | isspace(c); -> segmentation fault on nbsd

Yes, that's simply broken, the spec is clear, it must be int
(not short, long, unsigned anything ...) and its value must
be either EOF, or a value which can be stored in an unsigned char.

kre


Home | Main Index | Thread Index | Old Index