[prev in list] [next in list] [prev in thread] [next in thread]
List: fedora-list
Subject: Re: gcc 4.3 warnings
From: Matthew Saltzman <mjs () clemson ! edu>
Date: 2008-08-06 11:55:56
Message-ID: 1218023757.30391.10.camel () valkyrie ! localdomain
[Download RAW message or body]
On Tue, 2008-08-05 at 19:49 -0700, Skunk Worx wrote:
> $ gcc foo.c
> foo.c:1:16: warning: missing terminating " character
>
> $ cat foo.c
> #define DQUOTE "
> main() {}
>
> A few people at work have mentioned it seems unusual for a preprocessor
> to complain about simple macros this way.
>
> What do others think of this?
A macro definition has to consist of a sequence of tokens. A string
constant (sequence of characters enclosed in double quotes) is a token,
but the double quote by itself is not.
If you are trying to construct strings containing macro defs, look at
the stringize operator (#) and token merge operator (##)in the
preprocessor documentation.
>
> TIA,
> John
>
>
--
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic