1833883 Members
1803 Online
110063 Solutions
New Discussion

C++ Struct Alignment

 
danielbretton
Occasional Contributor

C++ Struct Alignment

Using the CC compiler I can not get the HP_ALIGN, PACK or ALIGN pragmas to work. I keep getting "unrecognized pragma" errors.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: C++ Struct Alignment

Before we go any further, do a cc -v and post the results. If you are using the bundled compiler or trying to compile C++ with the ANSI C compiler then this is hopeless.
If it ain't broke, I can fix that.
danielbretton
Occasional Contributor

Re: C++ Struct Alignment

I am using the CC compiler (not CC compiler) and the version is A.10.22. It is the HP C++ compiler. CC -v does nothing but put the compiler in verbose mode.
A. Clay Stephenson
Acclaimed Contributor

Re: C++ Struct Alignment

I have no idea what this means "I am using the CC compiler (not CC compiler)". I wanted you to do a cc -V myfile.c to display the versions of all the components so that it would be possible to determine which compiler you are using. But since you are using the obsolete HP C++ compiler rather than the aCC compiler, I suggest that you install PHSS_14732 along with the dependent patches associated with your OS version.

You could probably achieve the same result with +unum arguments.
If it ain't broke, I can fix that.