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

Reply via email to