linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yan Lin" <yanlin@fortinet.com>
To: Task Struct From Hell <taskstructfromhell@googlemail.com>,
	linux-c-programming@vger.kernel.org
Subject: Re: c preprocessor expansion
Date: Thu, 8 Jan 2009 09:53:48 -0800	[thread overview]
Message-ID: <AAA5666725A149B2A882E90858347F9A@ftnjoe> (raw)
In-Reply-To: ef37ea20901080949i2cd875fbk58b4ae3605655812@mail.gmail.com

gcc -E would do this.


----- Original Message ----- 
From: "Task Struct From Hell" <taskstructfromhell@googlemail.com>
To: <linux-c-programming@vger.kernel.org>
Sent: Thursday, January 08, 2009 9:49 AM
Subject: c preprocessor expansion


> Hi,
>
> I was wondering if gcc has any argument which allows for the expansion
> of all macros in a file, just so if we have something like the
> following:
>
>
> #define FOO "bar"
>
> int main() {
>   printf(FOO);
> }
>
> It will output this:
>
> int main() {
>   printf("bar");
> }
>
> Thanks,
> TSFH
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> 


*** This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient.  Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited.  If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto. ***


  parent reply	other threads:[~2009-01-08 17:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08 17:49 c preprocessor expansion Task Struct From Hell
2009-01-08 17:46 ` Nicholas Mc Guire
2009-01-08 17:53 ` Yan Lin [this message]
2009-01-08 18:11 ` ninjaboy
2009-01-09  8:15   ` Task Struct From Hell

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=AAA5666725A149B2A882E90858347F9A@ftnjoe \
    --to=yanlin@fortinet.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=taskstructfromhell@googlemail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).