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: Difficulties compiling libc from repository using gcc 10.N.0 |
To: | djgpp AT delorie DOT com |
References: | <5FD1FEA1 DOT 7010304 AT gmx DOT de> |
<8816d501-9f33-4d68-4235-1935a83580f6 AT gmail DOT com> | |
<CAA2C=vACivjbYiU7yVpyFdzKjjKB10E1tvqShLPQ6i31cuKrDA AT mail DOT gmail DOT com> | |
<111383e4-b3db-f346-b71c-749dee17dc9e AT gmail DOT com> | |
<CAA2C=vDL+YWHssNteT71jUNxYAJkxwiNXrKp1O618tY6bHHcxg AT mail DOT gmail DOT com> | |
<831rfx4ixg DOT fsf AT gnu DOT org> <6371c322-a0ad-b85a-1ccc-1bdfff4a8d87 AT gmail DOT com> | |
From: | Richard Damon <Richard AT Damon-Family DOT org> |
Message-ID: | <65b0c07f-88c1-1696-25ad-4c9a5c094159@Damon-Family.org> |
Date: | Thu, 10 Dec 2020 15:13:15 -0500 |
User-Agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) |
Gecko/20100101 Thunderbird/78.5.1 | |
MIME-Version: | 1.0 |
In-Reply-To: | <6371c322-a0ad-b85a-1ccc-1bdfff4a8d87@gmail.com> |
X-Provags-ID: | V03:K1:tdSOR9cahjaCWE/q16FxgJlOuucvmx5NNmnV/24Ww3Yn7lL4jN3 |
Dt6KbO9vEARFInRm9wtVRiO7l8eaDk0ZXKdVlNLfywWhLI5i84dyP6AKD+oE1lbKeFYtlFL | |
i6V7xL5G+op7VMk8easmwnTKYvxGFnD9ycIsneo8JQPGsZel0WwtFBJ8eIGQblvpflhlM+R | |
eRBg7cmI+doW7XXaXLDpA== | |
X-Spam-Flag: | NO |
X-UI-Out-Filterresults: | notjunk:1;V03:K0:1tQ3zdPZyzA=:PgJfhFjWUdIOIzI7k8WzyN |
aDXMPjn4VIdfO4DJalWfrVCAdMu40a3lVB7IpYbFe/Z/cZT6yMY+emJmpQ4JnwVHoOpSbTZT/ | |
e732daQLSUDYAvF/VHLbNC2JMtbz3CG0pvGUHjoYVtnQno/QJLsyKvlTO+4FQESQ9u97zQN5X | |
AVjtZEQ5bOUaCMfOHxm+FiHquBzoI16x0x+HFdtGFi9hu3bKzOjzjCSt6ri977joE65S7nRan | |
fU9DT9Tg0pdZTEcD0QLKzQhOo3hDMf1ibM6xaRiTtyKTkiDW8+LYE7inFb5N4wJBcu5XfRNDT | |
nu/a5+z3ay3iuSVeJwdyVG69tzjHxfBdXzhLMhLMIx9AKpEOVQVivdeYmT5mTcdY1lwyzCuWs | |
Qq43+VimxHcIQZFLJCDPFFrnOAW/ZYD3BUatVUgAuWojoeqeh8cojJ2VkargpO97YGjW0ZHCA | |
62f9pTpXLg== | |
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 |
On 12/10/20 1:55 PM, J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > This only applies to global variables (and __stdio_cleanup_hook here is a > function *pointer*), functions themselves still have implicit external linkage. > > I'm not a C language lawyer but this page suggests that it was always an error > to omit 'extern' on global variable declarations. It just wasn't reported as > such, until now: > > https://gcc.gnu.org/gcc-10/porting_to.html Yes, The C Standard explicitly states that if two Translation Units define the same variable, it is undefined behavior. A Translation Unit is considered to define (vs declare) a variable if it is mentioned with the extern storage specifier. Many programs have broken this rule, but gcc (and others) have covered this issue with the -fcommon being assumed. -- Richard Damon
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |