PR c++/35602 Bogus warning with -Wsign-conversion
Ian Lance Taylor
iant@google.com
Wed Aug 20 15:54:00 GMT 2008
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:
> 2008/8/20 Ian Lance Taylor <iant@google.com>:
>>
>> That seems odd. Why is that?
>
> The compiler generates some extra code in this case.
> See the PR http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35602
>
> Why or when, I don't know but I guess this fix may apply to other
> cases of compiler-generated stuff.
I don't see anything in that PR specific to std::string. It's just
specific to having a class.
I get the same warning with this test case.
struct c
{
~c();
c();
};
int
main(const int,
const char * const * const)
{
c x[0UL][0UL] =
{
};
c y[0UL] =
{
};
int z[0ul][0UL] =
{
};
return 0;
}
Ian
More information about the Gcc-patches
mailing list