This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: re[2]: alpha-dec-osf5.0 fixinclude problem



>   >>  This looks pretty condemning.
> 
> I agree, but a diff between the 2 files looks pretty 
> innocent.  (The diff is attached)

Yep.  It was not fixincludes.
A unified diff makes this clearer (below).
Here is the relevant text from the original source:

     57 #ifndef _SYS_TYPES_H_
     58 #define _SYS_TYPES_H_
     59 #ifdef __cplusplus
     60 extern "C" {
     61 #endif
     62 #include <standards.h>
     63 
     64 #if     !defined(__LANGUAGE_ASSEMBLY__) && !defined(LOCORE)
     65 
     66 #ifdef   _ANSI_C_SOURCE
     67 /*
     68  * ANSI C required typedefs
     69  */
     70 
     71 #ifndef _PTRDIFF_T
     72 #define _PTRDIFF_T
     73 typedef signed long     ptrdiff_t;
     74 #endif

And the first real difference:

@@ -70,7 +79,11 @@
 
 #ifndef _PTRDIFF_T
 #define _PTRDIFF_T
-typedef signed long     ptrdiff_t;
+#if !defined(_GCC_PTRDIFF_T)
+#define _GCC_PTRDIFF_T
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+#endif
+
 #endif

Yielding this problem???

  # 69 "/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/include/sys/types.h" 3
  extern "C" {

  extern "C" {

  extern void __terminate(void) __attribute__ ((__noreturn__));

``terminate'' does not appear in sys/types.h.
My guess?  It comes from something indirectly included from standards.h.
So, why isn't there a # line number directive?

Here are the rest of the fixinc fixes.  They do look innocent:

@@ -81,11 +94,29 @@
 #endif
 
 #if __WCHAR_T_LEN == 1
-    typedef unsigned char wchar_t;
+#ifndef __cplusplus
+#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
+#define _GCC_WCHAR_T
+typedef __WCHAR_TYPE__ wchar_t;
+#endif
+
+#endif
 #elif __WCHAR_T_LEN == 2
-    typedef unsigned short wchar_t;
+#ifndef __cplusplus
+#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
+#define _GCC_WCHAR_T
+typedef __WCHAR_TYPE__ wchar_t;
+#endif
+
+#endif
 #else
-    typedef unsigned int  wchar_t;
+#ifndef __cplusplus
+#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
+#define _GCC_WCHAR_T
+typedef __WCHAR_TYPE__ wchar_t;
+#endif
+
+#endif
 #endif /* __WCHAR_T_LEN == ?? */
 
 #endif /* _WCHAR_T */
@@ -110,7 +141,11 @@
 
 #ifndef _SIZE_T
 #define _SIZE_T
-typedef unsigned long   size_t;
+#if !defined(_GCC_SIZE_T)
+#define _GCC_SIZE_T
+typedef __SIZE_TYPE__ size_t;
+#endif
+
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]