jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Patches


Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
>     % cat cast-test.c
>     int main(void)
>    {
>         char buf[10] = { 0 };
>         int *a = (int*)&buf[1];
>         *a = 0x7a7a7a;
>
>         return 0;
>    }
>     % gcc -Wall -Wcast-align cast-test.c -o cast-test
>     cast-test.c: In function `main':
>     cast-test.c:4: warning: cast increases required alignment of target type
>     % ./cast-test
>     Unaligned access pid=398552 <cast-test> va=0x11fffbfe1 pc=0x12000112c ra=0x1200010ac inst=0xb0220000

Do you have an example of where this actually happens in jed?  I
regard it as a bug and would like to fix it.  I realize that a cast
such as (double*)(char*) might generate a compiler warning, but it is
only an error when the pointer being cast is actually unaligned.

Thanks,
--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]