Article View: gnu.gcc.bug
Article #1918[olsson@ivy: gcc 1.30 hangs]
From: W. Wilson Ho
Date: Tue, 08 Nov 1988 00:24
Date: Tue, 08 Nov 1988 00:24
55 lines
1880 bytes
1880 bytes
I got the following bug report from a local user. The version of gcc
is 1.30, running on a VAX 8600 under ultrix 2.2
> Date: Mon, 7 Nov 88 12:46:50 PST
> From: olsson@ivy (Ron Olsson)
> To: gnu@ivy.ucdavis.edu
> Cc: mcnamee@ivy.ucdavis.edu, sr-project@arizona.edu@arizona.edu
> Subject: gcc 1.30 hangs
>
> gcc hangs as follows
>
> % gcc -c z.c
> z.c: In function Pt:
> z.c:7: unterminated comment
> z.c:7: parse error at end of input
> ^C%
>
> on attached program
>
> #define RE(n) *(int*)(rv+n)
> static Pt(rv)
> char *rv;
> {
> RE(24)=(RE(20)/RE(16));
> }
>
>
After running the preprocessor, I got:
# 1 "test.c"
static Pt(rv)
char *rv;
{
*(int*)(rv+24) =(*(int*)(rv+20) /*(int*)(rv+16) );
}
Apparently gcc takes the /*... as the start of the comment. But
according to the ANSI draft, comment elimination occurs before macro
replacement. So this is a bug. Secondly, even if there is
unterminated comment, gcc should not go into infinite loop. So this
is bug number two.
Thanks for your attention!
Wilson Ho
-------------------------------------------------------------------------------
W. Wilson Ho | INTERNET: how@iris.ucdavis.edu
Division of Computer Science | UUCP: {lll-crg, ucbvax}!ucdavis!iris!how
EECS Department |
University of California | Phone: (916)752-7109
Davis, CA 95616 |
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<8811080024.AA02964@iris.ucdavis.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!uunet!tut.cis.ohio-state.edu!IRIS.UCDAVIS.EDU!howShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!uunet!tut.cis.ohio-state.edu!IRIS.UCDAVIS.EDU!how From: how@IRIS.UCDAVIS.EDU (W. Wilson Ho) Newsgroups: gnu.gcc.bug Subject: [olsson@ivy: gcc 1.30 hangs] Message-ID: <8811080024.AA02964@iris.ucdavis.edu> Date: 8 Nov 88 00:24:34 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 54