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

 
 

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

Submitted by:  None
Submitted on:  Wed Jan 22 20:17:32 2014  
 
Category: BuildSeverity: 2 - Minor
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 Oct 1 16:53:47 2016, 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 Jan 22 20:17:32 2014, 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.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Nov 23 23:54:24 2016haibleCategoryNone=>Build
      Severity3 - Normal=>2 - Minor
    Sat Oct 1 16:53:47 2016haibleStatusNone=>Works For Me
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed
    Wed Jan 22 20:17:32 2014NoneAttached File-=>Added _decomp.diff, #30348

    Back to the top


    Powered by Savane 3.1-cleanup