🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1360

Internal compiler error update

#1360
From: Chris Lang
Date: Thu, 07 Jan 1993 11:50
51 lines
1923 bytes
As an update to my message yesterday, here is a replacement for 
DirectoryEntry.h which will compile fine normally and produce the internal
compiler error if BUG is defined.  In order to cause correct compilation,
I had to add 'int foo;' to the class definition, although the data type,
name, and position (ordering or private/public) do not seem to matter --
adding other data types works as well.

I believe I also forgot to mention that I am running this on a DECsystem 5500
and Ultrix 4.2.

 -Chris Lang
-------------------------------- cut here -------------------------------
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	DirectoryEntry.h
#
echo x - DirectoryEntry.h
sed 's/^X//' >DirectoryEntry.h << 'END-of-DirectoryEntry.h'
X// This may look like C code, but it is really -*- C++ -*-
X
X#ifndef _directory_h
X#define _directory_h
X
Xclass DirectoryEntry {
X  private:
X    long len;
X    long st;
X    String name;
X  public:
X    DirectoryEntry(const DirectoryEntry &de) { 
X	len = de.len;
X	st = de.st;
X	name = de.name;
X    }
X    DirectoryEntry(String s) { name = s; }
X    long& length(void) { return len; }
X    long& start(void) { return st; }
X#ifndef BUG
X    int foo;
X#endif
X};
X
X
X#endif
END-of-DirectoryEntry.h
exit
Technical Details
Message-ID: <9301072150.AA27307@mirc00.ncms.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mirc00.ncms.org!chrisl

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mirc00.ncms.org!chrisl
From: chrisl@mirc00.ncms.org (Chris Lang)
Subject: Internal compiler error update
Message-ID: <9301072150.AA27307@mirc00.ncms.org>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 7 Jan 1993 11:50:27 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 54