GNU bug report logs -
#11082
24.0.94; u.glyphless member in struct glyph does not fit in 32 bits
Previous Next
Full log
View this message in rfc822 format
In article <83zkb6trdb.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> writes:
> > 447 /* Sub-stretch for type == GLYPHLESS_GLYPH. */
> > 448 struct
> > 449 {
> > 450 /* Value is an enum of the type glyphless_display_method. */
> > 451 unsigned method : 2;
> > 452 /* 1 iff this glyph is for a character of no font. */
> > 453 unsigned for_no_font : 1;
> > 454 /* Length of acronym or hexadecimal code string (at most 8). */
> > 455 unsigned len : 4;
> > 456 /* Character to display. Actually we need only 22 bits. */
> > 457 unsigned ch : 26;
> > 458 } glyphless;
[...]
> > According to the comment above, it seems to be OK to shorten the
> > length of `u.glyphless.ch' member from 26 to 25. Could someone
> > confirm this?
> Confirmed. From the ELisp manual:
[...]
> I would actually suggest to use 22-bit for this field, to avoid
> confusion in the future.
I agree to change the bit length. I don't remeber well but I
think the current bit length setting was just my mistake.
In article <jwv4ntch6w6.fsf-monnier+emacs <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> > dispextern.h (struct glyph): Change the bit length of glyphless.ch to 22
> > to make the member glyphless fit in 32 bits.
> I think it's safer to reduce it to 25 bits, otherwise `val' field will
> refer to undefined bits.
Ok. I've just installed that change.
---
Kenichi Handa
handa <at> m17n.org
This bug report was last modified 13 years and 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.