Top "Predefined-macro" questions

How to use __DATE__ and __TIME__ predefined macros in as two integers, then stringify?

Want to use __ DATE __ and __ TIME __ as integer for giving automated version to my code in compile time. #define STRINGIZER(…

c macros predefined-macro
How can I use #pragma message() so that the message points to the file(lineno)?

In order to add 'todo' items into my code, I want to put a message in the compiler output. I …

c++ visual-studio-2010 pragma line-numbers predefined-macro
What is this #ifdef __GNUC__ about?

I've found these lines in the libmagic code. What do they mean? #ifdef __GNUC__ __attribute__((unused)) #endif What does __GNUC__ …

c visual-studio gcc predefined-macro
How to set predefined macros in Code::Blocks

Is there a way to set some predefined Macros for my local installation of Code::Blocks. To elaborate on that, …

c++ g++ codeblocks predefined-macro
__cplusplus < 201402L return true in gcc even when I specified -std=c++14

The directive: #ifndef __cplusplus #error C++ is required #elif __cplusplus < 201402L #error C++14 is required #endif The command-line: g++ …

c++ gcc g++ c++14 predefined-macro
How can I write a 'clamp' / 'clip' / 'bound' macro for returning a value in a given range?

I often find myself writing something like int computedValue = ...; return MAX(0, MIN(5, computedValue)); I would like to be able to …

objective-c c macros predefined-macro