File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,22 @@ PyGcc_get_translation_units(PyObject *self, PyObject *args)
301301 add_translation_unit_decl_to_list )
302302}
303303
304- /* Weakly import global_namespace; it will be non-NULL for the C++ frontend: */
304+
305+ /* Weakly import global_namespace; it will be non-NULL for the C++ frontend.
306+
307+ GCC 8's r247599 (aka c99e91fe8d1191b348cbc1659fbfbac2fc07e154)
308+ converted it from:
309+ extern GTY(()) tree global_namespace;
310+ to:
311+ #define global_namespace cp_global_trees[CPTI_GLOBAL]
312+ so we have to access cp_global_trees instead. */
313+
314+ #if (GCC_VERSION >= 8000 )
315+ __typeof__ (cp_global_trees ) cp_global_trees __attribute__ ((weak ));
316+ #else
305317__typeof__ (global_namespace ) global_namespace __attribute__ ((weak ));
318+ #endif /* #if (GCC_VERSION >= 8000) */
319+
306320
307321static PyObject *
308322PyGcc_get_global_namespace (PyObject * self , PyObject * args )
You can’t perform that action at this time.
0 commit comments