X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com ARC-Seal: i=1; a=rsa-sha256; t=1624830619; cv=none; d=zohomail.com; s=zohoarc; b=ARygaw+5oTxG5a25qWP243HnubY8GeBjDGlcDhN+j7bJ4lyMrflYUq5dcusQQ7Nt2xdvTuws6WqQ21otiVoMxyp9SwpE0Mxus0Pi3Ol3ARw7lV5Pe6eNNzDnfeMtAoGhoLO2Ng1XCKAXRbxNdwZer6lUbHd3rCBK3eeWioUQSuE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624830619; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=WLKoiNPndeS6As8GsAdKsQduO92Z2sTNSTGXCpkK44w=; b=liGMInUbAkq95xKO9xW5+LHHbPsb3qe+vypiUEUvwrilo+DJhbEeci7bMhumYeL33yehAtXu7G09M4REbssm58l4E71sCM8xL2A8YKC3Z6kSyfH88+pU2dIc0mUc7nArBOjEdfieIHN2c60Jz/TiLr3ifcbVX9EDYkSeYVg/byQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=dufresnep AT zoho DOT com; dmarc=pass header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=bs8FfTThGBqpIi6nMsAQAvy/XjRTBrV3BgllKzTpnzN/Ww8k9fbWOE7qB0clAPD4DOhGeWt8rlFg X+omtB76S3mCBGcrOq5SXBbiJXF0kQBAgoU/dZXdLH7Wc5J2nNpB X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1624830619; s=zm2020; d=zoho.com; i=dufresnep AT zoho DOT com; h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Subject:MIME-Version:Content-Type; bh=WLKoiNPndeS6As8GsAdKsQduO92Z2sTNSTGXCpkK44w=; b=QZz3Q7d+7buhEbwfypIPYb739h53uhWpo7GKlHQaqL2rm2dceqapOPpa+Rqq7kQm vnDWh77umBupq59K6sFwozK26DCG3WiB8gRS1eU9dxXWmW+uVK5EvxMY6zrXUV7h965 IACMTOAkeqzlmQMdZ0gE75g/duwtLV2fhI1cXvu4= Date: Sun, 27 Jun 2021 17:50:12 -0400 From: "Paul Dufresne (dufresnep AT zoho DOT com) [via djgpp AT delorie DOT com]" To: "djgpp" Cc: "freedos-devel" Message-Id: <17a4f739486.10f49065955874.8303595826833934174@zoho.com> In-Reply-To: <17a4a690e82.ad5bda6d47674.7543348174997411766@zoho.com> References: <17a309c6725 DOT ee2b33335838 DOT 5210672258564129766 AT zoho 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> Subject: Re: Allegro library would need to be recompiled with -fgnu89-inline ? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_153977_1795701965.1624830612614" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail 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 Precedence: bulk ------=_Part_153977_1795701965.1624830612614 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit ---- Le sam., 26 juin 2021 18:20:36 -0400 Paul Dufresne I 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. I can now confirm this is a change in GCC 10 ( from https://gcc.gnu.org/gcc-10/changes.html ): "GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking." More details in: https://gcc.gnu.org/gcc-10/porting_to.html#common I am now realizing it can be tedious to rearrage the code to initialize stuff only once. -fcommon could allows us to do the bad thing for some time ------=_Part_153977_1795701965.1624830612614 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
---- Le sam., 26 juin 2021 18:20:= 36 -0400 Paul Dufresne <dufresnep AT zoho DOT com> I wrote ----
>I = now think that adding "external" before declarations in .h is the correct s= olution.
=
>If they were not mark static already, it is that the value is expe= cted to be shared (being global).
>The solution is *I now = think* to add external, and have the real declaration in a unique place, li= ke in main.c.

I= can now confirm this is a change in GCC 10 ( from https://gcc.gnu.org/gcc-10/ch= anges.html ):
"GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, globa= l variables with multiple tentative definitions now result in linker er= rors. With -fcommon such definitions are silently merged durin= g linking."

More details in:
https://gcc.gnu.org/gcc-10/porting_to.html#common
<= br>
I am now realizing it can be tedious to rearrage the code to = initialize stuff only once.
-fcommon could allows us to do th= e bad thing for some time

------=_Part_153977_1795701965.1624830612614--