This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] warning about empty extern "C" structures


On 05/17/2006 13:52, Mark Mitchell wrote:
(However, we normally don't warn in system headers, and I'd guess that's
where we're more likely to run into empty C structs, so the warning
might not be that useful.)

The warning has worked for me with the Linux kernel headers.


I compiled C++ code #including system headers of glibc, and readline, and
cursers, and unistd.h, and windows.h, on x86_64-redhat-linux and
i686-pc-cygwin. There was not an empty C structure in these headers. Most
C people try to be portable by not using them.

The warning should be independent of -Wsystem-headers. The whole point of
the warning is to locate the bad spots and be aware of them. The worst
situation is when the bad spot is deeply in the system.

Still, I think the warning itself is OK.  However, the patch is
incomplete, because it is missing invoke.texi documentation.  (It would
sure be nice to auto-generate that from texinfo fragments in .opt files,
but...)

Hopefully, I can produce it, if the the patch is going to be accepted.


Roman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]