Article View: comp.windows.interviews
Article #1684Re: Problem with GCC-2.4.5, and libg++-2.4 compiling IV-3.1...
From: Casper H.S. Dik
Date: Thu, 15 Jul 1993 11:10
Date: Thu, 15 Jul 1993 11:10
68 lines
3633 bytes
3633 bytes
aad@scr.siemens.com (Anthony A. Datri) writes: >>>Like I just said, IT DOESN'T. In fact, String.cc contains >>>Now, it's difficult to know if this is ever actually used as strlen, but > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> It does. libg++-2.4 fixes the problem >One more time. I ************AM************** using 2.4. >The libc call is an int. I N T. >> The problem you mentioned about gcc and interview is becuase you >>have the wrong libg++. I also encountered this problem which was >>caused by gcc-2.3.3 compiled libg++-2.4. >I don't know what kind of number system you use, but in mine 2.4 = 2.4. You must have done somthing wrong. To become more ANSI complaint, the gcc maintainers have decided that size_t should be unsigned, not only on platforms that have this by default, but also on platforms that can be made to support this. Now, on SunOS 4.x size_t is defined as (signed) int. The libc strlen() function is defined to return a (signed) int. Since it doesn't really matter whether strlen is called as a int returning function or a function returning unsigned int, that is not a problem. (It may become a problem when your strings are bigger than MAX_INT). So, if you use ``unsigned int strlen()'' and call teh libc function it still works. In gcc 2.4.x the definition of size type as changed for SunOS 4.x. It is now ``unsigned long int''. The gcc fixed include files also reflect this change. When installing libg++ and includes, the type of size_t is determined. When we installed libg++2.3 with gcc-2.3.3 everything worked. When we installed gcc-2.4.x after that, the type of size_t changed for gcc and the installed libg++ broke. After reconfiguring/installing libg++2.3[.1], everything worked again. (Except that gcc-2.3.3 could no longer compile C++ programs that include <string.h>). To get a working gcc/libg++ instalation: - install gcc/g++ (with fixed includes and the _SIZE_TYPE definition left as it was in the original source) - rebuild libg++ with the new gcc compiler. Works for us (with gcc 2.4, not with gcc 2.3.3): file.c: #include <string.h> % g++ -c -V 2.3.3 file.c /usr/local/gnu/lib/g++-include/string.h:28: declaration of `long unsigned int strlen (const char *)' <built-in>:0: conflicts with built-in declaration `int strlen (const char *)' In file included from /usr/local/gnu/lib/g++-include/stddef.h:7, from /usr/local/gnu/lib/g++-include/memory.h:6, from /usr/local/gnu/lib/g++-include/string.h:43, from tty.c:1: /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/include/stddef.h:152: conflicting types for `_G_size_t' /usr/local/gnu/lib/g++-include/_G_config.h:20: previous declaration of `_G_size_t' # gcc 2.4.3: % g++ -c file.c % Casper
Technical Details
Message-ID:
<223dvf$sa9@mail.fwi.uva.nl>Path:
arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!sun4nl!fwi.uva.nl!casperReferences:
<SMILEY.93Jul9175300@maharet.im.hou.compaq.com> <1993Jul12.073948.7933@ericsson.se> <CA28DM.CKy@scr.siemens.com> <21t1aoINNhjc@crcnis1.unl.edu> <CA5x3K.5K0@scr.siemens.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,2a85f141102c1320 X-Google-Attributes: gid10ba33,public X-Google-Thread: 101a2b,2a85f141102c1320 X-Google-Attributes: gid101a2b,public X-Google-ArrivalTime: 1993-07-15 04:22:54 PST Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!sun4nl!fwi.uva.nl!casper From: casper@fwi.uva.nl (Casper H.S. Dik) Newsgroups: comp.windows.interviews,gnu.g++.help Subject: Re: Problem with GCC-2.4.5, and libg++-2.4 compiling IV-3.1... Date: 15 Jul 1993 11:10:39 GMT Organization: FWI, University of Amsterdam Lines: 68 Message-ID: <223dvf$sa9@mail.fwi.uva.nl> References: <SMILEY.93Jul9175300@maharet.im.hou.compaq.com> <1993Jul12.073948.7933@ericsson.se> <CA28DM.CKy@scr.siemens.com> <21t1aoINNhjc@crcnis1.unl.edu> <CA5x3K.5K0@scr.siemens.com> NNTP-Posting-Host: adam.fwi.uva.nl