This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: default omp clause
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 Jul 2015 17:22:02 +0200
- Subject: Re: default omp clause
- Authentication-results: sourceware.org; auth=none
- References: <55B25583 dot 4060407 at acm dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 24, 2015 at 11:10:59AM -0400, Nathan Sidwell wrote:
> 2015-07-24 Nathan Sidwell <nathan@codesourcery.com>
>
> * gimplify.c (omp_default_clause): New function. Reorganize flow
> for clarity. Broken out of ...
> (omp_notice_variable): ... here.
Ok, except:
> + case OMP_CLAUSE_DEFAULT_NONE:
> + {
> + const char *accn;
Can you rename this variable to something that makes sense?
kind, or construct, or name, or directive?
> +
> + if (ctx->region_type & ORT_PARALLEL)
> + accn = "parallel";
> + else if (ctx->region_type & ORT_TASK)
> + accn = "task";
> + else if (ctx->region_type & ORT_TEAMS)
> + accn = "teams";
> + else
> + gcc_unreachable ();
> +
> + error ("%qE not specified in enclosing %s",
> + DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), accn);
> + error_at (ctx->location, "enclosing %s", accn);
Jakub