# introduce align keyword · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c5c9d98065890eaeb9070cba20e5a1ed48b392af)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c5c9d98065890eaeb9070cba20e5a1ed48b392af

Requested commit: c5c9d98065890eaeb9070cba20e5a1ed48b392af

Commit: c5c9d98065890eaeb9070cba20e5a1ed48b392af

Tree: 46ad520853066174a22ad5eb6e3ac81e51f11d16

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
introduce align keyword

 * remove `@setGlobalAlign`
 * add align keyword for setting alignment on functions and
   variables.
 * loads and stores use alignment from pointer
 * memcpy, memset use alignment from pointer
 * add syntax for pointer alignment
 * slices can have volatile
 * add u2, i2 primitives
 * ignore preferred align and use abi align everywhere
 * back to only having alignOf builtin.
   preferredAlignOf is too tricky to be useful.
   See #432. Partial revert of
   e726925e802eddab53cbfd9aacbc5eefe95c356f.

See #37

```

## Parents

- [b8ed0cb3741533e036ee05faa165d2f0c49064f4](https://git.cafe/gitcafe/zig/commit/b8ed0cb3741533e036ee05faa165d2f0c49064f4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c5c9d98065890eaeb9070cba20e5a1ed48b392af?format=markdown)
