This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[1998-04-25] Bug report


Greetings,

	egcs-980425 on x86 linux-2.0.33 glibc (RH5).  I discovered this
trying to build qt-1.33.  Here is a simplified case:

#include <iostream>

class Foo {

public:
        static const int value1;
        static const int value2;
        static const int value3;
};

typedef Foo ALIAS;

const int ALIAS::value1 = 5;
const int ALIAS::value2 = 10;
const int ALIAS::value3 = ALIAS::value1 | ALIAS::value2;

int main( int, char*[] ) {

        ALIAS f;
        std::cout << f.value1 << endl;
}

Along with output:

% g++ -o $TMPDIR/test $TMPDIR/test.cc
/home/bryan/tmp/test.cc:13: warning: ANSI C++ does not permit `Foo::value1'
to be defined as `ALIAS::value1'
/home/bryan/tmp/test.cc:14: warning: ANSI C++ does not permit `Foo::value2'
to be defined as `ALIAS::value2'
/home/bryan/tmp/test.cc:14: Internal compiler error.
/home/bryan/tmp/test.cc:14: Please submit a full bug report to
`egcs-bugs@cygnus.com'.
% 

Chaning the ALIAS:: to Foo:: cures the problem (and the warning).  This
appears to be the proper way to do this anyway.

-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]