public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Sean D'Epagnier <geckosenator@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: fixed-point support in c++
Date: Tue, 16 Mar 2010 01:32:00 -0000	[thread overview]
Message-ID: <4B9EE319.5080204@gmail.com> (raw)
In-Reply-To: <b9d4feda1003151503j3e8e2e27r68e169a177d8a941@mail.gmail.com>

On 15/03/2010 22:03, Sean D'Epagnier wrote:

> -  { "_Fract",           RID_FRACT,     D_CONLY | D_EXT },
> -  { "_Accum",           RID_ACCUM,     D_CONLY | D_EXT },
> -  { "_Sat",             RID_SAT,       D_CONLY | D_EXT },
> +  { "_Fract",           RID_FRACT,     D_EXT },
> +  { "_Accum",           RID_ACCUM,     D_EXT },
> +  { "_Sat",             RID_SAT,       D_EXT },

> Now the error is:
> 
> test.cpp:5:4: error: expected primary-expression before ‘_Accum’
> 
> Does anyone have clues as to the problem?  

  The problem is that it won't be as simple as that.  You'll have to extend
the C++ parser to accept those new RID_ values that it was previously never
expecting to see in those contexts, I would think (but haven't verified
against the source yet).  The C++ parser is a hand-coded recursive-descent
parser, so I wouldn't expect it to be generically able to deal with
previously-unknown token types suddenly appearing in its input stream at
arbitrary points.

    cheers,
      DaveK

  reply	other threads:[~2010-03-16  1:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16  1:28 Sean D'Epagnier
2010-03-16  1:32 ` Dave Korn [this message]
2010-03-16 10:12   ` Sean D'Epagnier
2010-03-19 13:04     ` Dave Korn
2010-04-13 15:34       ` Sean D'Epagnier
2010-04-13 16:33         ` Dave Korn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9EE319.5080204@gmail.com \
    --to=dave.korn.cygwin@googlemail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geckosenator@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).