lkml.org 
[lkml]   [2004]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectupdated gcc-3.4.0 fixes patch for 2.4.27-rc3
There's now an updated gcc-3.4.0 fixes patch for 2.4.27-rc3 at
<http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-gcc340-fixes-2.4.27-rc3>.

This update includes two cleanups:

1. The fix for the __attribute__((packed)) problem in ftape-bsm.h
has been corrected. The problem is that

typedef struct { char c[3]; } Name __attribute__((packed));
generates gcc warnings about the 'packed' attribute being
ignored. I assumed this was because packed is meaningless
on a struct containing only char values, so the previous
patches simply removed the attribute. However, the problem
turns out to be syntactic: __attribute__((packed)) is only
allowed in struct/union declarations, not in typedef:s.
The revised patch moves the attribute into the struct part:

typedef struct { char c[3]; } __attribute__((packed)) Name;
2. The patches that removed 'inline' from function declarations
have been removed. The problem is that include/linux/compiler.h
defines inline as follows:

#if __GNUC__ == 3
#if __GNUC_MINOR__ >= 1
# define inline __inline__ __attribute__((always_inline))

A number of functions are marked inline and then called in
contexts where their function bodies aren't visible. gcc-3.4.0
takes the always_inline attribute literally, and terminates
with an error in these cases.

The previous patches removed the problematic inline annotations.
The proper fix is to eliminate the always_inline attribute:

#if __GNUC__ == 3
#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4
# define inline __inline__ __attribute__((always_inline))

This is what the 2.6 kernels do, and my patch set already included
this change. So the inline removals were unnecessary and have been
eliminated.

Both cleanups are due to Marcelo questioning me about the validity
of the previous versions of these fixes.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans