2.6.22-rc2 built on ppc
Geert Uytterhoeven
Geert.Uytterhoeven at sonycom.com
Mon May 21 06:39:07 EST 2007
On Sun, 20 May 2007, Stefan Richter wrote:
> Segher Boessenkool wrote:
> >>> I don't know what's to blame for the warnings --- new gcc versions or
> >>> the change from do { } while (0) to ((void)0)? Either way, the compiler
> >>> should comprehend that the arguments stuffed into the dma_unmap_single
> >>> macro are _not_ unused by accident; it should stay quiet and optimize
> >>> the unused variables away if run with -Osomething.
> >>
> >> There is not much that the compiler can do by itself, since the macro
> >> expansion happens in the preprocessor.
> >
> > Even if the compiler could see that the variables are
> > used as macro arguments, this doesn't automatically
> > equate to it being able to infer the variables are
> > unused on purpose.
>
> Strange. I believe we had code before with variables that were only
> used in macros that expanded to <nil>, notably debug logging macros
> which were usually configured out. Perhaps I'm mistaken.
No, they were unused by the macro when DEBUG was not set.
Only when dev_dbg() was converted from a macro to a static inline function
did they start to be used (according to the compiler) all the time.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven at sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
More information about the Linuxppc-dev
mailing list