This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/6489: tradcpp0 fails on line ending with '\r\n'
- From: winter at alum dot mit dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 27 Apr 2002 17:22:48 -0000
- Subject: preprocessor/6489: tradcpp0 fails on line ending with '\r\n'
- Reply-to: winter at alum dot mit dot edu
>Number: 6489
>Category: preprocessor
>Synopsis: tradcpp0 fails on line ending with '\r\n'
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 27 10:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: winter@alum.mit.edu
>Release: gcc-3.0.4
>Organization:
>Environment:
Athlon, Redhat 6.2, gcc-3.0.4 built/installed from source using
default configuration
>Description:
When g77 preprocesses a file (using tradcpp0), if it encounters
a line like
#include "fname"\r\n
it fails with the message
#include expects "fname" or <fname>
Stepping through tradcpp0 with gdb reveals that it fails
to strip off the trailing \r (although it successfully handles
the \n) and thus concludes that the line is bogus.
Furthermore, manual removal of \r from the file (using
for instance fromdos) "fixes" the problem.
>How-To-Repeat:
Replace any line of the form
#include "fname"\n
with
#include "fname"\r\n
in a fortran source code and the problem should be repeatable.
>Fix:
Whatever code strips the trailing \n should also include
stripping of trailing \r\n combinations.
>Release-Note:
>Audit-Trail:
>Unformatted: