Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 Can't use the operator "#"

closed
nobody
None
5
2007-11-22
2007-11-21
Incubos
No

An error happens when preprocessing the file from standard test suite
CTorture. CPP preprocesses the file successfully.

Diagnostics:

/home/zakh/work/panasonic/cparser/trunk/950919-1.c:2: warning: Macro "empty" is expanded to 0 token
#if empty#cpu(m68k)
macro "empty" defined as: #define empty /* /home/zakh/work/panasonic/cparser/trunk/950919-1.c:1 */
/home/zakh/work/panasonic/cparser/trunk/950919-1.c:2: error: Can't use the operator "#"
#if empty#cpu(m68k)
f (){}

Discussion

  • Incubos
    Incubos
    2007-11-21

    Try to preprocess this file using mcpp

     
    Attachments
  • Kiyoshi Matsui
    Kiyoshi Matsui
    2007-11-22

    Logged In: YES
    user_id=1509677
    Originator: NO

    This is quite a different thing from '#' (stringizing) operator of
    Standard C preprocessing. This is a GCC's local feature of "assertion",
    such as '#cpu(m68k)'. MCPP does not support it. MCPP is not 100%
    compatible with GCC, even in GCC-specific-build.

    Note that even GCC has obsoleted this feature long since V.3.1.

    By the way, what is the "standard test suite"? GCC's testsuite? It is
    not a standard test suite.

     
  • Incubos
    Incubos
    2007-11-22

    Logged In: YES
    user_id=1876655
    Originator: YES

    Yes, GCC's test suite. Isn't it standard for GCC? :) Ok, I see, you are right. Thank you for explanations.

     
  • Incubos
    Incubos
    2007-11-22

    • status: open --> closed