Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232227 - Can't compile <linux/cdrom.h> in C++ with -pedantic.
Summary: Can't compile <linux/cdrom.h> in C++ with -pedantic.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-14 14:26 UTC by Scott Bambrough
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-05 22:15:40 UTC


Attachments (Terms of Use)

Description Scott Bambrough 2007-03-14 14:26:05 UTC
To reproduce compile the following code using g++.

//file: test.cpp
#include <linux/cdrom.h>
int main(int argc, char **argv) {
  return 0;
}

Compiling the above with gcc 4.11 on RedHat 5 RC1 yields:

g++ -o test test.cpp
This compile succeeds.

g++ -pedantic -o test test.cpp
This compile fails with errors in <linux/byteorder/swab.h>

/usr/include/linux/byteorder/swab.h: In function ‘__u16 __fswab16(__u16)’:
/usr/include/linux/byteorder/swab.h:134: error: ISO C++ forbids
/braced-groups within expressions
/usr/include/linux/byteorder/swab.h:134: error: ISO C++ forbids
/braced-groups within expressions
/usr/include/linux/byteorder/swab.h: In function ‘__u16 __swab16p(const
/__u16*)’:
/usr/include/linux/byteorder/swab.h:138: error: ISO C++ forbids
/braced-groups within expressions
/usr/include/linux/byteorder/swab.h:138: error: ISO C++ forbids
/braced-groups within expressions
/usr/include/linux/byteorder/swab.h: In function ‘void __swab16s(__u16*)’:
/usr/include/linux/byteorder/swab.h:142: error: ISO C++ forbids
/braced-groups within expressions
/usr/include/linux/byteorder/swab.h:142: error: ISO C++ forbids
/braced-groups within expressions

Comment 1 Ernie Petrides 2007-09-05 22:15:40 UTC
Being able to compile kernel-private header files in C++ is not a requirement.


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