This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CYG_INSTRUMENT_CLOCK+PowerPC+FPU problem.



    >>> What about
    >>> 
    >>> #define CYG_UNUSED_PARAM(_type_, _var_) \ if (0) { if
    >>> (((CYG_ADDRESS)&(_var_)) != ((CYG_ADDRESS)&(_var_))); }
    >>> 
    >>> Is there anything you cannot take the address of?

    Sergei> Unfortunately yes. If you declared _var_ to be register:

    Sergei> register int v;

    Sergei> then gcc will print warning if you try to take its address :-(

    Jesper> Hmm... Being a hacker sure ain't easy :)

    Jesper> What we really need is some GCC attribute magic one can
    Jesper> use to mark an argument (intentionally) unused. Maybe a
    Jesper> project for a rainy Sunday...

From the gcc info page:

`unused'
     This attribute, attached to a variable, means that the variable is
     meant to be possibly unused.  GNU CC will not produce a warning
     for this variable.

However I have never tried using it so I do not know how well it would
serve our purposes.

Bart

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]