[CLN-list] [PATCH](master aka HEAD) Replace (some of) MAYBE_INLINEs with ISO C++ compliant equivalent.

Richard B. Kreckel kreckel at ginac.de
Thu Jan 10 23:54:46 CET 2008


Dear Alexei,

Alexei Sheplyakov wrote:
> ISO C++ demands (in 7.1.2.4)
> "If a function with external linkage is declared inline in one translation
> unit, it shall be declared inline in all translation units in which it
> appears; no diagnostic is required." MAYBE_INLINE violates this requirement.
> Moreover, it's pointless, since the compiler emits those functions anyway.
> This causes link errors on non-ELF platforms (such as woe32 and Darwin).
> Hence, I decided to replace MAYBE_INLINE with standard compliant (but more
> intrusive) code. Only fiew occurences of MAYBE_INLINE have been converted.
> However, this happens to be enough to build CLN as a woe32 DLL (after
> massive hacking of build scripts).

Ouch, that patch is ugly as sin. But if, as a consequence, it will help 
someone provide DLLs of CLN, well, then maybe it should be applied. 
However, I'm worried about the maintainability: Can you, please, write a 
comment explaining what you're doing at some suitable place in the 
sources? And, can you please provide a ChangeLog entry for all that? 
(Oh, and don't worry about that cln_1-1 branch: I'll release CLN 1.2.0 
really soon now.)

And one last question: Do you have any idea why it's enough converting 
only these few occurrences?

Cheers
   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list