PING [PR46902/46912] Re: [Patch] Fix PR46916/46902

IainS developer@sandoe-acoustics.co.uk
Fri Jan 7 15:03:00 GMT 2011


Apologies for the wrong PR # in the original subject,

Approved from the Darwin perspective in  http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01425.html

since there is no specific maintainer listed for the plugin  
infrastructure, and this is verging on obvious,  perhaps an RM could  
approve?

Iain

On 17 Dec 2010, at 09:55, IainS wrote:

> The two PRs turned out to be manifestations of the same issue.
>
> Basically,
> gcc/system.h redefines bool => unsigned char.
>
> this causes a conflict with any ABI where bool/_Bool is defined to  
> something different (e.g. int).
>
> (I don't think PPC/Darwin is the only case where this was done...   
> but it might be the only modern case).
>
> anyway the "gotcha" is that all {external} system headers _must_ be  
> included before gcc/system.h (noted in that header).
>
> OK for trunk?
> Iain
>
> gcc:
>
> 	PR gcc/46902
> 	PR testsuite/46912
> 	* plugin.c: Ensure system headers are included before
> 	gcc/system.h
>
> Index: gcc/plugin.c
> ===================================================================
> --- gcc/plugin.c	(revision 167973)
> +++ gcc/plugin.c	(working copy)
> @@ -21,16 +21,19 @@ along with GCC; see the file COPYING3.  If not see
>    APIs described in doc/plugin.texi.  */
>
> #include "config.h"
> -#include "system.h"
>
> /* If plugin support is not enabled, do not try to execute any code
>    that may reference libdl.  The generic code is still compiled in to
>    avoid including too many conditional compilation paths in the rest
> -   of the compiler.  */
> +   of the compiler.
> +
> +   We must include system headers before "system.h" or the override
> +   for bool might be upset. */
> #ifdef ENABLE_PLUGIN
> #include <dlfcn.h>
> #endif
>
> +#include "system.h"
> #include "coretypes.h"
> #include "diagnostic-core.h"
> #include "tree.h"
>
>



More information about the Gcc-patches mailing list