public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Karel Gardas <kgardas@objectsecurity.com>
To: gcc@gcc.gnu.org
Subject: gcc 2.95.x interesting c++ parser error (bug).
Date: Sat, 20 Apr 2002 08:28:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.43.0204201637580.476-100000@thinkpad.objectsecurity.cz> (raw)


Hi,

It looks like that c++ parser in gcc 2.95.x doesn't like some param names
like '__op' and '__rs'. These names confuse parser and then it produce
error messages regarding ''declaration of operator '<something>' as
non-function''

Here is small example:


class Foo
{
public:
    void
    method(char* __op_name); // OK

    //  gcc2.95-wrong-param-name-bug.cc:9: declaration of `operator ' as non-function
    //  gcc2.95-wrong-param-name-bug.cc:9: confused by earlier errors, bailing out
    void
    method2(int __op); // error

    void
    method3(long __reply_status); // OK

    //  gcc2.95-wrong-param-name-bug.cc:17: declaration of `operator >>' as non-function
    //  gcc2.95-wrong-param-name-bug.cc:17: confused by earlier errors, bailing out
    void
    method4(short __rs); // error
};

int
main()
{
    return 0;
}


I know that the main focus of development is concentrated on upcoming gcc
3.1 release, but I think that someone might be interested (for example
Debian or FreeBSD 4.x gcc maintainers) and so I've posted this email,
because it takes me some time to find exact place in my sources which
cause this bug (these sources are of course perfectly OK with gcc 3.1).

Cheers,

Karel

PS: Tested on Debian GNU/Linux 3.0 and FreeBSD 4.5.

bash-2.05$ gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD]
bash-2.05$

thinkpad:~/cvs/mt-micosec-csiv2/mico$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
thinkpad:~/cvs/mt-micosec-csiv2/mico$
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com

             reply	other threads:[~2002-04-20 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-20  8:28 Karel Gardas [this message]
2002-04-21  4:32 ` Florian Weimer
2002-04-21 11:47   ` Karel Gardas
2002-04-21 15:05     ` Florian Weimer
2002-04-25  3:31       ` Jason Merrill
2002-04-25  8:45         ` Karel Gardas
2002-04-25 10:59           ` Phil Edwards

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=Pine.LNX.4.43.0204201637580.476-100000@thinkpad.objectsecurity.cz \
    --to=kgardas@objectsecurity.com \
    --cc=gcc@gcc.gnu.org \
    /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).