tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] __fp_unordered_compare defined twice on Windows


From: Jared Maddox
Subject: Re: [Tinycc-devel] __fp_unordered_compare defined twice on Windows
Date: Sat, 7 Dec 2013 21:16:24 -0600

> Date: Sat, 7 Dec 2013 16:48:17 +0000 (GMT)
> From: Rob <address@hidden>
> To: address@hidden
> Subject: Re: [Tinycc-devel] __fp_unordered_compare defined twice on
>       Windows
> Message-ID: <address@hidden>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]