Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get member alignment warnings from C compiler?

 
SOLVED
Go to solution
GuentherF
Trusted Contributor

How to get member alignment warnings from C compiler?

Still 'fishing' for alignment problems. I like the way the FORTRAN compiler gives me warning messages with /ALIGN=RECORDS=PACKED if the fields are not naturally aligned.

 

Couldn't find how to get the same warnings from the C compiler on Itanium using qualifier or pragma NOMEMBER_ALIGNMENT.

 

Anyone knows how to get a warning from the C compiler?

 

Thanks,

Guenther

3 REPLIES 3
Hoff
Honored Contributor

Re: How to get member alignment warnings from C compiler?

See the HELP CC /WARN information for related details.

 

Probably this command: CC /WARN=ENABLE=ALIGNMENT

GuentherF
Trusted Contributor
Solution

Re: How to get member alignment warnings from C compiler?

That's it! Missed that 'ENABLE' in between as it is for BASIC.

 

Thanks Hoff!

 

/Guenther

Ph Vouters
Valued Contributor

Re: How to get member alignment warnings from C compiler?

To complete this alignment natural concern, here is a serie of VMS/IA64 articles related to where you can loose performances. I extend the concern to float operations where you can also loose on performances as well as on float precisions:

1/ Cobol related

http://vouters.dyndns.org/tima/OpenVMS-Cobol-Effect_of_the_ALIGN_compiler_qualifier.html

2/ Data unalignment:

http://vouters.dyndns.org/tima/OpenVMS-IA64-Unaligned_data_accesses.html

3/ Pointer misalignment:

http://vouters.dyndns.org/tima/OpenVMS-Alpha-IA64_Misaligned_pointers.html

4/ VAX floats being compile-time default on Itanium - penalty in both performances and float precision

http://vouters.dyndns.org/tima/OpenVMS-IA64-VAX-IEEE-floats-Performances_on_double_operations.html