This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

__ESCAPE__ MACRO?

#define INTMAX_C(x) __ESCAPE__(x ## ll)

This Macro was copied from the ARM\RV\INC\stdint.h header file.
My question is the function of __ESCAPE__. It appears to be a predefined macro to implement an escape sequence. I have be unable to find the macro or any info. Is this a standard C macro? Did I miss something in my C classes a 100 years ago?
I have no problem. I would just like to know what I don't know.
Bradford

Parents
  • You should be fine by just defining:

    #define __ESCAPE__(x) x
    

    to allow you to glue together two symbols using the ## preprocessor operator.

    Long-time-ago, it was possible to use tricks like a/**/b or similar to glue symbols together, but the standard requires that a preprocessor must always replace comments with some form of white-space, to make sure that two symbols isn't inadvertedly converted to one. Hence, the need for the new preprocessor operator ##.

Reply
  • You should be fine by just defining:

    #define __ESCAPE__(x) x
    

    to allow you to glue together two symbols using the ## preprocessor operator.

    Long-time-ago, it was possible to use tricks like a/**/b or similar to glue symbols together, but the standard requires that a preprocessor must always replace comments with some form of white-space, to make sure that two symbols isn't inadvertedly converted to one. Hence, the need for the new preprocessor operator ##.

Children