c++/1936: pseudo-construction and >> operator
Jens.Maurer@gmx.net
Jens.Maurer@gmx.net
Sun Feb 11 14:06:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list