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

 
 

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

Submitter:  None
Submitted:  Wed 22 Jan 2014 08:17:32 PM UTC
   
 
Category:  Build Severity:  2 - Minor
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-23 haible CategoryNone Build
        Severity3 - Normal 2 - Minor
    2016-10-01 haible StatusNone Works For Me
        Assigned toNone haible
        Open/ClosedOpen Closed
    2014-01-22 None Attached File- Added _decomp.diff, #30348

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code