Dynamic rules generate DYNAMIC_CALLS strategy definitions for undefine-f and new-f. This is incompatible with separate compilation: the DYNAMIC_CALLS with end up in the external definitions of a library that uses dynamic rules and they will be in the C code as well. If a program that uses the library, applies dynamic rules as well, then the result will be an overriding external definition error.

I can think of two solutions for this:

1) DYNAMIC_CALLS do not need not produce C code, nor do they have to be in the external definitions. So, they can just be left out in the code generation of C and external definitions

2) DYNAMIC_CALLS are only necessary for programs (there is no dead code elimination for libraries), so the DYNAMIC_CALLS in the dynamic rules lifter only have to be generated if the compiler is working on a program.

This is a critical issue: unlike the definition of the same dynamic rule name over a library boundary (which is not supported), this DYNAMIC_CALLS issue affects any dynamic rule. So, you cannot use dynamic rules if you import the Dryad library.

Reported by Bogdan.

Submitted on 10 February 2006 at 19:38

On 10 February 2006 at 22:20 Jira commented:

STR-509, visser:
The strategy definition is now ignored when generating external definitions and C code.
Please test.


On 13 February 2006 at 12:03 Jira commented:

STR-509, bdumitriu:
The code I originally had problems with now compiles.


On 3 March 2006 at 18:11 Jira commented:

STR-509, martin:
I assume that this issue can be closed now?

Log in to post comments