public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* inconsistent macro behavior
@ 2008-07-28  7:29 Reza Roboubi
  2008-07-28  8:36 ` David Sveningsson
  2008-07-28 12:28 ` Reza Roboubi
  0 siblings, 2 replies; 5+ messages in thread
From: Reza Roboubi @ 2008-07-28  7:29 UTC (permalink / raw)
  To: gcc-help

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.

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

end of thread, other threads:[~2008-07-28 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1217227025.3398.ezmlm@gcc.gnu.org>
2008-07-28  8:41 ` inconsistent macro behavior Jay
2008-07-28  7:29 Reza Roboubi
2008-07-28  8:36 ` David Sveningsson
2008-07-28 12:57   ` Reza Roboubi
2008-07-28 12:28 ` Reza Roboubi

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).