RFA: __imag__ and __real__ in C++ (bug 11437)
Nathanael Nerode
neroden@twcny.rr.com
Wed Jul 9 22:22:00 GMT 2003
This is just a proof of concept. In particular, the mangling chosen
was arbitrary and probably wrong. :-)
But I'd like a C++ person to look at bug 11437, and at my analysis and
see what should be done. An alternative solution is to remove _Complex
support from C++, of course.
Index: operators.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/operators.def,v
retrieving revision 1.14
diff -u -r1.14 operators.def
--- operators.def 3 Apr 2003 15:42:16 -0000 1.14
+++ operators.def 9 Jul 2003 22:00:13 -0000
@@ -93,8 +93,10 @@
DEF_SIMPLE_OPERATOR ("++", PREINCREMENT_EXPR, "pp", 1)
DEF_SIMPLE_OPERATOR ("--", PREDECREMENT_EXPR, "mm", 1)
DEF_SIMPLE_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", 1)
-/* This is an extension. */
+/* These are extensions. */
DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "v17alignof", 1)
+DEF_SIMPLE_OPERATOR ("__imag__", IMAGPART_EXPR, "v17__imag__",1)
+DEF_SIMPLE_OPERATOR ("__real__", REALPART_EXPR, "v17__real__",1)
/* The cast operator. */
DEF_SIMPLE_OPERATOR ("", TYPE_EXPR, "cv", 1)
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html
More information about the Gcc
mailing list