package simulavr tag 361603 patch thanks It should be noted that this bug only affects 64-bit targets. This patch is untested on 64-bit targets, but should fix the issue.
Cheers, Shaun --- simulavr-0.1.2.2.orig/src/intvects.h +++ simulavr-0.1.2.2/src/intvects.h @@ -82,8 +82,9 @@ /* Macro to calculate the field index into the structure instead of maintaining an index enumeration. */ +#include <stddef.h> #define irq_vect_table_index(vect) \ - ( ((int) (&( ((IntVectTable *)(0)) -> vect))) / sizeof(IntVect) ) + (offsetof(IntVectTable, vect) / sizeof (IntVect)) /* No device will have all of these vectors, but must define a structure which has a slot for each interrupt. If the device doesn't support the On 4/9/06, Martin Michlmayr <[EMAIL PROTECTED]> wrote: > Package: simulavr > Version: 0.1.2.2-2 > > Your package fails to build with GCC 4.2. Version 4.2 has not been > released yet but I'm building with a snapshot in order to find errors > and give people an advance warning. The bug below is in your package > and not because I'm using a snapshot of the compiler so please take a > look at it. You can reproduce this with the gcc-snapshot package. > > > > Automatic build of simulavr_0.1.2.2-2 on em64t by sbuild/amd64 1.112 > ... > > if x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -Winline > > -Werror -I../src/getopt -Wall -g -O2 -MT adc.o -MD -MP -MF ".deps/adc.Tpo" > > -c -o adc.o adc.c; \ > > then mv -f ".deps/adc.Tpo" ".deps/adc.Po"; else rm -f > > ".deps/adc.Tpo"; exit 1; fi > > cc1: warnings being treated as errors > > adc.c: In function 'adc_intr_cb': > > adc.c:270: warning: cast from pointer to integer of different size > > make[4]: *** [adc.o] Error 1 > > -- > Martin Michlmayr > http://www.cyrius.com/