Skip to content

C3 alignment suggestion #48

@spikeysnack

Description

@spikeysnack

from alignment search c3 website:

A non-packed struct has the alignment of the member that has the highest alignment.
A packed struct has alignment 1.

https://c3-lang.org/references/docs/specification/#align-attribute

for details on changing the alignment.

struct Foo @align(8)
{
int a;
}

uint a = Foo.alignof; // 8

macro new_aligned($Type, ...) @NODISCARD
macro new_array_aligned($Type, usz elements) @NODISCARD

So if you want to use VectorN specify an acceptible alignment for wasm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions