public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-30  1:05 gdr
  0 siblings, 0 replies; 6+ messages in thread
From: gdr @ 2002-07-30  1:05 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, gdr, gsd, nobody

Synopsis: parse error on valid C++ code (parse error before `&&' token)

Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-By: gdr
Responsible-Changed-When: Tue Jul 30 01:05:53 2002
Responsible-Changed-Why:
    Analyzed.
State-Changed-From-To: open->closed
State-Changed-By: gdr
State-Changed-When: Tue Jul 30 01:05:53 2002
State-Changed-Why:
    Not a bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7440


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-31  0:36 Gilles Depeyrot
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Depeyrot @ 2002-07-31  0:36 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7440; it has been noted by GNATS.

From: "Gilles Depeyrot" <gsd@dolphin.fr>
To: "Neil Booth" <neil@daikokuya.co.uk>,
	"Gabriel Dos Reis" <gdr@integrable-solutions.net>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
Date: Wed, 31 Jul 2002 09:28:07 +0200

 Hi,
 
 In any case, thanks for your time and for a great product!
 
 Best regards,
 Gilles
 
 > Neil Booth <neil@daikokuya.co.uk> writes:
 > 
 > | We really need to use CPP to print tokens, the diagnostic in this
 > | case is awful,  and quite misleading.
 > 
 > Indeed.
 > 
 > That is what I told the submitter this morning (in private mail). 
 > Queued for after I'm finished with the pretty-printer thingy.
 > 
 > -- Gaby
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-30 11:06 Gabriel Dos Reis
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2002-07-30 11:06 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7440; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Neil Booth <neil@daikokuya.co.uk>
Cc: gsd@dolphin.fr, gcc-gnats@gcc.gnu.org
Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
Date: 30 Jul 2002 19:59:01 +0200

 Neil Booth <neil@daikokuya.co.uk> writes:
 
 | We really need to use CPP to print tokens, the diagnostic in this
 | case is awful,  and quite misleading.
 
 Indeed.
 
 That is what I told the submitter this morning (in private mail). 
 Queued for after I'm finished with the pretty-printer thingy.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-30  8:56 Neil Booth
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Booth @ 2002-07-30  8:56 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7440; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: gdr@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	gsd@dolphin.fr, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
Date: Tue, 30 Jul 2002 16:49:41 +0100

 gdr@gcc.gnu.org wrote:-
 
 > Synopsis: parse error on valid C++ code (parse error before `&&' token)
 > 
 > Responsible-Changed-From-To: unassigned->gdr
 > Responsible-Changed-By: gdr
 > Responsible-Changed-When: Tue Jul 30 01:05:53 2002
 > Responsible-Changed-Why:
 >     Analyzed.
 > State-Changed-From-To: open->closed
 > State-Changed-By: gdr
 > State-Changed-When: Tue Jul 30 01:05:53 2002
 > State-Changed-Why:
 >     Not a bug.
 
 We really need to use CPP to print tokens, the diagnostic in this
 case is awful,  and quite misleading.
 
 Neil.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-30  1:06 Gabriel Dos Reis
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2002-07-30  1:06 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7440; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: gsd@dolphin.fr
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
Date: 30 Jul 2002 10:02:02 +0200

 gsd@dolphin.fr writes:
 
 [...]
 
 | Compiling the one line C++ source file using g++:
 | 
 | inline const long and(const long L, const long R) { return (L && R); }
                     ^^^
 | 
 | produces the error message:
 | 
 | 1: parse error before `&&' token
 
 Indeed.  This is not a bug in the compiler.  It is a bug in your
 program source: "and" is an alternate spelling for "&&" so you cannot
 use it as a regular identifier.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 6+ messages in thread

* c++/7440: parse error on valid C++ code (parse error before `&&' token)
@ 2002-07-30  0:46 gsd
  0 siblings, 0 replies; 6+ messages in thread
From: gsd @ 2002-07-30  0:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7440
>Category:       c++
>Synopsis:       parse error on valid C++ code (parse error before `&&' token)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 30 00:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     gsd@dolphin.fr
>Release:        gcc (GCC) 3.1.1
>Organization:
>Environment:
Solaris 2.5.1
>Description:
Compiling the one line C++ source file using g++:

inline const long and(const long L, const long R) { return (L && R); }

produces the error message:

1: parse error before `&&' token

This code compiles fine with gcc-3.1.1 (C), gcc-2.95.3 (C), g++-2.95.3 (C++), MS Visual C++ (C/C++).
>How-To-Repeat:
Compile the following source using g++:

inline const long and(const long L, const long R) { return (L && R); }
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-07-31  7:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-30  1:05 c++/7440: parse error on valid C++ code (parse error before `&&' token) gdr
  -- strict thread matches above, loose matches on Subject: below --
2002-07-31  0:36 Gilles Depeyrot
2002-07-30 11:06 Gabriel Dos Reis
2002-07-30  8:56 Neil Booth
2002-07-30  1:06 Gabriel Dos Reis
2002-07-30  0:46 gsd

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).