Alignment not supported?

Florian Weimer fw@deneb.enyo.de
Sun Jan 1 00:00:00 GMT 2017


* David Malcolm:

> Hence all of this pre-existing logic for setting the alignment of a
> type is implemented with the c-family front-end code, which isn't
> available from libgccjit.

Ah, I assumed it was a c-family target.

> Alternatively, it might make more sense to go with this earlier API
> idea:
>
> extern gcc_jit_type *
> gcc_jit_type_set_alignment (gcc_jit_type *type,
>                             int alignment);
>
> or similar ("make_aligned" ?  "add_alignment" ?)
>
> I think I prefer the latter approach, as it makes it explicit in client
> code linkage metadata what functionality it's using,

It's also more type-safe and self-documenting.  Although “int”
probably isn't exactly the right type here.



More information about the Jit mailing list