System include file is broken as described in <Fix> section.
fixincludes does not create any modification of it, let alone fixed as
described.  Newly built gcc includes broken file when run.  This may
break just any program built with gcc, and does break compiling
`toplev.c' with `stage1/xgcc' as described in bug 28469.

Environment:
System: Linux way2go 2.6.3-27mdk #1 Tue May 31 21:48:42 MDT 2005 i686 unknown
unknown GNU/Linux
Architecture: i686

Old compiler is `gcc-3.3.2-6mdk'.  System headers are
`glibc-devel-2.3.3-12.8.100mdk'.
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.0.3/configure --enable-languages=c

How-To-Repeat:
        make bootstrap


------- Comment #1 from gin at mo dot msk dot ru  2006-08-11 14:59 -------
Fix:
Currently not known.  Obviously any fixincludes bug (even lack of
fixincludes itself) may be worked around, by doing the necessary
include file editing manually.  (This is why severity is not
critical.)  In this case the workaround is as follows.

  Fix after `compiler-gcc3.h': reverse `#ifndef __KERNEL__'.  If user
  mode code with contains seemingly identical inline function
  definitions before and after this file, type of the 2nd one becomes
  different, which breaks compilation.

--- /usr/include/linux/compiler-gcc+.h  2006/08/10 21:55:37     1.1
+++ /usr/include/linux/compiler-gcc+.h  2006/08/10 22:02:12     1.2
@@ -6,11 +6,11 @@
  */
 #include <linux/compiler-gcc.h>

-#ifndef __KERNEL__
+#if defined __KERNEL__
 #define inline                 __inline__ __attribute__((always_inline))
 #define __inline__             __inline__ __attribute__((always_inline))
 #define __inline               __inline__ __attribute__((always_inline))
-#endif
+#endif /* defined __KERNEL__ */

 #define __deprecated           __attribute__((deprecated))
 #define __attribute_used__     __attribute__((__used__))

Hope this is enough data to patch fixincludes.  Its maintainers
certainly do not have to ask details of includes in my system from me
or other users.  All of them are in
<ftp://mandrake.redbox.cz/Mandriva-old/updates/10.0/RPMS/glibc-devel-2.3.3-12.8.100mdk.i586.rpm>
archive.  (Anyway, will be unable to check mail until aug 21.)


-- 
           Summary: does not fix broken linux/compiler-gcc+.h
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to