- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problems occured during migration from 32bit to 64...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2003 11:52 PM
тАО05-02-2003 11:52 PM
Problems occured during migration from 32bit to 64bit
Problems occured during ompiling for 64 bit using +DD64 +M2 option
Problem 1:
I am using va_arg function in my C file.I am getting the warning like this
int ip= va_arg(ap, int);
long ip= va_arg(ap, long);
cc: "check.c", line 361: warning 530: LP64 migration: Casting from loose
to strict alignment: Resulting pointer may be misaligned.
cc: "check.c", line 361: warning 530: LP64 migration: Casting from loose
to strict alignment: Resulting pointer may be misaligned.
cc: "check.c", line 361: warning 530: LP64 migration: Casting from loose
to strict alignment: Resulting pointer may be misaligned.
Problem 2:
In our application we have to pass the return value of time function ie long value as the parameter to the alarm ()function,but alarm function takes the unsigned int only...
How to avoid both of this problem?
Regards
Balaji
- Tags:
- va_arg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2003 12:19 AM
тАО05-03-2003 12:19 AM
Re: Problems occured during migration from 32bit to 64bit
I can't help you with the second problem, but this posting could assist with the first.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd5547bb04b5cd611abdb0090277a778c,00.html
HTH
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2003 07:30 AM
тАО05-05-2003 07:30 AM
Re: Problems occured during migration from 32bit to 64bit
For example, an int is four bytes long, and it generally need to be aligned on a four-byte boundary.
"32-bit" mode on PA-RISC/IPF/etc is also called "ILP32" which stands for Ints Longs and Pointers are 32-bit - aka four bytes.
64-bit mode is LP64 - Longs and pointers are 64 bit - aka eight byte. So, a long needs to be in memory on an 8 byte boundary.
So, if you take something that is a pointer to an int, that pointer will only be four byte aligned. However, a pointer to a long needs to be 8 byte aligned. Sometimes something that is four-byte aligned is also 8 byte aligned, sometimes not. If you try to access a long from a four-byte boundary, the application will abort. Hence the warning.
Basically, the compiler is warning you that your 64-bit transtion isn't complete. Either the int needs to become a long, or the long an int.
Now, for problem two, why do you want to to pass the number of seconds since the epoch to the alarm function?!?
In a 64-bit compile time() returns a 64-bit quantity for seconds since the epoch. This is to fix the "2038" problem when the 32-bit unsigned integer holding seconds since the epoch would roll-over.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2012 01:52 AM
тАО05-28-2012 01:52 AM
Re: Problems occured during migration from 32bit to 64bit
>warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
This should be finally fixed by the addition of some extra casts in <varargs.h>.