On Feb 28, 2013 6:55 PM, "bdsatish" <bdsatish@gmail.com> wrote:
>
> Hi,
>
> Some warning messages are being "leaked" from GDC's source code into end-user's code. I think this shouldn't happen and hence, is a bug.
>
> ```
> // example.d
> import std.string;
>
> void main()
> {
> format("Hello World");
> }
>
> ```
> Here's the output:
>
> ```
> [shell]$ gdc -Wextra example.d
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d: In function 'decode':
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d:856: warning: uninitialized variable 'result'
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d: In function 'decode':
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d:856: warning: uninitialized variable 'result'
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d: In function 'decode':
> $INSTALLDIR/gcc/include/d/4.8.0/std/utf.d:856: warning: uninitialized variable 'result'
> example.d: In function 'std.format.formattedWrite!(Appender!(string), char, ).formattedWrite':
> $INSTALLDIR/gcc/include/d/4.8.0/std/format.d:504: warning: 'iftmp.16' may be used uninitialized in this function
> $INSTALLDIR/gcc/include/d/4.8.0/std/format.d:504: warning: 'iftmp.17' may be used uninitialized in this function
> ```
>
> So, all these warnings seem to be from GDC. Is there a way to supress these warnings? (for GDC's libs, not my own code).
>
>
> --Satish
The iftmp's shouldn't be emitted, the others though are because it's a template instantiated into the module you are compiling.
Regards
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';