> Date: Sat, 7 Dec 2013 16:48:17 +0000 (GMT) > From: Rob <[email protected]> > To: [email protected] > Subject: Re: [Tinycc-devel] __fp_unordered_compare defined twice on > Windows > Message-ID: <alpine.DEB.2.02.1312071643200.25263@egbert> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > So it looks like the bad commit is > 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6. I can't remember but they're > inline functions, and I think the standard allows two definitions - an > inline one and an extern one. > > I've attached a quick fix that modifies the header, but I suspect the > proper fix is the function inline redefinition logic in tcc. > > "An inline definition does not provide an external definition for the > function, and does not forbid an external definition in another > translation unit. An inline definition provides an alternative to an > external definition, which a translator may use to implement any call to > the function in the same translation unit. It is unspecified whether a > call to the function uses the inline definition or the external > definition." - C99, 6.7.4 >
Couldn't see the file (might be a Javascript filter on my end), but were there two definitions of the function in the preprocessed source? That bit of the standard reads to me as if it doesn't explicitly allow two definitions in the same preprocessed source, just in the finished executable. By the looks of it, it's aimed at allowing headers to have a preprocessor switch that chooses between inlines and prototypes, so that could be the catch. _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
