public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303]
Date: Fri, 23 Apr 2021 10:18:11 +0000 (GMT)	[thread overview]
Message-ID: <20210423101811.2226B3A76405@sourceware.org> (raw)

https://gcc.gnu.org/g:44501bfd13bd0c4027b19254e0d10cbc2bd1a264

commit 44501bfd13bd0c4027b19254e0d10cbc2bd1a264
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Thu Oct 29 10:29:19 2020 +0100

    libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303]
    
    This changes makes 'dg-warning', 'dg-error', 'dg-bogus', 'dg-message' behave as
    expected, and also enables use of relative line numbers as well as 'dg-line'.
    
            libgomp/
            PR testsuite/80219
            PR testsuite/85303
            * testsuite/lib/libgomp.exp (libgomp_init): Set
            'gcc_warning_prefix', 'gcc_error_prefix'.
    
    (cherry picked from commit 528507fa0314c75d1105890e4781a475c8badd7c)

Diff:
---
 libgomp/testsuite/lib/libgomp.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index ea3da2cb383..04302074732 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -248,6 +248,12 @@ proc libgomp_init { args } {
     if { $offload_additional_options != "" } {
 	lappend ALWAYS_CFLAGS "additional_flags=${offload_additional_options}"
     }
+
+    # Tell warning from error diagnostics.  This fits for C, C++, and Fortran.
+    global gcc_warning_prefix
+    set gcc_warning_prefix "\[Ww\]arning:"
+    global gcc_error_prefix
+    set gcc_error_prefix "(\[Ff\]atal )?\[Ee\]rror:"
 }
 
 #


                 reply	other threads:[~2021-04-23 10:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210423101811.2226B3A76405@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).