public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3274: gcc-3.0 bug
@ 2001-06-19 17:26 Hao Li
0 siblings, 0 replies; only message in thread
From: Hao Li @ 2001-06-19 17:26 UTC (permalink / raw)
To: gcc-gnats; +Cc: Hao Li
>Number: 3274
>Category: c++
>Synopsis: typedef bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Tue Jun 19 17:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Hao Li
>Release: 3.0
>Organization:
Onetta
>Environment:
System: Linux lexus 2.4.4 #1 Fri May 18 18:13:11 PDT 2001 i686 unknown
Architecture: i686
host: i686-redhat-linux-gnu
build: i686-redhat-linux-gnu
target: i686-redhat-linux-gnu
configured with: ../configure --prefix=/opt/gcc-3.0 --enable-shared --enable-threads --disable-nls i686-redhat-linux
>Description:
g++ 3.0 dies with "Internal error: Segmentation fault" when compiling
following code:
class test
{
public:
typedef bool (test::*ResponseFunc)(char*);
typedef bool RF(char*);
struct Command {
ResponseFunc respFunc;
};
RF setLosSwd;
RF getLosSwd;
RF printHelp;
static Command d_cmdTable[];
};
test::Command test::d_cmdTable[] = {
{&test::setLosSwd},
{&test::getLosSwd},
{&test::printHelp}
};
>How-To-Repeat:
Preprocessor output is the same as above.
>Fix:
If I don't use typedef of RF the problem is gone, i.e., following
code compiles fine. gcc-2.95.3 does not have this bug.
class test
{
public:
typedef bool (test::*ResponseFunc)(char*);
typedef bool RF(char*);
struct Command {
ResponseFunc respFunc;
};
bool setLosSwd(char*);
bool getLosSwd(char*);
bool printHelp(char*);
static Command d_cmdTable[];
};
test::Command test::d_cmdTable[] = {
{&test::setLosSwd},
{&test::getLosSwd},
{&test::printHelp}
};
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-06-19 17:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-19 17:26 c++/3274: gcc-3.0 bug Hao Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).