전혀 감을 못잡하서 그런데 한 번 코멘트좀 부탁 드립니다. ㅠㅠ

gokore의 이미지

# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
# define __THROW __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__)) fct

코드 해석 중에 이상한 것을 만났는데 대체 어떻게 이해를 해야할 까요??

__cplusplus나 __GNUC_PREREQ (3, 3) 같은 경우는 ctag로 더이상 검색이 안되구요

__attribute__ ((__nothrow__)) fct 는 무슨 말인지 모르겠네요 ㅠㅠ

amorette의 이미지

predefined macro:
http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

attribute syntax:
http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Quote:

nothrow:
The nothrow attribute is used to inform the compiler that a function cannot throw an exception. For example, most functions in the standard C library can be guaranteed not to throw an exception with the notable exceptions of qsort and bsearch that take function pointer arguments. The nothrow attribute is not implemented in GCC versions earlier than 3.3.