From: Reza Roboubi <reza@parvan.net>
To: gcc-help@gcc.gnu.org
Subject: inconsistent macro behavior
Date: Mon, 28 Jul 2008 07:29:00 -0000 [thread overview]
Message-ID: <488D3C09.2000601@parvan.net> (raw)
Hi,
this is the test file:
$ cat test.c
#define x "llll
#define y "
char * c =3D x y ;
Now, if I do this:
$ gcc -Wall -E test.c
It works as expected, and produces preprocessed output that is
perfectly compilable.
But, if I do this:
$ gcc -Wall -c test.c -o test.o
Then I get this:
test.c:3: error: missing terminating " character
test.c:3: error: missing terminating " character
test.c:3: error: expected expression before =91;=92 token
The questions are:
a.) What's even going on here? Why the apparent inconsistency?
b.) What _should_ be the correct behavior, both in terms of the
(extended) GNU C language, and also the standard C language?
Thanks so much for your help.
Reza.
next reply other threads:[~2008-07-28 3:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 7:29 Reza Roboubi [this message]
2008-07-28 8:36 ` David Sveningsson
2008-07-28 12:57 ` Reza Roboubi
2008-07-28 12:28 ` Reza Roboubi
[not found] <1217227025.3398.ezmlm@gcc.gnu.org>
2008-07-28 8:41 ` Jay
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=488D3C09.2000601@parvan.net \
--to=reza@parvan.net \
--cc=gcc-help@gcc.gnu.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).