Skip to content

Instantly share code, notes, and snippets.

@beoran
beoran / proposal_go2_range_types.md
Last active March 15, 2019 07:07
Proposal for Go Range Types

Proposal: Go 2 Range Types

B.

Last updated: 15 march, 2019

Discussion at:

golang/go/issues/30428 (the proposal itself)

golang/go/issues/30613 (checked integer types)

@Earnestly
Earnestly / c99_ub_list.rst
Last active March 29, 2024 03:52
C99 List of Undefined Behavior (193 Cases)

C99 List of Undefined Behavior

From N1256: (See http://port70.net/~nsz/c/c99/n1256.html#J.2)

  • A "shall" or "shall not" requirement that appears outside of a constraint is violated (clause 4).
  • A nonempty source file does not end in a new-line character which is not immediately preceded by a backslash character or ends in a partial preprocessing token or comment (5.1.1.2).
  • Token concatenation produces a character sequence matching the syntax of a universal character name (5.1.1.2).
  • A program in a hosted environment does not define a function named main using one of the specified forms (5.1.2.2.1).
  • A character not in the basic source character set is encountered in a source file, except in an identifier, a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token (5.2.1).
  • An identifier, comment, string literal, character constant, or header name contains an invalid multibyte character or does not