Tobias Burnus wrote:
As mentioned before, the following error is bogus as there is no requirement to have the base function defined or declared before the variant function (or at all, or to be available in any TU):foo.c: In function ‘my.ompvariant1’: foo.c:4:7: error: no previous declaration of base function 4 | int my(int i) { return 2; } | ^~ That's something that should be fixed.
"For the purpose of call resolution, … is a function variant for an assumed base function, with the same name and a compatible prototype, that is declared elsewhere without an associated declare variant directive." The idea/plan – and at least some claim the current wording is: * The variant defined does not require a base declaration * Calling a variant for which no base declaration exists works but also: * Calling a function where variants have been defined, but the the base function has not been declared, a compile-time error should be printed. That has been discussed in a meeting but also an (unresolved) issue exists for it → OpenMP spec issue #4464 – and the current wording (arguably) implies the third item as well. Tobias
