http://d.puremagic.com/issues/show_bug.cgi?id=5955


kenn...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from kenn...@gmail.com 2011-05-08 03:15:42 PDT ---
Patch:


@@ -354,6 +354,14 @@ private struct Demangle
             tbuf[tlen++] = '-';
             next();
         }
+        if( 'I' == tok() ) // INF
+        {
+            match( "INF" );
+            bool isNegative = tlen == 1;
+            debug(info) printf( "got (%sINF)\n", isNegative ? "N" : "" );
+            put( isNegative ? "-real.infinity" : "real.infinity" );
+            return;
+        }
         tbuf[tlen++] = '0';
         tbuf[tlen++] = 'X';
         if( !isHexDigit( tok() ) )
@@ -362,6 +370,19 @@ private struct Demangle
         tbuf[tlen++] = '.';
         next();

+        if( 'N' == tok() ) // NAN
+        {
+            if( tbuf[0] == '-' && tbuf[3] == 'A' )
+            {
+                next();
+                debug(info) printf( "got (NAN)\n" );
+                put( "real.nan" );
+                return;
+            }
+            else
+                error( "Unexpected 'N'" );
+        }
+
         while( isHexDigit( tok() ) )
         {
             tbuf[tlen++] = tok();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to