buggperf - Bugs: bug #45330, Use offsetof instead of cast to...

 
 

bug #45330: Use offsetof instead of cast to long

Submitter:  None
Submitted:  Tue 16 Jun 2015 07:43:09 AM UTC
   
 
Category:  Generated code Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 26 Nov 2016 01:57:05 AM UTC, comment #1: 

Thanks for the report. I'm changing the generated code to do an intermediate cast to 'size_t', not 'long'.

Unfortunately, the generated code cannot use the offsetof macro, because this would change the set of required prerequisite #include statements.

Bruno Haible <haible>
Group administrator
Tue 16 Jun 2015 07:43:09 AM UTC, original submission:  

Some compilers (gcc for x64 mingw) warn of casts from a pointer to
a shorter integer, and `long int` is always 32-bit on Windows.

This patch replaces the casts with `offsetof` standard macro whne ANSI-C or C++.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  •  

    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
    2023-01-04 haible StatusFixed Fix Released
    2016-11-26 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2016-11-24 haible CategoryNone Generated code
    2015-06-16 None Attached File- Added 0001-Use-offsetof-instead-of-cast-to-long.patch, #34231

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code