[Top][All Lists]

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

Re: bug in bison-1.875

From: Paul Eggert
Subject: Re: bug in bison-1.875
Date: 23 Apr 2003 13:26:52 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Martin MOKREJŠ <address@hidden> writes:

>   here're some answers from DEC/COMPAQ/HP engineers.

> From: "Belgardt, Wolfgang" <address@hidden>
> Date: Mon, 14 Apr 2003 16:26:40 +0200
> Dear Mr Mokreis,
> I have send your compiler log file to c++ engineering.
> Here is the answer.
>       Support for a conversion of an address to a bool is "undefined
>       behavior" according to the C99 standard.  So, it's valid for our
>       compiler to generate an error for this case.

This isn't correct for C99.  In C99, when you convert a null pointer
to _Bool, you get false; when you convert a non-null pointer to _Bool,
you get true.  C99 does not have a special case for pointers computed
via the address-of (&) operator; they are valid pointers, and can be
converted to _Bool just like any other pointers.

Perhaps the rules are different for C++; I don't know C++ that well.

Can you please forward this information to the developers via HP customer
support?  Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]