Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 645871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:33:01+00:00 2026-05-13T21:33:01+00:00

The C source codes that I am trying to port into 64 bit runs

  • 0

The C source codes that I am trying to port into 64 bit runs without any warning in the 32 bit environment. When I compile in 64 bit Linux environment with the compile gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1, it shows the following warning mostly:

warning: cast to pointer from integer of different size

The above warning were the most. I used uintptr_t type and most of those warnings were removed. I could change the type int /unsigned int into 64 bit favorable using uintptr_t. But how can I change the following type to make compatible to 64 bit:

typedef void*  POINTER;

I have changed the following code:

typedef unsigned int    ABC; 

into

typedef uintptr_t ABC

I got following warnings:

warning: passing argument 2 of ‘function’ from   incompatible pointer type
note: expected ‘ABC *’ but argument is of type ‘unsigned int *’

Moreover, after changing type def into uintptr_t which were earlier either int or unsigned int, I am encountering most of the warnings as follows:

warning: inlining failed in call to ‘abc_StringCopy’: call is unlikely and code size would grow

The function tptp_StringCopy is as follows:

static __inline__ char* abc_StringCopy(void)
{
  char *copy;
  copy = (char*)Malloc(yyleng+1);
  strcpy(copy, yytext);
  return copy;

How can I get rid of these warnings?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:33:01+00:00Added an answer on May 13, 2026 at 9:33 pm

    I’m not exactly clear on the situation, but it seems that You changed unsigned int to uintptr_t. The former is an unsigned int, the latter is an unsigned int pointer.

    In general, that’s not a valid substitution to make.

    Also, you said the code “runs without warning on 32 bit” but compilation for 64-bit gives you warnings. But it really doesn’t matter whether it runs without warning. Maybe you mean, it compiles without warnings. Is that true? The code you’ve modified, compiles for 32-bit without warning? That would be a surprise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.