Bug 60374 - Bogus warning on comments ending in '\ '
Summary: Bogus warning on comments ending in '\ '
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-26 22:57 UTC by Enrico Scholz
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-02-26 22:57:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2002-02-26 22:57:17 UTC
Description of Problem:

| $ cat >foo.cc <<EOF
| // line 1 \ 
| // line 2
| EOF
| $ 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):

gcc-3.1-0.21

Comment 1 Jakub Jelinek 2002-02-26 23:02:17 UTC
See http://gcc.gnu.org/ml/gcc/2002-02/msg01184.html


Note You need to log in before you can comment on or make changes to this bug.