DragonFly BSD
DragonFly bugs List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: errno bug and gcc internal error


From: Jeroen Ruigrok/asmodai <asmodai@xxxxxxxxxxxxx>
Date: Wed, 20 Jul 2005 06:31:05 +0200

-On [20050719 17:53], YONETANI Tomokazu (qhwt+dfly@xxxxxxxxxx) wrote:
>$ cat a.c
>extern int errno;
>int main(void) {return errno;}

[snip]

>I know this is a software error and I know how to handle this easily:

[snip]

>`bzzzt, your software declares errno as an extern int, which is incorrect.'

You can do

external int errno;

Just don't include errno.h.  But the behaviour of this is undefined.

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://ashemedai.deviantart.com/
http://www.tendra.org/   | http://www.in-nomine.org/
There is no greater sorrow than to recall, in misery, the time when we
were happy...



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]