Forum > iPhone/iPad

XCode 8.3 and "pointer not aligned at address" warning

(1/2) > >>

mayevski:
Hello,

We have built a static library for iOS using FPC for iOS, version 3.0.

When the customer is compiling the iOS application using XCode 8.3 and our static library, they get plenty (about 20K) of warnings similar to this one:


--- Quote ---Warning:pointer not aligned at address 0x1016BC5B6 (_RTTI_$SYSTEM_$$_openchararray + 22 from /Users/sbrzeski/Documents/Code/SDKiOS-5/output/OneginiSDKiOS/libsbb.a(system.o))
Warning:pointer not aligned at address 0x1016BC5DF (_RTTI_$SYSTEM_$$_char_pointer + 15 from /Users/sbrzeski/Documents/Code/SDKiOS-5/output/OneginiSDKiOS/libsbb.a(system.o))
Warning:pointer not aligned at address 0x1016BC603 (_RTTI_$SYSTEM_$$_widechar_pointer + 19 from /Users/sbrzeski/Documents/Code/SDKiOS-5/output/OneginiSDKiOS/libsbb.a(system.o))
Warning:pointer not aligned at address 0x1016BC797 (_RTTI_$SYSTEM_$$_pvmt + 7 from /Users/sbrzeski/Documents/Code/SDKiOS-5/output/OneginiSDKiOS/libsbb.a(system.o))
--- End quote ---

What exactly options we (or they) need to use to get rid of this message? Our developer has tried to use " {$CODEALIGN 8} " directive as described in the documentation, but this produces the following error:  "Error: Illegal alignment directive"

Is there something that we are missing here?

Sincerely yours
Eugene Mayevski

Phil:

--- Quote from: mayevski on May 23, 2017, 02:43:57 pm ---Is there something that we are missing here?

--- End quote ---

This looks like a new Xcode warning. A quick search reveals reports elsewhere of these warnings. For example, the D language compiler:

https://issues.dlang.org/show_bug.cgi?id=17289#c18

There may not be anything you can do since an upstream fix is probably needed. Check the bugtracker at left and see if this has already been reported for FPC. If not, file a bug report. Once fixed, you'll probably need to build the compiler from trunk.

mayevski:
Thank you. I assumed that the CODEALIGN directive would be enough, if only it worked :).

mischi:
I have reported this already:

https://bugs.freepascal.org/view.php?id=31696

To the best of my knowledge, passing -w (no warnings) to the linker is the only option. I am not aware of an option, which specifically switches off this particular warning.

mayevski:
Thank you for reply. Please see my comments below.


--- Quote from: mischi on May 24, 2017, 01:25:43 pm ---I have reported this already:

https://bugs.freepascal.org/view.php?id=31696

To the best of my knowledge, passing -w (no warnings) to the linker is the only option. I am not aware of an option, which specifically switches off this particular warning.

--- End quote ---

Interesting - I tried to use the Search function and didn't find your report.

Did you try CODEALIGN option? It is expected to address exactly this issue (but it didn't work for us, as I mentioned).

Navigation

[0] Message Index

[#] Next page

Go to full version