Bug 207569

Summary: Including <linux/types.h> breaks offsetof macro
Product: [Fedora] Fedora Reporter: Khem Raj <raj.khem>
Component: glibc-kernheadersAssignee: David Woodhouse <dwmw2>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Fedora 7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-06 21:28:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The failing testcase none

Description Khem Raj 2006-09-21 17:38:49 UTC
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 17:38:50 UTC
Created attachment 136893 [details]
The failing testcase

Comment 2 Matthew Miller 2007-04-06 17:26:40 UTC
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 21:28:46 UTC
testcase compiles on Fedora 7