Mail Archives: djgpp-workers/2000/08/31/03:41:56
Eli Zaretskii wrote:
> This looks okay to me, but for future picky compilers, please make the
> prototype and the definition consistent:
>
> static void __attribute__((noreturn)) bail(const char *msg)
> {
> assert(msg);
> ...
I finally got the way function attributes work :)
You can write prototype as
static void __attribute__ ((noreturn)) bail(const char *msg);
or
static void bail(const char *msg) __attribute__ ((noreturn));
But in definition you can use only
static void __attribute__ ((noreturn)) bail(const char *msg)
{
}
While I didn't get this, I was seeing mysterious parse errors,
which I've worked around in a luserish way.
So I'll get rid of prototype too.
Laurynas
- Raw text -