------- Comment #10 from hhinnant at apple dot com 2006-06-19 18:11 ------- It turns out this still isn't quite right. Looks like we need:
#define NEEDS_GUARD_P(decl) (TREE_PUBLIC (decl) && (DECL_COMMON (decl) \ || DECL_ONE_ONLY (decl) \ || DECL_WEAK (decl) \ || (TARGET_WEAK_NOT_IN_ARCHIVE_TOC \ && DECL_LANG_SPECIFIC (decl) \ && (DECL_EXPLICIT_INSTANTIATION (decl) \ || DECL_TEMPLATE_SPECIALIZATION (decl))))) The former solution was dereferencing a null pointer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28017