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 28 Dec 2012 05:53:13 PM UTC  
 
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.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 26 Jan 2013 11:04:26 PM UTC, 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 20 Jan 2013 02:15:46 PM UTC, 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 20 Jan 2013 10:41:47 AM UTC, 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 18 Jan 2013 02:30:57 PM UTC, 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 18 Jan 2013 02:01:13 PM UTC, 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 28 Dec 2012 05:53:13 PM UTC, 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.

     

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Jan 2013 11:04:42 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 24 Jan 2013 12:46:30 AM UTCjtnPlanned Release=>2.4.0-beta2, 2.5.0
    Fri 18 Jan 2013 02:30:57 PM UTCcazfiAttached File-=>Added IntPtrT.patch, #16965
      StatusIn Progress=>Ready For Test
    Fri 18 Jan 2013 02:01:13 PM UTCcazfiStatusNone=>In Progress
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup