c++/949: __typeof__ extension broken

gregod@rpi.edu gregod@rpi.edu
Thu Nov 30 21:36:00 GMT 2000


>Number:         949
>Category:       c++
>Synopsis:       __typeof__ extension broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 30 21:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Doug Gregor
>Release:        gcc version 2.97 20001130 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The write_type function doesn't not handle the TYPEOF_TYPE case, so g++ aborts. The error message given is:

gettype.C:10: Internal error #20000409.
gettype.C:10: Internal compiler error in write_type, at cp/mangle.c:1353
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

>How-To-Repeat:
g++ gettype.ii
>Fix:
A case for TYPEOF_TYPE needs to be added, though this may require adding nonstandard mangling code for __typeof__. 

As a test, I added a case for TYPEOF_TYPE which does nothing but break. I've found no ill-effects, and the typeof extension has worked wonderfully in code that makes heavy use of template metaprogramming. 

Any information regarding why the above fix will not work is welcome, and I'll be happy to help with a solution if possible.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: unknown; name="gettype.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gettype.ii"

IyAxICJnZXR0eXBlLkMiCmNsYXNzIEEge307CmNsYXNzIEMge307CgppbnQgZm9vKEEpOwpmbG9h
dCBmb28oQyk7Cgp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgpzdHJ1Y3QgR2V0Rm9vVHlwZQp7CiAgdHlw
ZWRlZiBfX3R5cGVvZl9fKGZvbyhUKCkpKSBSRVQ7Cn07Cg==


More information about the Gcc-bugs mailing list