We're now rejecting the minimum/maximum operator in some c++ code.
This is a new regression.  It works with 20060806.

(sid)106:[EMAIL PROTECTED]: ~] /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:[EMAIL PROTECTED]: ~] 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:[EMAIL PROTECTED]: ~]

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

Reply via email to