Menu

Defining and Undefining "defined"

Tom Hunt
2008-02-12
2013-05-28
  • Tom Hunt

    Tom Hunt - 2008-02-12

    Using v2.7 Pre-release:

    I believe the following lines should both give errors. However only the #undef generates one. Its not a problem for me, just thought I would mention for completeness.

    #define defined
    #undef defined

    thanks,

    Tom

     
    • Kiyoshi Matsui

      Kiyoshi Matsui - 2008-02-13

      On the contrary, mcpp flags an error at the line:

      #define defined

      and stays silent by default at:

      #undef defined

      , because it does not permit 'defined' macro to be defined, so the macro
      to be undefined never exists.

      These behaviors have not been changed from the beginning of mcpp, and
      are documented in mcpp-manual.html#5.4 and #5.4.7.  I don't think these
      behaviors need any change.

      Does anyone have any opinions on this issue?

       

Log in to post a comment.