Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jan 2000 20:28:13 +0100 (CET)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Giving a sighandler more information
Message-ID:  <200001151928.UAA83746@dorifer.heim3.tu-clausthal.de>
In-Reply-To: <85kig8$2f6k$1@atlantis.rz.tu-clausthal.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Mikhail Evstiounin <evstiounin@adelphia.net> wrote in list.freebsd-questions:
 > From: Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
 >>No!  A program which assumes that an int is large enough to
 >>store a pointer is BROKEN.  See this simple test program:
 > 
 > Oliver, IT'S A REQUIRIMENTS OF  THE STANDARD!!! - NOT MY WISH!!!

I'm afraid you are wrong.  The standard does NOT specify any
relation between the size of an int and the size of a pointer.
It never did, not even in old K&R days, and neither does C9x.
If you think otherwise, please quote from the standard.

A program written in C (or claimed to be written in C) must
never assume that a pointer can fit in an int.  Otherwise it
is just plain broken.

 > GCC team is very accurate - if they know that they have something
 > incompatible
 > with ANSI standard they always tell it - there is a whole document in
 > distributuive
 > that states what is different and why GCC team thinks it should be
 > different.

I hate to tell you this, but gcc is a good example of a
particularly bad implementation of the ANSI C standard, with
a particularly bad documentation.

And no, not even with -ansi -pedantic it is ANSI C compatible.

Regards
   Oliver

-- 
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)

"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
                                         (Terry Pratchett)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001151928.UAA83746>