Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86912 - inotify.h breaks under C++ pedantic (2.6.11)
Summary: inotify.h breaks under C++ pedantic (2.6.11)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-27 17:48 UTC by Dan Goodliffe
Modified: 2005-12-02 16:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Goodliffe 2005-03-27 17:48:01 UTC
Hardware Environment: Any (most likely)
Software Environment: GCC 3.3.5
Problem Description:
When compiling a CPP program that includes inotify.h for kernel version 2.6.11 (approx, 2.6.10-gentoo-r6 works fine) with GCCs -pedantic flag, compilation fails due to a struct definition containing a char[0]



Reproducible: Always
Steps to Reproduce:
1. Create a trivial .cpp program that includes inotify.h
2. Attempt to compile it (g++ test.cpp -pedantic)

Actual Results:  
defiant src # g++ test.cpp -pedantic
In file included from test.cpp:1:
/usr/src/linux-2.6.11-gentoo-r4/include/linux/inotify.h:24: error: ISO C++
   forbids zero-size array `name'


Expected Results:  
Compiled happily, like it does with previous versions of the header or with the
-pedantic flags removed. I've looked at the code, and I can see what we're
trying to create here... I don't think this is right way though.

// A suitable test program (yes, I know it does nothing and this is a bad
// way to include a file, but it's just for testing)

#include "/usr/src/linux-2.6.11-gentoo-r4/include/linux/inotify.h"
int main() {
  return 0;
}
Comment 1 SpanKY gentoo-dev 2005-12-02 16:58:13 UTC
i dont see the bug