![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 64 bit Porting Problem !!! | skaushal.schip | SuSE | 10 | 02-22-2009 02:51 AM |
| porting | areef4u | UNIX for Advanced & Expert Users | 10 | 08-03-2006 09:32 AM |
| HP-UX to linux porting | arunprakash | UNIX for Dummies Questions & Answers | 0 | 02-21-2005 05:49 AM |
| Porting C codes from HP-UX to AIX | Sinbad | AIX | 0 | 01-27-2005 12:48 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
No Error for 64-bit porting
I am just trying to get the warning while compiling for 64-bit on Linux
>> uname -a Linux mms4.es.cpth.ie 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux =================================== Written test.c file which conatin : #include<stdio.h> #include<stdlib.h> int main() { int i; long z; char str[10]="aaaabbbbcc"; printf("Long int size is %d bytes long!\n", sizeof(z)); printf("Int size is %d bytes !\n", sizeof(i)); i =strlen(str); printf("\nlength = %d",i); return 1; } ========================== After cimpiling gives me warning like: $ gcc -m64 -Wall -mcpu=x86-64 -o test.o test.c test.c: In function `main': test.c:9: warning: int format, different type arg (arg 2) test.c:10: warning: int format, different type arg (arg 2) test.c:11: warning: implicit declaration of function `strlen' There is no any warning which shows the Porting error like strlen() returns size_t which is 8 bytes on 64-bit. And 'i' is 4 bytes. On sparcv9 it is giving warnings like >> CC +w2 -xarch=v9 test64.cpp "test64.cpp", line 8: Warning: Conversion of 64 bit type value to "int" causes truncation. 1 Warning(s) detected. Can you please tell me that how could we get the similar warnings on Linux? which all options need to use with gcc for 64-bit except -m64 -Wall -mcpu=x86-64 ? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|