Red Hat Bugzilla – Bug 60374
Bogus warning on comments ending in '\ '
Last modified: 2008-05-01 11:38:01 EDT
Description of Problem:
| $ cat >foo.cc <<EOF
| // line 1 \
| // line 2
| $ g++ -c -Wall foo.cc ## with plain 'cpp' also
| foo.cc:1:1: warning: multi-line comment
(I do not know if bugzilla/HTML preserves the final whitespace in line 1, but it
ends with '\ ').
The C++ standard speaks only about "a new-line character and an immediately
preceding backslash" in chapter 2.1, and not about a NL character and a
backslash plus whitespaces. Therefore, I think the preprocessor and not the
program is wrong.
Version-Release number of selected component (if applicable):