This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] (header usage fix) remove unused system header includes
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Rich Felker <dalias at libc dot org>, nd <nd at arm dot com>
- Date: Fri, 22 Apr 2016 12:17:27 +0200
- Subject: Re: [PATCH 1/2] (header usage fix) remove unused system header includes
- Authentication-results: sourceware.org; auth=none
- References: <5719F6A0 dot 6050700 at arm dot com>
On Fri, Apr 22, 2016 at 12:02 PM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> These headers include "system.h" which already includes
> <new> and <string.h> so including them after "system.h"
> is a noop and including them before may cause problems
> if they depend on gcc macros from system.h.
>
> ipa-icf-gimple.c includes <list> after system.h which
> poisons various libc symbols which may cause problems
> and it is not used at all.
>
> Tested together with PATCH 2/2.
>
> OK for trunk?
Ok.
Thanks,
Richard.
> gcc/ChangeLog:
>
> 2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> * auto-profile.c: Remove <string.h> include.
> * ipa-icf-gimple.c: Remove <list> include.
> * diagnostic.c: Remove <new> include.
> * genmatch.c: Likewise.
> * pretty-print.c: Likewise.
> * toplev.c: Likewise
> * c/c-objc-common.c: Likewise.
> * cp/error.c: Likewise.
> * fortran/error.c: Likewise.