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: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Thu, 21 Jul 2016 20:59:54 -0500
- Subject: Re: DejaGnu directive matching multiple messages on the same line
- Authentication-results: sourceware.org; auth=none
- References: <578FDCC3.80609@gmail.com> <20160720202821.GA7387@tucnak.redhat.com> <578FE5B2.3040901@gmail.com>
On Wed, Jul 20, 2016 at 02:57:22PM -0600, Martin Sebor wrote:
> Btw., the above works fine when each directive is on its own line
> but when the second follows the first on the same line (somehow
> I thought it needed to be at first), the second one needs another
> string argument. I haven't looked into what it's for but the regex
> is the second argument in this case, not the first. Like this:
>
> whatever; // { dg-error "regex-1" } { dg-error "???" "regex2" "fail
> message" { target-selector } <line-number> }
dg-error takes the current line number as the first argument; it is
automagically put there unless you do weird things like you do ;-)
Segher