Top "C-preprocessor" questions

A textual macro processor applied before compiling C and C++ language programs.

Preprocessor output

How do I view the output produced by the C pre-processor, prior to its conversion into an object file? I …

gcc macros c-preprocessor
Portability of #warning preprocessor directive

I know that the #warning directive is not standard C/C++, but several compilers support it, including gcc/g++. But …

c++ compiler-construction warnings c-preprocessor portability
What is the NDEBUG preprocessor macro used for (on different platforms)?

I'm interested in what purpose various platforms / compilers ("implementations") / frameworks assign to the the C and C++ preprocessor macro NDEBUG. …

c++ c cross-platform c-preprocessor ndebug
Can the C preprocessor be used to tell if a file exists?

I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run …

c++ include c-preprocessor
What is the meaning of lines starting with a hash sign and number like '# 1 "a.c"' in the gcc preprocessor output?

I print out the output of C preprocessor by using gcc -E a.c The output contains many lines like # 1 "…

c gcc c-preprocessor
Expand macros inside quoted string

Possible Duplicate: C Macros to create strings I have a function which accepts one argument of type char*, like f("…

c macros c-preprocessor c-strings
Comma in C/C++ macro

Say we have a macro like this #define FOO(type,name) type name Which we could use like FOO(int, …

c++ c macros c-preprocessor
C Macro for minimum of two numbers

I want to make a simple macro with #define for returning the smaller of two numbers. How can i do …

c c-preprocessor minimum
What are C macros useful for?

I have written a little bit of C, and I can read it well enough to get a general idea …

c macros c-preprocessor language-design language-features
Can #if pre-processor directives be nested in C++?

I have a question about Pre-processor directives in c++: For example: #ifndef QUESTION //some code here #ifndef QUESTION //some code …

c++ c-preprocessor preprocessor-directive