What does—or did—“volatile void function( … )” do?

后端 未结 3 1295
抹茶落季
抹茶落季 2021-02-12 09:51

I\'ve seen How many usage does "volatile" keyword have in C++ function, from grammar perspective? about use of the volatile keyword on functions, but there was no clea

3条回答
  •  无人共我
    2021-02-12 10:19

    According to the gcc documentation (until February 2015), volatile void as a function return value in C (but not in C++) is equivalent to __attribute__((noreturn)) on the function and tells the compiler that the function never returns.

提交回复
热议问题