Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The standard required whitespace between the preprocessing tokens may be removed #241

Open
pmor13 opened this issue Feb 21, 2022 · 0 comments

Comments

@pmor13
Copy link

pmor13 commented Feb 21, 2022

$ cat t10.c
#define X(x,y) 	x y
#define STR_(x) #x
#define STR(x) 	STR_(x)
STR(X(Y,Y))

$ ./simplecpp t10.c
"YY"

The whitespace is required by the standard.

Extra: running ./simplecpp built with g++ or clang++ may lead to exit status 127:

$ g++ -o simplecpp main.cpp simplecpp.cpp && echo OK && ./simplecpp
OK
# exit status 127

$ g++ --version
g++ (GCC) 11.1.0

$ clang++ -o simplecpp main.cpp simplecpp.cpp && echo OK && ./simplecpp
OK
# exit status 127

$ clang++ --version
clang version 8.0.1 (tags/RELEASE_801/final)

$ LLVM/12.0.0/bin/clang++ -o simplecpp main.cpp simplecpp.cpp && ./simplecpp
Syntax:
simplecpp [options] filename
  -DNAME          Define NAME.
  -IPATH          Include path.
  -include=FILE   Include FILE.
  -UNAME          Undefine NAME.

$ uname -a
CYGWIN_NT-10.0 xxx 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin
datadiode added a commit to datadiode/simplecpp that referenced this issue Sep 2, 2024
…#241) / Fix an integer truncation warning in testrunner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant