------- Comment #1 from yottui at yahoo dot co dot jp  2010-07-10 15:12 -------
Also, I reproduced it on gcc45 of MacPorts 1.9.1 with '-O -m32 -msse' compiler
options.
At that time, I modified errno of the test code.

--- test.old.cpp        2010-07-10 23:27:22.000000000 +0900
+++ test.new.cpp        2010-07-10 23:32:57.000000000 +0900
@@ -48,7 +48,7 @@
 };

 extern "C" {
-        int* _errno(void);
+        extern int errno;
         int  printf (const char*, ...);
 }

@@ -58,9 +58,9 @@
         if ( !is_succeed )
         {
                 printf("error: %s(%d)\n", file_name, line_num);
-                if ( *_errno() ) // LINE_A
+                if ( errno ) // LINE_A
                 {
-                        printf("errno: %d\n", *_errno());
+                        printf("errno: %d\n", errno);
                 }
         }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44900

Reply via email to