This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: obstack default alignment


On Tue Aug 10, 2004 at 09:33:29 +0200, Andreas Schwab wrote:
>Benno <benjl@cse.unsw.edu.au> writes:
>
>> I would have thought it made sense to set the default alignment in the =
>same
>> way as malloc(). However failing shouldn't the code actually implement =
>the
>> 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:

http://sources.redhat.com/bugzilla/show_bug.cgi?id=315

Cheers,

Benno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]