Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22144

stackless python #pragma GCC diagnostic not allowed inside functions

$
0
0

I have Centos6 OS and trying to configure stackless python on it. https://github.com/python/cpython

I am keep getting below error. I am mainly a Python developer and quite confused about this error. Please help.

Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions
Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions
Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions
Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions
Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions
Python/ceval.c:2035: error: #pragma GCC diagnostic not allowed inside functions

Respective code block

2011         TARGET(YIELD_FROM) {
2012             PyObject *v = POP();
2013             PyObject *receiver = TOP();
2014             int err;
2015             if (PyGen_CheckExact(receiver) || PyCoro_CheckExact(receiver)) {
2016                 STACKLESS_PROPOSE_ALL(tstate);
2017                 retval = _PyGen_Send((PyGenObject *)receiver, v);
2018                 STACKLESS_ASSERT();
2019             } else {
2020                 _Py_IDENTIFIER(send);
2021                 if (v == Py_None) {
2022                     STACKLESS_PROPOSE_METHOD(tstate, receiver, tp_iternext);
2023                     retval = Py_TYPE(receiver)->tp_iternext(receiver);
2024                     STACKLESS_ASSERT();
2025                 }
2026                 else {
2027                     STACKLESS_PROPOSE_ALL(tstate);
2028                     retval = _PyObject_CallMethodIdObjArgs(receiver, &PyId_send, v, NULL);
2029                     STACKLESS_ASSERT();
2030                 }
2031             }
2032             Py_DECREF(v);
2033 #ifdef STACKLESS
2034             if (STACKLESS_UNWINDING(retval)) {
2035                 HANDLE_UNWINDING(slp_eval_frame_yield_from, 0, retval);
2036                 receiver = TOP();
2037             }
2038 #endif
2039             if (retval == NULL) {
2040                 PyObject *val;
2041                 if (tstate->c_tracefunc != NULL
2042                         && PyErr_ExceptionMatches(PyExc_StopIteration))
2043                     call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f);
2044                 err = _PyGen_FetchStopIterationValue(&val);
2045                 if (err < 0)
2046                     goto error;
2047                 Py_DECREF(receiver);
2048                 SET_TOP(val);
2049                 DISPATCH();
2050             }


Viewing all articles
Browse latest Browse all 22144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>