linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@hofr.at>
To: Task Struct From Hell <taskstructfromhell@googlemail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: c preprocessor expansion
Date: Thu, 8 Jan 2009 08:46:18 -0900 (AKST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0901080843500.3415@vlab.hofr.at> (raw)
In-Reply-To: <ef37ea20901080949i2cd875fbk58b4ae3605655812@mail.gmail.com>

>
>
> #define FOO "bar"
>
> int main() {
>    printf(FOO);
> }
>
> It will output this:
>
> int main() {
>    printf("bar");
> }
>
gcc -E file.c
hofrat@rtl14:~/stuff$ cat file.c
#define FOO "bar"

int main() {
   printf(FOO);
}

hofrat@rtl14:~/stuff$ gcc -E file.c
# 1 "file.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "file.c"


int main() {
   printf("bar");
}


hofrat

  reply	other threads:[~2009-01-08 17:46 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 [this message]
2009-01-08 17:53 ` Yan Lin
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=Pine.LNX.4.58.0901080843500.3415@vlab.hofr.at \
    --to=hofrat@hofr.at \
    --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).