GCC主要数据结构之cpp_macro_arg

本文介绍了一个用于C预处理器中宏参数的结构定义。该结构包括宏参数编号和宏参数原始拼写的指针,有助于理解宏替换的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/* A macro argument in the cpp_token union.  */
struct GTY(()) cpp_macro_arg {
  /* Argument number.  */
  unsigned int arg_no;
  /* The original spelling of the macro argument token.  */
  cpp_hashnode *
    GTY ((nested_ptr (union tree_node,
  "%h ? CPP_HASHNODE (GCC_IDENT_TO_HT_IDENT (%h)) : NULL",
   "%h ? HT_IDENT_TO_GCC_IDENT (HT_NODE (%h)) : NULL")))
       spelling;
};
In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:296:39: warning: explicit conversion operators only available with -std=c++11 or -std=gnu++11 [enabled by default] G_EXPLICIT_OP operator bool() const G_NOEXCEPT ^ src/greenlet/greenlet_greenlet.hpp:296:39: error: expected ‘;’ at end of member declaration In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:296:45: note: in expansion of macro ‘G_NOEXCEPT’ G_EXPLICIT_OP operator bool() const G_NOEXCEPT ^ src/greenlet/greenlet_compiler_compat.hpp:79:29: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls(const Cls& other) = delete; \ ^ src/greenlet/greenlet_greenlet.hpp:316:9: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(Greenlet); ^ src/greenlet/greenlet_compiler_compat.hpp:80:40: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls& operator=(const Cls& other) = delete ^ src/greenlet/greenlet_greenlet.hpp:316:9: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(Greenlet); ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:345:39: error: expected ‘;’ at end of member declaration inline intptr_t stack_saved() const G_NOEXCEPT ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:345:45: note: in expansion of macro ‘G_NOEXCEPT’ inline intptr_t stack_saved() const G_NOEXCEPT ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:355:42: error: expected ‘;’ at end of member declaration inline const char* stack_start() const G_NOEXCEPT ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:355:48: note: in expansion of macro ‘G_NOEXCEPT’ inline const char* stack_start() const G_NOEXCEPT ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:389:39: error: expected ‘;’ at end of member declaration inline void slp_restore_state() G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:389:41: note: in expansion of macro ‘G_NOEXCEPT’ inline void slp_restore_state() G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:390:55: error: expected ‘;’ at end of member declaration inline int slp_save_state(char *const stackref) G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:390:57: note: in expansion of macro ‘G_NOEXCEPT’ inline int slp_save_state(char *const stackref) G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:428:45: error: expected ‘;’ at end of member declaration virtual ThreadState* thread_state() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:428:51: note: in expansion of macro ‘G_NOEXCEPT’ virtual ThreadState* thread_state() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:432:51: error: expected ‘;’ at end of member declaration virtual bool was_running_in_dead_thread() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:432:57: note: in expansion of macro ‘G_NOEXCEPT’ virtual bool was_running_in_dead_thread() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:436:41: error: expected ‘;’ at end of member declaration virtual BorrowedGreenlet self() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:436:47: note: in expansion of macro ‘G_NOEXCEPT’ virtual BorrowedGreenlet self() const G_NOEXCEPT = 0; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:490:53: error: expected ‘;’ at end of member declaration virtual OwnedGreenlet g_switchstack_success() G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:490:55: note: in expansion of macro ‘G_NOEXCEPT’ virtual OwnedGreenlet g_switchstack_success() G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:333:63: error: ‘nullptr’ was not declared in this scope const OwnedObject context(const typename IsPy37::IsIt=nullptr) const; ^ src/greenlet/greenlet_greenlet.hpp:336:85: error: ‘nullptr’ was not declared in this scope inline void context(refs::BorrowedObject new_context, typename IsPy37::IsIt=nullptr); ^ src/greenlet/greenlet_greenlet.hpp: In constructor ‘greenlet::Greenlet::switchstack_result_t::switchstack_result_t()’: src/greenlet/greenlet_greenlet.hpp:458:43: error: ‘nullptr’ was not declared in this scope the_state_that_switched(nullptr) ^ src/greenlet/greenlet_greenlet.hpp: In constructor ‘greenlet::Greenlet::switchstack_result_t::switchstack_result_t(int)’: src/greenlet/greenlet_greenlet.hpp:463:43: error: ‘nullptr’ was not declared in this scope the_state_that_switched(nullptr) ^ src/greenlet/greenlet_greenlet.hpp: At global scope: src/greenlet/greenlet_greenlet.hpp:561:51: error: expected ‘;’ at end of member declaration virtual bool was_running_in_dead_thread() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:561:57: note: in expansion of macro ‘G_NOEXCEPT’ virtual bool was_running_in_dead_thread() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:562:45: error: expected ‘;’ at end of member declaration virtual ThreadState* thread_state() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:562:51: note: in expansion of macro ‘G_NOEXCEPT’ virtual ThreadState* thread_state() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:578:41: error: expected ‘;’ at end of member declaration virtual BorrowedGreenlet self() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:578:47: note: in expansion of macro ‘G_NOEXCEPT’ virtual BorrowedGreenlet self() const G_NOEXCEPT; ^ src/greenlet/greenlet_compiler_compat.hpp:79:29: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls(const Cls& other) = delete; \ ^ src/greenlet/greenlet_greenlet.hpp:588:13: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(ParentIsCurrentGuard); ^ src/greenlet/greenlet_compiler_compat.hpp:80:40: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls& operator=(const Cls& other) = delete ^ src/greenlet/greenlet_greenlet.hpp:588:13: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(ParentIsCurrentGuard); ^ src/greenlet/greenlet_compiler_compat.hpp:79:29: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls(const Cls& other) = delete; \ ^ src/greenlet/greenlet_greenlet.hpp:606:9: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(MainGreenlet); ^ src/greenlet/greenlet_compiler_compat.hpp:80:40: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11 [enabled by default] Cls& operator=(const Cls& other) = delete ^ src/greenlet/greenlet_greenlet.hpp:606:9: note: in expansion of macro ‘G_NO_COPIES_OF_CLS’ G_NO_COPIES_OF_CLS(MainGreenlet); ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:624:51: error: expected ‘;’ at end of member declaration virtual bool was_running_in_dead_thread() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:624:57: note: in expansion of macro ‘G_NOEXCEPT’ virtual bool was_running_in_dead_thread() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:625:45: error: expected ‘;’ at end of member declaration virtual ThreadState* thread_state() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:625:51: note: in expansion of macro ‘G_NOEXCEPT’ virtual ThreadState* thread_state() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:626:39: error: expected ‘;’ at end of member declaration void thread_state(ThreadState*) G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:626:41: note: in expansion of macro ‘G_NOEXCEPT’ void thread_state(ThreadState*) G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:628:41: error: expected ‘;’ at end of member declaration virtual BorrowedGreenlet self() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_internal.hpp:17:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_compiler_compat.hpp:66:20: error: ‘noexcept’ does not name a type #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:628:47: note: in expansion of macro ‘G_NOEXCEPT’ virtual BorrowedGreenlet self() const G_NOEXCEPT; ^ src/greenlet/greenlet_compiler_compat.hpp:66:20: error: expected initializer before ‘noexcept’ #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:694:68: note: in expansion of macro ‘G_NOEXCEPT’ void ExceptionState::operator<<(const PyThreadState *const tstate) G_NOEXCEPT ^ src/greenlet/greenlet_compiler_compat.hpp:66:20: error: expected initializer before ‘noexcept’ #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:703:62: note: in expansion of macro ‘G_NOEXCEPT’ void ExceptionState::operator>>(PyThreadState *const tstate) G_NOEXCEPT ^ src/greenlet/greenlet_compiler_compat.hpp:66:20: error: expected initializer before ‘noexcept’ #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:713:30: note: in expansion of macro ‘G_NOEXCEPT’ void ExceptionState::clear() G_NOEXCEPT ^ src/greenlet/greenlet_compiler_compat.hpp:66:20: error: expected initializer before ‘noexcept’ #define G_NOEXCEPT noexcept ^ src/greenlet/greenlet_greenlet.hpp:722:61: note: in expansion of macro ‘G_NOEXCEPT’ int ExceptionState::tp_traverse(visitproc visit, void* arg) G_NOEXCEPT ^ src/greenlet/greenlet.cpp:187:32: error: expected declaration before end of line # pragma GCC diagnostic push ^ In file included from src/greenlet/greenlet_greenlet.hpp:11:0, from src/greenlet/greenlet_internal.hpp:20, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_refs.hpp:67:9: warning: inline function ‘void greenlet::refs::MainGreenletExactChecker(void*)’ used but never defined [enabled by default] MainGreenletExactChecker(void *p); ^ src/greenlet/greenlet_refs.hpp:181:19: warning: inline function ‘T* greenlet::refs::PyObjectPointer<T, <anonymous> >::borrow() const [with T = _greenlet; void (* TC)(void*) = greenlet::refs::MainGreenletExactChecker]’ used but never defined [enabled by default] inline T* borrow() const G_NOEXCEPT ^ src/greenlet/greenlet_refs.hpp:181:19: warning: inline function ‘T* greenlet::refs::PyObjectPointer<T, <anonymous> >::borrow() const [with T = _object; void (* TC)(void*) = greenlet::refs::NoOpChecker]’ used but never defined [enabled by default] src/greenlet/greenlet_refs.hpp:191:19: warning: inline function ‘T* greenlet::refs::PyObjectPointer<T, <anonymous> >::operator->() const [with T = _object; void (* TC)(void*) = greenlet::refs::NoOpChecker]’ used but never defined [enabled by default] inline T* operator->() const G_NOEXCEPT ^ In file included from src/greenlet/greenlet_internal.hpp:20:0, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_greenlet.hpp:209:21: warning: inline function ‘bool greenlet::StackState::started() const’ used but never defined [enabled by default] inline bool started() const G_NOEXCEPT; ^ src/greenlet/greenlet_greenlet.hpp:211:21: warning: inline function ‘bool greenlet::StackState::active() const’ used but never defined [enabled by default] inline bool active() const G_NOEXCEPT; ^ src/greenlet/greenlet_greenlet.hpp:210:21: warning: inline function ‘bool greenlet::StackState::main() const’ used but never defined [enabled by default] inline bool main() const G_NOEXCEPT; ^ In file included from src/greenlet/greenlet_greenlet.hpp:11:0, from src/greenlet/greenlet_internal.hpp:20, from src/greenlet/greenlet.cpp:19: src/greenlet/greenlet_refs.hpp:181:19: warning: inline function ‘T* greenlet::refs::PyObjectPointer<T, <anonymous> >::borrow() const [with T = _greenlet; void (* TC)(void*) = greenlet::refs::GreenletChecker]’ used but never defined [enabled by default] inline T* borrow() const G_NOEXCEPT ^ error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-30998ynj/greenlet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jfkgxde5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-30998ynj/greenlet/ 还是报错,Python.h再文件夹中可以看到
最新发布
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值