This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/6055: gcc-2.95.x: ^M not ignored after #pragma
- From: garloff at suse dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: Tue, 26 Mar 2002 03:23:09 +0100 (CET)
- Subject: preprocessor/6055: gcc-2.95.x: ^M not ignored after #pragma
>Number: 6055
>Category: preprocessor
>Synopsis: gcc-2.95.x: ^M not ignored after #pragma
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Mar 25 18:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Kurt Garloff
>Release: 2.95.3 (SuSE)
>Organization:
SuSE Linux AG
>Environment:
SuSE Linux 7.3 SMP (ix86)
System: Linux pckurt 2.4.18-SMP #4 SMP Sat Mar 23 11:23:04 CET 2002 i686 unknown
Architecture: i686,
Linux,
i686-pc-linux-gnu
glibc-2.2.x
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: N.N.
>Description:
gcc-2.95.x: ^M not ignored after #pragma
>How-To-Repeat:
#pragma prototyped^M
typedef int __sig_atomic_t;
typedef __sig_atomic_t sig_atomic_t;
Compile and watch the compiler barf. (Ctrl-M is ASCII 13 (CR) and
commonly used before ^J (LF) on some "operating systems")
garloff@gum01m:~/Linux $ gcc -c gdgen5.E.c
gdgen5.E.c:3: parse error before sig_atomic_t'
gdgen5.E.c:3: warning: data definition has no type or storage class
garloff@gum01m:~/Linux $ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
PS: Thx to John Ellson (Lucent) for finding this bug!
>Fix:
Either the preprocessor should dump all ^M before evaluating
anything and before passing data to the compiler, or (better)
the compiler should ignore the ^M.
It has been fixed on the 2.96 snapshots that I've seen and
it also is fixed in 3.x.
>Release-Note:
>Audit-Trail:
>Unformatted: