This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to write testcase with two warnings on one line?
- From: Tobias dot Schlueter at Physik dot Uni-Muenchen dot DE
- To: Feng Wang <wf_cs at yahoo dot com>
- Cc: fortran at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 21 Jun 2005 16:32:56 +0200
- Subject: Re: How to write testcase with two warnings on one line?
- References: <20050621142135.17517.qmail@web15609.mail.cnb.yahoo.com>
Quoting Feng Wang <wf_cs@yahoo.com>:
> Hi,
>
> I want to write a testcase. The compiler gives two separated warnings on one
> statement. How to write this with Dejagnu?
I don't think this is possible if both warnings are issued for the same location
(which is probably not something we want). If the loci are different, it is
possible to split the line between the warnings and then proceed as usual, say:
do_first_thing & ! { dg-warning "a" }
& do_second_thing ! { dg-warning "b" }
IIRC there are testcases that do just that.
HTH,
- Tobi