This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1936: pseudo-construction and >> operator



>Number:         1936
>Category:       c++
>Synopsis:       pseudo-construction and >> operator
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 11 14:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jens.Maurer@gmx.net
>Release:        gcc version 2.97 20010208 (experimental)
>Organization:
>Environment:
Linux menuett 2.2.13 #1 Mon Nov 8 15:51:29 CET 1999 i686 unknown
glibc 2.2.1
>Description:
The code below is legal, but rejected by gcc.

constant_shift_operator.cc:2: parse error before `>>' token
>How-To-Repeat:

int i = (int()) >> 5;

>Fix:
As a workaround, use int(0) instead of int()
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]