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: [gomp4] bootstrap broken, function enclosing_target_ctx defined but not used


Hi!

On Tue, 19 May 2015 09:24:51 +0200, Tom de Vries <Tom_deVries@mentor.com> wrote:
> On 18-05-15 17:31, Tom de Vries wrote:
> > In ran into this bootstrap failure with branch gomp-4_0-branch:
> > ...
> > src/gcc-gomp-4_0-branch/gcc/omp-low.c:2897:1: error: 'omp_context*
> > enclosing_target_ctx(omp_context*)' defined but not used [-Werror=unused-function]
> >   enclosing_target_ctx (omp_context *ctx)
> >   ^
> > cc1plus: all warnings being treated as errors
> > make[3]: *** [omp-low.o] Error 1
> > ...

I can only encourage everyone to pay attention to compiler warnings.

> This patch fixes bootstrap by commenting out the unused function 
> enclosing_target_ctx.
> 
> The patch just comments it out, since I'm not sure whether:
> - the function needs to be removed, or
> - a user of the function will soon be committed.

Well, looking at the recent revision history, I see that in r223222 Cesar
has removed the single use of enclosing_target_ctx,
<http://news.gmane.org/find-root.php?message_id=%3C5556368D.7010904%40codesourcery.com%3E>,
so I'd assume it is no longer needed?  That is, Cesar, please remove the
function in this case.

> Committed to fix bootstrap.

Thanks!

> Comment out unused enclosing_target_ctx
> 
> 2015-05-19  Tom de Vries  <tom@codesourcery.com>
> 
> 	* omp-low.c (enclosing_target_ctx): Comment out.
> ---
>   gcc/omp-low.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/omp-low.c b/gcc/omp-low.c
> index 914549c..3414ab5 100644
> --- a/gcc/omp-low.c
> +++ b/gcc/omp-low.c
> @@ -2893,6 +2893,7 @@ finish_taskreg_scan (omp_context *ctx)
>   }
> 
> 
> +#if 0
>   static omp_context *
>   enclosing_target_ctx (omp_context *ctx)
>   {
> @@ -2902,6 +2903,7 @@ enclosing_target_ctx (omp_context *ctx)
>     gcc_assert (ctx != NULL);
>     return ctx;
>   }
> +#endif
> 
>   static bool
>   oacc_loop_or_target_p (gimple stmt)


GrÃÃe,
 Thomas

Attachment: pgpy8s2Xb8ysA.pgp
Description: PGP signature


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