[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Re: Full config and make log (CVS with gcc 3.1)
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Re: Full config and make log (CVS with gcc 3.1) |
Date: |
06 Aug 2002 11:06:31 -0400 |
Greetings, and thanks for your comprehensive report. I've committed
the #undef bool, and the bcopy et.al. prototypes are already commented
out of protoize.h I hope this clears all your issues. Please let me
know if not.
Take care,
"David Shochat" <address@hidden> writes:
> On Thu, 01 Aug 2002 11:10:09 -0400, Camm Maguire wrote:
>
> > Greetings, and thankd for the post! If you insert an #undef bool
> > before the typedef in object.h, is everything cleared? If not, could
> > you please post if changed, or report 'no change'? Also, can you find
> > the file containing the declaration of bool on your system? Is it a
> > #define or a typedef? Could you please post the declaration?
> >
> Yes, this resulted in a change. The previous errors about
> incompatible types for:
> GBC_enable, initflag, and saving_system were gone. But I still got the
> following errors (which I also got last time):
>
> gcc3 -pipe -fwritable-strings -DVOL=volatile
> -I/usr/local/lisp/gcl/cvs/gcl/o
> -fsigned-char -Wall -c -O4 -Wall -I../gcl-tk -I../h/ -O4 -Wall main.c
> In file included from ../h/include.h:78,
> from main.c:40:
> ../h/protoize.h:111: warning: conflicting types for built-in function `bcmp'
> ../h/protoize.h:112: conflicting types for `bcopy'
> /usr/include/string.h:242: previous declaration of `bcopy'
> main.c: In function `multiply_stacks':
> main.c:762: warning: passing arg 1 of `bcopy' from incompatible pointer type
> main.c:763: warning: passing arg 1 of `bcopy' from incompatible pointer type
> main.c:764: warning: passing arg 1 of `bcopy' from incompatible pointer type
> main.c:766: warning: passing arg 1 of `bcopy' from incompatible pointer type
> make[1]: *** [main.o] Error 1
>
> I was able to get rid of the above errors by commenting out the prototypes
> of bcmp() and bcopy() in protoize.h. The make then went on to give a
> successful build.
>
> I found a book today that clarified the bool situation for me. It is "C A
> Reference Manual", 5th Edition, by Samuel P. Harbison III and Guy L.
> Steele Jr. It says (section 5.1.5 on page 132) that in the latest (1999)
> revision to the C Standard, _Bool is a (built-in) unsigned integer
> type which can hold only the values 0 or 1. Then, quoting from the 2nd
> paragraph:
>
> The header file stdbool.h defines the macro bool to be a synonym
> for _Bool and defines false and true to be 0 and 1, respectively.
>
> On my system, the file:
> /usr/lib/gcc-lib/i386-redhat-linux/3.1/include/stdbool.h
> contains the following lines:
>
> #ifndef __cplusplus
>
> #define bool _Bool
> #define true 1
> #define false 0
>
> So that says to me that gcc 3.1 is conforming to the standard, where bool
> is concerned. I think bool is defined this way so that it can be masked
> out using a #undef, as you said to do.
>
> -- David
>
>
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah