Talk:C preprocessor

message: Checked and added that the C-compilers by Intel and IBM also support the #warning directive. Is this sufficient to remove the weasel word warning?  —Preceding unsigned comment added by 141.84.9.25 (talk) 15:06, 11 November 2009 (UTC)
thread_title:  #warning 

message: The article is too detailed.  Wikipedia is not an instruction manual. - Richfife (talk) 19:26, 28 February 2011 (UTC)
replies: text: Every time I go to the pharmacy to buy shoes, their selection totally sucks.  Just a couple of cheap flip-flops.  The pharmacy totally sucks.  It's completely useless.  I'm not going there anymore. - Richfife (talk) 17:17, 12 April 2013 (UTC)
thread_title:  I'm going to start moving sections over to wikibooks 

message: Encyclopedant (talk) 21:44, 24 September 2011 (UTC)
thread_title:  "OlderSmall" example should be much simpler 

message: I'd like to change the syntax highlighting to CPP from C (source lang="cpp").  The CPP highlighting is more attractive, and is what C (programming language) uses.  Comments?  Rwessel (talk) 01:04, 15 October 2011 (UTC)
thread_title:  Syntax highlighing 

message: Can we get a reference for the claim that the C preprocessor is Turing Complete? I have heard mention
of it before, but only as a hack that required the use of external tools or something that required
non-standard behavior, I forget which and where I heard it. It is a pretty big claim however that is
not referenced. If it is true, is it true for the original C preprocessor, the C89, C99 or C11 preprocessor?  — Preceding unsigned comment added by 212.77.163.111 (talk) 09:30, 18 February 2015 (UTC)
replies: text: The article says it's not Turing Complete.  It's far from it.  I think you may have misread. - Richfife (talk) 15:30, 18 February 2015 (UTC)

text: It's not Turing complete because it lacks recursion or iteration. M4, which supports recursion, is. Rp (talk) 15:02, 19 February 2015 (UTC)

text: It exist an interpreter for brainfuck written enteirly in c preprocessor,so it is (surprisingly enough) turing complete,althought you still can't do much with it--Pasqui23(talk-please understand,my  native language is not english) 00:38, 20 February 2015 (UTC)
replies: text:  Here's a quote from that exact page: "There has been much speculation on the turing completeness of the C Preprocessor. Does this act as a demonstrative proof that it is? The short answer - not really." - Richfife (talk) 00:51, 20 February 2015 (UTC)
replies: text: I have to agree, this is not really a what I'd consider a demonstration that the PP is Turing complete.  Rwessel (talk) 05:24, 20 February 2015 (UTC)

text: The explanation is a little clearer. However it still presents the difference between the ability to express bounded iteration and the ability to express unbounded iteration as a "subtlety", while it is actually one of the fundamental cornerstones of reasoning about programming. With only fixed-bounded iteration, you can do with a fixed (and precomputable) amount of memory, which makes implementing and reasoning about programs a lot easier.  Some C compilers for embedded systems actually remove unbounded iteration and recursion from the language. Rp (talk) 17:39, 20 February 2015 (UTC)
replies: text:  This gets into what I call pure vs. applied engineering.  Can you make a case that the preprocessor is sort of, kind of, Turing complete?  Yes.  Would Turing slap you upside the head if he was still around for doing it?  Also yes.  Presenting the preprocessor as Turing Complete isn't doing anybody any favors. - Richfife (talk) 18:40, 20 February 2015 (UTC)
thread_title:  Turing completeness? 

message: The article includes this example about #line:
 #line 314 "pi.c"
 puts("line=" #__LINE__ " file=" __FILE__);
and claims it generates this:
 puts("line=314 file=pi.c");
I've tried it and it gave me an error. I think the syntax of using # outside a macro definition is incorrect. This worked for me:
 #define XSTRINGIFY(x) #x
 #define STRINGIFY(x) XSTRINGIFY(x)
 #line 314 "pi.c"
 puts("line=" STRINGIFY(__LINE__) " file=" __FILE__);
As did this:
 #line 314 "pi.c"
 printf("line=%d file=%s\n", __LINE__, __FILE__);
Does that need to be corrected, or did I miss something? --pgimeno (talk) 22:30, 7 March 2015 (UTC)
replies: text: Nope, you're right.  Fixed.  Rwessel (talk) 23:43, 7 March 2015 (UTC)
thread_title:  #line example wrong? 

message: The article does not explain how comments can be done for .h files. I came to wikipedia first in order to find out whether /* */ is valid
or whether I have to use // instead. Now I have to google for another site. :-)  2A02:8388:1600:3280:BE5F:F4FF:FECD:7CB2 (talk) 17:10, 4 April 2016 (UTC)
thread_title:  Comments 

message: Both GCC and MSVC both have a concept of a preprocessor comment. If a line comment is preceded with a # the comment will be consumed by the preprocessor and not included in the output of the preprocessor. This effect is only ever noticed if the compiler is run as only a preprocessor. So a line that starts "#//" is replaced with an empty line. --192.107.155.6 (talk) 13:42, 20 July 2018 (UTC)
thread_title:  Preprocessor Comments 

message: The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for speedy deletion:
* 
You can see the reason for deletion at the file description page linked above. —Community Tech bot (talk) 19:08, 18 August 2022 (UTC)
thread_title:  A Commons file used on this page or its Wikidata item has been nominated for speedy deletion 

message: Neither "cpp" nor "CPP" are introduced before they appear in sub section Other uses.
What are they? The name of an executable and a shorthand for "C preprocessor", respectively? For the former, restricted to a particular compiler environment, like GCC?
Is "cpp" the same as "CPP"?
--Mortense (talk) 13:37, 20 May 2023 (UTC)
thread_title:  Introduction of "cpp" and "CPP"