static inline and jextract
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Sep 6 21:01:28 UTC 2022
On 06/09/2022 21:48, Manuel Bleichenbacher wrote:
> It definitely looks as if I misunderstood you. So what's the plan now
> for things like:
>
> int i = 4;
> int __declspec(selectany) myvar = 4;
>
> Would they all generate code with a symbol lookup?
Yes
>
> If so, who would benefit? The code is 99% likely to fail at run-time.
> It would just make it harder to use the tool.
I get where you come from. But if we do what you'd like us to do, and
omit this always, other legitimate use cases would have no workaround
(whereas in the current state, spurious symbols can be pruned).
I'd say, let's leave this sitting for a while, and see if other people
run into the same issue with other libraries.
In your excellent page:
https://github.com/manuelbl/JavaDoesUSB/tree/main/java-does-usb/jextract
there's quite a lot of feedback and issues that we'd like to go through.
We can revisit this at a later point (e.g. for instance we could add a
flag to make jextract stricter and only accept "extern" var declarations).
Maurizio
More information about the jextract-dev
mailing list