unexpected parse error in #define
Erik Talvola
talvola@yahoo.com
Fri Oct 6 14:25:00 GMT 2000
--- Zack Weinberg <zackw@Stanford.EDU> wrote:
> On Fri, Oct 06, 2000 at 09:18:07AM -0700, Erik
> Talvola wrote:
> > > >
> > > > [etalvo@hobo etalvo]$ gcc -c test.c
> > > > test.c:3: parse error before `{'
> > > > [etalvo@hobo etalvo]$ gcc -c test3.c
> > > > [etalvo@hobo etalvo]$
> > >
> > > The odds are overwhelming that the actual
> problem is that there's
> > > a space at the end of line 2 of test.c. In all
> released versions
> > > of GCC, \-newline doesn't trigger continuation
> if there's
> > > whitespace between the \ and the end of the
> line.
> >
> > There is definitely no space there. That's what I
> > first suspected in the original code, but it's not
> the
> > case here.
> >
> > begin 644 test.c
> > B#0HC9&5F:6YE($9/3R!A(%P-"B![(&$H*3L@?0T*#0H-"@``
> > `
> > end
>
> $ uudecode < message
> $ cat -v test.c
> ^M
> #define FOO a \^M
> { a(); }^M
> ^M
> ^M
>
> In the version of GCC you are using, ^M is
> considered horizontal white
> space, and prevents \-newline from continuing lines.
>
> This has been fixed in the development tree, and may
> also have been
> fixed in 2.95 - I thought it hadn't, but the copy
> installed on my
> computer handles your file just fine.
>
> zw
well, now I feel stupid. I counted on Emacs to
display the ^M's when on Unix - obviously I have mine
misconfigured somehow.
thanks
--erik
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
More information about the Gcc-bugs
mailing list