Bug 112448 - Headers are broken for C++
Headers are broken for C++
Product: Red Hat Raw Hide
Classification: Retired
Component: e2fsprogs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-12-19 15:42 EST by Enrico Scholz
Modified: 2007-04-18 13:00 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-05 11:02:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2003-12-19 15:42:46 EST
Description of problem:

| $ cat /tmp/foo.c
| #include <ext2fs/ext2fs.h>
| $ gcc -c /tmp/foo.c
| $ g++ -c /tmp/foo.c
| In file included from /tmp/foo.c:1:
| /usr/include/ext2fs/ext2fs.h:980: error: syntax error before `__attribute__'
| /usr/include/ext2fs/ext2fs.h: In function `errcode_t ext2fs_resize_mem(...)':
| /usr/include/ext2fs/ext2fs.h:980: error: declaration of C function `errcode_t 
|    ext2fs_resize_mem(...)' conflicts with
| /usr/include/ext2fs/ext2fs.h:918: error: previous declaration `errcode_t 
|    ext2fs_resize_mem(long unsigned int, long unsigned int, void*)' here
| /usr/include/ext2fs/ext2fs.h: In function `errcode_t ext2fs_resize_mem(...)':
| /usr/include/ext2fs/ext2fs.h:984: error: `ptr' undeclared (first use this 

This is because of the line

| _INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)),

Moving the EXT2FS_ATTR _before_ 'old_size' makes it work like a charm.

Version-Release number of selected component (if applicable):


How reproducible:


Additional info:

I am reporting it here, since 1.35 is an unofficial version and I can
not check if it is fixed in CVS/BK already.
Comment 1 Enrico Scholz 2004-01-10 01:44:23 EST
Since people are asking what I mean with the moving of EXT2FS_ATTR,
here a patch-like notation:

- _INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)),
+ _INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size,

Btw, problem still exists in e2fsprogs-1.35-4
Comment 2 Thomas Woerner 2004-02-05 11:02:44 EST
Fixed in rawhide in rpm e2fsprogs-1.35-5.1 or newer.

Note You need to log in before you can comment on or make changes to this bug.