mwette@newton.ucsb.edu (Matt Wette) (02/23/88)
This is a follow up to a previously posted article where I stated I had
problems compiling GNU C++ 1.18.0. The problem is due to what seems to
be a bug in sunpro.
I was compiling GNU C++ 1.18.0 on a Sun 3/280 running SunOS 3.4 with sunpro.
Look at the following output:
% cc -E lex.c | fgrep obstack_free
.................... : (int) _obstack_free ((&inline_text_obstack), .....
^^^^^^^^^^^^^
% cc -E lex.c | fgrep obstack_begin
_obstack_begin ((&inline_text_obstack), 4096 - 4, 4, xmalloc, free);
^^^^^^^^^^^^^^
% nm lex.o | fgrep obstack
U __obstack_begin
U __obstack_newchunk
00003c48 b _inline_text_obstack
U _obstack_free <---- yech!
Notice the difference in the number of underscores preceeding
"obstack_free" and "obstack_begin". The preprocessor put one on
both but the compiler put two on "obstack_begin" (correct) and one
on "obstack_free" (incorrect).
Now look at the following
% nm obstack.o | fgrep obstack
00000004 C __obstack
00000000 T __obstack_begin
00000132 T __obstack_free
00000088 T __obstack_newchunk
I again compiled lex.c on a SunOS3.4 system without sunpro to get
% nm lex.o | fgrep obstack
U __obstack
U __obstack_begin
U __obstack_free <---- yeah!
U __obstack_newchunk
0000401c b _inline_text_obstack
The correct thing! GNU C++ now compiles!
Thanks to all who responded.
Matt
_____________________________________________________________________________
Matthew R. Wette | ARPA: mwette%gauss@hub.ucsb.edu
Scientific Computation Lab | UUCP: ucbvax!ucsbhub!gauss!mwette
Dept. Elec. and Comp. Eng. |
University of California |
Santa Barbara, CA 93106 |
-----------------------------------------------------------------------------