python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Why does GCC remove the whitespace between the preprocessing tokens?
Sample code:
#define X(x,y) x y
#define STR_(x) #x
#define STR(x) STR_(x)
STR(X(Y,Y))
Invocations:
$ gcc t222.c -std=c11 -pedantic -Wall -Wextra -E -P
"Y Y"
$ gcc t222.c -std=c11 -pedant...
pmor
Votes: 0
Answers: 1
Make C++ preprocessor add a character at the end of each line
I am implementing some compile-time check which should base on a CSV file and I am trying to load it a bit hacky way:
constexpr std::variant<int, const char*> test[] = {
#include "data.csv&...
knopers8
Votes: 0
Answers: 1
C Macro define a variable to itself with double quotes
I don't know how to describe my question in the title precisely.
What I want the final result of macro expansion to be:
#define HELLO "HELLO"
#define WORLD "WORLD"
But there could...
Tomingsun
Votes: 0
Answers: 1
Why is the C preprocessor a subject of undefined behavior?
I can understand that:
One of the origins of the UB is a performance increase (e.g. by removing never executed code, such as if (i+1 < i) { /* never_executed_code */ }; UPD: if i is a signed integ...
pmor
Votes: 0
Answers: 3