zertovitch / gwindows

GWindows: GUI framework for MS Windows
https://sf.net/projects/gnavi/
21 stars 5 forks source link

Warnings due to violation of supposed usage of sync-builtin (GNATCOM.Initialize, sync_fetch_and_add) #9

Open zertovitch opened 2 years ago

zertovitch commented 2 years ago

The issue is the name used with the pragma Import on sync_fetch_and_add in gnatcom-initialize.adb, using a recent version of GNAT Pro. See:

https://sourceforge.net/p/gnavi/bugs/14/

Unfortunately the suggested fix (replacing sync_fetch_and_add_4 by sync_fetch_and_add_N) breaks compatibility with previous versions of GNAT (as recent as GNAT CE 21). I get (trying with both 'N' and 'n'): gnatcom-initialize.adb:85:1: undefined reference to __sync_fetch_and_add_N gnatcom-initialize.adb:85:1: undefined reference to __sync_fetch_and_add_n

Perhaps it is better to try disabling the warning.