[gnu.g++.bug] hp9k320g problems with g++ 1.36.0

glenne@HPLSLA.HP.COM (Glenn Engel) (10/15/89)

version: g++ 1.36.0- obtained 10/14
machine: hp9000/370
config : hp9k320g

3 problems here.

Problem 1:
============
When compiling toplev.c I received errors complaining that _bufsiz was
not a member of the structure.   Changing the code to use the
_bufsiz() macro defined in stdio.h seemed to make everything happy.

Problem 2:
============
g++ seems to give an error when compiling member functions which
have null bodies:

class Grok {
int i;

public:

Grok(int j) { i=j; };
~Grok() {};
 korg() {};
};

g++ bug.cc
gcc version 1.36.0- (based on GCC 1.36)
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix -D__hp9000s300 -D_HPUX_SOURCE -D__hp9000s200__ -D__hp9000s300__ -D__PWB__ -D__hpux__ -D__unix__ -D____hp9000s300__ -D___HPUX_SOURCE__ -D__HAVE_68881__ -Dmc68020 bug.cc /usr/tmp/cca13607.cpp
GNU CPP version 1.36
 /usr/local/lib/gcc-cc1plus /usr/tmp/cca13607.cpp -quiet -dumpbase bug.cc -version -o /usr/tmp/cca13607.s
GNU C++ version 1.36.0- (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
bug.cc:7: parse error at null character
bug.cc:8: parse error at end of input

Problem 3:
============
The code in gnulib3.c requires the copylefted code in builtin.cc.
Compiling a simle program like
main()
{
}

will result in the following link error without builtin.o:

gnulib3.c:39: Undefined symbol ___DTOR_LIST__ referenced from text
gnulib3.c:40: Undefined symbol ___DTOR_LIST__ referenced from text
gnulib3.c:41: Undefined symbol ___1xyzzy__ referenced from text
gnulib3.c:59: Undefined symbol ___CTOR_LIST__ referenced from text
gnulib3.c:61: Undefined symbol ___CTOR_LIST__ referenced from text

Of course, a kludge for this is to just declare an int called  __1xyzzy__
and make sure there is at least one global destructor and constructor
in the code somewhere.

Why not include this in gnulib3.c and make this part of the g++ source
instead of the libg++ source ?

--
 |  Glenn R. Engel
 |  Hewlett-Packard 
 |  (206) 335-2066
 |  glenne%hplsla@hplabs.hp.com

tiemann@LURCH.STANFORD.EDU (Michael Tiemann) (10/15/89)

    3 problems here.

    Problem 1:
    ============
    When compiling toplev.c I received errors complaining that _bufsiz was
    not a member of the structure.   Changing the code to use the
    _bufsiz() macro defined in stdio.h seemed to make everything happy.

    Problem 2:
    ============
    g++ seems to give an error when compiling member functions which
    have null bodies:

    class Grok {
    int i;

    public:

    Grok(int j) { i=j; };
    ~Grok() {};
     korg() {};
    };

There is no _bufsiz macro on Suns, so we need a solution which works
for both.  Also, GNU C++ on Suns does not have any problem with empty
member functions, so there is some problem with GNU C++ when it is run
under HP-UX.  I would look for the problem in cplus-lex.c.  If
somebody has a fix, I will merge it in.

Michael

schmidt@zola.ics.uci.edu (Doug Schmidt) (10/15/89)

In article <8910142218.AA07490@lurch.Stanford.EDU>, tiemann@LURCH (Michael Tiemann) writes:
>    Problem 2:
>    ============
>    g++ seems to give an error when compiling member functions which
>    have null bodies:
>
>    class Grok {
>    int i;
>
>    public:
>
>    Grok(int j) { i=j; };
>    ~Grok() {};
>     korg() {};
>    };
>
>There is no _bufsiz macro on Suns, so we need a solution which works
>for both.  Also, GNU C++ on Suns does not have any problem with empty
>member functions, so there is some problem with GNU C++ when it is run
>under HP-UX.  I would look for the problem in cplus-lex.c.  If
>somebody has a fix, I will merge it in.

grok.cc fails to compile on the suns with the beta 1.36 version
available on labrea.stanford.edu.  However, an even more recent
version of g++ (made with some patches sent to me by Michael a couple
days ago) does work, so it looks like this problem is probably fixed
for the next release.  I'll keep it around in my regression test suite
just to make sure...

Doug
--
Master Swordsman speak of humility;             | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth;                    | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada