[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c/44355]  New: "\ " at the end of a comment
From:       "romain dot failliot at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2010-05-31 17:25:37
Message-ID: bug-44355-19264 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

Hi!
We've seen a strange bug at work today.
Simply copy/paste this code:

#include <stdio.h>
int main()
{
    printf("Hello\n"); // \ 
    printf("World\n");
    return 0;
}

Verify there is a space after the backspace.
The compilation goes well (there is a warning though with -Wall), but at the
execution you'll only see "Hello". The word "World" has been wiped out by the
\.
It seems like the begin and end spaces on the line are trimmed and so it
doesn't detect the character '\ '.

If it's the standard, then it's not a bug. But I must admit I'm not sure...

Thanks,
Romain


-- 
           Summary: "\ " at the end of a comment
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: romain dot failliot at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44355

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic