On Thursday 14 May 2009, David L wrote:
> With this code:
>
>
> #include <stdio.h>
>
> class MyClass {
> public:
>   short int foo_ : 6;
> };
>
> int main(int argc, char *argv[]) {
>   MyClass *gce = new MyClass();
>   double d=0.0;
>   if (d == 0.0) {
>     printf("d equals zero.\n");
>   }
>   return 0;
> }
>
> I get this output from valgrind:
>
>
> ==32293== Conditional jump or move depends on uninitialised value(s)
> ==32293==    at 0x804862F: main (main.cpp:11)
> ==32293==  Uninitialised value was created by a heap allocation
> ==32293==    at 0x400674E: operator new(unsigned int)
> (vg_replace_malloc.c:224) ==32293==    by 0x8048610: main (main.cpp:9)
>
> If I remove the : 6 from foo_, I don't get the error.  Is this a valgrind
> bug?

Hmm, that's ungood.  Can you send details of the precise gcc version,
the compilation flags, and the what kind of processor you're running on?

J

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to