[Bug c++/28918] New: [4.2 regression] rejects minimum/maximum operator in some c++ code
tbm at cyrius dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 31 20:38:00 GMT 2006
We're now rejecting the minimum/maximum operator in some c++ code.
This is a new regression. It works with 20060806.
(sid)106:tbm@usurper: ~] /usr/lib/gcc-snapshot/bin/g++ -c orig.c
orig.c: In member function 'virtual void IBox::Rebuild()':
orig.c:10: error: expected primary-expression before '?' token
orig.c:10: error: expected `:' before ')' token
orig.c:10: error: expected primary-expression before ')' token
zsh: exit 1 /usr/lib/gcc-snapshot/bin/g++ -c orig.c
(sid)107:tbm@usurper: ~] g++-4.1 -c orig.c
orig.c: In member function Âvirtual void IBox::Rebuild()Â:
orig.c:10: warning: minimum/maximum operators are deprecated
(sid)108:tbm@usurper: ~]
Testcase:
extern int XCopyArea (unsigned int);
class IBox
{
virtual void Rebuild ();
int Wlen, xsize;
};
void
IBox::Rebuild ()
{
XCopyArea(Wlen<?(xsize - 4));
}
--
Summary: [4.2 regression] rejects minimum/maximum operator in
some c++ code
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28918
More information about the Gcc-bugs
mailing list