This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: unexpected parse error in #define
- To: Zack Weinberg <zackw at Stanford dot EDU>
- Subject: Re: unexpected parse error in #define
- From: Erik Talvola <talvola at yahoo dot com>
- Date: Fri, 6 Oct 2000 14:25:09 -0700 (PDT)
- Cc: gcc-bugs at gcc dot gnu dot org
--- 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/