From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Jeffrey Merkey <jeffmerkey@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [UPDATE] gcc NULL strings passed from ternary operators in kernel modules
Date: Mon, 17 Jan 2011 16:50:16 +0800 [thread overview]
Message-ID: <20110117085016.GG11358@cr0.nay.redhat.com> (raw)
In-Reply-To: <AANLkTim+fY4jUoE_8zVkZ2xxZ+nT3_SeMrOvwW6714z9@mail.gmail.com>
On Thu, Jan 13, 2011 at 12:56:39AM -0700, Jeffrey Merkey wrote:
>might help if my examples are correct -- geez...
>
>interesting case with gcc. The following code example:
>
>printk("%s\n", (value & 1) ? "set": "clear");
>
>will evaluate to NULL unless the ":" character has a space after
>static string declaration.
>
>this version
>
>printk("%s\n", (value & 1) ? "set" : "clear");
>
>works.
>
>go figure. Looks like gcc assumes this case is a C++ construct of
>some sort and
>evaluates it to NULL.
>
Huh? How can gcc assume that is C++ code?!
Whitespaces definitely should not bother the code.
Which version of gcc are you using?
prev parent reply other threads:[~2011-01-17 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 7:56 Jeffrey Merkey
2011-01-17 8:50 ` Américo Wang [this message]
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=20110117085016.GG11358@cr0.nay.redhat.com \
--to=xiyou.wangcong@gmail.com \
--cc=jeffmerkey@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®