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; }
i dont see the bug