Bug 207569 - Including <linux/types.h> breaks offsetof macro
Including <linux/types.h> breaks offsetof macro
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: glibc-kernheaders (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-21 13:38 EDT by Khem Raj
Modified: 2008-01-06 16:28 EST (History)
1 user (show)

See Also:
Fixed In Version: Fedora 7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-06 16:28:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The failing testcase (247 bytes, text/x-csrc)
2006-09-21 13:38 EDT, Khem Raj
no flags Details

  None (edit)
Description Khem Raj 2006-09-21 13:38:49 EDT
Description of problem:

offsetof macro definitions are picked from two different files. As a result the
attached file when compiled with g++ fails and gives following error

test.c: In function 'int main(int, char**)':
test.c:14: error: a cast to a type other than an integral or enumeration type
cannot appear in a constant-expression
test.c:14: error: '->' cannot appear in a constant-expression
test.c:14: error: `&' cannot appear in a constant-expression


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

gcc-c++-4.1.1-23

How reproducible:

Compile the attached testcase like g++ -o test test.c

Steps to Reproduce:
1.
2.
3.
  
Actual results:

Following compilation error

test.c: In function 'int main(int, char**)':
test.c:14: error: a cast to a type other than an integral or enumeration type
cannot appear in a constant-expression
test.c:14: error: '->' cannot appear in a constant-expression
test.c:14: error: `&' cannot appear in a constant-expression


Expected results:

The program should have compiled without errors.

Additional info:
Comment 1 Khem Raj 2006-09-21 13:38:50 EDT
Created attachment 136893 [details]
The failing testcase
Comment 2 Matthew Miller 2007-04-06 13:26:40 EDT
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.

[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]
Comment 3 Till Maas 2008-01-06 16:28:46 EST
testcase compiles on Fedora 7

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