buglibiconv - Bugs: bug #41311, ambiguous signedness for...


bug #41311: ambiguous signedness for {cp1255,viet}_decomp

Submitted by:  None
Submitted on:  Wed 22 Jan 2014 08:17:32 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat 01 Oct 2016 04:53:47 PM UTC, comment #1:

'comb1' is declared as plain 'int' bitfield because it really does not matter whether it's a 'signed int' or an 'unsigned int' bitfield. When the bitfield size is 4 bits and the used values are in the range 0..7, it's all OK either way.

In glibc, I don't remember the reasons why Drepper and I used 'uint32_t' as bit field type. Probably a micro-optimization of some kind.

Did you get a warning about this? In a build with gcc and "-W -Wall", I got no warning from cp1255.h nor vietcomb.h.

In general, I like to not constrain types more than needed, for maintainability.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Wed 22 Jan 2014 08:17:32 PM UTC, original submission:

comb1 in both structs are labeled as plain int, the patch explicitly changes them to unsigned int, this also more-or-less matches the signedness of the equivalent structs in glibc.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #30348:  _decomp.diff added by None (1kB - text/x-diff)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 01 Oct 2016 04:53:47 PM UTChaibleStatusNone=>Works For Me
      Assigned toNone=>haible
    Wed 22 Jan 2014 08:17:32 PM UTCNoneAttached File-=>Added _decomp.diff, #30348

    Back to the top

    Powered by Savane 3.1-cleanup