delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Recipient: | djgpp AT delorie DOT com |
Subject: | Re: Allegro library would need to be recompiled with -fgnu89-inline ? |
To: | djgpp AT delorie DOT com |
References: | <17a309c6725 DOT ee2b33335838 DOT 5210672258564129766 AT zoho DOT com> |
<CAN1+P_3bouS5PbTdc6jJBKW=zdabEE2-zy5c1F=jR+F+3Tz0eA AT mail DOT gmail DOT com> | |
<17a30b8508b DOT eceb84066270 DOT 6146636058200994488 AT zoho DOT com> | |
<17a49890ca6 DOT 123f188ed46443 DOT 7177863653080197011 AT zoho DOT com> | |
<17a4a690e82 DOT ad5bda6d47674 DOT 7543348174997411766 AT zoho DOT com> | |
From: | Damien Guibouret <damien DOT guibouret AT partition-saving DOT com> |
Message-ID: | <c2e16d46-e247-3a22-b2c5-2d0391e7623a@partition-saving.com> |
Date: | Sun, 27 Jun 2021 18:07:59 +0200 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 |
Thunderbird/68.10.0 | |
MIME-Version: | 1.0 |
In-Reply-To: | <17a4a690e82.ad5bda6d47674.7543348174997411766@zoho.com> |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Hello, This is a change in behaviour of GCC-10: last change described in https://gcc.gnu.org/gcc-10/changes.html#c Using -fcommon is certainly not the correct correction (but could be a workaround for old programs with a lot of occurence of this problem), but adding extern or static depending on if the variable should be shared or not is better. Regards, Damien On 27/06/2021 00:20, Paul Dufresne (dufresnep AT zoho DOT com) [via djgpp AT delorie DOT com] wrote: > I now think that adding "external" before declarations in .h is the > correct solution. > If they were not mark static already, it is that the value is expected > to be shared (being global). > The solution is *I now think* to add external, and have the real > declaration in a unique place, like in main.c. >
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |