You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C99 Standard states that a function-like macro can be separated from its argument list by whitespace.
If the macro name on one line is followed by a directive and then the argument list on the next line, the macro name is considered to have no arguments and is therefore not replaced.
pcpp doesn't do this. Instead, it acts as though the macro and its arguments are in adjacent lines and expands the macro.
Example:
#define X(a) (a) + 1
X
#
(3)
Should result in
X
(3)
GCC produces this result.
But pcpp produces
(3) + 1
The reason is that pcpp continues to collect unexpanded tokens until it sees an #include, #define, #endif, or the end of the source file, before expanding what it has collected.
The text was updated successfully, but these errors were encountered:
The C99 Standard states that a function-like macro can be separated from its argument list by whitespace.
If the macro name on one line is followed by a directive and then the argument list on the next line, the macro name is considered to have no arguments and is therefore not replaced.
pcpp doesn't do this. Instead, it acts as though the macro and its arguments are in adjacent lines and expands the macro.
Example:
Should result in
GCC produces this result.
But pcpp produces
The reason is that pcpp continues to collect unexpanded tokens until it sees an #include, #define, #endif, or the end of the source file, before expanding what it has collected.
The text was updated successfully, but these errors were encountered: