On Wed, 28 Jun 2023, tlaro...@polynum.com wrote:

But isn't it incorrect? POSIX 2018 says:

'"\ddd", where ddd is a one, two, or three-digit octal number, shall be
written as a byte with the numeric value specified by the octal number.'

since 477 -> 777 are not byte values, shouldn't \777 be interpreted as
'\77' octal then the digit 7; \677 -> \67 octal then 7 etc. ?


Better to do what the C compiler does: try converting up to 3 digits, and
if the result of the conversion is > 255, complain.

-RVP

Reply via email to