Thread View: gnu.g++.lib.bug
4 messages
4 total messages
Started by Michael Czeiszperger
Tue, 01 Sep 1992 19:42
built-in prototypes?
Author: Michael Czeiszperger
Date: Tue, 01 Sep 1992 19:42
Date: Tue, 01 Sep 1992 19:42
32 lines
2102 bytes
2102 bytes
Hi -- I'm trying to compile libg++-2.2 with gcc-2.2.2 on a Sun3 running SunOS4.1. The problem is, the compiler keeps complaining that the prototypes in g++-includes that come with libg++ don't match the built-in prototypes. I've never heard of built-in prototypes, and can't find an explanation in the docs anywhere. I did fix the include files after compiling gcc using "make fixincludes". Does anyone have an idea of what's going on? gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include -c AllocRing.cc In file included from ./std.h:26, from AllocRing.cc:22: ./../g++-include/string.h:28: declaration of `long unsigned int strlen (const c har *)' <built-in>:0: conflicts with built-in declaration `int strlen (const char *)' In file included from ./std.h:28, from AllocRing.cc:22: ./../g++-include/unistd.h:92: conflicting types for `int geteuid (...)' /usr/local/lib/gcc-lib/m68k-sun-sunos4.1/2.2.2/include/unistd.h:96: previous dec laration of `short unsigned int geteuid (...)' ./../g++-include/unistd.h:93: conflicting types for `int getegid (...)' /usr/local/lib/gcc-lib/m68k-sun-sunos4.1/2.2.2/include/unistd.h:95: previous dec laration of `short unsigned int getegid (...)' ./../g++-include/unistd.h:94: conflicting types for `int getgid (.. Thanks awfully much for any pointers, including the much expected "you didn't compile gcc correctly" ! Michael Czeiszperger | "II-V-I... to me, this is a hateful progression. Muscle Fish Consulting | In Jazz, they beef it up up by adding extra czei@musclefish.com | partials, but its still the essense of 'bad Berkeley, CA 94710 | 'white person music.'" -- Frank Zappa
Re: built-in prototypes?
Author: bothner
Date: Thu, 03 Sep 1992 10:21
Date: Thu, 03 Sep 1992 10:21
14 lines
1118 bytes
1118 bytes
./../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 *)' This is because of conflicts in the definition of size_t. size_t is pre-defined (using the macro SIZE_TYPE) in gcc. libg++ extracts a definition of size_t from the system header files (in the script libg++/utils/gen-params). So basically, gcc's definition of size_t as int (which contradicts ANSI, but matches most recent releases of SunOS) does not match your system's header files. You could fix gcc (by changing its definition of SIZE_TYPE). --Per Bothner Cygnus Support bothner@cygnus.com
Re: built-in prototypes?
Author: Jason Merrill
Date: Fri, 04 Sep 1992 21:11
Date: Fri, 04 Sep 1992 21:11
51 lines
1907 bytes
1907 bytes
bothner@cygnus.com writes: >libg++ extracts a definition of size_t from the system header >files (in the script libg++/utils/gen-params). So basically, >gcc's definition of size_t as int (which contradicts ANSI, but >matches most recent releases of SunOS) does not match your >system's header files. You could fix gcc (by changing its >definition of SIZE_TYPE). If you are compiling libg++ with gcc (as I would assume), the size_t defined in the gcc headers (i.e. stddef.h) should take precedence over the system headers, I feel. Thus: *** /gnu/libg++/libg++/utils/gen-params~ Fri Jun 26 12:29:41 1992 --- /gnu/libg++/libg++/utils/gen-params Fri Sep 4 14:06:22 1992 *************** *** 107,113 # using sed to search for typedefs in the output. cat >dummy.c <<!EOF! - #include <sys/types.h> #include <stddef.h> #include <stdarg.h> #include <stdio.h> --- 107,112 ----- # using sed to search for typedefs in the output. cat >dummy.c <<!EOF! #include <stddef.h> #include <sys/types.h> #include <stdarg.h> *************** *** 109,114 cat >dummy.c <<!EOF! #include <sys/types.h> #include <stddef.h> #include <stdarg.h> #include <stdio.h> #include <time.h> --- 108,114 ----- cat >dummy.c <<!EOF! #include <stddef.h> + #include <sys/types.h> #include <stdarg.h> #include <stdio.h> #include <time.h> -- Fool on a Pedestal
Re: built-in prototypes?
Author: Jason Merrill
Date: Sun, 06 Sep 1992 01:04
Date: Sun, 06 Sep 1992 01:04
13 lines
1074 bytes
1074 bytes
In article <1992Sep4.211129.25826@muddcs.claremont.edu> jason@jarthur.claremont.edu (Jason Merrill) writes: >If you are compiling libg++ with gcc (as I would assume), the size_t >defined in the gcc headers (i.e. stddef.h) should take precedence over the >system headers, I feel. OK, I was wrong. Since stddef.h says size_t is unsigned long no matter what SIZE_TYPE was when gcc was compiled, obviously it can't be trusted, and the system headers should take priority. -- Jason Merrill jason@jarthur.claremont.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads