Re: Doubt regarding dg-directives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, it does.
I used dg-warning and not dg warning (that was a sheer typing mistake).
The warning is about the uninitialized variable being used in the
testcase yet there is no warning on that line and the test results in
FAIL.
I used /* { dg-warning "uninitialized" } */ on that particular line.I
used the test in gcc.dg, with other directive /* { dg-options "-O2" }
*/ .
Can you help me where I went wrong?
Thanks,
Krishna Narayanan


On Tue, Feb 22, 2022 at 8:03 PM Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
>
>
>
> On Tue, 22 Feb 2022 at 14:31, Jonathan Wakely wrote:
>>
>>
>>
>> On Tue, 22 Feb 2022 at 11:43, Krishna Narayanan via Gcc-help <gcc-help@xxxxxxxxxxx> wrote:
>>>
>>> Hello,
>>> I had been working on a testcase,in which there had to be a warning on
>>> a specific line. On giving the /* { dg warning "text" } */ to that
>>
>>
>>
>> That should be dg-warning, did you get it right in the test?
>>
>>>
>>> line ,the test outcome is FAIL(test for warnings) even though the
>>> warning was expected.
>
>
> And does the warning actually happen? dg-warning says a warning is expected, so the test will fail if no warning happens.
>
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux