I was taking a look through some of the gcc attributes list and I spotted this one that caught my attention:
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.
How could a C function throw an exception? Could someone explain what this attribute is used for?
There seems to be a nothrow
tag available but what I've found there seem to be related to C++ std::nothrow
. Not sure whether that's related to my particular question.