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]

[committed] Emit sorry for inscan reduction modifier


Hi!

In this case, even the parsing isn't finished (while the modifier is parsed,
if there is the modifier, there must be scan directive in the body etc.).

This patch emits a sorry.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

2018-11-09  Jakub Jelinek  <jakub@redhat.com>

	* c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
	reduction clause with inscan modifier.

	* parser.c (cp_parser_omp_clause_reduction): Call sorry_at on
	reduction clause with inscan modifier.

--- gcc/c/c-parser.c.jj	2018-11-09 16:01:53.406548059 +0100
+++ gcc/c/c-parser.c	2018-11-09 17:17:05.454216557 +0100
@@ -13280,7 +13280,11 @@ c_parser_omp_clause_reduction (c_parser
 	      if (strcmp (p, "task") == 0)
 		task = true;
 	      else if (strcmp (p, "inscan") == 0)
-		inscan = true;
+		{
+		  inscan = true;
+		  sorry ("%<inscan%> modifier on %<reduction%> clause "
+			 "not supported yet");
+		}
 	      if (task || inscan)
 		{
 		  c_parser_consume_token (parser);
--- gcc/cp/parser.c.jj	2018-11-09 16:02:30.582935064 +0100
+++ gcc/cp/parser.c	2018-11-09 17:18:47.887528746 +0100
@@ -33115,7 +33115,11 @@ cp_parser_omp_clause_reduction (cp_parse
 	  if (strcmp (p, "task") == 0)
 	    task = true;
 	  else if (strcmp (p, "inscan") == 0)
-	    inscan = true;
+	    {
+	      inscan = true;
+	      sorry ("%<inscan%> modifier on %<reduction%> clause "
+		     "not supported yet");
+	    }
 	  if (task || inscan)
 	    {
 	      cp_lexer_consume_token (parser->lexer);

	Jakub


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