I
Ian
Alf said:See above, although many compilers such as MSVC already allow this, as an
extension, and although I agree that it would be nice and not only for
template functions, but also for static member functions. The problem here
is that C linkage seems to have been intended to address two different
practical aspects of linkage: name mangling, and machine code level calling
convention. For pointers the former is irrelevant, but the latter is still
relevant. In MSVC the calling convention is specified via a language
extension, not via the C/C++ linkage. And so MSVC can allow such pointers.
This looks to be a good idea, unfortunately Sun's compiler is rather
pedantic in this area (maybe something to do the the author being the
C++ standard committee chairman!). I suppose I could disable the
warning and get on with life.
Cheers,
Ian