Hi again,
Getting further along with my project, I have come across yet another
thing that I dont understand. While compiling:
libstdc++-v3/libsupc++/vec.cc
My GCC extension comes across two FUNCTION_DECL nodes that both have
DECL_ASSEMBLER_NAME of __cxa_begin_catch
After reading some past posts it seems that the standard allows for
multiple C functions defined extern "C" in different namespaces.
As an example of code which might do this see below:
extern "C"
{
void Function(void) {}
}
namespace NS
{
extern "C"
{
void Function(void);
}
}
Is it safe to assume in the C++ front end that two functions declared in
such a manner will always share the same implementation in which case it
is kind-of like a "using" statement?
If so, is there any reason why the following code does not emit an error
in the compiler but only in the assembler?
extern "C"
{
void Function(void) {}
}
namespace NS
{
extern "C"
{
void Function(void) {}
}
}
Thanks,
Brendon.