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

Re: [Xen-devel] stdbool.h -nostdinc XSA-55 trouble



>>> On 09.08.13 at 10:11, Patrick Welche <prlw1@xxxxxxxxx> wrote:
> I'm sorry, I still don't see how I can write code which exhibits the
> problem case... Could I have a 1A supervision please?

Try this

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

typedef char bool_t;

int main(int argc, char*argv[]) {
        while(*++argv) {
                long l = strtol(*argv, NULL, 0);
                bool b1 = l;
                bool_t b2 = l;

                printf("%ld -> %d/%d\n", l, b1, b2);
        }

        return 0;
}

with e.g. inputs 1, 255, and 256.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.