This is the mail archive of the
mailing list for the glibc project.
Re: obstack default alignment
On Tue Aug 10, 2004 at 09:33:29 +0200, Andreas Schwab wrote:
>Benno <firstname.lastname@example.org> writes:
>> I would have thought it made sense to set the default alignment in the =
>> way as malloc(). However failing shouldn't the code actually implement =
>> docs and set the alignment to 4, rather than calculating?
>It is never an error to return more alignment than what is garanteed.
>After all, an 8 byte aligned object is also 4 byte aligned.
Sure, my point is that the code *looks* like it is trying to get something
aligned enough to hold any data type, however the documentation specifies
4 explicitly -- such a thing causes confusion. In any case a bug report
has been filed: