public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch,openacc] C, C++ OpenACC wait diagnostic change
@ 2018-09-26 18:21 Cesar Philippidis
  2018-09-26 20:28 ` Joseph Myers
  0 siblings, 1 reply; 9+ messages in thread
From: Cesar Philippidis @ 2018-09-26 18:21 UTC (permalink / raw)
  To: gcc-patches, Thomas Schwinge

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

Attached is an old patch which updated the C and C++ FEs to use %<)%>
for the right ')' symbol. It's mostly a cosmetic change. All of the
changes are self-contained to the OpenACC code path.

Is this OK for trunk? I bootstrapped and regtested it for x86_64 Linux
with nvptx offloading.

Thanks,
Cesar

[-- Attachment #2: 0001-C-C-OpenACC-wait-diagnostic-change.patch --]
[-- Type: text/x-patch, Size: 2626 bytes --]

[OpenACC] C, C++ OpenACC wait diagnostic change

2018-XX-YY  James Norris  <jnorris@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	gcc/c/
	* c-parser.c (c_parser_oacc_wait_list): Change error message.
	gcc/cp/
        * parser.c (cp_parser_oacc_wait_list): Change error message.
	gcc/testsuite/
        * c-c++-common/goacc/asyncwait-1: Update messages.

(cherry picked from gomp-4_0-branch r223007, e4ea0a3)

diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 1766a256633..b8fc000b50d 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -11597,7 +11597,8 @@ c_parser_oacc_wait_list (c_parser *parser, location_t clause_loc, tree list)
 
   if (args->length () == 0)
     {
-      c_parser_error (parser, "expected integer expression before ')'");
+      c_parser_error (parser,
+		      "expected integer expression list before %<)%>");
       release_tree_vector (args);
       return list;
     }
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c6ebc494e59..e80c1fba670 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -32094,7 +32094,8 @@ cp_parser_oacc_wait_list (cp_parser *parser, location_t clause_loc, tree list)
 
   if (args == NULL || args->length () == 0)
     {
-      cp_parser_error (parser, "expected integer expression before ')'");
+      cp_parser_error (parser,
+		       "expected integer expression list before %<)%>");
       if (args != NULL)
 	release_tree_vector (args);
       return list;
diff --git a/gcc/testsuite/c-c++-common/goacc/asyncwait-1.c b/gcc/testsuite/c-c++-common/goacc/asyncwait-1.c
index e1840af5d70..2fc89486ee5 100644
--- a/gcc/testsuite/c-c++-common/goacc/asyncwait-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/asyncwait-1.c
@@ -116,7 +116,7 @@ f (int N, float *a, float *b)
     }
 
 #pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait (1 /* { dg-error "expected '\\\)' before end of line" } */
-    /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
+    /* { dg-error "expected integer expression list before" "" { target c++ } .-1 } */
     {
         for (ii = 0; ii < N; ii++)
             b[ii] = a[ii];
@@ -171,7 +171,7 @@ f (int N, float *a, float *b)
 #pragma acc wait (1,2,,) /* { dg-error "expected (primary-|)expression before" } */
 
 #pragma acc wait (1 /* { dg-error "expected '\\\)' before end of line" } */
-    /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
+    /* { dg-error "expected integer expression list before" "" { target c++ } .-1 } */
 
 #pragma acc wait (1,*) /* { dg-error "expected (primary-|)expression before" } */
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-04 11:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 18:21 [patch,openacc] C, C++ OpenACC wait diagnostic change Cesar Philippidis
2018-09-26 20:28 ` Joseph Myers
2018-09-26 21:14   ` Cesar Philippidis
2018-09-28 13:33     ` Julian Brown
2018-11-29 21:22       ` Julian Brown
2018-11-29 21:28         ` Joseph Myers
2018-11-30 15:25       ` Thomas Schwinge
2018-12-03 21:11         ` Julian Brown
2018-12-04 11:46           ` Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).