[PATCH 1/2] doc: document max_align_t effect on ABI
DJ Delorie
dj@redhat.com
Wed Mar 18 01:44:01 GMT 2026
Paul Eggert <eggert@cs.ucla.edu> writes:
> -@end deftp
Elsewhere in the manual, it seems that the rule is that text defining
the type goes inside the @deftp, and text describing how to use it goes
outside it. Since @deftp text is indented (in pdf at least), we should
be consistent here. See the first page or so of the Input/Output on
Streams chapter. However, given the rest of the text in this section, I
don't think it matters which way you choose.
> +Code that uses @code{max_align_t} should take into account the
> +variable alignment of the type.
This is a slightly confusing wording, but only because we don't think of
types being aligned, just the objects of that type being aligned, and
"variable" could mean something different than "changing". A type
imposes an alignment, it doesn't "have" one because a type doesn't
occupy memory.
Perhaps "should not rely on its alignment being constant for any given
platform." ?
> +For example, it is unwise for a public interface to rely on @code{max_align_t},
> +as the interface's ABI can change if a different compiler defines
> +@code{max_align_t} differently.
> +
This part is fine.
I don't feel strongly enough about any of the above to hold this back
as-is though, if you don't feel like changing it.
Reviewed-by: DJ Delorie <dj@redhat.com>
More information about the Libc-alpha
mailing list