This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [Fwd: Re: [ECOS] Problems building ecos sources]
- From: Andrew Lunn <andrew at lunn dot ch>
- To: David Fernandez <dfernandez at cct dot co dot uk>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 24 Jan 2007 11:32:38 +0100
- Subject: Re: [Fwd: Re: [ECOS] Problems building ecos sources]
- References: <1168248265.2880.4.camel@software.cct.co.uk>
> Andrew,
>
> I think that what you propose is to do:
>
> CYG_ADDRESS workspace_end_int = (CYG_ADDRESS) workspace_end;
> HAL_THREAD_INIT_CONTEXT(workspace_end_int,
> breakpoint, trampoline, 0);
> workspace_end = (CYG_WORD*)workspace_end_int;
>
> I propose, to keep the macro useful in saving typing code, and to not
> replicate the functionality of the last line of the macro; to change the
> macro line:
>
> register CYG_WORD* _sp_ = ((CYG_WORD*)((_sparg_) &~15));
>
> into
>
> register CYG_WORD* _sp_ = ((CYG_WORD*)((CYG_ADDRWORD)(_sparg_) &~15));
>
> and get rid of the casting to (CYG_ADDRWORD) in main.
>
> I think this makes more sense, you cannot cast something to an int, and
> expect to behave as l-value, the macro should receive a variable without
> casting. On the other hand, you can always cast a r-value to int if
> unsure of getting a real int or a pointer.
>
> Either way, it fixes the problem, and either make and gmake go well
> now.
Hi David
Please could you produce a real patch, ChangeLog etc. We can then
review it and probably commit it.
Thanks
Andrew