public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/55406] New: Again: pasting xxx and xxx does not give a valid preprocessing token
@ 2012-11-20 1:47 zhouzhenghui at gmail dot com
2012-11-20 1:52 ` [Bug c/55406] " pinskia at gcc dot gnu.org
2012-11-20 2:20 ` zhouzhenghui at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: zhouzhenghui at gmail dot com @ 2012-11-20 1:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55406
Bug #: 55406
Summary: Again: pasting xxx and xxx does not give a valid
preprocessing token
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zhouzhenghui@gmail.com
I have konwn that there are too many "SPAM" about this title. Most of them are
list in BUG [7976], http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7976. The
compiler requirement of a valid preprocessing token is correct due to the
standard definition.
But when taking the the preprocessor as a meta programming language, there is
chance to running into such situation. One thing is the BOOST_PP_IS_EMPTY
assertion. The example may be:
#include <boost/preprocessor/facilities/is_empty.hpp>
BOOST_PP_IS_EMPTY() /* result: 1 */
BOOST_PP_IS_EMPTY(a) /* result: 0 */
BOOST_PP_IS_EMPTY(+a) /* error report here, for '+' cannot be pasted */
And more information I have posted to comp.std.c, take a look at
https://groups.google.com/forum/?fromgroups=#!topic/comp.std.c/7rgt8k6ILMM.
Since in most simple cases, the cocmpiler just does the same thing of pasting
when omitting the ## operator, so may be it is a option to allow pasting tokens
here.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/55406] Again: pasting xxx and xxx does not give a valid preprocessing token
2012-11-20 1:47 [Bug c/55406] New: Again: pasting xxx and xxx does not give a valid preprocessing token zhouzhenghui at gmail dot com
@ 2012-11-20 1:52 ` pinskia at gcc dot gnu.org
2012-11-20 2:20 ` zhouzhenghui at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-20 1:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55406
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-20 01:51:39 UTC ---
Undefined at compile time rather than undefined at runtime. Anyways GCC is
correct. BOOST_PP_IS_EMPTY is broken plain and simple, report this to boost
instead.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/55406] Again: pasting xxx and xxx does not give a valid preprocessing token
2012-11-20 1:47 [Bug c/55406] New: Again: pasting xxx and xxx does not give a valid preprocessing token zhouzhenghui at gmail dot com
2012-11-20 1:52 ` [Bug c/55406] " pinskia at gcc dot gnu.org
@ 2012-11-20 2:20 ` zhouzhenghui at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: zhouzhenghui at gmail dot com @ 2012-11-20 2:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55406
--- Comment #2 from Zhenghui Zhou <zhouzhenghui at gmail dot com> 2012-11-20 02:19:34 UTC ---
The BOOST interface is just one thing may be dealed with, it may be good to
find the potential power of the preprocessor. IMHO, the undefined behaviour is
less harmful in preprocessor. after all, they can be language extensions.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-20 2:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 1:47 [Bug c/55406] New: Again: pasting xxx and xxx does not give a valid preprocessing token zhouzhenghui at gmail dot com
2012-11-20 1:52 ` [Bug c/55406] " pinskia at gcc dot gnu.org
2012-11-20 2:20 ` zhouzhenghui at gmail dot com
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).