On Mon, Dec 3, 2012 at 10:51 AM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> if you compile the attached testcase on x86 with -O2 -Wuninitialized, you get:
>
> strip.adb: In function 'Strip':
> strip.adb:4:4: warning: 'Last' may be used uninitialized in this function [-
> Wuninitialized]
> strip.adb:26:44: warning: 'First' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
>
> The same warning is apparently associated with 2 different options so, if you
> want to disable "maybe" warnings, -O2 -Wuninitialized -Wno-maybe-uninitialized
> only disables the second one:
>
> strip.adb: In function 'Strip':
> strip.adb:4:4: warning: 'Last' may be used uninitialized in this function [-
> Wuninitialized]
>
> Of course the story under the hood is a bit different, but this doesn't really
> matter to the user I think, so I propose using the -Wmaybe-uninitialized tag
> in both cases.  Tested on x86-64-suse-linux, OK for the mainline?

Ok.

Thanks,
Richard.

>
> 2012-12-03  Eric Botcazou  <ebotca...@adacore.com>
>
>         * tree-ssa.c (warn_uninitialized_var): Use OPT_Wmaybe_uninitialized 
> tag
>         in the non-always executed case.
>
>
> --
> Eric Botcazou

Reply via email to