c++/10428: struct <typedef'ed name> causes internal error

lk1@teamten.com lk1@teamten.com
Thu Apr 17 22:46:00 GMT 2003


>Number:         10428
>Category:       c++
>Synopsis:       struct <typedef'ed name> causes internal error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 17 22:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lawrence Kesteloot
>Release:        gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Organization:
>Environment:
Linux neelypcx 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
>Description:
Compile file in "How-To-Repeat" with "gcc foo.cpp". I get this error:

foo.cpp:7: Internal compiler error in write_unscoped_name, at cp/mangle.c:782
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

In another context (more complex), I got this error:

/home/lawrence/src/include/ui.hpp:228: Internal error #20000521.
/home/lawrence/src/include/ui.hpp:228: Internal compiler error in write_unscoped_name, at cp/mangle.c:782
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

This error doesn't happen if there's no namespace.
>How-To-Repeat:
namespace Name {

    typedef void *(*Function)( void *, int );

    struct Foo {
        struct Function xyz[5];
    };

}
>Fix:
The source supplied above is buggy (the "struct" shouldn't be there).  But there shouldn't be a compiler error, either.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list