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
{{ message }}
Repository navigation
# operator drops the space that a comment stands for #718
In translation phase 3 each comment is replaced by one space character (C §5.1.1.2, C++ [lex.phases]). When an argument is stringified with #, each group of whitespace between tokens becomes one space (C §6.10.3.2), so a comment
between two tokens must give a space in the string.
#definestr(x) #x
str(a/**/b)
gcc and clang output "a b". simplecpp outputs "ab".
When comments are kept in the output (like gcc -C), gcc keeps the comment in the string: "a/**/b". simplecpp already does the same, and that should not change.
Activity
Fix #718 (# operator drops the space that a comment stands for)
Fix cppcheck-opensource#718 (# operator drops the space that a commen…