"benben xiao" xiaoxiaoben@hotmail.com writes:
Hi; When I see the file "init.h" in "l4/server/sigma0/src/",I meet a problem. Although I have know: #define L4_NORETURN __attribute__((noreturn)) but I don't understand the function definition: void init(struct multiboot_info *mbi, unsigned int flag, l4_kernel_info_t *info) L4_NORETURN; there why we can use "L4_NORETURN" and what is the effect of "L4_NORETURN".
__attribute__((noreturn)) is an extension supported by the GNU C compiler. It is intended to be used with functions that are not supposed to return. When a function declared with this attribute looks like it returns anyway, the compiler issues a warning.
Please consult the Gcc documentation for more details (on most system, you can run "info gcc 'c extensions' 'function attr'").
Michael