This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DejaGnu directive matching multiple messages on the same line
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 20 Jul 2016 22:28:21 +0200
- Subject: Re: DejaGnu directive matching multiple messages on the same line
- Authentication-results: sourceware.org; auth=none
- References: <578FDCC3.80609@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 20, 2016 at 02:19:15PM -0600, Martin Sebor wrote:
> Is there a way to express a requirement that a single line cause
> two or more diagnostic messages (in any order) each matching one
> of the regex strings?
Sure, and it is used many times in the testsuite.
whatever; /* { dg-error "whatever1" } */
/* { dg-error "whatever2" "" { target *-*-* } 33 } */
You need to use the target specification and supply line number in the
second and following directive which you want to apply to the same line.
Jakub