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: default omp clause


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


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