small diffs to fix -enable-targets=all
Jay
jayk123@hotmail.com
Sat Jul 26 09:37:00 GMT 2008
More information about the Binutils mailing list
Sat Jul 26 09:37:00 GMT 2008
- Previous message (by thread): small diffs to fix -enable-targets=all
- Next message (by thread): [PATCH] Support PowerPC single-precision float
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Another variation here is:
#define COFF_TI_ADJUST(base, offset) \
((char*) (base - (char*) offset))
though this really doesn't seem much better.
There's still an implicit ptrdiff_t in there.
Either I cast a pointer to a size_t, or I cast the result of pointer subtraction back to a pointer.
Yet another option maybe is to push the subtraction into a function instead of a macro.
Though that ought not help. If gcc can track the type info through casts, e.g.: this doesn't work:
#define COFF_TI_ADJUST(base, offset) \
(((char*) base) - offset)
then it should just as well be able to track it through function calls, if they are inlined.
I see there is #pragma GCC diagnostic, and C9x _Pragma but couldn't figure out how to get them to work quickly.
> From: jayk123@hotmail.com
> diff -ur gcc.orig/include/coff/ti.h gcc.mine/include/coff/ti.h
> --- gcc.orig/include/coff/ti.h 2005-05-10 03:21:09.000000000 -0700
> +++ gcc.mine/include/coff/ti.h 2008-07-25 18:59:40.078125000 -0700
> @@ -214,26 +214,45 @@
> +#define COFF_TI_ADJUST(base, offset) \
> + (((char*) (size_t) base) - offset)
- Previous message (by thread): small diffs to fix -enable-targets=all
- Next message (by thread): [PATCH] Support PowerPC single-precision float
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list