I realize this post is a little bit old, but I didn't see the solution that I had found so I thought I would respond. This may only be relevant if you're using MinGW. I found the following on the GCC online documentation web site at https://gcc.gnu.org/onlinedocs/gcc-4...ttributes.html.
You may also specify attributes with `__' preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use __noreturn__ instead of noreturn.
...
Some programs define their own functions that never return. You can declare them noreturn to tell the compiler this fact. For example,
void fatal () __attribute__ ((noreturn));
void
fatal (/* ... */)
{
/* ... */ /* Print error message. */ /* ... */
exit (1);
}
void fatal () __attribute__ ((noreturn));
void
fatal (/* ... */)
{
/* ... */ /* Print error message. */ /* ... */
exit (1);
}
To copy to clipboard, switch view to plain text mode
This solved my problem, hope it helps anybody else in this situation.
Bookmarks