c-preprocessor
Understanding #define #ifdef and Macros in the Linux Kernel
I have just started work on auditing the Linux kernel and I cant help but notice in the source code the multitude of #defines and #ifdefs. I cant seem to understand exactly how these are being used. I[详细]
2023-04-12 05:28 分类:问答Any script to strip out the compiled source in C++
In my C++ file, I have #ifdef DEBUG then blah #else blooh. I want to strip out all text that does not get compiled after preprocessing, so that if DEBUG is not defined, then all statement of th[详细]
2023-04-12 05:18 分类:问答Is there a way to escape a C preprocessor directive?
What I am trying to do is have the C preprocessor output #ifdef, #else, and #endif directives. That is, I would like to somehow \"escap开发者_StackOverflow社区e\" a directive so that the output of the[详细]
2023-04-11 23:42 分类:问答Weird #define declaration, can't understand to what it expands
I have this #define statement in legacy code I\'m inspecting in C. #开发者_C百科define STEP(x)case x: STEP ## x : WPAN_Startup_Step = x;[详细]
2023-04-11 17:34 分类:问答Objective C "#if" syntax
I\'m a little confused by the \"pound if\" or #if syntax I see when I look at so开发者_C百科me classes.[详细]
2023-04-11 02:58 分类:问答Detecting if a class/type is defined prior to compiling
This is similar to a few other threads i have found, but I haven\'t found the answer I need yet. I would appreciate a direct answer, even if it is \"no, you can\'t do that\".[详细]
2023-04-10 12:38 分类:问答Get SFML cross-platform typedefs in SWIG
I\'m writing an C++ game and I\'m connecting it with Lua. The tool I chose for this task was SWIG, since I want to make my game available to be written in python or some other language. I\'m also usin[详细]
2023-04-10 09:58 分类:问答How can I conditionally include #ident directives in a macro?
A bug in gcc-4.4 causes the #ident directive to emit a warning.We don\'t allow warnings in our compiler (-Werror) so I need to turn these off when compiled on certain GCC compiler versions.(See Best r[详细]
2023-04-10 02:04 分类:问答Is there a way to check how a macro "expands" in C or Objective-C
A mac开发者_开发问答ro is a preprocessor right. Sometimes we set things right sometimes we don\'t.[详细]
2023-04-09 06:04 分类:问答Preprocessor macro value to Objective-C string literal
I have a preprocessor macro defined in build settings FOO=BAR That value I want to massage into an Objective-C string l开发者_JS百科iteral that can be passed to a method.The following #define does[详细]
2023-04-09 05:41 分类:问答