From: Derek M Jones <derek@knosof.co.uk>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Hannes Eder <hannes@hanneseder.net>,
Christopher Li <sparse@chrisli.org>,
linux-sparse@vger.kernel.org
Subject: Re: [PATCH] test-suite: new preprocessor test case
Date: Thu, 19 Mar 2009 19:24:06 +0000 [thread overview]
Message-ID: <49C29BD6.7050005@knosof.co.uk> (raw)
In-Reply-To: <20090319182628.GB28946@ZenIV.linux.org.uk>
Al,
> It doesn't. 6.10.3p11: "If there are sequences of preprocessing tokens
> within the list of arguments that would otherwise act as preprocessing
> directives, the behavior is undefined."
>
> You are asking for identical nasal demons from two implementations, when
> it's not even promised that the same kind will fly on two invocations of
> the same implementation...
So what you are saying is that this is a bug in the header.
This is the approach I would favor.
> Seriously, this is undefined behaviour *and* it's extermely hard to come
> up with self-consistent semantics for it. Standard doesn't even try and
> implementations are doing whatever's more convenient at the moment. Try
> to think of it and you'll come up with really ugly corner cases very fast.
Unless gcc comes up with consistent behavior every time I would not
expect this usage to hang around very long in the header.
> What we probably ought to do is a warning when such stuff happens.
You mean a more easy to understand message.
--
Derek M. Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd mailto:derek@knosof.co.uk
Source code analysis http://www.knosof.co.uk
prev parent reply other threads:[~2009-03-19 19:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 17:56 [PATCH] test-suite: new preprocessor test case Hannes Eder
2009-03-19 18:26 ` Al Viro
2009-03-19 18:51 ` Hannes Eder
2009-03-19 19:07 ` Nasal demons in preprocessor use (Re: [PATCH] test-suite: new preprocessor test case) Al Viro
2009-03-19 19:27 ` Ingo Molnar
2009-03-19 19:39 ` Al Viro
2009-03-19 20:20 ` Vegard Nossum
2009-03-19 22:07 ` Stephen Rothwell
2009-03-20 18:08 ` Ingo Molnar
2009-03-20 19:04 ` Al Viro
2009-03-20 19:14 ` Al Viro
2009-03-20 23:16 ` Vegard Nossum
2009-03-20 23:44 ` Al Viro
2009-03-21 8:34 ` Johannes Berg
2009-03-27 3:13 ` H. Peter Anvin
2009-03-19 19:24 ` Derek M Jones [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=49C29BD6.7050005@knosof.co.uk \
--to=derek@knosof.co.uk \
--cc=hannes@hanneseder.net \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
--cc=viro@ZenIV.linux.org.uk \
/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).