[lkml]   [2004]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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

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

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:04    [W:0.023 / U:0.208 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site