This is the mail archive of the gcc-bugs@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]

[Digital UNIX V4.0B] C++ ICE in egcs 1.1.2 and current CVS version


Both egcs 1.1.2 and a recent CVS version (egcs-2.93.20 19990430) get an ICE
on the following input file (stripped down from James Clark's jade 1.2.1
jade/SgmlFOTBuilder.cxx) on Digital UNIX V4.0B (alpha-dec-osf4.0b):

class   OutputCharStream {
public:
  OutputCharStream &operator<<(char);
};

inline
void hex2(OutputCharStream &os, unsigned char c)
{
  static const char hexDigits[] = "0123456789ABCDEF";
  os << hexDigits[c >> 4] << hexDigits[c & 0xF];
}

test.ii: In function `void hex2(class OutputCharStream &, unsigned char)':
test.ii:9: warning: sorry: semantics of inline function static data `const char const hexDigits[17]' are wrong (you'll wind up with multiple copies)
test.ii:9: Internal compiler error.

The same file compiles fine on Solaris 2.6 and IRIX 6.2 with egcs 1.1.2.

	Rainer


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