This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Clean-up of C++ header dependencies
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Martin Michlmayr <tbm at cyrius dot com>
- Cc: Paolo Carlini <pcarlini at suse dot de>, gcc at gcc dot gnu dot org
- Date: Wed, 28 Mar 2007 10:21:07 -0700
- Subject: Re: Clean-up of C++ header dependencies
- References: <20070328123925.GF9670@deprecation.cyrius.com>
On Wed, Mar 28, 2007 at 01:39:25PM +0100, Martin Michlmayr wrote:
> I noticed that you cleaned up C++ header dependencies in response to
> PR28080. This means that *a lot* of C++ code will no longer build.
Rather, programs that have never been built with any compiler other than
g++, but that assume that doing
#include <iostream>
(for example) means that a whole lot of other headers are automatically
included ( <stdlib.h>, <assert.h>, <string.h>, etc) will now fail.
Ideally, I would prefer it if either by default, or with some specified
flag, we could reject any program that invokes a standard function but
does not explicitly #include the header that officially defines that
standard function. That way, it would be possible to detect a
non-portable program without needing to try it out with proprietary
compilers.
To fully implement this for both C and C++ would require cooperation with
the C library maintainers.
> Can you please mention your clean-up work at
> http://gcc.gnu.org/gcc-4.3/changes.html so users are aware of what's
> going on.
Yes, it's worth mentioning, since users will run into it.