This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28918] New: [4.2 regression] rejects minimum/maximum operator in some c++ code
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 20:38:32 -0000
- Subject: [Bug c++/28918] New: [4.2 regression] rejects minimum/maximum operator in some c++ code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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