Bug 112448 - Headers are broken for C++
Summary: Headers are broken for C++
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: e2fsprogs
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-19 20:42 UTC by Enrico Scholz
Modified: 2007-04-18 17:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-05 16:02:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2003-12-19 20:42:46 UTC
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):

e2fsprogs-devel-1.35-3
gcc-c++-3.3.2-3


How reproducible:

100%


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 06:44:23 UTC
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 16:02:44 UTC
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.