All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: lkml <linux-kernel@vger.kernel.org>
Subject: __initcall macros and C token pasting
Date: Sat, 25 Sep 2004 13:57:37 -0400	[thread overview]
Message-ID: <9e47339104092510574c908525@mail.gmail.com> (raw)

#define DRM(x) r128_##x
module_init( DRM(init) );

#define __define_initcall(level,fn) \
        static initcall_t __initcall_##fn __attribute_used__ \
        __attribute__((__section__(".initcall" level ".init"))) = fn

This gives the error:
{standard input}: Assembler messages:
{standard input}:104: Error: junk at end of line, first unrecognized
character is `('

I believe this is because the C macro is not being expanded in the
assembler context of the section with the fn assignment.

Any ideas on how to fix this?

-- 
Jon Smirl
jonsmirl@gmail.com

             reply	other threads:[~2004-09-25 17:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 17:57 Jon Smirl [this message]
2004-09-25 18:32 ` __initcall macros and C token pasting viro
2004-09-25 18:40   ` Jon Smirl
2004-09-25 19:17   ` Jon Smirl
2004-09-26 17:21     ` Olivier Galibert
2004-09-26 17:24       ` Tonnerre
2004-09-26 17:42         ` Christoph Hellwig
2004-09-26 19:56         ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e47339104092510574c908525@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.