Skip to content

feature request: allow packed types #1704

Closed

Description

@bnoordhuis

Would it be possible to add support for packed types? Types appear to be unpacked right now (which is fine in itself) but it blocks interop with C APIs like epoll_wait.

Example: on x86_64, (0u32, 0u64) is 12 bytes when packed and 16 bytes when unpacked.

Activity

  1. brson commented on Jan 30, 2012

    @brson
    Contributor

    While I do think we should support this in the language, you could probably hack around the problem with unsafe pointers.

  2. added a commit that references this issue on Feb 6, 2012
  3. graydon commented on Feb 15, 2012

    @graydon
    Contributor

    I'm ok taking a patch to add packed as a prefix type operator to a record, vector or tuple type. It'll be a bit of a pain to support but does seem to be part of the world we live in.

  4. added a commit that references this issue on Apr 10, 2013
    5d01f64
  5. thestinger commented on Apr 11, 2013

    @thestinger
    Contributor

    Fixed by cad2260

  6. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions