delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/31/03:41:56

Message-ID: <39AE0E8D.345D3406@softhome.net>
Date: Thu, 31 Aug 2000 09:51:41 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
CC: mail AT jgreen4 DOT fsnet DOT co DOT uk, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Subject: Re: Symify fixes
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000831074607 DOT 20860D-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019