bugFreeciv - Bugs: bug #20392, cast from pointer to integer of...

 
 
Show feedback again

bug #20392: cast from pointer to integer of different size

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Fri Dec 28 17:53:13 2012  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Microsoft Windows
Planned Release: 2.4.0-beta2, 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat Jan 26 23:04:26 2013, SVN revision 22209:

Use intptr_t type where ever integer type size of the pointer type
is needed. This fixes compilation on LLP64 systems.

See gna bug #20392

(Browse SVN revision 22209)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Jan 20 14:15:46 2013, comment #4:

Addition patch for trunk is patch #3606. These should be backported to S2_4 simultaneously.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Jan 20 10:41:47 2013, SVN revision 22164:

Use intptr_t type where ever integer type size of the pointer type
is needed. This fixes compilation on LLP64 systems.

See gna bug #20392

(Browse SVN revision 22164)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Jan 18 14:30:57 2013, comment #2:

Patch for TRUNK.

> Want to test there a bit before going to stable branches


But should go in to S2_4 well before 2.4.0-beta2 so it gets test coverage on beta cycle.

I don't think there's any point in introducing this to S2_3 this late. Win64 support can very well be new feature in 2.4, and besides gtk2 does not compile for win64 so one couldn't have gtk win64 client in 2.3 anyway.

(file #16965)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Jan 18 14:01:13 2013, comment #1:

This affects all LLP64 platforms (long being 32bits, pointers 64bits). Where possible, our use of "unsigned long" for casting to and from pointers could be replaced with "intptr_t" that is supposed to be integer type of the same size as pointers in all platforms. I'm going for that in TRUNK first. Want to test there a bit before going to stable branches, as googling suggested that intptr_t has some (not specified) portability problems itself.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Dec 28 17:53:13 2012, original submission:

I've built experimental 64bit version of crosser, and tried to make also 64bit version of freeciv on top of it. Compilation had a lot of these warnings:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #16965:  IntPtrT.patch added by cazfi (3kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Updated the item)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    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.

     

    Error: not logged in

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Jan 26 23:04:42 2013cazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu Jan 24 00:46:30 2013jtnPlanned Release=>2.4.0-beta2, 2.5.0
    Fri Jan 18 14:30:57 2013cazfiAttached File-=>Added IntPtrT.patch, #16965
      StatusIn Progress=>Ready For Test
    Fri Jan 18 14:01:13 2013cazfiStatusNone=>In Progress
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup