Geoff Clare via austin-group-l at The Open Group dixit:

>XCU 1.1.2 relates to utilities that "perform complex data manipulation
>using their own procedure and arithmetic languages".  So it applies to
>shell arithmetic expansion, but isn't really relevant to simple
>argument parsing by a utility.  For that, the relevant text is in XBD
>12.1 Utility Argument Syntax, item 6.

Ah okay.

>It's somewhere between the second and third. It's unspecified whether
>the utility will report an error, but if it doesn't then it has to
>handle the value correctly, i.e. test 2 -lt 99999999999999999999 must
>exit with status 0 or status >1; it must not exit with status 1.

OK, so wraparound behaviour is not allowed for utilities like test(1),
and, unless I do bignums, it must return an error.

Thank you.

Can you confirm (for the sake of completeness) that wraparound
is ok for shell arithmetics in POSIX mode?

bye,
//mirabilos
-- 
[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...

  • out-of-bounds numbers... Thorsten Glaser via austin-group-l at The Open Group
    • Re: out-of-bound... Geoff Clare via austin-group-l at The Open Group
      • Re: out-of-b... Thorsten Glaser via austin-group-l at The Open Group
        • Re: out-... Geoff Clare via austin-group-l at The Open Group
        • Re: out-... Robert Elz via austin-group-l at The Open Group
          • Re: ... Gabriel Ravier via austin-group-l at The Open Group
          • Re: ... Thorsten Glaser via austin-group-l at The Open Group

Reply via email to