Re: DejaGnu directive matching multiple messages on the same line

2016-07-25 Thread Joseph Myers
On Wed, 20 Jul 2016, Jakub Jelinek wrote: > 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 ma

Re: DejaGnu directive matching multiple messages on the same line

2016-07-21 Thread Segher Boessenkool
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 looke

Re: DejaGnu directive matching multiple messages on the same line

2016-07-20 Thread Martin Sebor
On 07/20/2016 02:28 PM, Jakub Jelinek wrote: 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

Re: DejaGnu directive matching multiple messages on the same line

2016-07-20 Thread Jakub Jelinek
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 "

DejaGnu directive matching multiple messages on the same line

2016-07-20 Thread Martin Sebor
When multiple diagnostics for a given line in a test are expected, I have been using the vertical bar ('|') in regular expression arguments to DejaGnu directives like dg-error and dg-warning on the assumption that all are matched. This use appears to be sanctioned by the GCC TestCaseWriting Wiki