Issue
Like the title, how do I use -Wall option on gcc/g++ and turn off the multi-line comments warnings?
The comment looks like that:
// Comment starts here \
// and end here (the // at the beginning is not necessary)
Solution
You could use /* .. */ for the multiline comment.
/* foo bar comment
lala blah
*/
Edit:
I found a solution in another post here: How can I hide "defined but not used" warnings in GCC?
If you add the option -Wno-comment
, the warning is gone.
gcc -Wall -Wno-comment test.c -o test
It's also explained here: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Answered By - Matthias Answer Checked By - Marie Seifert (WPSolving Admin)