Search code examples
cfunctionopenclspecifier

C what is a function specifier? like _inline _NORETURN


Today I started learning OpenCL when I came across function specifier like _kernel. Than I searched for it and I found many function specifier like _inline _noreturn. I want to know what is a function specifier and what's its usage? I have read many C programming books but never found such term?

_Noreturn 

Is the above specifier similar to void?


Solution

  • Here's a good link explaining function specifiers

    I have quoted an excerpt that more accurately answers your specific question:

    _Noreturn (since C11) - specifies that the function does not return to where it was called from.