This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: CYG_INSTRUMENT_CLOCK+PowerPC+FPU problem.
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] CYG_INSTRUMENT_CLOCK+PowerPC+FPU problem.
- From: Nick Garnett <nickg at cygnus dot co dot uk>
- Date: 04 May 2000 16:10:37 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions, a Red Hat company (Cambridge, UK)
- References: <87vh0vu9z4.fsf@osv.javad.ru>
Sergei Organov <osv@javad.ru> writes:
[CYG_UNUSED_PARAM leaves unneeded code]
> Well, I've tried to remove all the CYG_UNUSED_PARAM from all the macros in the
> 'instrmnt.h', and got only one compiler warning related to the
> CYG_INSTRUMENT_INTR macro. Thus I left only this macro to be like this:
>
> #define CYG_INSTRUMENT_INTR(_event_,_arg1_,_arg2_) \
> CYG_MACRO_START \
> CYG_UNUSED_PARAM(CYG_ADDRWORD, (CYG_ADDRWORD)(_arg1_)); \
> CYG_MACRO_END
Which invocation of this macro causes this? The simple solution is to
add a call to CYG_UNUSED_PARAM() just before the instrumentation macro
call and get rid of the call in the macro.
>
> Now there are no compiler warnings and no unnecessary loads in the code.
>
> Do I submit the patch, or is there a better solution for the problem?
>
Having thought about this and discussed this amongst ourselves we
think that removing the CYG_UNUSED_PARAM calls is probably the best
solution.
The CYG_UNUSED_PARAM calls were only added about year ago to fix some
compiler warnings (not by me, so I do not know which platform this
was). So we will just be backing out the change. We may need to add
some call to CYG_UNUSED_PARAM in various places to dispose of the
compiler warnings.
The changes needed here seem to be fairly trivial, so there probably
is no need for you to send us a patch.
--
Nick Garnett
Cygnus Solutions, a Red Hat Company
Cambridge, UK