This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Determining if a function has vague linkage
- From: Brendon Costa <brendon at christian dot net>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 02 Dec 2006 14:03:46 +1100
- Subject: Determining if a function has vague linkage
Hi all,
I understand that all template functions in GCC should have vague
linkage and thus may be exported into numerous translation units where
they are used. I have been attempting to use a few different macros on
both an instanciated template functions FUNCTION_DECL node and a normal
functions FUNCTION_DECL node to see what the results are. I have tried:
DECL_WEAK(fndecl)
DECL_ONE_ONLY(fndecl)
DECL_COMDAT(fndecl)
DECL_DEFER_OUTPUT(fndecl)
DECL_REPO_AVAILABLE_P(fndecl)
IDENTIFIER_REPO_CHOSEN(DECL_ASSEMBLER_NAME(fndecl))
and ALL of these macros are returning false for both the FUNCTION_DECL
nodes. Is there any macro i can use to determine if a FUNCTION_DECL node
has vague linkage? Or do i need to just assume that it is the sace for a
template function?
Also what are some other examples of functions that should return true
for any of the above macros (I assume inlines do sometimes according to
the vague linkage GCC page)?
Thanks,
Brendon.