This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question from imobilien
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Jan Eissfeld <bobbies at web dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 21 Dec 2006 10:03:43 -0800
- Subject: Re: question from imobilien
- References: <82456916@web.de>
On Wed, Dec 20, 2006 at 03:06:34PM +0100, Jan Eissfeld wrote:
> Hi,
>
> PR19978 reports that some overflow warnings are emitted multiple times. Like for example,
>
> test.c:6: warning: integer overflow in expression
> test.c:6: warning: integer overflow in expression
> test.c:6: warning: integer overflow in expression
>
> The current testsuite will match any number of those to a single {
> dg-warning }. I don't know whether this is a known limitation, a bug
> on the testsuite or it just needs some magic.
>
> How could I test that exactly one warning was emitted?
See http://gcc.gnu.org/ml/gcc/2006-12/msg00000.html for an ugly solution,
and the rest of the thread for problems with this approach. The check
for getting the warning must be in a separate test from the check for
multiple warnings.
Janis