Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: be less tentative about undefined behavior #18091

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1627,7 +1627,7 @@ endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1660,7 +1660,7 @@ added: v0.5.0
Reads a signed 8-bit integer from `buf` at the specified `offset`.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1694,7 +1694,7 @@ the specified endian format (`readInt16BE()` returns big endian,
`readInt16LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1728,7 +1728,7 @@ the specified endian format (`readInt32BE()` returns big endian,
`readInt32LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1763,7 +1763,7 @@ and interprets the result as a two's complement signed value. Supports up to 48
bits of accuracy.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1795,7 +1795,7 @@ added: v0.5.0
Reads an unsigned 8-bit integer from `buf` at the specified `offset`.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1827,7 +1827,7 @@ specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1865,7 +1865,7 @@ specified endian format (`readUInt32BE()` returns big endian,
`readUInt32LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1898,7 +1898,7 @@ and interprets the result as an unsigned integer. Supports up to 48
bits of accuracy.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2236,7 +2236,7 @@ endian). `value` *should* be a valid 64-bit double. Behavior is undefined when
`value` is anything other than a 64-bit double.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2271,7 +2271,7 @@ endian). `value` *should* be a valid 32-bit float. Behavior is undefined when
`value` is anything other than a 32-bit float.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2304,7 +2304,7 @@ signed 8-bit integer. Behavior is undefined when `value` is anything other than
a signed 8-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2337,7 +2337,7 @@ endian). `value` *should* be a valid signed 16-bit integer. Behavior is undefine
when `value` is anything other than a signed 16-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2370,7 +2370,7 @@ endian). `value` *should* be a valid signed 32-bit integer. Behavior is undefine
when `value` is anything other than a signed 32-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2404,7 +2404,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
anything other than a signed integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2437,7 +2437,7 @@ valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
other than an unsigned 8-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2470,7 +2470,7 @@ endian). `value` should be a valid unsigned 16-bit integer. Behavior is
undefined when `value` is anything other than an unsigned 16-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2507,7 +2507,7 @@ endian). `value` should be a valid unsigned 32-bit integer. Behavior is
undefined when `value` is anything other than an unsigned 32-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2543,7 +2543,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
anything other than an unsigned integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down