public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* __attribute__((unused))
@ 2004-10-14 21:02 Russell King
  2004-10-14 22:04 ` __attribute__((unused)) David Woodhouse
  2004-10-15 12:33 ` __attribute__((unused)) Frank van Maarseveen
  0 siblings, 2 replies; 8+ messages in thread
From: Russell King @ 2004-10-14 21:02 UTC (permalink / raw)
  To: Linux Kernel List

Hi,

I notice that module.h contains stuff like:

#define MODULE_GENERIC_TABLE(gtype,name)                        \
extern const struct gtype##_id __mod_##gtype##_table            \
  __attribute__ ((unused, alias(__stringify(name))))

and even:

#define __MODULE_INFO(tag, name, info)                                    \
static const char __module_cat(name,__LINE__)[]                           \
  __attribute_used__                                                      \
  __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info

My understanding is that we shouldn't be using __attribute__((unused))
in either of these - can someone confirm.

The second one looks fairly dodgy since we're telling a compiler that
it's both used and unused.  That sounds a bit like a HHGTTG puzzle (you
have tea and no tea.)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-15 13:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14 21:02 __attribute__((unused)) Russell King
2004-10-14 22:04 ` __attribute__((unused)) David Woodhouse
2004-10-14 22:08   ` __attribute__((unused)) Russell King
2004-10-14 23:28     ` __attribute__((unused)) Maciej W. Rozycki
2004-10-15 12:31     ` __attribute__((unused)) Alan Cox
2004-10-15 13:50       ` __attribute__((unused)) Richard B. Johnson
2004-10-15 12:33 ` __attribute__((unused)) Frank van Maarseveen
2004-10-15 13:15   ` __attribute__((unused)) Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox