When compiling C/C++ code using nvcc or any C++11-compliant compiler, a warning may appear due to the usage of the PRId64 macro in printf statements. The warning:
/home/said/Desktop/pyccel/__pyccel__/test.cu:17:16: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
17 | printf("%"PRId64"\n", a);
Expected behavior
This warning is triggered because C++11 requires a space between the % literal and the PRId64 macro in format strings.
A clear and concise description of what you expected to happen.
Describe the bug
When compiling C/C++ code using nvcc or any C++11-compliant compiler, a warning may appear due to the usage of the PRId64 macro in printf statements. The warning:
To Reproduce
Provide code to reproduce the behavior: test.py
test.cu
Error details
Provide the generated code, or the error message:
Expected behavior
This warning is triggered because C++11 requires a space between the % literal and the PRId64 macro in format strings. A clear and concise description of what you expected to happen.
Language
cuda