gm2
[Top][All Lists]
Advanced

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

Re: API change between GCC 12.3.0 and 13.2.0?


From: Gaius Mulley
Subject: Re: API change between GCC 12.3.0 and 13.2.0?
Date: Thu, 14 Dec 2023 11:54:46 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Philip Munts <phil@munts.net> writes:

> It appears to me that in GCC 12.3.0, externals declared in a C binding
> module (DEFINITION MODULE FOR "C") are not mangled, but in GCC 13.2.0
> they *are* mangled, prefixing the module name.
>
> Given:
>
> DEFINITION MODULE FOR "C" Foo;
>
>   PROCEDURE Bar;
>
> END FOO;
>
> Linking a program that calls Foo.Bar in 12.3.0 requires the external C 
> function to be named Bar while 13.2.0 requires it to be Foo_Bar.
>
> This is a severe pain in the neck, as I have a substantial number of
> such C binding modules that all have to be rewritten for GCC 13,
> adding EXPORT QUALIFIED for every C external.  I opine that external C
> names should never be mangled...
>
> Phil

Hi Phil,

yes this is true - apologies for causing extra work.

The linking code was completely re-written between 12 and 13 and a
general overhaul occured as the code base went into the gcc tree.

The definition for "C" and export unqualified have now been separated
into distinct issues.  The definition for "C" affects parameter passing
whereas the export unqualified affects name mangling.  Export
unqualified can be used in m2 (and "C") definition modules and the
default for both the "C" and m2 versions of definition modules is now
the same.

regards,
Gaius



reply via email to

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