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

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